1098226878@qq.com
2022-01-10 093b73aadb022895a02dbbcd64b87613e19b547b
Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity
8个文件已添加
54个文件已修改
1845 ■■■■ 已修改文件
.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/account/AccountDto.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/complaint/ComplaintDto.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/fee/FeeDetailDto.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/mapping/MappingDto.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/onlinePay/OnlinePayDto.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/owner/OwnerCarDto.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/repair/RepairDto.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/repair/RepairSettingDto.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/repair/RepairUserDto.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/resourceStoreUseRecord/ResourceStoreUseRecordDto.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/roomRenovation/RoomRenovationDto.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/po/repair/RepairSettingPo.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/po/resourceStoreUseRecord/ResourceStoreUseRecordPo.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/vo/api/complaint/ApiComplaintDataVo.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/acct/AccountServiceDaoImplMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/acct/OnlinePayV1ServiceDaoImplMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/common/SmsConfigServiceDaoImplMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/community/MappingServiceDaoImplMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/community/PropertyRightRegistrationV1ServiceDaoImplMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/community/RepairSettingServiceDaoImplMapper.xml 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/community/RoomRenovationServiceDaoImplMapper.xml 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/fee/PayFeeDetailDiscountNewV1ServiceDaoImplMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/fee/PayFeeDetailNewV1ServiceDaoImplMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/store/ComplaintServiceDaoImplMapper.xml 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/store/ResourceStoreUseRecordServiceDaoImplMapper.xml 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/store/SmallWeChatServiceDaoImplMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/user/OwnerCarV1ServiceDaoImplMapper.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-utils/src/main/java/com/java110/utils/constant/ServiceCodeRepairDispatchStepConstant.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-utils/src/main/java/com/java110/utils/util/BeanConvertUtil.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-acct/src/main/java/com/java110/acct/dao/impl/AccountServiceDaoImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/bmo/allocationUserStorehouse/impl/AllocationUserStorehouseBMOImpl.java 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/components/assetImport/ImportOwnerCarComponent.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/complaint/ListComplaintsListener.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/fee/PayOweFeeListener.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/login/UserLoginServiceListener.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/ownerRepair/GrabbingRepairListener.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/ownerRepair/ListOwnerRepairsListener.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/ownerRepair/RepairDispatchListener.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/ownerRepair/RepairFinishListener.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/ownerRepair/RepairStartListener.java 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/ownerRepair/RepairStopListener.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/resourceStore/SaveAllocationUserStorehouseListener.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/properties/WechatAuthProperties.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/smo/assetExport/IExportOwnerCarSMO.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/smo/assetExport/impl/ExportOwnerCarSMOImpl.java 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/smo/assetExport/impl/ExportReportFeeSMOImpl.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/smo/assetImport/IImportOwnerCarSMO.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/smo/assetImport/impl/ImportOwnerCarSMOImpl.java 260 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/smo/payment/impl/ToPaySMOImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/smo/impl/FileInnerServiceSMOImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/api/RoomRenovationApi.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/listener/repair/AbstractRepairSettingBusinessServiceDataFlowListener.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/cmd/fee/PayFeeConfirmCmd.java 105 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/cmd/fee/PayFeePreCmd.java 127 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-job/src/main/java/com/java110/job/adapt/fee/ReturnPayFeeMoneyAdapt.java 214 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-job/src/main/java/com/java110/job/task/wechat/WeChatPushMessageTemplate.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-store/src/main/java/com/java110/store/bmo/storeAds/impl/GetStoreAdsBMOImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-store/src/main/java/com/java110/store/listener/resourceStoreUseRecord/AbstractResourceStoreUseRecordBusinessServiceDataFlowListener.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-user/src/main/java/com/java110/user/dao/impl/OwnerCarV1ServiceDaoImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.DS_Store
Binary files differ
java110-bean/src/main/java/com/java110/dto/account/AccountDto.java
@@ -36,6 +36,7 @@
    private String objId;
    private String [] objIds;
    private String acctId;
    private String [] acctIds;
    private String acctName;
    private String objType;
    private String partId;
@@ -160,4 +161,12 @@
    public void setObjIds(String[] objIds) {
        this.objIds = objIds;
    }
    public String[] getAcctIds() {
        return acctIds;
    }
    public void setAcctIds(String[] acctIds) {
        this.acctIds = acctIds;
    }
}
java110-bean/src/main/java/com/java110/dto/complaint/ComplaintDto.java
@@ -41,19 +41,18 @@
    private String currentUserId;
    private String currentUserName;
    private String currentUserTel;
    private String startTime;
    private String endTime;
    private String startUserId;
    //
    private String auditCode;
    private String auditMessage;
    private Date createTime;
    private String statusCd = "0";
    public String getComplaintId() {
        return complaintId;
@@ -118,7 +117,6 @@
    public void setRoomId(String roomId) {
        this.roomId = roomId;
    }
    public Date getCreateTime() {
        return createTime;
@@ -263,4 +261,20 @@
    public void setRoomIds(String[] roomIds) {
        this.roomIds = roomIds;
    }
    public String getStartTime() {
        return startTime;
    }
    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }
    public String getEndTime() {
        return endTime;
    }
    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
}
java110-bean/src/main/java/com/java110/dto/fee/FeeDetailDto.java
@@ -15,6 +15,8 @@
 **/
public class FeeDetailDto extends PageDto implements Serializable {
    public static final String PRIME_REATE_WECHAT = "5";
    private String primeRate;
    private String detailId;
    private String receivableAmount;
java110-bean/src/main/java/com/java110/dto/mapping/MappingDto.java
@@ -17,6 +17,7 @@
    private String domain;
    private String name;
    private String nameLike;
    private String remark;
    private String id;
    private String value;
@@ -92,4 +93,12 @@
    public void setStatusCd(String statusCd) {
        this.statusCd = statusCd;
    }
    public String getNameLike() {
        return nameLike;
    }
    public void setNameLike(String nameLike) {
        this.nameLike = nameLike;
    }
}
java110-bean/src/main/java/com/java110/dto/onlinePay/OnlinePayDto.java
@@ -15,6 +15,15 @@
 **/
public class OnlinePayDto extends PageDto implements Serializable {
    //状态 W待支付 C 支付完成 F 通知失败 WT 待退费 CT退费完成
    public static final String STATE_WAIT = "W";
    public static final String STATE_PAY_FAIL = "PF"; // 支付失败
    public static final String STATE_COMPILE = "C";
    public static final String STATE_FAIL = "F";
    public static final String STATE_WT = "WT"; // 待退费
    public static final String STATE_CT = "CT"; // 退费完成
    public static final String STATE_FT = "FT"; // 退费失败
    private String refundFee;
    private String mchId;
    private String orderId;
java110-bean/src/main/java/com/java110/dto/owner/OwnerCarDto.java
@@ -46,6 +46,9 @@
    private String idCard;
    private String link;
    private String parkingType;
    //停车场类型
    private String typeCd;
    private String spaceSate;
    private String roomName;
@@ -57,7 +60,6 @@
    private String areaNum;
    private String num;
    private Date createTime;
@@ -343,4 +345,20 @@
    public void setCarTypeCds(String[] carTypeCds) {
        this.carTypeCds = carTypeCds;
    }
    public String getTypeCd() {
        return typeCd;
    }
    public void setTypeCd(String typeCd) {
        this.typeCd = typeCd;
    }
    public String getSpaceSate() {
        return spaceSate;
    }
    public void setSpaceSate(String spaceSate) {
        this.spaceSate = spaceSate;
    }
}
java110-bean/src/main/java/com/java110/dto/repair/RepairDto.java
@@ -37,6 +37,8 @@
    public static final String STATE_COMPLATE = "1900";
    //未处理主动结单
    public static final String STATE_UNPROCESSED = "2000";
    //暂停报修单
    public static final String STATE_STOP = "2001";
    public static final String REPAIR_WAY_GRABBING = "100"; //抢单模式
    public static final String REPAIR_WAY_ASSIGN = "200"; //指派模式
@@ -118,6 +120,8 @@
    private String repairmanServiceScore;
    //平均分
    private String average;
    private String repairSettingType;
    private String repairSettingTypeName;
    public String getRepairName() {
        return repairName;
@@ -519,4 +523,20 @@
    public void setPayType(String payType) {
        this.payType = payType;
    }
    public String getRepairSettingType() {
        return repairSettingType;
    }
    public void setRepairSettingType(String repairSettingType) {
        this.repairSettingType = repairSettingType;
    }
    public String getRepairSettingTypeName() {
        return repairSettingTypeName;
    }
    public void setRepairSettingTypeName(String repairSettingTypeName) {
        this.repairSettingTypeName = repairSettingTypeName;
    }
}
java110-bean/src/main/java/com/java110/dto/repair/RepairSettingDto.java
@@ -28,6 +28,8 @@
    private String priceScope;
    private String returnVisitFlag;
    private String returnVisitFlagName;
    private String repairSettingType;
    private String repairSettingTypeName;
    private Date createTime;
@@ -147,4 +149,20 @@
    public void setReturnVisitFlagName(String returnVisitFlagName) {
        this.returnVisitFlagName = returnVisitFlagName;
    }
    public String getRepairSettingType() {
        return repairSettingType;
    }
    public void setRepairSettingType(String repairSettingType) {
        this.repairSettingType = repairSettingType;
    }
    public String getRepairSettingTypeName() {
        return repairSettingTypeName;
    }
    public void setRepairSettingTypeName(String repairSettingTypeName) {
        this.repairSettingTypeName = repairSettingTypeName;
    }
}
java110-bean/src/main/java/com/java110/dto/repair/RepairUserDto.java
@@ -35,7 +35,7 @@
    public static final String STATE_PAY_FEE = "10009";//待支付
    public static final String STATE_EVALUATE = "11000";//待评价
    public static final String STATE_FINISH_PAY_FEE = "12000";//已支付
    public static final String STATE_STOP = "12001";//暂停
    private String context;
    private String repairId;
java110-bean/src/main/java/com/java110/dto/resourceStoreUseRecord/ResourceStoreUseRecordDto.java
@@ -14,7 +14,6 @@
 * add by wuxw 2019/4/24
 **/
public class ResourceStoreUseRecordDto extends PageDto implements Serializable {
    private String repairId;
    private String unitPrice;
    private String createUserId;
@@ -38,6 +37,9 @@
    private String endTime;
    private String unitCodeName;
    private String miniUnitCodeName;
    //1001 报废回收   2002 工单损耗   3003 公用损耗
    private String state;
    private String stateName;
    private String statusCd = "0";
@@ -251,4 +253,20 @@
    public void setIsFixedName(String isFixedName) {
        this.isFixedName = isFixedName;
    }
    public String getState() {
        return state;
    }
    public void setState(String state) {
        this.state = state;
    }
    public String getStateName() {
        return stateName;
    }
    public void setStateName(String stateName) {
        this.stateName = stateName;
    }
}
java110-bean/src/main/java/com/java110/dto/roomRenovation/RoomRenovationDto.java
@@ -35,12 +35,13 @@
    private String renovationCompany;
    private String personMain;
    private String personMainTel;
    private String renovationTime;
    private String renovationStartTime;
    private String renovationEndTime;
    private Date createTime;
    private String statusCd = "0";
    public String getRemark() {
        return remark;
@@ -138,7 +139,6 @@
        this.personTel = personTel;
    }
    public Date getCreateTime() {
        return createTime;
    }
