cgf
2025-08-09 569bd97e623c596ac2db49aa65c88966380b6562
折扣已完成现有需求2025/08/09
7个文件已修改
1个文件已添加
112 ■■■■■ 已修改文件
docs/db/0809.sql 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/contract/ContractDto.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/store/ContractServiceDaoImplMapper.xml 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/api/FeeDiscountApi.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/bmo/feeDiscountRuleSpec/IComputeFeeDiscountBMO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/bmo/feeDiscountRuleSpec/impl/ComputeFeeDiscountBMOImpl.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/smo/impl/FeeDiscountInnerServiceSMOImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/db/0809.sql
Binary files differ
java110-bean/src/main/java/com/java110/dto/contract/ContractDto.java
@@ -43,6 +43,10 @@
    private String contractName;
    private String contractNameLike;
    private String partyC;
    private String cLink;
    private String cContacts;
    private String startTime;
    private String endTime;
@@ -539,4 +543,28 @@
    public void setParentContractCodeLike(String parentContractCodeLike) {
        this.parentContractCodeLike = parentContractCodeLike;
    }
    public String getPartyC() {
        return partyC;
    }
    public void setPartyC(String partyC) {
        this.partyC = partyC;
    }
    public String getcLink() {
        return cLink;
    }
    public void setcLink(String cLink) {
        this.cLink = cLink;
    }
    public String getcContacts() {
        return cContacts;
    }
    public void setcContacts(String cContacts) {
        this.cContacts = cContacts;
    }
}
java110-db/src/main/resources/mapper/store/ContractServiceDaoImplMapper.xml
@@ -9,12 +9,12 @@
                             party_a, b_link, party_b,
                             contract_id, obj_id, contract_name, start_time, end_time, state, contract_code, obj_type,
                             operator_link, contract_parent_id,
                             obj_name, obj_person_name, obj_person_id, start_user_id)
                             obj_name, obj_person_name, obj_person_id, start_user_id,party_c,c_link,c_contacts)
        values (#{aLink}, #{aContacts}, #{amount}, #{contractType}, #{storeId}, #{operator}, #{signingTime},
                #{bContacts}, #{partyA}, #{bLink}, #{partyB},
                #{contractId}, #{objId}, #{contractName}, #{startTime}, #{endTime}, #{state}, #{contractCode},
                #{objType}, #{operatorLink}, #{contractParentId},
                #{objName}, #{objPersonName}, #{objPersonId}, #{startUserId})
                #{objName}, #{objPersonName}, #{objPersonId}, #{startUserId},#{partyC},#{cLink},#{cContacts})
    </insert>
    <!-- 查询合同管理信息 add by wuxw 2018-07-03 -->
@@ -29,7 +29,7 @@
        objType,t.operator_link,t.operator_link operatorLink,ct.type_name contractTypeName,ct.audit,td.`name`
        stateName,t.state_desc stateDesc,t.contract_parent_id contractParentId,tt.contract_code parentContractCode,
        tt.contract_name parentContractName,t.obj_name objName, t.obj_person_name objPersonName, t.obj_person_id
        objPersonId,t.start_user_id startUserId,t.create_time createTime
        objPersonId,t.start_user_id startUserId,t.create_time createTime,t.party_c partyC,t.c_link cLink,t.c_contacts cContacts
        from contract t
        LEFT JOIN contract_type ct on t.contract_type = ct.contract_type_id and ct.status_cd = '0' and ct.store_id =
        t.store_id
@@ -111,6 +111,15 @@
        </if>
        <if test="state !=null and state != ''">
            and t.state= #{state}
        </if>
        <if test="partyC !=null and partyC != ''">
            and t.party_c= #{partyC}
        </if>
        <if test="cLink !=null and cLink != ''">
            and t.c_link= #{cLink}
        </if>
        <if test="cContacts !=null and cContacts != ''">
            and t.c_contacts= #{cContacts}
        </if>
        <if test="noStates !=null ">
            and t.state not in
@@ -217,10 +226,21 @@
        <if test="operatorLink !=null and operatorLink != ''">
            , t.operator_link= #{operatorLink}
        </if>
        <if test="partyC !=null and partyC != ''">
            , t.party_c= #{partyC}
        </if>
        <if test="cLink !=null and cLink != ''">
            , t.c_link= #{cLink}
        </if>
        <if test="cContacts !=null and cContacts != ''">
            , t.c_contacts= #{cContacts}
        </if>
        where 1=1
        <if test="contractId !=null and contractId != ''">
            and t.contract_id= #{contractId}
        </if>
    </update>
    <!-- 查询合同管理数量 add by wuxw 2018-07-03 -->
@@ -230,6 +250,15 @@
        left join contract tt on t.contract_parent_id = tt.contract_id and tt.status_cd = '0' and tt.store_id =
        t.store_id
        where 1 =1
        <if test="partyC !=null and partyC != ''">
            and t.party_c= #{partyC}
        </if>
        <if test="cLink !=null and cLink != ''">
            and t.c_link= #{cLink}
        </if>
        <if test="cContacts !=null and cContacts != ''">
            and t.c_contacts= #{cContacts}
        </if>
        <if test="aLink !=null and aLink != ''">
            and t.a_link= #{aLink}
        </if>
service-fee/src/main/java/com/java110/fee/api/FeeDiscountApi.java
@@ -196,13 +196,17 @@
                                                     @RequestParam(value = "custStartTime",required = false) String custStartTime,
                                                     @RequestParam(value = "page") int page,
                                                     @RequestParam(value = "row") int row) throws ParseException {
//        custEndTime = "2025-12-20";
//        custStartTime = "2025-12-11";
        if (cycles == 105){
            if(custStartTime == null){
                throw new IllegalArgumentException("请选择开始时间");
            }
            if(custEndTime == null){
                throw new IllegalArgumentException("请选择结束时间");
            }
            cycles = DateUtil.dayCompare(DateUtil.getDateFromStringB(custStartTime), DateUtil.getDateFromStringB(custEndTime));
        }
        if(!StringUtil.isEmpty(custEndTime)){
            double c = DateUtil.dayCompare(DateUtil.getDateFromStringB(endTime),DateUtil.getDateFromStringB(custEndTime));
            cycles = c;
            return computeFeeDiscountBMOImpl.compute(feeId, communityId, cycles, payerObjId, payerObjType, custStartTime, page, row, custEndTime);
        }
        return computeFeeDiscountBMOImpl.compute(feeId, communityId, cycles, payerObjId, payerObjType, endTime, page, row);
    }