@@ -210,4 +210,28 @@
    public void setPersonMainTel(String personMainTel) {
        this.personMainTel = personMainTel;
    }
    public String getRenovationTime() {
        return renovationTime;
    }
    public void setRenovationTime(String renovationTime) {
        this.renovationTime = renovationTime;
    }
    public String getRenovationStartTime() {
        return renovationStartTime;
    }
    public void setRenovationStartTime(String renovationStartTime) {
        this.renovationStartTime = renovationStartTime;
    }
    public String getRenovationEndTime() {
        return renovationEndTime;
    }
    public void setRenovationEndTime(String renovationEndTime) {
        this.renovationEndTime = renovationEndTime;
    }
}
java110-bean/src/main/java/com/java110/po/repair/RepairSettingPo.java
@@ -15,6 +15,7 @@
    private String payFeeFlag;
    private String priceScope;
    private String returnVisitFlag;
    private String repairSettingType;
    public String getRepairTypeName() {
@@ -97,4 +98,12 @@
    public void setReturnVisitFlag(String returnVisitFlag) {
        this.returnVisitFlag = returnVisitFlag;
    }
    public String getRepairSettingType() {
        return repairSettingType;
    }
    public void setRepairSettingType(String repairSettingType) {
        this.repairSettingType = repairSettingType;
    }
}
java110-bean/src/main/java/com/java110/po/resourceStoreUseRecord/ResourceStoreUseRecordPo.java
@@ -1,7 +1,6 @@
package com.java110.po.resourceStoreUseRecord;
import java.io.Serializable;
import java.util.Date;
public class ResourceStoreUseRecordPo implements Serializable {
@@ -17,6 +16,8 @@
    private String communityId;
    private String resName;
    private String resourceStoreName;
    //1001 报废回收   2002 工单损耗   3003 公用损耗
    private String state;
    public String getRepairId() {
        return repairId;
@@ -113,4 +114,12 @@
    public void setResourceStoreName(String resourceStoreName) {
        this.resourceStoreName = resourceStoreName;
    }
    public String getState() {
        return state;
    }
    public void setState(String state) {
        this.state = state;
    }
}
java110-bean/src/main/java/com/java110/vo/api/complaint/ApiComplaintDataVo.java
@@ -25,7 +25,7 @@
    private String unitNum;
    private String floorNum;
    private String communityId;
    //
    private String auditCode;
    private List<PhotoVo> photos;
java110-db/src/main/resources/mapper/acct/AccountServiceDaoImplMapper.xml
@@ -119,6 +119,12 @@
                #{item}
            </foreach>
        </if>
        <if test="acctIds !=null ">
            and t.acct_id in
            <foreach collection="acctIds" item="item" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="acctId !=null and acctId != ''">
            and t.acct_id= #{acctId}
        </if>
@@ -196,6 +202,12 @@
        <if test="objId !=null and objId != ''">
            and t.obj_id= #{objId}
        </if>
        <if test="acctIds !=null ">
            and t.acct_id in
            <foreach collection="acctIds" item="item" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="acctId !=null and acctId != ''">
            and t.acct_id= #{acctId}
        </if>
java110-db/src/main/resources/mapper/acct/OnlinePayV1ServiceDaoImplMapper.xml
@@ -79,9 +79,7 @@
        <if test="mchId !=null and mchId != ''">
            , t.mch_id= #{mchId}
        </if>
        <if test="orderId !=null and orderId != ''">
            , t.order_id= #{orderId}
        </if>
        <if test="totalFee !=null and totalFee != ''">
            , t.total_fee= #{totalFee}
        </if>
@@ -107,6 +105,9 @@
        <if test="payId !=null and payId != ''">
            and t.pay_id= #{payId}
        </if>
        <if test="orderId !=null and orderId != ''">
            and t.order_id= #{orderId}
        </if>
    </update>
java110-db/src/main/resources/mapper/common/SmsConfigServiceDaoImplMapper.xml
@@ -5,9 +5,6 @@
<mapper namespace="smsConfigServiceDaoImpl">
    <!-- 保存短信配置信息 add by wuxw 2018-07-03 -->
    <insert id="saveSmsConfigInfo" parameterType="Map">
        insert into sms_config(
@@ -18,10 +15,12 @@
    </insert>
    <!-- 查询短信配置信息 add by wuxw 2018-07-03 -->
    <select id="getSmsConfigInfo" parameterType="Map" resultType="Map">
        select  t.access_key_id,t.access_key_id accessKeyId,t.sms_busi,t.sms_busi smsBusi,t.sign_name,t.sign_name signName,t.status_cd,t.status_cd statusCd,t.template_code,t.template_code templateCode,t.store_id,t.store_id storeId,t.access_secret,t.access_secret accessSecret,t.sms_id,t.sms_id smsId,t.obj_id,t.obj_id objId,t.sms_type,t.sms_type smsType,t.log_switch,t.log_switch logSwitch,t.region,t.remarks
        select t.access_key_id,t.access_key_id accessKeyId,t.sms_busi,t.sms_busi smsBusi,t.sign_name,t.sign_name
        signName,t.status_cd,t.status_cd statusCd,t.template_code,t.template_code templateCode,t.store_id,t.store_id
        storeId,t.access_secret,t.access_secret accessSecret,t.sms_id,t.sms_id smsId,t.obj_id,t.obj_id
        objId,t.sms_type,t.sms_type smsType,t.log_switch,t.log_switch logSwitch,t.region,t.remarks
from sms_config t 
where 1 =1 
<if test="accessKeyId !=null and accessKeyId != ''">
@@ -71,8 +70,6 @@
    </select>
    <!-- 修改短信配置信息 add by wuxw 2018-07-03 -->
    <update id="updateSmsConfigInfo" parameterType="Map">
        update  sms_config t set t.status_cd = #{statusCd}
@@ -112,7 +109,8 @@
<if test="remarks !=null and remarks != ''">
, t.remarks= #{remarks}
</if> 
 where 1=1 <if test="smsId !=null and smsId != ''">
        where 1=1
        <if test="smsId !=null and smsId != ''">
and t.sms_id= #{smsId}
</if> 
java110-db/src/main/resources/mapper/community/MappingServiceDaoImplMapper.xml
@@ -84,6 +84,9 @@
        <if test="name !=null and name != ''">
            and t.name= #{name}
        </if>
        <if test="nameLike !=null and nameLike != ''">
            and t.name like concat('%',#{nameLike},'%')
        </if>
        <if test="remark !=null and remark != ''">
            and t.remark= #{remark}
        </if>
java110-db/src/main/resources/mapper/community/PropertyRightRegistrationV1ServiceDaoImplMapper.xml
@@ -48,6 +48,12 @@
        <if test="roomId !=null and roomId != ''">
            and t.room_id= #{roomId}
        </if>
        <if test="floorId !=null and floorId != ''">
            and fl.floor_id= #{floorId}
        </if>
        <if test="unitId !=null and unitId != ''">
            and bu.unit_id= #{unitId}
        </if>
        <if test="roomNum !=null and roomNum != ''">
            and br.room_num= #{roomNum}
        </if>
@@ -144,6 +150,12 @@
        <if test="roomId !=null and roomId != ''">
            and t.room_id= #{roomId}
        </if>
        <if test="floorId !=null and floorId != ''">
            and fl.floor_id= #{floorId}
        </if>
        <if test="unitId !=null and unitId != ''">
            and bu.unit_id= #{unitId}
        </if>
        <if test="roomNum !=null and roomNum != ''">
            and br.room_num= #{roomNum}
        </if>
java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml
@@ -139,15 +139,15 @@
        t.repair_obj_type,t.repair_obj_id,t.repair_obj_name,t.repair_obj_type repairObjType,t.repair_obj_id repairObjId,
        t.repair_obj_name repairObjName,rrv.visit_type visitType,rrv.context visitContext,a.appraise_score
        appraiseScore, a.door_speed_score doorSpeedScore,a.repairman_service_score repairmanServiceScore,
        t.pay_type,t.pay_type payType
        t.pay_type,t.pay_type payType,rs.repair_setting_type repairSettingType,d1.name repairSettingTypeName
        <if test="staffId != null and staffId != ''">
            ,rru.state repairDispatchState,rru.context repairDispatchContext,td.name repairDispatchStateName
        </if>
        from r_repair_pool t
        left join t_dict d on t.state = d.status_cd and d.table_name = 'r_repair_pool' and d.table_columns = 'state'
        left join r_repair_setting rs on rs.repair_type = t.repair_type and rs.status_cd = '0'
        left join r_repair_return_visit rrv on t.repair_id = rrv.repair_id and rrv.community_id = t.community_id and
        rrv.status_cd = '0'
        left join t_dict d1 on rs.repair_setting_type = d1.status_cd and d1.table_name = 'r_repair_setting' and d1.table_columns = 'repair_setting_type'
        left join r_repair_return_visit rrv on t.repair_id = rrv.repair_id and rrv.community_id = t.community_id and rrv.status_cd = '0'
        left join appraise a on a.obj_id = t.repair_id and a.status_cd = '0'
        <if test="staffId != null and staffId != ''">
            ,r_repair_user rru
@@ -164,6 +164,9 @@
        </if>
        <if test="repairWay !=null and repairWay != ''">
            and rs.repair_way= #{repairWay}
        </if>
        <if test="repairSettingType !=null and repairSettingType != ''">
            and rs.repair_setting_type= #{repairSettingType}
        </if>
        <if test="returnVisitFlag != null and returnVisitFlag != '' and returnVisitFlag != '003'">
            and rs.return_visit_flag in ('001','002')
@@ -324,6 +327,9 @@
        <if test="repairType !=null and repairType != ''">
            and t.repair_type= #{repairType}
        </if>
        <if test="repairSettingType !=null and repairSettingType != ''">
            and rs.repair_setting_type= #{repairSettingType}
        </if>
        <if test="payType !=null and payType != ''">
            and t.pay_type= #{payType}
        </if>
@@ -395,7 +401,7 @@
        td.table_columns='return_visit_flag'
        where 1 =1
        and ru.state in ('10001','10009','11000')
        and t.state in('1000','1100','1200','1300','1400','1700','1800')
        and t.state in('1000','1100','1200','1300','1400','1700','1800','2001')
        <if test="staffId !=null and staffId != ''">
            and ru.staff_id = #{staffId}
        </if>
@@ -462,7 +468,7 @@
        td.table_columns='return_visit_flag'
        where 1 =1
        and ru.state in ('10001','10009','11000')
        and t.state in('1000','1100','1200','1300','1400','1700','1800')
        and t.state in('1000','1100','1200','1300','1400','1700','1800','2001')
        <if test="staffId !=null and staffId != ''">
            and ru.staff_id = #{staffId}
        </if>
java110-db/src/main/resources/mapper/community/RepairSettingServiceDaoImplMapper.xml
@@ -7,16 +7,16 @@
    <!-- 保存报修设置信息 add by wuxw 2018-07-03 -->
    <insert id="saveBusinessRepairSettingInfo" parameterType="Map">
        insert into business_repair_setting(
        operate,repair_type_name,repair_type,remark,b_id,community_id,repair_way,setting_id,public_area,pay_fee_flag,price_scope,return_visit_flag
        operate,repair_type_name,repair_type,repair_setting_type,remark,b_id,community_id,repair_way,setting_id,public_area,pay_fee_flag,price_scope,return_visit_flag
        ) values (
        #{operate},#{repairTypeName},#{repairType},#{remark},#{bId},#{communityId},#{repairWay},#{settingId},#{publicArea},#{payFeeFlag},#{priceScope},#{returnVisitFlag}
        #{operate},#{repairTypeName},#{repairType},#{repairSettingType},#{remark},#{bId},#{communityId},#{repairWay},#{settingId},#{publicArea},#{payFeeFlag},#{priceScope},#{returnVisitFlag}
        )
    </insert>
    <!-- 查询报修设置信息(Business) add by wuxw 2018-07-03 -->
    <select id="getBusinessRepairSettingInfo" parameterType="Map" resultType="Map">
        select t.operate,t.repair_type_name,t.repair_type_name repairTypeName,t.repair_type,t.repair_type
        repairType,t.remark,t.b_id,t.b_id bId,t.community_id,t.community_id communityId,t.repair_way,t.repair_way
        repairType,t.repair_setting_type,t.repair_setting_type repairSettingType,t.remark,t.b_id,t.b_id bId,t.community_id,t.community_id communityId,t.repair_way,t.repair_way
        repairWay,t.setting_id,t.setting_id settingId,t.public_area,t.public_area
        publicArea,t.pay_fee_flag,t.pay_fee_flag payFeeFlag
        ,t.price_scope,t.price_scope priceScope,t.return_visit_flag,t.return_visit_flag returnVisitFlag
@@ -30,6 +30,9 @@
        </if>
        <if test="repairType !=null and repairType != ''">
            and t.repair_type= #{repairType}
        </if>
        <if test="repairSettingType !=null and repairSettingType != ''">
            and t.repair_setting_type= #{repairSettingType}
        </if>
        <if test="remark !=null and remark != ''">
            and t.remark= #{remark}
@@ -51,8 +54,8 @@
    <!-- 保存报修设置信息至 instance表中 add by wuxw 2018-07-03 -->
    <insert id="saveRepairSettingInfoInstance" parameterType="Map">
        insert into r_repair_setting(
        repair_type_name,repair_type,remark,status_cd,b_id,community_id,repair_way,setting_id,public_area,pay_fee_flag,price_scope,return_visit_flag
        ) select t.repair_type_name,t.repair_type,t.remark,'0',t.b_id,t.community_id,t.repair_way,t.setting_id
        repair_type_name,repair_type,repair_setting_type,remark,status_cd,b_id,community_id,repair_way,setting_id,public_area,pay_fee_flag,price_scope,return_visit_flag
        ) select t.repair_type_name,t.repair_type,t.repair_setting_type,t.remark,'0',t.b_id,t.community_id,t.repair_way,t.setting_id
        ,t.public_area,t.pay_fee_flag,t.price_scope,t.return_visit_flag
        from
        business_repair_setting t where 1=1
@@ -62,6 +65,9 @@
        </if>
        <if test="repairType !=null and repairType != ''">
            and t.repair_type= #{repairType}
        </if>
        <if test="repairSettingType and repairSettingType != ''">
            and t.repair_setting_type= #{repairSettingType}
        </if>
        <if test="remark !=null and remark != ''">
            and t.remark= #{remark}
@@ -83,23 +89,25 @@
    <!-- 查询报修设置信息 add by wuxw 2018-07-03 -->
    <select id="getRepairSettingInfo" parameterType="Map" resultType="Map">
        select t.repair_type_name,t.repair_type_name repairTypeName,t.repair_type,t.repair_type
        repairType,t.remark,t.status_cd,t.status_cd statusCd,t.b_id,t.b_id bId,t.community_id,t.community_id
        repairType,t.repair_setting_type,t.repair_setting_type repairSettingType,t.remark,t.status_cd,t.status_cd statusCd,t.b_id,t.b_id bId,t.community_id,t.community_id
        communityId,t.repair_way,t.repair_way repairWay,t.setting_id,t.setting_id settingId,t.create_time
        createTime,d.name repairWayName,
        createTime,d.name repairWayName,d2.name repairSettingTypeName,
        t.public_area,t.public_area publicArea,t.pay_fee_flag,t.pay_fee_flag payFeeFlag
        ,t.price_scope,t.price_scope priceScope,t.return_visit_flag,t.return_visit_flag returnVisitFlag,d1.name
        returnVisitFlagName
        from r_repair_setting t
        left join t_dict d on t.repair_way = d.status_cd and d.table_name = 'r_repair_setting' and d.table_columns =
        'repair_way'
        left join t_dict d1 on t.return_visit_flag = d1.status_cd and d1.table_name = 'r_repair_setting' and
        d1.table_columns = 'return_visit_flag'
        left join t_dict d on t.repair_way = d.status_cd and d.table_name = 'r_repair_setting' and d.table_columns ='repair_way'
        left join t_dict d1 on t.return_visit_flag = d1.status_cd and d1.table_name = 'r_repair_setting' and d1.table_columns = 'return_visit_flag'
        left join t_dict d2 on t.repair_setting_type = d2.status_cd and d2.table_name = 'r_repair_setting' and d2.table_columns = 'repair_setting_type'
        where 1 =1
        <if test="repairTypeName !=null and repairTypeName != ''">
            and t.repair_type_name like '%${repairTypeName}%'
        </if>
        <if test="repairType !=null and repairType != ''">
            and t.repair_type= #{repairType}
        </if>
        <if test="repairSettingType !=null and repairSettingType != ''">
            and t.repair_setting_type= #{repairSettingType}
        </if>
        <if test="remark !=null and remark != ''">
            and t.remark= #{remark}
@@ -146,6 +154,9 @@
        <if test="repairType !=null and repairType != ''">
            , t.repair_type= #{repairType}
        </if>
        <if test="repairSettingType !=null and repairSettingType != ''">
            , t.repair_setting_type= #{repairSettingType}
        </if>
        <if test="remark !=null and remark != ''">
            , t.remark= #{remark}
        </if>
@@ -180,8 +191,7 @@
    <select id="queryRepairSettingsCount" parameterType="Map" resultType="Map">
        select count(1) count
        from r_repair_setting t
        left join t_dict d on t.repair_way = d.status_cd and d.table_name = 'r_repair_setting' and d.table_columns =
        'repair_way'
        left join t_dict d on t.repair_way = d.status_cd and d.table_name = 'r_repair_setting' and d.table_columns = 'repair_way'
        where 1 =1
        <if test="repairTypeName !=null and repairTypeName != ''">
            and t.repair_type_name like '%${repairTypeName}%'
@@ -189,6 +199,9 @@
        <if test="repairType !=null and repairType != ''">
            and t.repair_type= #{repairType}
        </if>
        <if test="repairSettingType !=null and repairSettingType != ''">
            and t.repair_setting_type= #{repairSettingType}
        </if>
        <if test="remark !=null and remark != ''">
            and t.remark= #{remark}
        </if>
java110-db/src/main/resources/mapper/community/RoomRenovationServiceDaoImplMapper.xml
@@ -6,11 +6,12 @@
    <!-- 保存装修申请信息 add by wuxw 2018-07-03 -->
    <insert id="saveRoomRenovationInfo" parameterType="Map">
        insert into room_renovation(
        remark,is_violation,r_id,room_id,room_name,person_name,violation_desc,start_time,end_time,state,community_id,person_tel,is_postpone,postpone_time,renovation_company,person_main,person_main_tel
        ) values (
        #{remark},#{isViolation},#{rId},#{roomId},#{roomName},#{personName},#{violationDesc},#{startTime},#{endTime},#{state},#{communityId},#{personTel},#{isPostpone},#{postponeTime},#{renovationCompany},#{personMain},#{personMainTel}
        )
        insert into room_renovation(remark, is_violation, r_id, room_id, room_name, person_name, violation_desc,
                                    start_time, end_time, state, community_id, person_tel, is_postpone, postpone_time,
                                    renovation_company, person_main, person_main_tel)
        values (#{remark}, #{isViolation}, #{rId}, #{roomId}, #{roomName}, #{personName}, #{violationDesc},
                #{startTime}, #{endTime}, #{state}, #{communityId}, #{personTel}, #{isPostpone}, #{postponeTime},
                #{renovationCompany}, #{personMain}, #{personMainTel})
    </insert>
    <!-- 查询装修申请信息 add by wuxw 2018-07-03 -->
@@ -19,8 +20,10 @@
        rId,t.room_id,t.room_id roomId,t.room_name,t.room_name roomName,t.person_name,t.person_name
        personName,t.violation_desc,t.violation_desc violationDesc,t.start_time,t.start_time
        startTime,t.end_time,t.end_time endTime,t.state,td.name stateName,t.community_id,t.community_id
        communityId,t.person_tel,t.person_tel personTel,t.create_time createTime,t.is_postpone,t.is_postpone isPostpone,t.postpone_time,t.postpone_time postponeTime,
        t.renovation_company,t.renovation_company renovationCompany,t.person_main,t.person_main personMain,t.person_main_tel,t.person_main_tel personMainTel
        communityId,t.person_tel,t.person_tel personTel,t.create_time createTime,t.is_postpone,t.is_postpone
        isPostpone,t.postpone_time,t.postpone_time postponeTime,
        t.renovation_company,t.renovation_company renovationCompany,t.person_main,t.person_main
        personMain,t.person_main_tel,t.person_main_tel personMainTel
        from room_renovation t
        left join t_dict td on td.table_name='room_renovation' and td.table_columns='state'
        and t.state=td.status_cd
@@ -57,6 +60,16 @@
        </if>
        <if test="endTime !=null and endTime != ''">
            and t.end_time= #{endTime}
        </if>
        <if test="renovationTime !=null and renovationTime != ''">
            and t.start_time &lt;= #{renovationTime}
            and t.end_time &gt;= #{renovationTime}
        </if>
        <if test="renovationStartTime !=null and renovationStartTime != ''">
            and t.create_time &gt;= #{renovationStartTime}
        </if>
        <if test="renovationEndTime !=null and renovationEndTime != ''">
            and t.create_time &lt;= #{renovationEndTime}
        </if>
        <if test="state !=null and state != ''">
            and t.state= #{state}
@@ -184,6 +197,16 @@
        <if test="endTime !=null and endTime != ''">
            and t.end_time= #{endTime}
        </if>
        <if test="renovationTime !=null and renovationTime != ''">
            and t.start_time &lt;= #{renovationTime}
            and t.end_time &gt;= #{renovationTime}
        </if>
        <if test="renovationStartTime !=null and renovationStartTime != ''">
            and t.create_time &gt;= #{renovationStartTime}
        </if>
        <if test="renovationEndTime !=null and renovationEndTime != ''">
            and t.create_time &lt;= #{renovationEndTime}
        </if>
        <if test="state !=null and state != ''">
            and t.state= #{state}
        </if>
java110-db/src/main/resources/mapper/fee/PayFeeDetailDiscountNewV1ServiceDaoImplMapper.xml
@@ -11,9 +11,9 @@
    <!-- 保存费用明细信息 add by wuxw 2018-07-03 -->
    <insert id="savePayFeeDetailDiscountNewInfo" parameterType="Map">
        insert into pay_fee_detail_discount(
detail_discount_id,discount_price,detail_id,remark,community_id,discount_id,fee_id
detail_discount_id,discount_price,detail_id,remark,community_id,discount_id,fee_id,b_id
) values (
#{detailDiscountId},#{discountPrice},#{detailId},#{remark},#{communityId},#{discountId},#{feeId}
#{detailDiscountId},#{discountPrice},#{detailId},#{remark},#{communityId},#{discountId},#{feeId},#{bId}
)
    </insert>
java110-db/src/main/resources/mapper/fee/PayFeeDetailNewV1ServiceDaoImplMapper.xml
@@ -10,7 +10,7 @@
        insert into pay_fee_detail(
        prime_rate,detail_id,receivable_amount,cycles,remark,start_time,received_amount,state,end_time,community_id,fee_id,b_id
        ) values (
        #{primeRate},#{detailId},#{receivableAmount},#{cycles},#{remark},#{startTime},#{receivedAmount},#{state},#{endTime},#{communityId},#{feeId}#{bId}
        #{primeRate},#{detailId},#{receivableAmount},#{cycles},#{remark},#{startTime},#{receivedAmount},#{state},#{endTime},#{communityId},#{feeId},#{bId}
        )
    </insert>
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml
@@ -1856,6 +1856,7 @@
    <select id="queryRepairForStaff" parameterType="Map" resultType="Map">
        SELECT r.staff_id staffId,r.staff_name staffName,r.state FROM r_repair_user r
        inner join u_user u on u.user_id = r.staff_id and u.status_cd = '0'
        WHERE r.state!='10005' AND r.state!='10009' AND r.state!='11000' AND
        r.state!='12000' AND r.state != '10007' AND r.status_cd = '0' AND
        r.repair_event != 'payUser' AND r.repair_event != 'startUser' AND r.staff_id != '-1'
java110-db/src/main/resources/mapper/store/ComplaintServiceDaoImplMapper.xml
@@ -1,19 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="complaintServiceDaoImpl">
    <!-- 保存投诉建议信息 add by wuxw 2018-07-03 -->
    <insert id="saveBusinessComplaintInfo" parameterType="Map">
        insert into business_complaint(
        operate,complaint_id,type_cd,context,complaint_name,tel,state,store_id,b_id,room_id,community_id,start_user_id
        ) values (
        #{operate},#{complaintId},#{typeCd},#{context},#{complaintName},#{tel},#{state},#{storeId},#{bId},#{roomId},#{communityId},
        #{startUserId}
        )
        insert into business_complaint(operate, complaint_id, type_cd, context, complaint_name, tel, state, store_id,
                                       b_id, room_id, community_id, start_user_id)
        values (#{operate}, #{complaintId}, #{typeCd}, #{context}, #{complaintName}, #{tel}, #{state}, #{storeId},
                #{bId}, #{roomId}, #{communityId},
                #{startUserId})
    </insert>
    <!-- 查询投诉建议信息(Business) add by wuxw 2018-07-03 -->
    <select id="getBusinessComplaintInfo" parameterType="Map" resultType="Map">
@@ -56,9 +53,7 @@
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
    </select>
    <!-- 保存投诉建议信息至 instance表中 add by wuxw 2018-07-03 -->
    <insert id="saveComplaintInfoInstance" parameterType="Map">
@@ -97,9 +92,7 @@
        <if test="roomId !=null and roomId != ''">
            and t.room_id= #{roomId}
        </if>
    </insert>
    <!-- 查询投诉建议信息 add by wuxw 2018-07-03 -->
    <select id="getComplaintInfo" parameterType="Map" resultType="Map">
@@ -165,14 +158,17 @@
        <if test="startUserId !=null and startUserId != ''">
            and t.start_user_id= #{startUserId}
        </if>
        <if test="startTime !=null and startTime != ''">
            and t.create_time &gt;= #{startTime}
        </if>
        <if test="endTime !=null and endTime != ''">
            and t.create_time &lt;= #{endTime}
        </if>
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
    </select>
    <!-- 修改投诉建议信息 add by wuxw 2018-07-03 -->
    <update id="updateComplaintInfoInstance" parameterType="Map">
@@ -211,7 +207,6 @@
        <if test="bId !=null and bId != ''">
            and t.b_id= #{bId}
        </if>
    </update>
    <!-- 查询投诉建议数量 add by wuxw 2018-07-03 -->
@@ -273,8 +268,11 @@
        <if test="startUserId !=null and startUserId != ''">
            and t.start_user_id= #{startUserId}
        </if>
        <if test="startTime !=null and startTime != ''">
            and t.create_time &gt;= #{startTime}
        </if>
        <if test="endTime !=null and endTime != ''">
            and t.create_time &lt;= #{endTime}
        </if>
    </select>
</mapper>
java110-db/src/main/resources/mapper/store/ResourceStoreUseRecordServiceDaoImplMapper.xml
@@ -6,11 +6,11 @@
    <!-- 保存物品使用记录信息 add by wuxw 2018-07-03 -->
    <insert id="saveBusinessResourceStoreUseRecordInfo" parameterType="Map">
           insert into business_resource_store_use_record(
            unit_price,create_user_id,quantity,rsur_id,repair_id,create_user_name,remark,store_id,res_id,resource_store_name,operate,b_id,community_id
            ) values (
            #{unitPrice},#{createUserId},#{quantity},#{rsurId},#{repairId},#{createUserName},#{remark},#{storeId},#{resId},#{resourceStoreName},#{operate},#{bId},#{communityId}
            )
        insert into business_resource_store_use_record(unit_price, create_user_id, quantity, rsur_id, repair_id,
                                                       create_user_name, remark, store_id, res_id, resource_store_name,
                                                       operate, b_id, community_id, state)
        values (#{unitPrice}, #{createUserId}, #{quantity}, #{rsurId}, #{repairId}, #{createUserName}, #{remark},
                #{storeId}, #{resId}, #{resourceStoreName}, #{operate}, #{bId}, #{communityId}, #{state})
    </insert>
    <!-- 查询物品使用记录信息(Business) add by wuxw 2018-07-03 -->
@@ -19,7 +19,7 @@
        createUserId,t.quantity,t.rsur_id,t.rsur_id rsurId,t.repair_id,t.repair_id
        repairId,t.create_user_name,t.create_user_name createUserName,t.remark,t.store_id,t.store_id
        storeId,t.res_id,t.res_id resId,t.resource_store_name,t.resource_store_name
        resourceStoreName,t.operate,t.b_id,t.b_id bId,t.community_id,t.community_id communityId
        resourceStoreName,t.operate,t.b_id,t.b_id bId,t.community_id,t.community_id communityId,t.state
        from business_resource_store_use_record t
        where 1 =1
        <if test="unitPrice !=null and unitPrice != ''">
@@ -52,6 +52,9 @@
        <if test="resourceStoreName !=null and resourceStoreName != ''">
            and t.resource_store_name= #{resourceStoreName}
        </if>
        <if test="state !=null and state != ''">
            and t.state= #{state}
        </if>
        <if test="operate !=null and operate != ''">
            and t.operate= #{operate}
        </if>
@@ -66,9 +69,9 @@
    <!-- 保存物品使用记录信息至 instance表中 add by wuxw 2018-07-03 -->
    <insert id="saveResourceStoreUseRecordInfoInstance" parameterType="Map">
        insert into resource_store_use_record(
        unit_price,create_user_id,quantity,rsur_id,repair_id,create_user_name,status_cd,remark,store_id,res_id,resource_store_name,b_id,community_id
        unit_price,create_user_id,quantity,rsur_id,repair_id,create_user_name,status_cd,remark,store_id,res_id,resource_store_name,b_id,community_id,state
        ) select
        t.unit_price,t.create_user_id,t.quantity,t.rsur_id,t.repair_id,t.create_user_name,'0',t.remark,t.store_id,t.res_id,t.resource_store_name,t.b_id,t.community_id
        t.unit_price,t.create_user_id,t.quantity,t.rsur_id,t.repair_id,t.create_user_name,'0',t.remark,t.store_id,t.res_id,t.resource_store_name,t.b_id,t.community_id,t.state
        from business_resource_store_use_record t where 1=1
        <if test="unitPrice !=null and unitPrice != ''">
            and t.unit_price= #{unitPrice}
@@ -97,6 +100,9 @@
        <if test="resId !=null and resId != ''">
            and t.res_id= #{resId}
        </if>
        <if test="state !=null and state != ''">
            and t.state= #{state}
        </if>
        <if test="resourceStoreName !=null and resourceStoreName != ''">
            and t.resource_store_name= #{resourceStoreName}
        </if>
@@ -118,15 +124,20 @@
        resId,t.resource_store_name,t.resource_store_name resourceStoreName,rs.res_name resName,
        t.b_id,t.b_id bId,t.community_id,t.community_id communityId,t.create_time createTime, rst.name
        rstName,rst1.name parentRstName,rss.spec_name specName,td1.name unitCodeName,td2.name miniUnitCodeName,
        rs.is_fixed isFixed,td3.name isFixedName
        rs.is_fixed isFixed,td3.name isFixedName,t.state,td4.name stateName
        from resource_store_use_record t
        left join resource_store rs on rs.res_id = t.res_id
        left join resource_store_type rst on rs.rst_id = rst.rst_id
        left join resource_store_type rst1 on rs.parent_rst_id = rst1.rst_id
        left join resource_store_specification rss on rs.rss_id = rss.rss_id
        left join t_dict td1 on rs.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns = 'unit_code'
        left join t_dict td2 on rs.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns = 'unit_code'
        left join t_dict td3 on rs.is_fixed = td3.status_cd and td3.table_name = 'resource_store' and td3.table_columns = 'is_fixed'
        left join t_dict td1 on rs.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns
        = 'unit_code'
        left join t_dict td2 on rs.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and
        td2.table_columns = 'unit_code'
        left join t_dict td3 on rs.is_fixed = td3.status_cd and td3.table_name = 'resource_store' and td3.table_columns
        = 'is_fixed'
        left join t_dict td4 on t.state = td4.status_cd and td4.table_name = 'resource_store_use_record' and
        td4.table_columns = 'state'
        where 1 = 1
        <if test="unitPrice !=null and unitPrice != ''">
            and t.unit_price= #{unitPrice}
@@ -176,6 +187,9 @@
        <if test="isFixed !=null and isFixed != ''">
            and rs.is_fixed= #{isFixed}
        </if>
        <if test="state !=null and state != ''">
            and t.state= #{state}
        </if>
        <if test="bId !=null and bId != ''">
            and t.b_id= #{bId}
        </if>
@@ -224,6 +238,9 @@
        <if test="resId !=null and resId != ''">
            , t.res_id= #{resId}
        </if>
        <if test="state !=null and state != ''">
            , t.state= #{state}
        </if>
        <if test="resourceStoreName !=null and resourceStoreName != ''">
            , t.resource_store_name= #{resourceStoreName}
        </if>
@@ -246,8 +263,14 @@
        left join resource_store rs on rs.res_id = t.res_id
        left join resource_store_type rst on rs.rst_id = rst.rst_id
        left join resource_store_specification rss on rs.rss_id = rss.rss_id
        left join t_dict td1 on rs.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns = 'unit_code'
        left join t_dict td2 on rs.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns = 'unit_code'
        left join t_dict td1 on rs.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns
        = 'unit_code'
        left join t_dict td2 on rs.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and
        td2.table_columns = 'unit_code'
        left join t_dict td3 on rs.is_fixed = td3.status_cd and td3.table_name = 'resource_store' and td3.table_columns
        = 'is_fixed'
        left join t_dict td4 on t.state = td4.status_cd and td4.table_name = 'resource_store_use_record' and
        td4.table_columns = 'state'
        where 1 =1
        <if test="unitPrice !=null and unitPrice != ''">
            and t.unit_price= #{unitPrice}
@@ -297,6 +320,9 @@
        <if test="isFixed !=null and isFixed != ''">
            and rs.is_fixed= #{isFixed}
        </if>
        <if test="state !=null and state != ''">
            and rs.state= #{state}
        </if>
        <if test="parentRstId !=null and parentRstId != ''">
            and rs.parent_rst_id= #{parentRstId}
        </if>
java110-db/src/main/resources/mapper/store/SmallWeChatServiceDaoImplMapper.xml
@@ -173,6 +173,9 @@
        <if test="objId !=null and objId != ''">
            and t.obj_id= #{objId}
        </if>
        <if test="mchId !=null and mchId != ''">
            and t.mch_id= #{mchId}
        </if>
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
java110-db/src/main/resources/mapper/user/OwnerCarV1ServiceDaoImplMapper.xml
@@ -7,11 +7,10 @@
    <!-- 保存车辆信息 add by wuxw 2018-07-03 -->
    <insert id="saveOwnerCarInfo" parameterType="Map">
        insert into owner_car(
        car_brand,car_num,ps_id,remark,owner_id,car_type_cd,user_id,car_id,car_color,car_type,start_time,end_time,state,community_id,member_id,b_id
        ) values (
        #{carBrand},#{carNum},#{psId},#{remark},#{ownerId},#{carTypeCd},#{userId},#{carId},#{carColor},#{carType},#{startTime},#{endTime},#{state},#{communityId},#{memberId},'-1'
        )
        insert into owner_car(car_brand, car_num, ps_id, remark, owner_id, car_type_cd, user_id, car_id, car_color,
                              car_type, start_time, end_time, state, community_id, member_id, b_id)
        values (#{carBrand}, #{carNum}, #{psId}, #{remark}, #{ownerId}, #{carTypeCd}, #{userId}, #{carId}, #{carColor},
                #{carType}, #{startTime}, #{endTime}, #{state}, #{communityId}, #{memberId}, '-1')
    </insert>
java110-utils/src/main/java/com/java110/utils/constant/ServiceCodeRepairDispatchStepConstant.java
@@ -16,6 +16,15 @@
     */
    public static final String BINDING_REPAIR_DISPATCH = "ownerRepair.repairDispatch";
    /**
     * 暂停报修单
     */
    public static final String BINDING_REPAIR_STOP = "ownerRepair.repairStop";
    /**
     * 启动报修单
     */
    public static final String BINDING_REPAIR_START = "ownerRepair.repairStart";
    /**
     * 报修结单
java110-utils/src/main/java/com/java110/utils/util/BeanConvertUtil.java
@@ -1,11 +1,10 @@
package com.java110.utils.util;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.beanutils.Converter;
import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.lang3.reflect.FieldUtils;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.cglib.beans.BeanMap;
@@ -13,12 +12,7 @@
import java.lang.reflect.Field;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;
/**
 * @ClassName BeanConvertUtil
@@ -183,6 +177,17 @@
        return JSONObject.parseObject(JSONObject.toJSONString(orgBean));
    }
    /**
     * bean转换为map对象
     *
     * @param orgBean 原始bean
     * @return map对象
     */
    public static JSONArray beanCovertJSONArray(Object orgBean) {
        return JSONArray.parseArray(JSONArray.toJSONStringWithDateFormat(orgBean, "yyyy-MM-dd HH:mm:ss"));
    }
    /**
     * bean集合转换为map对象集合
service-acct/src/main/java/com/java110/acct/dao/impl/AccountServiceDaoImpl.java
service-api/src/main/java/com/java110/api/bmo/allocationUserStorehouse/impl/AllocationUserStorehouseBMOImpl.java
@@ -2,29 +2,43 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.java110.api.bmo.ApiBaseBMO;
import com.java110.api.bmo.allocationUserStorehouse.IAllocationUserStorehouseBMO;
import com.java110.api.listener.AbstractServiceApiPlusListener;
import com.java110.core.context.DataFlowContext;
import com.java110.core.event.service.api.ServiceDataFlowEvent;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.dto.resourceStore.ResourceStoreDto;
import com.java110.dto.userStorehouse.UserStorehouseDto;
import com.java110.entity.center.AppService;
import com.java110.intf.store.IResourceStoreInnerServiceSMO;
import com.java110.intf.store.IUserStorehouseInnerServiceSMO;
import com.java110.po.allocationUserStorehouse.AllocationUserStorehousePo;
import com.java110.po.resourceStoreUseRecord.ResourceStoreUseRecordPo;
import com.java110.po.userStorehouse.UserStorehousePo;
import com.java110.utils.constant.BusinessTypeConstant;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.utils.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Service("allocationUserStorehouseBMOImpl")
public class AllocationUserStorehouseBMOImpl extends ApiBaseBMO implements IAllocationUserStorehouseBMO {
public class AllocationUserStorehouseBMOImpl extends AbstractServiceApiPlusListener implements IAllocationUserStorehouseBMO {
    @Autowired
    private IUserStorehouseInnerServiceSMO userStorehouseInnerServiceSMOImpl;
    @Autowired
    private IResourceStoreInnerServiceSMO resourceStoreInnerServiceSMOImpl;
    /**
     * 添加小区信息
@@ -38,6 +52,82 @@
        JSONArray json = JSONArray.parseArray(resourceStores);
        if (json.size() > 0) {
            Object[] objects = json.toArray();
            String flag = paramInJson.getString("flag");
            if (!StringUtil.isEmpty(flag) && flag.equals("1")) { //损耗
                for (int i = 0; i < objects.length; i++) {
                    Object object = objects[i];
                    JSONObject paramIn = JSONObject.parseObject(String.valueOf(object));
                    ResourceStoreUseRecordPo resourceStoreUseRecordPo = new ResourceStoreUseRecordPo();
                    resourceStoreUseRecordPo.setRsurId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_rsurId));
                    resourceStoreUseRecordPo.setRepairId("-1"); //报修记录
                    resourceStoreUseRecordPo.setResId(paramIn.getString("resId")); //物品资源id
                    resourceStoreUseRecordPo.setCommunityId(paramInJson.getString("communityId")); //小区id
                    resourceStoreUseRecordPo.setStoreId(paramInJson.getString("storeId")); //商户id
                    resourceStoreUseRecordPo.setQuantity(paramIn.getString("giveQuantity")); //损耗数量
                    //根据物品资源id查询物品资源信息
                    ResourceStoreDto resourceStoreDto = new ResourceStoreDto();
                    resourceStoreDto.setResId(paramIn.getString("resId"));
                    List<ResourceStoreDto> resourceStoreDtos = resourceStoreInnerServiceSMOImpl.queryResourceStores(resourceStoreDto);
                    Assert.listOnlyOne(resourceStoreDtos, "查询房屋信息错误!");
                    resourceStoreUseRecordPo.setUnitPrice(resourceStoreDtos.get(0).getPrice()); //物品资源单价
                    resourceStoreUseRecordPo.setCreateUserId(paramInJson.getString("userId")); //创建人id
                    resourceStoreUseRecordPo.setCreateUserName(paramInJson.getString("userName")); //创建人名称
                    resourceStoreUseRecordPo.setRemark(paramIn.getString("purchaseRemark")); //备注
                    resourceStoreUseRecordPo.setResourceStoreName(paramIn.getString("resName")); //物品名称
                    resourceStoreUseRecordPo.setState(paramIn.getString("state")); //1001 报废回收   2002 工单损耗   3003 公用损耗
                    super.insert(dataFlowContext, resourceStoreUseRecordPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_RESOURCE_STORE_USE_RECORD);
                    //个人物品处理
                    UserStorehouseDto userStorehouseDto = new UserStorehouseDto();
                    userStorehouseDto.setUserId(paramInJson.getString("userId"));
                    userStorehouseDto.setResId(paramIn.getString("resId"));
                    //查询个人物品信息
                    List<UserStorehouseDto> userStorehouseDtos = userStorehouseInnerServiceSMOImpl.queryUserStorehouses(userStorehouseDto);
                    Assert.listOnlyOne(userStorehouseDtos, "查询个人物品信息错误!");
                    //获取个人物品信息id
                    String usId = userStorehouseDtos.get(0).getUsId();
                    //获取物品单位
                    if (StringUtil.isEmpty(userStorehouseDtos.get(0).getUnitCode())) {
                        throw new IllegalArgumentException("物品单位不能为空");
                    }
                    String unitCode = userStorehouseDtos.get(0).getUnitCode(); //物品单位
                    //获取物品最小计量单位
                    if (StringUtil.isEmpty(userStorehouseDtos.get(0).getMiniUnitCode())) {
                        throw new IllegalArgumentException("物品最小计量单位不能为空");
                    }
                    String miniUnitCode = userStorehouseDtos.get(0).getMiniUnitCode(); //物品最小计量单位
                    UserStorehousePo userStorehousePo = new UserStorehousePo();
                    userStorehousePo.setUsId(usId); //个人物品id
                    //获取最小单位计量总数
                    String miniStock = userStorehouseDtos.get(0).getMiniStock();
                    //获取最小计量单位数量
                    String miniUnitStock = paramIn.getString("miniUnitStock");
                    //获取报废数量
                    String giveQuantity = paramIn.getString("giveQuantity");
                    //除去报废个人物品剩余的最小单位计量总数
                    BigDecimal num1 = new BigDecimal(miniStock);
                    BigDecimal num2 = new BigDecimal(giveQuantity);
                    BigDecimal quantity = num1.subtract(num2);
                    if (quantity.doubleValue() == 0.0) { //如果减去报废后剩余0个,那么最小计量单位总数和物品数量都变为0
                        userStorehousePo.setMiniStock("0");
                        userStorehousePo.setStock("0");
                    } else {
                        userStorehousePo.setMiniStock(String.valueOf(quantity)); //减去报废后剩余的最小计量单位总数
                        BigDecimal reduceNum = num1.subtract(num2);
                        if (unitCode.equals(miniUnitCode)) { //如果物品单位与最小计量单位相同,就不向上取整
                            userStorehousePo.setStock(String.valueOf(reduceNum));
                        } else { //如果物品最小计量单位与物品单位不同,就向上取整
                            //用转赠后最小计量总数除以最小计量单位数量,并向上取整,获取转赠后的库存数
                            BigDecimal num3 = new BigDecimal(miniUnitStock);
                            BigDecimal unitStock = reduceNum.divide(num3, 2, BigDecimal.ROUND_HALF_UP);
                            Integer stockNumber = (int) Math.ceil(unitStock.doubleValue());
                            userStorehousePo.setStock(String.valueOf(stockNumber)); //减去报废后剩余的个人物品数量
                        }
                    }
                    //更新当前用户个人物品库存数
                    super.update(dataFlowContext, userStorehousePo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_USER_STOREHOUSE);
                    commit(dataFlowContext);
                }
            } else { //退还
            for (int i = 0; i < objects.length; i++) {
                Object object = objects[i];
                JSONObject paramIn = JSONObject.parseObject(String.valueOf(object));
@@ -182,6 +272,7 @@
            }
        }
    }
    }
    /**
@@ -210,4 +301,53 @@
        super.update(dataFlowContext, allocationUserStorehousePo, BusinessTypeConstant.BUSINESS_TYPE_DELETE_ALLOCATION_USER_STOREHOUSE);
    }
    @Override
    public String getServiceCode() {
        return null;
    }
    @Override
    public HttpMethod getHttpMethod() {
        return null;
    }
    @Override
    public ResponseEntity<String> callService(ServiceDataFlowEvent event) {
        return null;
    }
    @Override
    public ResponseEntity<String> callService(DataFlowContext context, String serviceCode, JSONArray businesses) {
        return null;
    }
    @Override
    public ResponseEntity<String> callService(DataFlowContext context, String serviceCode, JSONObject businesses) {
        return null;
    }
    @Override
    public ResponseEntity<String> callService(DataFlowContext context, AppService appService, Map paramIn) {
        return null;
    }
    @Override
    public JSONObject restToCenterProtocol(JSONObject businesses, Map<String, String> headers) {
        return null;
    }
    @Override
    public void freshHttpHeader(HttpHeaders httpHeaders, Map<String, String> headers) {
    }
    @Override
    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) throws ParseException {
    }
    @Override
    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) throws ParseException {
    }
}
service-api/src/main/java/com/java110/api/components/assetImport/ImportOwnerCarComponent.java
New file
@@ -0,0 +1,54 @@
package com.java110.api.components.assetImport;
import com.java110.api.smo.assetExport.IExportOwnerCarSMO;
import com.java110.api.smo.assetImport.impl.ImportOwnerCarSMOImpl;
import com.java110.core.context.IPageData;
import com.java110.core.context.PageData;
import com.java110.dto.app.AppDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
/**
 * 添加应用组件
 *
 * @author fqz
 * @date 2021-12-21
 */
@Component("importOwnerCar")
public class ImportOwnerCarComponent {
    private final static Logger logger = LoggerFactory.getLogger(ImportOwnerCarComponent.class);
    @Autowired
    private ImportOwnerCarSMOImpl importOwnerCarSMOImpl;
    @Autowired
    private IExportOwnerCarSMO exportOwnerCarSMOImpl;
    /**
     * 添加应用数据
     *
     * @param pd 页面数据封装
     * @return ResponseEntity 对象
     */
    public ResponseEntity<String> importData(IPageData pd, MultipartFile uploadFile) throws Exception {
        return importOwnerCarSMOImpl.importExcelData(pd, uploadFile);
    }
    /**
     * 添加应用数据
     *
     * @param pd 页面数据封装
     * @return ResponseEntity 对象
     */
    public ResponseEntity<Object> exportData(IPageData pd) throws Exception {
        IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(), pd.getToken(), pd.getReqData(), pd.getComponentCode(), pd.getComponentMethod(), "",
                pd.getSessionId(), AppDto.WEB_APP_ID, pd.getHeaders());
        return exportOwnerCarSMOImpl.exportExcelData(newPd);
    }
}
service-api/src/main/java/com/java110/api/listener/complaint/ListComplaintsListener.java
@@ -79,7 +79,6 @@
    @Override
    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
        ComplaintDto complaintDto = BeanConvertUtil.covertBean(reqJson, ComplaintDto.class);
        String roomId=reqJson.getString("roomId");
service-api/src/main/java/com/java110/api/listener/fee/PayOweFeeListener.java
@@ -10,6 +10,7 @@
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.dto.app.AppDto;
import com.java110.dto.fee.FeeAttrDto;
import com.java110.dto.fee.FeeDetailDto;
import com.java110.dto.feeReceipt.FeeReceiptDetailDto;
import com.java110.dto.repair.RepairDto;
import com.java110.dto.repair.RepairUserDto;
@@ -18,11 +19,7 @@
import com.java110.intf.community.IRepairInnerServiceSMO;
import com.java110.intf.community.IRepairUserInnerServiceSMO;
import com.java110.intf.community.IRoomInnerServiceSMO;
import com.java110.intf.fee.IFeeAttrInnerServiceSMO;
import com.java110.intf.fee.IFeeConfigInnerServiceSMO;
import com.java110.intf.fee.IFeeInnerServiceSMO;
import com.java110.intf.fee.IFeeReceiptDetailInnerServiceSMO;
import com.java110.intf.fee.IFeeReceiptInnerServiceSMO;
import com.java110.intf.fee.*;
import com.java110.po.feeReceipt.FeeReceiptPo;
import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo;
import com.java110.po.owner.RepairPoolPo;
@@ -181,7 +178,10 @@
        }
        String appId = dataFlowContext.getAppId();
        logger.info("======支付方式======:" + appId + "+======+" + paramObj.containsKey("primeRate") + "======:" + JSONArray.toJSONString(dataFlowContext));
        if (AppDto.OWNER_WECHAT_PAY.equals(appId)) {  //微信支付(欠费缴费无法区分小程序还是微信公众号)
        if (AppDto.OWNER_WECHAT_PAY.equals(appId)
                && FeeDetailDto.PRIME_REATE_WECHAT.equals(paramObj.getString("primeRate"))) {  //微信支付(欠费缴费无法区分小程序还是微信公众号)
            paramObj.put("remark", "线上公众号支付");
        } else {
            paramObj.put("remark", "微信支付");
        }
        paramObj.put("state", "1400");
service-api/src/main/java/com/java110/api/listener/login/UserLoginServiceListener.java
@@ -10,7 +10,6 @@
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.dto.store.StoreDto;
import com.java110.dto.store.StoreUserDto;
import com.java110.dto.user.UserDto;
import com.java110.dto.userLogin.UserLoginDto;
import com.java110.entity.center.AppService;
import com.java110.intf.store.IStoreInnerServiceSMO;
@@ -23,7 +22,6 @@
import com.java110.utils.exception.SMOException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.DateUtil;
import com.java110.utils.util.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -149,11 +147,14 @@
                dataFlowContext.setResponseEntity(responseEntity);
                return;
            }
        }
        StoreDto storeDto = new StoreDto();
        storeDto.setStoreId(storeUserDtos.get(0).getStoreId());
        List<StoreDto> storeDtos = storeInnerServiceSMOImpl.getStores(storeDto);
            if (storeDtos != null && storeDtos.size() > 0) {
        userInfo.put("storeType",storeDtos.get(0).getStoreTypeCd());
            }
        }
        try {
            Map userMap = new HashMap();
service-api/src/main/java/com/java110/api/listener/ownerRepair/GrabbingRepairListener.java
@@ -75,10 +75,14 @@
            DistributedLock.waitGetDistributedLock(key, requestId);
            //获取当前处理员工id
            String staffId = reqJson.getString("userId");
            RepairUserDto repairUser = new RepairUserDto();
            /*RepairUserDto repairUser = new RepairUserDto();
            repairUser.setStaffId(staffId);
            repairUser.setState("10001"); //处理中
            int i = repairUserInnerServiceSMOImpl.queryRepairUsersCount(repairUser);
            int i = repairUserInnerServiceSMOImpl.queryRepairUsersCount(repairUser);*/
            RepairDto repair = new RepairDto();
            repair.setStaffId(staffId);
            repair.setCommunityId(reqJson.getString("communityId"));
            int i = repairInnerServiceSMOImpl.queryStaffRepairsCount(repair);
            //取出开关映射的值(维修师傅未处理最大单数)
            String repairNumber = MappingCache.getValue(DOMAIN_COMMON, REPAIR_NUMBER);
            if (i >= Integer.parseInt(repairNumber)) {
service-api/src/main/java/com/java110/api/listener/ownerRepair/ListOwnerRepairsListener.java
@@ -5,12 +5,13 @@
import com.java110.core.annotation.Java110Listener;
import com.java110.core.context.DataFlowContext;
import com.java110.core.event.service.api.ServiceDataFlowEvent;
import com.java110.intf.common.IFileRelInnerServiceSMO;
import com.java110.intf.community.IRepairInnerServiceSMO;
import com.java110.intf.community.IRepairUserInnerServiceSMO;
import com.java110.dto.file.FileRelDto;
import com.java110.dto.repair.RepairDto;
import com.java110.dto.repair.RepairUserDto;
import com.java110.intf.common.IFileRelInnerServiceSMO;
import com.java110.intf.community.IRepairInnerServiceSMO;
import com.java110.intf.community.IRepairUserInnerServiceSMO;
import com.java110.utils.cache.MappingCache;
import com.java110.utils.constant.ServiceCodeOwnerRepairConstant;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.utils.util.StringUtil;
@@ -164,6 +165,8 @@
        List<PhotoVo> beforePhotos = null;  //维修前图片
        List<PhotoVo> afterPhotos = null;  //维修后图片
        PhotoVo photoVo = null;
        String imgUrl = MappingCache.getValue("IMG_PATH");
        imgUrl += (!StringUtil.isEmpty(imgUrl) && imgUrl.endsWith("/") ? "" : "/");
        for (RepairDto repairDto : ownerRepairs) {
            FileRelDto fileRelDto = new FileRelDto();
            fileRelDto.setObjId(repairDto.getRepairId());
@@ -174,22 +177,26 @@
            afterPhotos = new ArrayList<>();
            for (FileRelDto tmpFileRelDto : fileRelDtos) {
                photoVo = new PhotoVo();
                photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairDto.getCommunityId());
                //photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairDto.getCommunityId());
                photoVo.setUrl(imgUrl + tmpFileRelDto.getFileRealName());
                photoVo.setRelTypeCd(tmpFileRelDto.getRelTypeCd());
                photoVos.add(photoVo);
                if (tmpFileRelDto.getRelTypeCd().equals(FileRelDto.REL_TYPE_CD_REPAIR)) {  //维修图片
                    photoVo = new PhotoVo();
                    photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairDto.getCommunityId());
                   // photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairDto.getCommunityId());
                    photoVo.setUrl(imgUrl + tmpFileRelDto.getFileRealName());
                    photoVo.setRelTypeCd(tmpFileRelDto.getRelTypeCd());
                    repairPhotos.add(photoVo);  //维修图片
                } else if (tmpFileRelDto.getRelTypeCd().equals(FileRelDto.BEFORE_REPAIR_PHOTOS)) {  //维修前图片
                    photoVo = new PhotoVo();
                    photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairDto.getCommunityId());
                    //photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairDto.getCommunityId());
                    photoVo.setUrl(imgUrl + tmpFileRelDto.getFileRealName());
                    photoVo.setRelTypeCd(tmpFileRelDto.getRelTypeCd());
                    beforePhotos.add(photoVo);  //维修前图片
                } else if (tmpFileRelDto.getRelTypeCd().equals(FileRelDto.AFTER_REPAIR_PHOTOS)) {  //维修后图片
                    photoVo = new PhotoVo();
                    photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairDto.getCommunityId());
                    //photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairDto.getCommunityId());
                    photoVo.setUrl(imgUrl + tmpFileRelDto.getFileRealName());
                    photoVo.setRelTypeCd(tmpFileRelDto.getRelTypeCd());
                    afterPhotos.add(photoVo);
                }
service-api/src/main/java/com/java110/api/listener/ownerRepair/RepairDispatchListener.java
@@ -237,10 +237,10 @@
    private void transferRepair(DataFlowContext context, JSONObject reqJson) {
        //获取接受转单的员工
        String staffId = reqJson.getString("staffId");
        RepairUserDto repairUser = new RepairUserDto();
        repairUser.setStaffId(staffId);
        repairUser.setState("10001"); //处理中
        int i = repairUserInnerServiceSMOImpl.queryRepairUsersCount(repairUser);
        RepairDto repair = new RepairDto();
        repair.setStaffId(staffId);
        repair.setState("10001"); //处理中
        int i = repairInnerServiceSMOImpl.queryStaffRepairsCount(repair);
        //取出开关映射的值(维修师傅未处理最大单数)
        String repairNumber = MappingCache.getValue(DOMAIN_COMMON, REPAIR_NUMBER);
        if (i >= Integer.parseInt(repairNumber)) {
@@ -300,10 +300,10 @@
    private void dispacthRepair(DataFlowContext context, JSONObject reqJson) {
        //获取接受派单的员工
        String staffId = reqJson.getString("staffId");
        RepairUserDto repairUser = new RepairUserDto();
        repairUser.setStaffId(staffId);
        repairUser.setState("10001"); //处理中
        int i = repairUserInnerServiceSMOImpl.queryRepairUsersCount(repairUser);
        RepairDto repair = new RepairDto();
        repair.setStaffId(staffId);
        repair.setState("10001"); //处理中
        int i = repairInnerServiceSMOImpl.queryStaffRepairsCount(repair);
        //取出开关映射的值(维修师傅未处理最大单数)
        String repairNumber = MappingCache.getValue(DOMAIN_COMMON, REPAIR_NUMBER);
        if (i >= Integer.parseInt(repairNumber)) {
service-api/src/main/java/com/java110/api/listener/ownerRepair/RepairFinishListener.java
@@ -301,6 +301,7 @@
                resourceStoreUseRecordPo.setCreateUserName(reqJson.getString("userName"));
                resourceStoreUseRecordPo.setRemark(reqJson.getString("context"));
                resourceStoreUseRecordPo.setQuantity(useNumber);
                resourceStoreUseRecordPo.setState("2002"); //1001 报废回收   2002 工单损耗   3003 公用损耗
                //有偿服务
                if (maintenanceType.equals("1001")) {
                    resourceStoreUseRecordPo.setUnitPrice(paramIn.getString("price"));
service-api/src/main/java/com/java110/api/listener/ownerRepair/RepairStartListener.java
New file
@@ -0,0 +1,90 @@
package com.java110.api.listener.ownerRepair;
import com.alibaba.fastjson.JSONObject;
import com.java110.api.listener.AbstractServiceApiPlusListener;
import com.java110.core.annotation.Java110Listener;
import com.java110.core.context.DataFlowContext;
import com.java110.core.event.service.api.ServiceDataFlowEvent;
import com.java110.dto.repair.RepairDto;
import com.java110.dto.repair.RepairUserDto;
import com.java110.intf.community.IRepairInnerServiceSMO;
import com.java110.intf.community.IRepairUserInnerServiceSMO;
import com.java110.po.owner.RepairPoolPo;
import com.java110.po.owner.RepairUserPo;
import com.java110.utils.constant.BusinessTypeConstant;
import com.java110.utils.constant.ServiceCodeRepairDispatchStepConstant;
import com.java110.utils.util.Assert;
import com.java110.utils.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpMethod;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
/**
 * 启动报修单
 *
 * @author fqz
 * @date 2021-12-24
 */
@Java110Listener("repairStartListener")
public class RepairStartListener extends AbstractServiceApiPlusListener {
    @Autowired
    private IRepairInnerServiceSMO repairInnerServiceSMOImpl;
    @Autowired
    private IRepairUserInnerServiceSMO repairUserInnerServiceSMOImpl;
    @Override
    public String getServiceCode() {
        return ServiceCodeRepairDispatchStepConstant.BINDING_REPAIR_START;
    }
    @Override
    public HttpMethod getHttpMethod() {
        return HttpMethod.POST;
    }
    @Override
    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
        Assert.hasKeyAndValue(reqJson, "repairId", "未包含报修单信息");
        Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息");
    }
    @Override
    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
        RepairDto repairDto = new RepairDto();
        repairDto.setRepairId(reqJson.getString("repairId"));
        //查询报修信息
        List<RepairDto> repairDtos = repairInnerServiceSMOImpl.queryRepairs(repairDto);
        Assert.listOnlyOne(repairDtos, "查询报修信息错误!");
        String state = repairDtos.get(0).getState();
        if (!StringUtil.isEmpty(state) && state.equals(RepairDto.STATE_STOP)) { //状态是暂停状态
            RepairPoolPo repairPoolPo = new RepairPoolPo();
            repairPoolPo.setRepairId(reqJson.getString("repairId"));
            repairPoolPo.setState(RepairDto.STATE_TAKING); //状态变为接单状态
            super.update(context, repairPoolPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_REPAIR);
            RepairUserDto repairUserDto = new RepairUserDto();
            repairUserDto.setRepairId(reqJson.getString("repairId"));
            repairUserDto.setState(RepairUserDto.STATE_STOP); //暂停状态
            //查询报修派单
            List<RepairUserDto> repairUserDtos = repairUserInnerServiceSMOImpl.queryRepairUsers(repairUserDto);
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            if (repairUserDtos != null && repairUserDtos.size() > 0) {
                for (RepairUserDto repairUser : repairUserDtos) {
                    if (repairUser.getEndTime() == null) {
                        RepairUserPo repairUserPo = new RepairUserPo();
                        repairUserPo.setRuId(repairUser.getRuId());
                        repairUserPo.setEndTime(simpleDateFormat.format(new Date()));
                        //修改暂停报修状态
                        super.update(context, repairUserPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_REPAIR_USER);
                    }
                }
            } else {
                throw new IllegalArgumentException("启动报修单错误!");
            }
        }
    }
}
service-api/src/main/java/com/java110/api/listener/ownerRepair/RepairStopListener.java
New file
@@ -0,0 +1,97 @@
package com.java110.api.listener.ownerRepair;
import com.alibaba.fastjson.JSONObject;
import com.java110.api.listener.AbstractServiceApiPlusListener;
import com.java110.core.annotation.Java110Listener;
import com.java110.core.context.DataFlowContext;
import com.java110.core.event.service.api.ServiceDataFlowEvent;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.dto.repair.RepairDto;
import com.java110.dto.repair.RepairUserDto;
import com.java110.intf.community.IRepairInnerServiceSMO;
import com.java110.intf.community.IRepairUserInnerServiceSMO;
import com.java110.po.owner.RepairPoolPo;
import com.java110.po.owner.RepairUserPo;
import com.java110.utils.constant.BusinessTypeConstant;
import com.java110.utils.constant.ServiceCodeRepairDispatchStepConstant;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.utils.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpMethod;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
/**
 * 暂停报修单
 *
 * @author fqz
 * @date 2021-12-24
 */
@Java110Listener("repairStopListener")
public class RepairStopListener extends AbstractServiceApiPlusListener {
    @Autowired
    private IRepairInnerServiceSMO repairInnerServiceSMOImpl;
    @Autowired
    private IRepairUserInnerServiceSMO repairUserInnerServiceSMOImpl;
    @Override
    public String getServiceCode() {
        return ServiceCodeRepairDispatchStepConstant.BINDING_REPAIR_STOP;
    }
    @Override
    public HttpMethod getHttpMethod() {
        return HttpMethod.POST;
    }
    @Override
    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) throws ParseException {
        Assert.hasKeyAndValue(reqJson, "repairId", "未包含报修单信息");
        Assert.hasKeyAndValue(reqJson, "remark", "未包含派单内容");
        Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息");
    }
    @Override
    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) throws ParseException {
        RepairDto repairDto = new RepairDto();
        repairDto.setRepairId(reqJson.getString("repairId"));
        //查询报修信息
        List<RepairDto> repairDtos = repairInnerServiceSMOImpl.queryRepairs(repairDto);
        Assert.listOnlyOne(repairDtos, "查询报修单错误!");
        String state = repairDtos.get(0).getState();
        if (!StringUtil.isEmpty(state) && !state.equals(RepairDto.STATE_STOP)) { //报修单不是暂停状态
            RepairPoolPo repairPoolPo = BeanConvertUtil.covertBean(reqJson, RepairPoolPo.class);
            repairPoolPo.setState(RepairDto.STATE_STOP); //将报修状态变为暂停状态
            //更新报修状态
            super.update(context, repairPoolPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_REPAIR);
            RepairUserPo repairUserPo = new RepairUserPo();
            repairUserPo.setRuId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_ruId)); //报修派单id
            repairUserPo.setRepairId(reqJson.getString("repairId")); //报修派单
            repairUserPo.setCommunityId(reqJson.getString("communityId")); //小区id
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            repairUserPo.setCreateTime(simpleDateFormat.format(new Date())); //创建时间
            repairUserPo.setState(RepairUserDto.STATE_STOP); //状态(暂停状态)
            repairUserPo.setContext(reqJson.getString("remark")); //报修内容
            repairUserPo.setStaffId(reqJson.getString("userId")); //当前处理员工id
            repairUserPo.setStaffName(reqJson.getString("userName")); //当前处理员工名称
            RepairUserDto repairUserDto = new RepairUserDto();
            repairUserDto.setRepairId(reqJson.getString("repairId"));
            repairUserDto.setState(RepairUserDto.STATE_DOING); //处理中状态
            //查询报修派单
            List<RepairUserDto> repairUserDtos = repairUserInnerServiceSMOImpl.queryRepairUsers(repairUserDto);
            Assert.listOnlyOne(repairUserDtos, "查询报修派单错误!");
            repairUserPo.setPreStaffId(repairUserDtos.get(0).getStaffId()); //上一节点处理员工id
            repairUserPo.setPreStaffName(repairUserDtos.get(0).getStaffName()); //上一节点处理员工名称
            repairUserPo.setStartTime(simpleDateFormat.format(new Date())); //开始时间
            repairUserPo.setRepairEvent(RepairUserDto.REPAIR_EVENT_AUDIT_USER); //审核用户
            repairUserPo.setPreRuId(repairUserDtos.get(0).getRuId()); //上一节点处理id
            super.insert(context, repairUserPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_REPAIR_USER);
        }
    }
}
service-api/src/main/java/com/java110/api/listener/resourceStore/SaveAllocationUserStorehouseListener.java
@@ -27,7 +27,7 @@
    @Override
    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
        //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
        Assert.hasKeyAndValue(reqJson, "acceptUserId", "请求报文中未包含acceptUserId");
        //Assert.hasKeyAndValue(reqJson, "acceptUserId", "请求报文中未包含acceptUserId");
        Assert.hasKeyAndValue(reqJson, "storeId", "请求报文中未包含storeId");
    }
service-api/src/main/java/com/java110/api/properties/WechatAuthProperties.java
@@ -129,6 +129,10 @@
    }
    public String getWechatAppId() {
        String wechatAppIdCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "wechatAppId");
        if (!StringUtil.isEmpty(wechatAppIdCache)) {
            return wechatAppIdCache;
        }
        return wechatAppId;
    }
@@ -137,6 +141,10 @@
    }
    public String getWechatAppSecret() {
        String wechatAppSecretCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "wechatAppSecret");
        if (!StringUtil.isEmpty(wechatAppSecretCache)) {
            return wechatAppSecretCache;
        }
        return wechatAppSecret;
    }
service-api/src/main/java/com/java110/api/smo/assetExport/IExportOwnerCarSMO.java
New file
@@ -0,0 +1,20 @@
package com.java110.api.smo.assetExport;
import com.java110.core.context.IPageData;
import org.springframework.http.ResponseEntity;
/**
 * @author fqz
 * @date 2021-12-21
 */
public interface IExportOwnerCarSMO {
    /**
     * 导入excel数据
     *
     * @param pd 前台数据封装
     * @return ResponseEntity
     */
    public ResponseEntity<Object> exportExcelData(IPageData pd) throws Exception;
}
service-api/src/main/java/com/java110/api/smo/assetExport/impl/ExportOwnerCarSMOImpl.java
New file
@@ -0,0 +1,103 @@
package com.java110.api.smo.assetExport.impl;
import com.alibaba.fastjson.JSONObject;
import com.java110.api.smo.DefaultAbstractComponentSMO;
import com.java110.api.smo.assetExport.IExportOwnerCarSMO;
import com.java110.core.context.IPageData;
import com.java110.entity.component.ComponentValidateResult;
import com.java110.utils.util.Assert;
import com.java110.utils.util.DateUtil;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@Service("exportOwnerCarSMOImpl")
public class ExportOwnerCarSMOImpl extends DefaultAbstractComponentSMO implements IExportOwnerCarSMO {
    @Autowired
    private RestTemplate restTemplate;
    @Override
    public ResponseEntity<Object> exportExcelData(IPageData pd) throws Exception {
        ComponentValidateResult result = this.validateStoreStaffCommunityRelationship(pd, restTemplate);
        Assert.hasKeyAndValue(JSONObject.parseObject(pd.getReqData()), "communityId", "请求中未包含小区");
        Workbook workbook = null;  //工作簿
        //工作表
        workbook = new XSSFWorkbook();
        //获取楼信息
        getOwnerCar(pd, result, workbook);
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        MultiValueMap headers = new HttpHeaders();
        headers.add("content-type", "application/octet-stream;charset=UTF-8");
        headers.add("Content-Disposition", "attachment;filename=ownerCarImport_" + DateUtil.getyyyyMMddhhmmssDateString() + ".xlsx");
        headers.add("Pargam", "no-cache");
        headers.add("Cache-Control", "no-cache");
        //headers.add("Content-Disposition", "attachment; filename=" + outParam.getString("fileName"));
        headers.add("Accept-Ranges", "bytes");
        byte[] context = null;
        try {
            workbook.write(os);
            context = os.toByteArray();
            os.close();
            workbook.close();
        } catch (IOException e) {
            e.printStackTrace();
            // 保存数据
            return new ResponseEntity<Object>("导出失败", HttpStatus.INTERNAL_SERVER_ERROR);
        }
        // 保存数据
        return new ResponseEntity<Object>(context, headers, HttpStatus.OK);
    }
    /**
     * 获取 房屋信息
     *
     * @param componentValidateResult
     * @param workbook
     */
    private void getOwnerCar(IPageData pd, ComponentValidateResult componentValidateResult, Workbook workbook) {
        Sheet sheet = workbook.createSheet("业主车辆信息");
        Row row = sheet.createRow(0);
        Cell cell0 = row.createCell(0);
        cell0.setCellValue("房屋号: 格式为xx-xx-xx(楼栋-单元-房屋);\n车辆类型:9901表示家用小汽车,9902表示客车,9903表示货车;" +
                "\n车位:xx-xx(停车场-车位)" + "\n起租时间: 格式为YYYY-MM-DD HH:mm:ss;\n截止时间: 格式为YYYY-MM-DD HH:mm:ss;" +
                "\n停车场类型:1001表示地上停车场,2001表示地下停车场;\n车位状态:S表示出售,H表示出租;" +
                "\n注意:所有单元格式为文本");
        CellStyle cs = workbook.createCellStyle();
        cs.setWrapText(true);  //关键
        cell0.setCellStyle(cs);
        row.setHeight((short) (200 * 10));
        row = sheet.createRow(1);
        row.createCell(0).setCellValue("车牌号");
        row.createCell(1).setCellValue("房屋号");
        row.createCell(2).setCellValue("车辆品牌");
        row.createCell(3).setCellValue("车辆类型");
        row.createCell(4).setCellValue("颜色");
        row.createCell(5).setCellValue("业主");
        row.createCell(6).setCellValue("车位");
        row.createCell(7).setCellValue("起租时间");
        row.createCell(8).setCellValue("截止时间");
        row.createCell(9).setCellValue("停车场类型");
        row.createCell(10).setCellValue("车位类型");
        CellRangeAddress region = new CellRangeAddress(0, 0, 0, 8);
        sheet.addMergedRegion(region);
    }
    public RestTemplate getRestTemplate() {
        return restTemplate;
    }
    public void setRestTemplate(RestTemplate restTemplate) {
        this.restTemplate = restTemplate;
    }
}
service-api/src/main/java/com/java110/api/smo/assetExport/impl/ExportReportFeeSMOImpl.java
@@ -887,12 +887,13 @@
        row.createCell(4).setCellValue("物品名称");
        row.createCell(5).setCellValue("物品规格");
        row.createCell(6).setCellValue("是否是固定物品");
        row.createCell(7).setCellValue("物品使用数量");
        row.createCell(8).setCellValue("物品价格");
        row.createCell(9).setCellValue("使用人ID");
        row.createCell(10).setCellValue("使用人");
        row.createCell(11).setCellValue("创建时间");
        row.createCell(12).setCellValue("备注");
        row.createCell(7).setCellValue("物品使用类型");
        row.createCell(8).setCellValue("物品使用数量");
        row.createCell(9).setCellValue("物品价格");
        row.createCell(10).setCellValue("使用人ID");
        row.createCell(11).setCellValue("使用人");
        row.createCell(12).setCellValue("创建时间");
        row.createCell(13).setCellValue("备注");
        JSONArray resourceStoreUseRecords = this.getResourceStoreUseRecordManage(pd, result);
        if (resourceStoreUseRecords == null || resourceStoreUseRecords.size() == 0) {
            return;
@@ -908,12 +909,13 @@
            row.createCell(4).setCellValue(dataObj.getString("resourceStoreName"));
            row.createCell(5).setCellValue(dataObj.getString("specName"));
            row.createCell(6).setCellValue(dataObj.getString("isFixedName"));
            row.createCell(7).setCellValue(dataObj.getString("quantity") + dataObj.getString("miniUnitCodeName"));
            row.createCell(8).setCellValue(dataObj.getString("unitPrice"));
            row.createCell(9).setCellValue(dataObj.getString("createUserId"));
            row.createCell(10).setCellValue(dataObj.getString("createUserName"));
            row.createCell(11).setCellValue(dataObj.getString("createTime"));
            row.createCell(12).setCellValue(dataObj.getString("remark"));
            row.createCell(7).setCellValue(dataObj.getString("stateName"));
            row.createCell(8).setCellValue(dataObj.getString("quantity") + dataObj.getString("miniUnitCodeName"));
            row.createCell(9).setCellValue(dataObj.getString("unitPrice"));
            row.createCell(10).setCellValue(dataObj.getString("createUserId"));
            row.createCell(11).setCellValue(dataObj.getString("createUserName"));
            row.createCell(12).setCellValue(dataObj.getString("createTime"));
            row.createCell(13).setCellValue(dataObj.getString("remark"));
        }
    }