service-fee/src/main/java/com/java110/fee/bmo/feeDiscountRuleSpec/IComputeFeeDiscountBMO.java
@@ -14,4 +14,5 @@
     */
    ResponseEntity<String> compute(String feeId, String communityId, double cycles, String payerObjId, String payerObjType, String endTime, int page, int row) throws ParseException;
    ResponseEntity<String> compute(String feeId, String communityId, double cycles, String payerObjId, String payerObjType, String custStartTime, int page, int row, String custEndTime) throws ParseException;
}
service-fee/src/main/java/com/java110/fee/bmo/feeDiscountRuleSpec/impl/ComputeFeeDiscountBMOImpl.java
@@ -4,6 +4,7 @@
import com.java110.dto.fee.ComputeDiscountDto;
import com.java110.fee.bmo.feeDiscountRuleSpec.IComputeFeeDiscountBMO;
import com.java110.fee.smo.impl.FeeDiscountInnerServiceSMOImpl;
import com.java110.utils.util.DateUtil;
import com.java110.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
@@ -45,4 +46,31 @@
        List<ComputeDiscountDto> computeDiscountDtos = feeDiscountInnerServiceSMOImpl.computeDiscount(feeDetailDto);
        return ResultVo.createResponseEntity(computeDiscountDtos);
    }
    /**
     * 计算折扣
     *
     * @param feeId
     * @param communityId
     * @param cycles
     * @param page
     * @param row
     * @return
     */
    @Override
    public ResponseEntity<String> compute(String feeId, String communityId, double cycles, String payerObjId, String payerObjType, String endTime, int page, int row, String custEndTime) throws ParseException {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        FeeDetailDto feeDetailDto = new FeeDetailDto();
        feeDetailDto.setCommunityId(communityId);
        feeDetailDto.setFeeId(feeId);
        feeDetailDto.setCycles(cycles + "");
        feeDetailDto.setPayerObjId(payerObjId);
        feeDetailDto.setPayerObjType(payerObjType);
        //缴费开始时间为上月到期时间
        feeDetailDto.setStartTime(DateUtil.getDateFromStringB(endTime));
        feeDetailDto.setEndTime(DateUtil.getDateFromStringB(custEndTime));
        feeDetailDto.setRow(row);
        feeDetailDto.setPage(page);
        List<ComputeDiscountDto> computeDiscountDtos = feeDiscountInnerServiceSMOImpl.computeDiscount(feeDetailDto);
        return ResultVo.createResponseEntity(computeDiscountDtos);
    }
}
service-fee/src/main/java/com/java110/fee/smo/impl/FeeDiscountInnerServiceSMOImpl.java
@@ -306,8 +306,8 @@
                }
                if(applyRoomDiscountDtos.get(0).getEndTime() == null){
                    payFeeConfigDiscount.setEndTime(endTime);
                }else if(DateUtil.getDateFromStringB(applyRoomDiscountDtos.get(0).getEndTime()).after(endTime)){
                    payFeeConfigDiscount.setEndTime(endTime);
                }else if(DateUtil.getDateFromStringB(applyRoomDiscountDtos.get(0).getEndTime()).after(feeDetailDto.getEndTime())){
                    payFeeConfigDiscount.setEndTime(feeDetailDto.getEndTime());
                }else{
                    payFeeConfigDiscount.setEndTime(DateUtil.getDateFromStringB(applyRoomDiscountDtos.get(0).getEndTime()));
                }
springboot/src/main/resources/application.yml
@@ -1,6 +1,6 @@
spring:
  profiles:
    active:  devlocal
    active:  debug
#  docker build -t lx .
#