service-api/src/main/java/com/java110/api/smo/assetImport/IImportOwnerCarSMO.java
New file
@@ -0,0 +1,22 @@
package com.java110.api.smo.assetImport;
import com.java110.core.context.IPageData;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;
/**
 * @author fqz
 * @date 2021-12-21
 */
public interface IImportOwnerCarSMO {
    /**
     * 导入excel数据
     *
     * @param pd         前台数据封装
     * @param uploadFile excel 文件
     * @return ResponseEntity
     */
    public ResponseEntity<String> importExcelData(IPageData pd, MultipartFile uploadFile) throws Exception;
}
service-api/src/main/java/com/java110/api/smo/assetImport/impl/ImportOwnerCarSMOImpl.java
New file
@@ -0,0 +1,260 @@
package com.java110.api.smo.assetImport.impl;
import com.alibaba.fastjson.JSONObject;
import com.java110.api.smo.DefaultAbstractComponentSMO;
import com.java110.api.smo.assetImport.IImportOwnerCarSMO;
import com.java110.core.context.IPageData;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.dto.FloorDto;
import com.java110.dto.RoomDto;
import com.java110.dto.UnitDto;
import com.java110.dto.owner.OwnerCarDto;
import com.java110.dto.owner.OwnerDto;
import com.java110.dto.owner.OwnerRoomRelDto;
import com.java110.dto.parking.ParkingAreaDto;
import com.java110.dto.parking.ParkingSpaceDto;
import com.java110.entity.component.ComponentValidateResult;
import com.java110.intf.community.*;
import com.java110.intf.user.*;
import com.java110.po.car.OwnerCarPo;
import com.java110.po.parking.ParkingSpacePo;
import com.java110.utils.util.*;
import com.java110.vo.ResultVo;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.multipart.MultipartFile;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Service("importOwnerCarSMOImpl")
public class ImportOwnerCarSMOImpl extends DefaultAbstractComponentSMO implements IImportOwnerCarSMO {
    private final static Logger logger = LoggerFactory.getLogger(ImportOwnerCarSMOImpl.class);
    @Autowired
    private RestTemplate restTemplate;
    @Autowired
    private IOwnerCarV1InnerServiceSMO ownerCarV1InnerServiceSMOImpl;
    @Autowired
    private IFloorInnerServiceSMO floorInnerServiceSMOImpl;
    @Autowired
    private IUnitInnerServiceSMO unitInnerServiceSMOImpl;
    @Autowired
    private IRoomInnerServiceSMO roomInnerServiceSMOImpl;
    @Autowired
    private IOwnerRoomRelInnerServiceSMO ownerRoomRelInnerServiceSMOImpl;
    @Autowired
    private IOwnerInnerServiceSMO ownerInnerServiceSMOImpl;
    @Autowired
    private IParkingAreaInnerServiceSMO parkingAreaInnerServiceSMOImpl;
    @Autowired
    private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl;
    @Override
    public ResponseEntity<String> importExcelData(IPageData pd, MultipartFile uploadFile) throws Exception {
        try {
            ComponentValidateResult result = this.validateStoreStaffCommunityRelationship(pd, restTemplate);
            //InputStream is = uploadFile.getInputStream();
            Workbook workbook = ImportExcelUtils.createWorkbook(uploadFile);  //工作簿
            List<OwnerCarDto> ownerCars = new ArrayList<OwnerCarDto>();
            //获取楼信息
            getOwnerCars(workbook, ownerCars);
            // 保存数据
            return dealExcelData(pd, ownerCars, result);
        } catch (Exception e) {
            logger.error("导入失败 ", e);
            return new ResponseEntity<String>("非常抱歉,您填写的模板数据有误:" + e.getMessage(), HttpStatus.BAD_REQUEST);
        }
    }
    /**
     * 获取业主车辆信息
     *
     * @param workbook
     * @param ownerCarDtos
     */
    private void getOwnerCars(Workbook workbook, List<OwnerCarDto> ownerCarDtos) throws ParseException {
        Sheet sheet = null;
        sheet = ImportExcelUtils.getSheet(workbook, "业主车辆信息");
        List<Object[]> oList = ImportExcelUtils.listFromSheet(sheet);
        OwnerCarDto importOwnerCar = null;
        for (int osIndex = 0; osIndex < oList.size(); osIndex++) {
            Object[] os = oList.get(osIndex);
            if (osIndex == 0 || osIndex == 1) { // 第一行是 头部信息 直接跳过
                continue;
            }
            if (StringUtil.isNullOrNone(os[0])) {
                continue;
            }
            Assert.hasValue(os[0], (osIndex + 1) + "车牌号不能为空");
            Assert.hasValue(os[1], (osIndex + 1) + "房屋号不能为空");
            Assert.hasValue(os[2], (osIndex + 1) + "车辆品牌不能为空");
            Assert.hasValue(os[3], (osIndex + 1) + "车辆类型不能为空");
            Assert.hasValue(os[4], (osIndex + 1) + "颜色不能为空");
            Assert.hasValue(os[5], (osIndex + 1) + "业主不能为空");
            Assert.hasValue(os[6], (osIndex + 1) + "车位不能为空");
            Assert.hasValue(os[7], (osIndex + 1) + "起租时间不能为空");
            Assert.hasValue(os[8], (osIndex + 1) + "截止时间不能为空");
            Assert.hasValue(os[9], (osIndex + 1) + "停车场类型不能为空");
            Assert.hasValue(os[10], (osIndex + 1) + "车位类型不能为空");
            String startTime = excelDoubleToDate(os[7].toString());
            String endTime = excelDoubleToDate(os[8].toString());
            Assert.isDate(startTime, DateUtil.DATE_FORMATE_STRING_A, (osIndex + 1) + "行开始时间格式错误 请填写YYYY-MM-DD HH:mm:ss文本格式");
            Assert.isDate(endTime, DateUtil.DATE_FORMATE_STRING_A, (osIndex + 1) + "行结束时间格式错误 请填写YYYY-MM-DD HH:mm:ss文本格式");
            importOwnerCar = new OwnerCarDto();
            importOwnerCar.setCarNum(os[0].toString());
            importOwnerCar.setRoomName(os[1].toString());
            importOwnerCar.setCarBrand(os[2].toString());
            importOwnerCar.setCarType(os[3].toString());
            importOwnerCar.setCarColor(os[4].toString());
            importOwnerCar.setOwnerName(os[5].toString());
            //获取车位
            String parkingLot = os[6].toString();
            String[] split = parkingLot.split("-");
            importOwnerCar.setAreaNum(split[0]);
            importOwnerCar.setNum(split[1]);
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            importOwnerCar.setStartTime(simpleDateFormat.parse(startTime));
            importOwnerCar.setEndTime(simpleDateFormat.parse(endTime));
            importOwnerCar.setTypeCd(os[9].toString());
            importOwnerCar.setSpaceSate(os[10].toString());
            ownerCarDtos.add(importOwnerCar);
        }
    }
    /**
     * 处理ExcelData数据
     */
    private ResponseEntity<String> dealExcelData(IPageData pd, List<OwnerCarDto> ownerCarDtos, ComponentValidateResult result) {
        ResponseEntity<String> responseEntity = null;
        //保存单元信息 和 楼栋信息
        responseEntity = savedOwnerCars(pd, ownerCarDtos, result);
        if (responseEntity == null || responseEntity.getStatusCode() != HttpStatus.OK) {
            return responseEntity;
        }
        return responseEntity;
    }
    private ResponseEntity<String> savedOwnerCars(IPageData pd, List<OwnerCarDto> ownerCars, ComponentValidateResult result) {
        JSONObject reqJson = JSONObject.parseObject(pd.getReqData());
        if (ownerCars.size() < 1) {
            throw new IllegalArgumentException("没有数据需要处理");
        }
        for (OwnerCarDto ownerCarDto : ownerCars) {
            OwnerCarPo ownerCarPo = BeanConvertUtil.covertBean(ownerCarDto, OwnerCarPo.class);
            //获取房屋名称
            String roomName = ownerCarDto.getRoomName();
            String[] split = roomName.split("-");
            String floorNum = split[0];
            String unitNum = split[1];
            String roomNum = split[2];
            FloorDto floorDto = new FloorDto();
            floorDto.setCommunityId(reqJson.getString("communityId"));
            floorDto.setFloorNum(floorNum);
            //查询楼栋
            List<FloorDto> floorDtos = floorInnerServiceSMOImpl.queryFloors(floorDto);
            Assert.listOnlyOne(floorDtos, "查询楼栋错误!");
            UnitDto unitDto = new UnitDto();
            unitDto.setUnitNum(unitNum);
            unitDto.setFloorId(floorDtos.get(0).getFloorId());
            //查询单元
            List<UnitDto> unitDtos = unitInnerServiceSMOImpl.queryUnits(unitDto);
            Assert.listOnlyOne(unitDtos, "查询单元错误!");
            RoomDto roomDto = new RoomDto();
            roomDto.setRoomNum(roomNum);
            roomDto.setUnitId(unitDtos.get(0).getUnitId());
            //查询房屋
            List<RoomDto> roomDtos = roomInnerServiceSMOImpl.queryRooms(roomDto);
            Assert.listOnlyOne(roomDtos, "查询房屋错误!");
            OwnerRoomRelDto ownerRoomRelDto = new OwnerRoomRelDto();
            ownerRoomRelDto.setRoomId(roomDtos.get(0).getRoomId());
            //查询业主房屋关系表
            List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelInnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto);
            Assert.listOnlyOne(ownerRoomRelDtos, "查询业主房屋信息错误!");
            OwnerDto ownerDto = new OwnerDto();
            ownerDto.setOwnerId(ownerRoomRelDtos.get(0).getOwnerId());
            ownerDto.setName(ownerCarDto.getOwnerName());
            //查询业主
            List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwners(ownerDto);
            Assert.listOnlyOne(ownerDtos, "查询业主信息错误!");
            if (ownerDtos.get(0).getOwnerTypeCd().equals("1001")) { //业主
                ownerCarPo.setCarTypeCd("1001"); //业主车辆
            } else {
                ownerCarPo.setCarTypeCd("1002"); //成员车辆
            }
            ParkingAreaDto parkingAreaDto = new ParkingAreaDto();
            parkingAreaDto.setNum(ownerCarDto.getAreaNum());
            parkingAreaDto.setTypeCd(ownerCarDto.getTypeCd());
            //查询停车场
            List<ParkingAreaDto> parkingAreaDtos = parkingAreaInnerServiceSMOImpl.queryParkingAreas(parkingAreaDto);
            Assert.listOnlyOne(parkingAreaDtos, "查询停车场错误!");
            ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto();
            parkingSpaceDto.setNum(ownerCarDto.getNum());
            parkingSpaceDto.setPaId(parkingAreaDtos.get(0).getPaId());
            //查询停车位
            List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto);
            Assert.listOnlyOne(parkingSpaceDtos, "查询停车位错误!");
            //获取停车位状态(出售 S,出租 H ,空闲 F)
            String state = parkingSpaceDtos.get(0).getState();
            if (!StringUtil.isEmpty(state) && !state.equals("F")) {
                throw new IllegalArgumentException(parkingAreaDtos.get(0).getNum() + "停车场-" + parkingSpaceDtos.get(0).getNum() + "停车位不是空闲状态!");
            }
            ownerCarPo.setPsId(parkingSpaceDtos.get(0).getPsId());
            ownerCarPo.setOwnerId(ownerRoomRelDtos.get(0).getOwnerId());
            ownerCarPo.setUserId("-1");
            ownerCarPo.setCommunityId(reqJson.getString("communityId"));
            ownerCarPo.setCarId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_carId));
            ownerCarPo.setMemberId(ownerCarPo.getCarId());
            ownerCarPo.setState("1001"); //1001 正常状态,2002 车位释放欠费状态,3003 车位释放
            ownerCarV1InnerServiceSMOImpl.saveOwnerCar(ownerCarPo);
            ParkingSpacePo parkingSpacePo = new ParkingSpacePo();
            parkingSpacePo.setPsId(parkingSpaceDtos.get(0).getPsId()); //车位id
            parkingSpacePo.setState(ownerCarDto.getSpaceSate());
            parkingSpaceInnerServiceSMOImpl.updateParkingSpace(parkingSpacePo);
        }
        return ResultVo.success();
    }
    //解析Excel日期格式
    public static String excelDoubleToDate(String strDate) {
        if (strDate.length() == 5) {
            try {
                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                Date tDate = DoubleToDate(Double.parseDouble(strDate));
                return sdf.format(tDate);
            } catch (Exception e) {
                e.printStackTrace();
                return strDate;
            }
        }
        return strDate;
    }
    //解析Excel日期格式
    public static Date DoubleToDate(Double dVal) {
        Date tDate = new Date();
        long localOffset = tDate.getTimezoneOffset() * 60000; //系统时区偏移 1900/1/1 到 1970/1/1 的 25569 天
        tDate.setTime((long) ((dVal - 25569) * 24 * 3600 * 1000 + localOffset));
        return tDate;
    }
}
service-api/src/main/java/com/java110/api/smo/payment/impl/ToPaySMOImpl.java
@@ -94,7 +94,6 @@
        double money = Double.parseDouble(orderInfo.getString("receivedAmount"));
        //需要判断金额是否 == 0 等于0 直接掉缴费通知接口
        if (money <= 0) {
            JSONObject paramOut = new JSONObject();
            paramOut.put("oId", orderId);
            String urlOut = "fee.payFeeConfirm";
service-common/src/main/java/com/java110/common/smo/impl/FileInnerServiceSMOImpl.java
@@ -75,9 +75,13 @@
        String context = "";
        String ossSwitch = MappingCache.getValue(OSSUtil.DOMAIN, OSSUtil.OSS_SWITCH);
        if (StringUtil.isEmpty(ossSwitch) || !OSSUtil.OSS_SWITCH_OSS.equals(ossSwitch)) {
            context = ftpUploadTemplate.download(ftpPath, fileName, java110Properties.getFtpServer(),
                    java110Properties.getFtpPort(), java110Properties.getFtpUserName(),
                    java110Properties.getFtpUserPassword());
            String ftpServer = MappingCache.getValue( FtpUploadTemplate.FTP_DOMAIN, FtpUploadTemplate.FTP_SERVER);
            int ftpPort = Integer.parseInt(MappingCache.getValue( FtpUploadTemplate.FTP_DOMAIN, FtpUploadTemplate.FTP_PORT));
            String ftpUserName = MappingCache.getValue( FtpUploadTemplate.FTP_DOMAIN, FtpUploadTemplate.FTP_USERNAME);
            String ftpUserPassword = MappingCache.getValue( FtpUploadTemplate.FTP_DOMAIN, FtpUploadTemplate.FTP_USERPASSWORD);
            context = ftpUploadTemplate.download(ftpPath, fileName, ftpServer,
                    ftpPort, ftpUserName,
                    ftpUserPassword);
        }else{
            context = ossUploadTemplate.download(ftpPath, fileName, java110Properties.getFtpServer(),
                    java110Properties.getFtpPort(), java110Properties.getFtpUserName(),
service-community/src/main/java/com/java110/community/api/RoomRenovationApi.java
@@ -542,6 +542,9 @@
                                                      @RequestParam(value = "personTel", required = false) String personTel,
                                                      @RequestParam(value = "state", required = false) String state,
                                                      @RequestParam(value = "isPostpone", required = false) String isPostpone,
                                                      @RequestParam(value = "renovationTime", required = false) String renovationTime,
                                                      @RequestParam(value = "renovationStartTime", required = false) String renovationStartTime,
                                                      @RequestParam(value = "renovationEndTime", required = false) String renovationEndTime,
                                                      @RequestHeader(value = "user-id") String userId,
                                                      @RequestParam(value = "page", required = false) int page,
                                                      @RequestParam(value = "row", required = false) int row) {
@@ -556,6 +559,9 @@
        roomRenovationDto.setState(state);
        roomRenovationDto.setUserId(userId);
        roomRenovationDto.setIsPostpone(isPostpone);
        roomRenovationDto.setRenovationTime(renovationTime);
        roomRenovationDto.setRenovationStartTime(renovationStartTime);
        roomRenovationDto.setRenovationEndTime(renovationEndTime);
        return getRoomRenovationBMOImpl.get(roomRenovationDto);
    }
service-community/src/main/java/com/java110/community/listener/repair/AbstractRepairSettingBusinessServiceDataFlowListener.java
@@ -39,7 +39,8 @@
        businessRepairSettingInfo.put("newBId", businessRepairSettingInfo.get("b_id"));
        businessRepairSettingInfo.put("operate", businessRepairSettingInfo.get("operate"));
        businessRepairSettingInfo.put("repairTypeName", businessRepairSettingInfo.get("repair_type_name"));
        businessRepairSettingInfo.put("repairType", businessRepairSettingInfo.get("repair_type"));
        businessRepairSettingInfo.put("repairSettingType", businessRepairSettingInfo.get("repair_setting_type"));
        businessRepairSettingInfo.put("settingType", businessRepairSettingInfo.get("setting_type"));
        businessRepairSettingInfo.put("remark", businessRepairSettingInfo.get("remark"));
        businessRepairSettingInfo.put("communityId", businessRepairSettingInfo.get("community_id"));
        businessRepairSettingInfo.put("repairWay", businessRepairSettingInfo.get("repair_way"));
@@ -76,6 +77,7 @@
        currentRepairSettingInfo.put("operate", currentRepairSettingInfo.get("operate"));
        currentRepairSettingInfo.put("repairTypeName", currentRepairSettingInfo.get("repair_type_name"));
        currentRepairSettingInfo.put("repairType", currentRepairSettingInfo.get("repair_type"));
        currentRepairSettingInfo.put("repairSettingType", currentRepairSettingInfo.get("repair_setting_type"));
        currentRepairSettingInfo.put("remark", currentRepairSettingInfo.get("remark"));
        currentRepairSettingInfo.put("communityId", currentRepairSettingInfo.get("community_id"));
        currentRepairSettingInfo.put("repairWay", currentRepairSettingInfo.get("repair_way"));
service-fee/src/main/java/com/java110/fee/cmd/fee/PayFeeConfirmCmd.java
@@ -3,11 +3,11 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.java110.core.annotation.Java110Cmd;
import com.java110.core.context.DataFlowContext;
import com.java110.core.context.ICmdDataFlowContext;
import com.java110.core.event.cmd.AbstractServiceCmdListener;
import com.java110.core.event.cmd.CmdEvent;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.dto.account.AccountDto;
import com.java110.dto.app.AppDto;
import com.java110.dto.couponUser.CouponUserDto;
import com.java110.dto.fee.FeeAttrDto;
@@ -15,17 +15,17 @@
import com.java110.dto.fee.FeeDto;
import com.java110.dto.feeDiscount.ComputeDiscountDto;
import com.java110.dto.owner.OwnerCarDto;
import com.java110.dto.payFeeDetailDiscount.PayFeeDetailDiscountDto;
import com.java110.dto.repair.RepairDto;
import com.java110.dto.repair.RepairUserDto;
import com.java110.entity.order.Orders;
import com.java110.fee.bmo.fee.IFeeBMO;
import com.java110.intf.acct.IAccountInnerServiceSMO;
import com.java110.intf.acct.ICouponUserDetailV1InnerServiceSMO;
import com.java110.intf.acct.ICouponUserV1InnerServiceSMO;
import com.java110.intf.community.IRepairUserInnerServiceSMO;
import com.java110.intf.community.IRoomInnerServiceSMO;
import com.java110.intf.fee.*;
import com.java110.intf.user.IOwnerCarInnerServiceSMO;
import com.java110.po.accountDetail.AccountDetailPo;
import com.java110.po.applyRoomDiscount.ApplyRoomDiscountPo;
import com.java110.po.car.OwnerCarPo;
import com.java110.po.couponUser.CouponUserPo;
@@ -34,8 +34,6 @@
import com.java110.po.owner.RepairUserPo;
import com.java110.po.payFeeDetailDiscount.PayFeeDetailDiscountPo;
import com.java110.utils.cache.CommonCache;
import com.java110.utils.constant.BusinessTypeConstant;
import com.java110.utils.constant.CommonConstant;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
@@ -43,8 +41,6 @@
import com.java110.utils.util.StringUtil;
import com.java110.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import java.math.BigDecimal;
import java.text.DecimalFormat;
@@ -99,6 +95,9 @@
    @Autowired
    private ICouponUserDetailV1InnerServiceSMO couponUserDetailV1InnerServiceSMOImpl;
    @Autowired
    private IAccountInnerServiceSMO accountInnerServiceSMOImpl;
    //默认序列
    protected static final int DEFAULT_SEQ = 1;
@@ -125,19 +124,20 @@
            paramObj.put("remark", "线上小程序支付");
        }
        //处理现金账户
        dealAccount(paramObj);
        //处理 优惠折扣
        addDiscount(paramObj);
        //修改已使用优惠卷信息
        modifyCouponUser(paramObj);
        //添加单元信息
        feeBMOImpl.addFeePreDetail(paramObj);
        feeBMOImpl.modifyPreFee(paramObj);
        double discountPrice = paramObj.getDouble("discountPrice");
        if (discountPrice > 0) {
            addDiscount(paramObj);
        }
        dealOwnerCartEndTime(paramObj);
        //修改已使用优惠卷信息
        modifyCouponUser(paramObj);
        //判断是否有派单属性ID
        FeeAttrDto feeAttrDto = new FeeAttrDto();
@@ -228,10 +228,63 @@
        cmdDataFlowContext.setResponseEntity(ResultVo.success());
    }
    private void dealAccount(JSONObject paramObj) {
        if (!paramObj.containsKey("deductionAmount") || paramObj.getDouble("deductionAmount") <= 0) {
            return;
        }
        BigDecimal deductionAmount = new BigDecimal(paramObj.getDouble("deductionAmount"));
        JSONArray accountDtos = paramObj.getJSONArray("selectUserAccount");
        BigDecimal amount = null;
        AccountDto accountDto = null;
        for (int accountIndex = 0; accountIndex < accountDtos.size(); accountIndex++) {
            accountDto = BeanConvertUtil.covertBean(accountDtos.getJSONObject(accountIndex), AccountDto.class);
            amount = new BigDecimal(Double.parseDouble(accountDto.getAmount()));
            AccountDetailPo accountDetailPo = new AccountDetailPo();
            accountDetailPo.setAcctId(accountDto.getAcctId());
            accountDetailPo.setObjId(accountDto.getObjId());
            if (amount.doubleValue() < deductionAmount.doubleValue()) {
                accountDetailPo.setAmount(amount.doubleValue() + "");
                deductionAmount = deductionAmount.subtract(amount).setScale(2, BigDecimal.ROUND_HALF_UP);
            } else {
                accountDetailPo.setAmount(deductionAmount.doubleValue() + "");
                deductionAmount = deductionAmount.subtract(deductionAmount).setScale(2, BigDecimal.ROUND_HALF_UP);
            }
            int flag = accountInnerServiceSMOImpl.withholdAccount(accountDetailPo);
            if (flag < 1) {
                throw new CmdException("扣款失败");
            }
        }
        if (deductionAmount.doubleValue() > 0) {
            throw new CmdException("账户金额不足");
        }
        paramObj.put("remark", paramObj.getString("remark") + "-现金账户抵扣" + paramObj.getDouble("deductionAmount") + "元");
    }
    private void modifyCouponUser(JSONObject paramObj) {
        FeeDto feeInfo = (FeeDto) paramObj.get("feeInfo");
        List<CouponUserDto> couponUserDtos = (List<CouponUserDto>) paramObj.get("couponUserDtos");
        for (CouponUserDto couponUser : couponUserDtos) {
        if (!paramObj.containsKey("couponPrice") || paramObj.getDouble("couponPrice") <= 0) {
            return;
        }
        //FeeDto feeInfo = (FeeDto) paramObj.get("feeInfo");
        CouponUserDto couponUserDto = null;
        JSONArray couponUserDtos = paramObj.getJSONArray("couponUserDtos");
        CouponUserDto couponUser = null;
        for (int accountIndex = 0; accountIndex < couponUserDtos.size(); accountIndex++) {
            couponUser = BeanConvertUtil.covertBean(couponUserDtos.getJSONObject(accountIndex), CouponUserDto.class);
            couponUserDto = new CouponUserDto();
            couponUserDto.setCouponId(couponUser.getCouponId());
            couponUserDto.setState(CouponUserDto.COUPON_STATE_RUN);
            List<CouponUserDto> couponUserDtos1 = couponUserV1InnerServiceSMOImpl.queryCouponUsers(couponUserDto);
            if (couponUserDtos1 == null || couponUserDtos1.size() < 1) {
                throw new CmdException("优惠券被使用");
            }
            CouponUserPo couponUserPo = new CouponUserPo();
            couponUserPo.setState(CouponUserDto.COUPON_STATE_STOP);
            couponUserPo.setCouponId(couponUser.getCouponId());
@@ -245,8 +298,8 @@
            couponUserDetailPo.setUserId(couponUser.getUserId());
            couponUserDetailPo.setCouponName(couponUser.getCouponName());
            couponUserDetailPo.setUserName(couponUser.getUserName());
            couponUserDetailPo.setObjId(feeInfo.getFeeId());
            couponUserDetailPo.setObjType(feeInfo.getFeeTypeCd());
            couponUserDetailPo.setObjId(paramObj.getString("feeId"));
            couponUserDetailPo.setObjType(paramObj.getString("feeTypeCd"));
            couponUserDetailPo.setOrderId(paramObj.getString("oId"));
            fage = couponUserDetailV1InnerServiceSMOImpl.saveCouponUserDetail(couponUserDetailPo);
            if (fage < 1) {
@@ -254,11 +307,19 @@
            }
        }
        paramObj.put("remark", paramObj.getString("remark") + "-优惠劵抵扣" + paramObj.getDouble("couponPrice") + "元");
    }
    private void addDiscount(JSONObject paramObj) {
        List<ComputeDiscountDto> computeDiscountDtos = (List<ComputeDiscountDto>) paramObj.get("computeDiscountDtos");
        for (ComputeDiscountDto computeDiscountDto : computeDiscountDtos) {
        if (!paramObj.containsKey("discountPrice") || paramObj.getDouble("discountPrice") <= 0) {
            return;
        }
        JSONArray computeDiscountDtos = paramObj.getJSONArray("computeDiscountDtos");
        ComputeDiscountDto computeDiscountDto = null;
        for (int accountIndex = 0; accountIndex < computeDiscountDtos.size(); accountIndex++) {
            computeDiscountDto = BeanConvertUtil.covertBean(computeDiscountDtos.getJSONObject(accountIndex), ComputeDiscountDto.class);
            if (computeDiscountDto.getDiscountPrice() <= 0) {
                continue;
            }
service-fee/src/main/java/com/java110/fee/cmd/fee/PayFeePreCmd.java
@@ -8,10 +8,12 @@
import com.java110.core.event.cmd.CmdEvent;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.core.smo.IComputeFeeSMO;
import com.java110.dto.account.AccountDto;
import com.java110.dto.couponUser.CouponUserDto;
import com.java110.dto.fee.FeeDetailDto;
import com.java110.dto.fee.FeeDto;
import com.java110.dto.feeDiscount.ComputeDiscountDto;
import com.java110.intf.acct.IAccountInnerServiceSMO;
import com.java110.intf.acct.ICouponUserV1InnerServiceSMO;
import com.java110.intf.community.IRepairUserInnerServiceSMO;
import com.java110.intf.community.IRoomInnerServiceSMO;
@@ -22,6 +24,7 @@
import com.java110.utils.exception.CmdException;
import com.java110.utils.exception.ListenerExecuteException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.utils.util.DateUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -46,7 +49,7 @@
 * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
 * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
 */
@Java110Cmd(serviceCode = "fee.payFeePreNew")
@Java110Cmd(serviceCode = "fee.payFeePre")
public class PayFeePreCmd extends AbstractServiceCmdListener {
    private static Logger logger = LoggerFactory.getLogger(PayFeePreCmd.class);
@@ -83,6 +86,9 @@
    @Autowired
    private ICouponUserV1InnerServiceSMO couponUserV1InnerServiceSMOImpl;
    @Autowired
    private IAccountInnerServiceSMO accountInnerServiceSMOImpl;
    @Override
    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
        Assert.jsonObjectHaveKey(reqJson, "communityId", "请求报文中未包含communityId节点");
@@ -102,16 +108,9 @@
    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
        logger.debug("ServiceDataFlowEvent : {}", event);
        JSONObject paramObj = reqJson;
        JSONArray businesses = new JSONArray();
        //判断是否有折扣情况
        judgeDiscount(paramObj);
        //3.0 考虑优惠卷
        checkCouponUser(paramObj);
        String appId = cmdDataFlowContext.getReqHeaders().get("app-id");
        reqJson.put("appId", appId);
        FeeDto feeDto = new FeeDto();
        feeDto.setFeeId(reqJson.getString("feeId"));
        feeDto.setCommunityId(reqJson.getString("communityId"));
@@ -120,40 +119,110 @@
            throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "查询费用信息失败,未查到数据或查到多条数据");
        }
        feeDto = feeDtos.get(0);
        reqJson.put("feeTypeCd", feeDto.getFeeTypeCd());
        reqJson.put("feeId", feeDto.getFeeId());
        Map feePriceAll = computeFeeSMOImpl.getFeePrice(feeDto);
        BigDecimal receivableAmount = new BigDecimal(feePriceAll.get("feePrice").toString());
        BigDecimal cycles = new BigDecimal(Double.parseDouble(reqJson.getString("cycles")));
        double tmpReceivableAmount = cycles.multiply(receivableAmount).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue();
        double discountPrice = reqJson.getDouble("discountPrice");
        double couponPrice = reqJson.getDouble("couponPrice");
        JSONObject paramOut = new JSONObject();
        paramOut.put("receivableAmount", tmpReceivableAmount);
        paramOut.put("oId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_oId));
        //1.0 考虑优惠金额
        //实收金额
        BigDecimal tmpReceivedAmout = new BigDecimal(tmpReceivableAmount);
        //判断是否有折扣情况
        double discountPrice = judgeDiscount(reqJson);
        tmpReceivedAmout = tmpReceivedAmout.subtract(new BigDecimal(discountPrice)).setScale(2, BigDecimal.ROUND_HALF_EVEN);
        //2.0 考虑账户抵消
        double accountPrice = judgeAccount(reqJson);
        tmpReceivedAmout = tmpReceivedAmout.subtract(new BigDecimal(accountPrice)).setScale(2, BigDecimal.ROUND_HALF_EVEN);
        //3.0 考虑优惠卷
        BigDecimal tmpReceivedAmout = new BigDecimal(tmpReceivableAmount).subtract(new BigDecimal(discountPrice)).setScale(2, BigDecimal.ROUND_HALF_EVEN);
        double receivedAmount = tmpReceivedAmout.subtract(new BigDecimal(couponPrice)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue();
        double couponPrice = checkCouponUser(reqJson);
        tmpReceivedAmout = tmpReceivedAmout.subtract(new BigDecimal(couponPrice)).setScale(2, BigDecimal.ROUND_HALF_EVEN);
        double receivedAmount = tmpReceivedAmout.doubleValue();
        //所有 优惠折扣计算完后,如果总金额小于等于0,则返回总扣款为0
        if (receivedAmount <= 0) {
            receivedAmount = 0.0;
        }
        paramOut.put("receivedAmount", receivedAmount);
        ResponseEntity<String> responseEntity = new ResponseEntity<>(paramOut.toJSONString(), HttpStatus.OK);
        reqJson.putAll(paramOut);
        CommonCache.setValue("payFeePre" + paramOut.getString("oId"), reqJson.toJSONString(), 24 * 60 * 60);
        cmdDataFlowContext.setResponseEntity(responseEntity);
    }
    private void checkCouponUser(JSONObject paramObj) {
    /**
     * 考虑账户抵消
     *
     * @param reqJson
     */
    private double judgeAccount(JSONObject reqJson) {
        if (!reqJson.containsKey("deductionAmount")) {
            reqJson.put("deductionAmount", 0.0);
            return 0.0;
        }
        double deductionAmount = reqJson.getDouble("deductionAmount");
        if (deductionAmount <= 0) {
            reqJson.put("deductionAmount", 0.0);
            return 0.0;
        }
        if (!reqJson.containsKey("selectUserAccount")) {
            reqJson.put("deductionAmount", 0.0);
            return 0.0;
        }
        JSONArray selectUserAccount = reqJson.getJSONArray("selectUserAccount");
        if (selectUserAccount == null || selectUserAccount.size() < 1) {
            reqJson.put("deductionAmount", 0.0);
            return 0.0;
        }
        List<String> acctIds = new ArrayList<>();
        for (int userAccountIndex = 0; userAccountIndex < selectUserAccount.size(); userAccountIndex++) {
            acctIds.add(selectUserAccount.getJSONObject(userAccountIndex).getString("acctId"));
        }
        AccountDto accountDto = new AccountDto();
        accountDto.setAcctIds(acctIds.toArray(new String[acctIds.size()]));
        List<AccountDto> accountDtos = accountInnerServiceSMOImpl.queryAccounts(accountDto);
        if (accountDtos == null || accountDtos.size() < 1) {
            reqJson.put("deductionAmount", 0.0);
            return 0.0;
        }
        BigDecimal totalAccountAmount = new BigDecimal(0);
        for (AccountDto tmpAccountDto : accountDtos) {
            totalAccountAmount = totalAccountAmount.add(new BigDecimal(tmpAccountDto.getAmount()));
        }
        deductionAmount = totalAccountAmount.subtract(new BigDecimal(deductionAmount)).doubleValue();
        if (deductionAmount < 0) {
            reqJson.put("deductionAmount", totalAccountAmount.doubleValue());
            reqJson.put("selectUserAccount", BeanConvertUtil.beanCovertJSONArray(accountDtos));
            return totalAccountAmount.doubleValue();
        }
        reqJson.put("deductionAmount", deductionAmount);
        reqJson.put("selectUserAccount", BeanConvertUtil.beanCovertJSONArray(accountDtos));
        return deductionAmount;
    }
    private double checkCouponUser(JSONObject paramObj) {
        JSONArray couponList = paramObj.getJSONArray("couponList");
        BigDecimal couponPrice = new BigDecimal(0.0);
        List<String> couponIds = new ArrayList<String>();
        if (couponList == null || couponList.size() < 1) {
            paramObj.put("couponPrice", couponPrice);
            return;
            paramObj.put("couponPrice", couponPrice.doubleValue());
            paramObj.put("couponUserDtos", new JSONArray()); //这里考虑空
            return couponPrice.doubleValue();
        }
        for (int couponIndex = 0; couponIndex < couponList.size(); couponIndex++) {
            couponIds.add(couponList.getJSONObject(couponIndex).getString("couponId"));
@@ -162,21 +231,22 @@
        couponUserDto.setCouponIds(couponIds.toArray(new String[couponIds.size()]));
        List<CouponUserDto> couponUserDtos = couponUserV1InnerServiceSMOImpl.queryCouponUsers(couponUserDto);
        if (couponUserDtos == null || couponUserDtos.size() < 1) {
            paramObj.put("couponPrice", couponPrice);
            return;
            paramObj.put("couponPrice", couponPrice.doubleValue());
            return couponPrice.doubleValue();
        }
        for (CouponUserDto couponUser : couponUserDtos) {
            //不计算已过期购物券金额
            if (couponUser.getEndTime().compareTo(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_B)) >= 0) {
                couponPrice.add(new BigDecimal(Double.parseDouble(couponUser.getActualPrice())));
                couponPrice = couponPrice.add(new BigDecimal(Double.parseDouble(couponUser.getActualPrice())));
            }
        }
        paramObj.put("couponPrice", couponPrice);
        paramObj.put("couponUserDtos", couponUserDtos);
        paramObj.put("couponPrice", couponPrice.doubleValue());
        paramObj.put("couponUserDtos", BeanConvertUtil.beanCovertJSONArray(couponUserDtos));
        return couponPrice.doubleValue();
    }
    private void judgeDiscount(JSONObject paramObj) {
    private double judgeDiscount(JSONObject paramObj) {
        FeeDetailDto feeDetailDto = new FeeDetailDto();
        feeDetailDto.setCommunityId(paramObj.getString("communityId"));
        feeDetailDto.setFeeId(paramObj.getString("feeId"));
@@ -197,13 +267,14 @@
        if (computeDiscountDtos == null || computeDiscountDtos.size() < 1) {
            paramObj.put("discountPrice", 0.0);
            return;
            return 0.0;
        }
        BigDecimal discountPrice = new BigDecimal(0);
        for (ComputeDiscountDto computeDiscountDto : computeDiscountDtos) {
            discountPrice = discountPrice.add(new BigDecimal(computeDiscountDto.getDiscountPrice()));
        }
        paramObj.put("discountPrice", discountPrice);
        paramObj.put("computeDiscountDtos", computeDiscountDtos);
        paramObj.put("discountPrice", discountPrice.doubleValue());
        paramObj.put("computeDiscountDtos", BeanConvertUtil.beanCovertJSONArray(computeDiscountDtos));
        return discountPrice.doubleValue();
    }
}
service-job/src/main/java/com/java110/job/adapt/fee/ReturnPayFeeMoneyAdapt.java
New file
@@ -0,0 +1,214 @@
package com.java110.job.adapt.fee;
import com.alibaba.fastjson.JSONObject;
import com.java110.core.client.FtpUploadTemplate;
import com.java110.core.client.OssUploadTemplate;
import com.java110.dto.file.FileDto;
import com.java110.dto.onlinePay.OnlinePayDto;
import com.java110.dto.smallWeChat.SmallWeChatDto;
import com.java110.entity.order.Business;
import com.java110.intf.acct.IOnlinePayV1InnerServiceSMO;
import com.java110.intf.fee.IReturnPayFeeInnerServiceSMO;
import com.java110.intf.order.IOrderInnerServiceSMO;
import com.java110.intf.store.ISmallWeChatInnerServiceSMO;
import com.java110.job.adapt.DatabusAdaptImpl;
import com.java110.po.onlinePay.OnlinePayPo;
import com.java110.utils.cache.MappingCache;
import com.java110.utils.constant.WechatConstant;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.utils.util.OSSUtil;
import com.java110.utils.util.PayUtil;
import com.java110.utils.util.StringUtil;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.ssl.SSLContexts;
import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import javax.net.ssl.SSLContext;
import java.io.ByteArrayInputStream;
import java.security.KeyStore;
import java.util.*;
/**
 * 退费审核通过后 通知 微信支付平台退款处理
 *
 * @author fqz
 * @Date 2021-08-19 10:12
 */
@Component(value = "returnPayFeeMoneyAdapt")
public class ReturnPayFeeMoneyAdapt extends DatabusAdaptImpl {
    @Autowired
    private IReturnPayFeeInnerServiceSMO returnPayFeeInnerServiceSMOImpl;
    @Autowired
    private IOrderInnerServiceSMO orderInnerServiceSMOImpl;
    @Autowired
    private IOnlinePayV1InnerServiceSMO onlinePayV1InnerServiceSMOImpl;
    @Autowired
    private ISmallWeChatInnerServiceSMO smallWeChatInnerServiceSMOImpl;
    @Autowired
    private RestTemplate outRestTemplate;
    public static final String wechatReturnUrl = "https://api.mch.weixin.qq.com/secapi/pay/refund";
    private static Logger logger = LoggerFactory.getLogger(ReturnPayFeeMoneyAdapt.class);
    @Autowired
    private FtpUploadTemplate ftpUploadTemplate;
    @Autowired
    private OssUploadTemplate ossUploadTemplate;
    @Override
    public void execute(Business business, List<Business> businesses) {
        JSONObject data = business.getData();
        OnlinePayPo oaWorkflowDataPo = BeanConvertUtil.covertBean(data, OnlinePayPo.class);
        try {
            doPayFeeMoney(oaWorkflowDataPo);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    /**
     * 通知退款
     *
     * @param oaWorkflowDataPo
     */
    public void doPayFeeMoney(OnlinePayPo oaWorkflowDataPo) throws Exception {
        //查询小区信息
        OnlinePayDto onlinePayDto = new OnlinePayDto();
        onlinePayDto.setPayId(oaWorkflowDataPo.getPayId());
        onlinePayDto.setState(OnlinePayDto.STATE_WT);
        List<OnlinePayDto> onlinePayDtos = onlinePayV1InnerServiceSMOImpl.queryOnlinePays(onlinePayDto);
        if (onlinePayDtos == null || onlinePayDtos.size() < 1) {
            return;
        }
        String payPassword = "";
        String certData = "";
        SmallWeChatDto smallWeChatDto = new SmallWeChatDto();
        smallWeChatDto.setMchId(onlinePayDtos.get(0).getMchId());
        smallWeChatDto.setAppId(onlinePayDtos.get(0).getAppId());
        List<SmallWeChatDto> smallWeChatDtos = smallWeChatInnerServiceSMOImpl.querySmallWeChats(smallWeChatDto);
        if (smallWeChatDto == null || smallWeChatDtos.size() <= 0) {
            payPassword = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "key");
            certData = MappingCache.getRemark(WechatConstant.WECHAT_DOMAIN, "cert");
        } else {
            payPassword = smallWeChatDtos.get(0).getPayPassword();
            certData = smallWeChatDtos.get(0).getRemarks();
        }
        SortedMap<String, String> parameters = new TreeMap<String, String>();
        parameters.put("appid", onlinePayDtos.get(0).getAppId());//appid
        parameters.put("mch_id", onlinePayDtos.get(0).getMchId());//商户号
        parameters.put("nonce_str", PayUtil.makeUUID(32));//随机数
        parameters.put("out_trade_no", onlinePayDtos.get(0).getMchId());//商户订单号
        parameters.put("out_refund_no", onlinePayDtos.get(0).getPayId());//我们自己设定的退款申请号,约束为UK
        parameters.put("total_fee", PayUtil.moneyToIntegerStr(Double.parseDouble(onlinePayDtos.get(0).getTotalFee())));//订单金额 单位为分!!!这里稍微注意一下
        parameters.put("refund_fee", PayUtil.moneyToIntegerStr(Double.parseDouble(onlinePayDtos.get(0).getRefundFee())));//退款金额 单位为分!!!
        parameters.put("sign", PayUtil.createSign(parameters, payPassword));
        String xmlData = PayUtil.mapToXml(parameters);
        KeyStore keyStore = KeyStore.getInstance("PKCS12");
        ByteArrayInputStream inputStream = new ByteArrayInputStream(getPkcs12(certData));
        try {
            //这里写密码..默认是你的MCHID
            keyStore.load(inputStream, onlinePayDtos.get(0).getMchId().toCharArray());
        } finally {
            inputStream.close();
        }
        SSLContext sslcontext = SSLContexts.custom()
                //这里也是写密码的
                .loadKeyMaterial(keyStore, onlinePayDtos.get(0).getMchId().toCharArray())
                .build();
        SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(
                sslcontext,
                SSLConnectionSocketFactory.getDefaultHostnameVerifier());
        CloseableHttpClient httpclient = HttpClients.custom()
                .setSSLSocketFactory(sslsf)
                .build();
        String jsonStr = "";
        try {
            HttpPost httpost = new HttpPost(wechatReturnUrl);
            httpost.setEntity(new StringEntity(xmlData, "UTF-8"));
            CloseableHttpResponse response = httpclient.execute(httpost);
            try {
                HttpEntity entity = response.getEntity();
                //接受到返回信息
                jsonStr = EntityUtils.toString(response.getEntity(), "UTF-8");
                EntityUtils.consume(entity);
            } finally {
                response.close();
            }
        } finally {
            httpclient.close();
        }
        Map<String, String> resMap = PayUtil.xmlStrToMap(jsonStr);
        if ("SUCCESS".equals(resMap.get("return_code")) && "SUCCESS".equals(resMap.get("result_code"))) {
            doUpdateOnlinePay(onlinePayDtos.get(0).getOrderId(), OnlinePayDto.STATE_CT, "退款完成");
        } else {
            doUpdateOnlinePay(onlinePayDtos.get(0).getOrderId(), OnlinePayDto.STATE_FT, resMap.get("return_msg"));
        }
    }
    private void doUpdateOnlinePay(String orderId, String state, String message) {
        OnlinePayPo onlinePayPo = new OnlinePayPo();
        onlinePayPo.setMessage(message.length() > 1000 ? message.substring(0, 1000) : message);
        onlinePayPo.setOrderId(orderId);
        onlinePayPo.setState(state);
        onlinePayV1InnerServiceSMOImpl.updateOnlinePay(onlinePayPo);
    }
    private byte[] getPkcs12(String fileName) {
        List<FileDto> fileDtos = new ArrayList<>();
        byte[] context = null;
        String ftpPath = MappingCache.getValue(FtpUploadTemplate.FTP_DOMAIN, FtpUploadTemplate.FTP_PATH);
        String ossSwitch = MappingCache.getValue(OSSUtil.DOMAIN, OSSUtil.OSS_SWITCH);
        if (StringUtil.isEmpty(ossSwitch) || !OSSUtil.OSS_SWITCH_OSS.equals(ossSwitch)) {
            String ftpServer = MappingCache.getValue(FtpUploadTemplate.FTP_DOMAIN, FtpUploadTemplate.FTP_SERVER);
            int ftpPort = Integer.parseInt(MappingCache.getValue(FtpUploadTemplate.FTP_DOMAIN, FtpUploadTemplate.FTP_PORT));
            String ftpUserName = MappingCache.getValue(FtpUploadTemplate.FTP_DOMAIN, FtpUploadTemplate.FTP_USERNAME);
            String ftpUserPassword = MappingCache.getValue(FtpUploadTemplate.FTP_DOMAIN, FtpUploadTemplate.FTP_USERPASSWORD);
            context = ftpUploadTemplate.downFileByte(ftpPath, fileName, ftpServer,
                    ftpPort, ftpUserName,
                    ftpUserPassword);
        } else {
            context = ossUploadTemplate.downFileByte(ftpPath, fileName, "",
                    0, "",
                    "");
        }
        return context;
    }
}
service-job/src/main/java/com/java110/job/task/wechat/WeChatPushMessageTemplate.java
@@ -337,7 +337,7 @@
                data.setKeyword3(new Content(StringUtil.delHtmlTag(noticeDto.getContext())));
                data.setRemark(new Content("如有疑问请联系相关物业人员"));
                templateMessage.setData(data);
                templateMessage.setUrl(wechatUrl + noticeDto.getNoticeId() + "&wAppId=" + weChatDto.getAppId());
                templateMessage.setUrl(wechatUrl + noticeDto.getNoticeId() + "&wAppId=" + weChatDto.getAppId()+"&communityId="+noticeDto.getCommunityId());
                logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage));
                responseEntity = outRestTemplate.postForEntity(sendTemplate + accessToken, JSON.toJSONString(templateMessage), String.class);
                logger.info("微信模板返回内容:{}", responseEntity);
@@ -412,9 +412,9 @@
                templateMessage.setData(data);
                if (!StringUtil.isEmpty(wechatUrl)) {
                    if (miniprogram == null) {
                        templateMessage.setUrl(wechatUrl + "/#/pages/notice/detail/detail?noticeId=" + noticeDto.getNoticeId() + "&wAppId=" + weChatDto.getAppId());
                        templateMessage.setUrl(wechatUrl + "/#/pages/notice/detail/detail?noticeId=" + noticeDto.getNoticeId() + "&wAppId=" + weChatDto.getAppId()+"&communityId="+noticeDto.getCommunityId());
                    } else {
                        miniprogram.setPagepath("/pages/notice/detail/detail?noticeId=" + noticeDto.getNoticeId() + "&wAppId=" + weChatDto.getAppId());
                        miniprogram.setPagepath("/pages/notice/detail/detail?noticeId=" + noticeDto.getNoticeId() + "&wAppId=" + weChatDto.getAppId()+"&communityId="+noticeDto.getCommunityId());
                        templateMessage.setMiniprogram(miniprogram);
                    }
                }
service-store/src/main/java/com/java110/store/bmo/storeAds/impl/GetStoreAdsBMOImpl.java
@@ -48,7 +48,7 @@
        String imgUrl = MappingCache.getValue("IMG_PATH");
        imgUrl += (!StringUtil.isEmpty(imgUrl) && imgUrl.endsWith("/") ? "" : "/");
        for (StoreAdsDto tmpStoreAdsDto : storeAdsDtos) {
            tmpStoreAdsDto.setUrl(imgUrl + tmpStoreAdsDto.getUrl() + "&communityId=-1");
            tmpStoreAdsDto.setUrl(imgUrl + tmpStoreAdsDto.getUrl());
        }
    }
service-store/src/main/java/com/java110/store/listener/resourceStoreUseRecord/AbstractResourceStoreUseRecordBusinessServiceDataFlowListener.java
@@ -49,6 +49,7 @@
        businessResourceStoreUseRecordInfo.put("operate", businessResourceStoreUseRecordInfo.get("operate"));
        businessResourceStoreUseRecordInfo.put("communityId", businessResourceStoreUseRecordInfo.get("community_id"));
        businessResourceStoreUseRecordInfo.put("resourceStoreName", businessResourceStoreUseRecordInfo.get("resource_store_name"));
        businessResourceStoreUseRecordInfo.put("state", businessResourceStoreUseRecordInfo.get("state"));
        businessResourceStoreUseRecordInfo.remove("bId");
        businessResourceStoreUseRecordInfo.put("statusCd", statusCd);
    }
@@ -82,6 +83,7 @@
        currentResourceStoreUseRecordInfo.put("operate", currentResourceStoreUseRecordInfo.get("operate"));
        currentResourceStoreUseRecordInfo.put("communityId", currentResourceStoreUseRecordInfo.get("community_id"));
        currentResourceStoreUseRecordInfo.put("resourceStoreName", currentResourceStoreUseRecordInfo.get("resource_store_name"));
        currentResourceStoreUseRecordInfo.put("state", currentResourceStoreUseRecordInfo.get("state"));
        currentResourceStoreUseRecordInfo.put("operate", StatusConstant.OPERATE_DEL);
        getResourceStoreUseRecordServiceDaoImpl().saveBusinessResourceStoreUseRecordInfo(currentResourceStoreUseRecordInfo);
        for (Object key : currentResourceStoreUseRecordInfo.keySet()) {
service-user/src/main/java/com/java110/user/dao/impl/OwnerCarV1ServiceDaoImpl.java
@@ -15,16 +15,12 @@
 */
package com.java110.user.dao.impl;
import com.alibaba.fastjson.JSONObject;
import com.java110.utils.constant.ResponseConstant;
import com.java110.utils.exception.DAOException;
import com.java110.utils.util.DateUtil;
import com.java110.core.base.dao.BaseServiceDao;
import com.java110.user.dao.IOwnerCarV1ServiceDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
@@ -42,12 +38,9 @@
    private static Logger logger = LoggerFactory.getLogger(OwnerCarV1ServiceDaoImpl.class);
    /**
     * 保存车辆信息 到 instance
     *
     * @param info   bId 信息
     * @throws DAOException DAO异常
     */
@@ -63,6 +56,7 @@
    /**
     * 查询车辆信息(instance)
     *
     * @param info bId 信息
     * @return List<Map>
     * @throws DAOException DAO异常
@@ -79,6 +73,7 @@
    /**
     * 修改车辆信息
     *
     * @param info 修改信息
     * @throws DAOException DAO异常
     */
@@ -93,6 +88,7 @@
     /**
     * 查询车辆数量
     *
     * @param info 车辆信息
     * @return 车辆数量
     */