1、优化报修汇总报表增加汇总数据展示2、增加业主绑定后登录获取头像和昵称3、员工办结维修前图片和维修后图片上传4、业主手机端查询详情时刷入图片信息
21个文件已修改
427 ■■■■■ 已修改文件
java110-bean/src/main/java/com/java110/dto/file/FileRelDto.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/owner/OwnerAppUserDto.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/repair/RepairDto.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/repair/RepairUserDto.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/po/owner/OwnerAppUserPo.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/vo/ResultVo.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/vo/api/auditAppUserBindingOwner/ApiAuditAppUserBindingOwnerDataVo.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/vo/api/junkRequirement/PhotoVo.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/user/OwnerAppUserServiceDaoImplMapper.xml 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/fee/PayFeePreListener.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/owner/ListAuditAppUserBindingOwnersListener.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/owner/RefreshAppUserBindingOwnerOpenIdListener.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/ownerRepair/ListOwnerRepairsListener.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/ownerRepair/ListRepairStaffsListener.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/ownerRepair/RepairFinishListener.java 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-front/src/main/java/com/java110/front/smo/login/impl/OwnerAppLoginSMOImpl.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-job/src/main/java/com/java110/job/adapt/Repair/MachineAddOwnerRepairAdapt.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-report/src/main/java/com/java110/report/smo/impl/ReportFeeMonthStatisticsInnerServiceSMOImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-user/src/main/java/com/java110/user/listener/ownerAppUser/AbstractOwnerAppUserBusinessServiceDataFlowListener.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/file/FileRelDto.java
@@ -21,6 +21,8 @@
    public static final String REL_TYPE_CD_GOODS_COVER = "17000";//商品封面
    public static final String REL_TYPE_CD_GOODS_CAROUSEL_FIGURE = "18000";//商品轮播
    public static final String SAVE_WAY_FTP = "ftp";//租赁图片
    public static final String BEFORE_REPAIR_PHOTOS = "19000";  //维修前图片
    public static final String AFTER_REPAIR_PHOTOS = "200000";  //维修后图片
    private String relTypeCd;
    private String[] relTypeCds;
java110-bean/src/main/java/com/java110/dto/owner/OwnerAppUserDto.java
@@ -53,6 +53,9 @@
    private String statusCd = "0";
    private String nickName;
    private String headImgUrl;
    public String getIdCard() {
        return idCard;
@@ -246,4 +249,20 @@
    public void setOwnerId(String ownerId) {
        this.ownerId = ownerId;
    }
    public String getNickName() {
        return nickName;
    }
    public void setNickName(String nickName) {
        this.nickName = nickName;
    }
    public String getHeadImgUrl() {
        return headImgUrl;
    }
    public void setHeadImgUrl(String headImgUrl) {
        this.headImgUrl = headImgUrl;
    }
}
java110-bean/src/main/java/com/java110/dto/repair/RepairDto.java
@@ -83,6 +83,13 @@
    private String preRuId;
    private String ruId;
    //业主上传维修图片
    private List<PhotoVo> repairPhotos;
    //维修前图片
    private List<PhotoVo> beforePhotos;
    //维修后图片
    private List<PhotoVo> afterPhotos;
    public String getRepairName() {
        return repairName;
@@ -325,6 +332,7 @@
    public void setPreRuId(String preRuId) {
        this.preRuId = preRuId;
    }
    public String getbId() {
        return bId;
    }
@@ -340,4 +348,28 @@
    public void setRuId(String ruId) {
        this.ruId = ruId;
    }
    public List<PhotoVo> getRepairPhotos() {
        return repairPhotos;
    }
    public void setRepairPhotos(List<PhotoVo> repairPhotos) {
        this.repairPhotos = repairPhotos;
    }
    public List<PhotoVo> getBeforePhotos() {
        return beforePhotos;
    }
    public void setBeforePhotos(List<PhotoVo> beforePhotos) {
        this.beforePhotos = beforePhotos;
    }
    public List<PhotoVo> getAfterPhotos() {
        return afterPhotos;
    }
    public void setAfterPhotos(List<PhotoVo> afterPhotos) {
        this.afterPhotos = afterPhotos;
    }
}
java110-bean/src/main/java/com/java110/dto/repair/RepairUserDto.java
@@ -1,6 +1,7 @@
package com.java110.dto.repair;
import com.java110.dto.PageDto;
import com.java110.vo.api.junkRequirement.PhotoVo;
import java.io.Serializable;
import java.util.Date;
@@ -75,6 +76,20 @@
    private String finishEndTime;
    //员工报修表员工信息
    private List<RepairUserDto> repairList;
    //业主上传图片
    private List<PhotoVo> photoVos;
    //处理中报修总条数
    private String dealNumber;
    //结单报修总条数
    private String statementNumber;
    //退单报修总数
    private String chargebackNumber;
    //转单报修总数
    private String transferOrderNumber;
    //派单报修总数
    private String dispatchNumber;
    public String getContext() {
@@ -341,4 +356,52 @@
    public void setRepairList(List<RepairUserDto> repairList) {
        this.repairList = repairList;
    }
    public List<PhotoVo> getPhotoVos() {
        return photoVos;
    }
    public void setPhotoVos(List<PhotoVo> photoVos) {
        this.photoVos = photoVos;
    }
    public String getDealNumber() {
        return dealNumber;
    }
    public void setDealNumber(String dealNumber) {
        this.dealNumber = dealNumber;
    }
    public String getStatementNumber() {
        return statementNumber;
    }
    public void setStatementNumber(String statementNumber) {
        this.statementNumber = statementNumber;
    }
    public String getChargebackNumber() {
        return chargebackNumber;
    }
    public void setChargebackNumber(String chargebackNumber) {
        this.chargebackNumber = chargebackNumber;
    }
    public String getTransferOrderNumber() {
        return transferOrderNumber;
    }
    public void setTransferOrderNumber(String transferOrderNumber) {
        this.transferOrderNumber = transferOrderNumber;
    }
    public String getDispatchNumber() {
        return dispatchNumber;
    }
    public void setDispatchNumber(String dispatchNumber) {
        this.dispatchNumber = dispatchNumber;
    }
}
java110-bean/src/main/java/com/java110/po/owner/OwnerAppUserPo.java
@@ -25,6 +25,8 @@
    private String state;
    private String remark;
    private String userId;
    private String nickName;
    private String headImgUrl;
    public String getAppUserId() {
        return appUserId;
@@ -129,4 +131,21 @@
    public void setAppType(String appType) {
        this.appType = appType;
    }
    public String getNickName() {
        return nickName;
    }
    public void setNickName(String nickName) {
        this.nickName = nickName;
    }
    public String getHeadImgUrl() {
        return headImgUrl;
    }
    public void setHeadImgUrl(String headImgUrl) {
        this.headImgUrl = headImgUrl;
    }
}
java110-bean/src/main/java/com/java110/vo/ResultVo.java
@@ -64,6 +64,9 @@
    //用来存放大计、小计金额
    private Object sumTotal;
    //所需数据
    private Object rep;
    public ResultVo() {
    }
@@ -93,6 +96,16 @@
        this.total = total;
        this.data = data;
        this.sumTotal = sumTotal;
    }
    public ResultVo(int records, int total, Object data, Object sumTotal, Object rep) {
        this.code = CODE_OK;
        this.msg = MSG_OK;
        this.records = records;
        this.total = total;
        this.data = data;
        this.sumTotal = sumTotal;
        this.rep = rep;
    }
    public ResultVo(int code, String msg, Object data) {
@@ -173,6 +186,14 @@
        this.sumTotal = sumTotal;
    }
    public Object getRep() {
        return rep;
    }
    public void setRep(Object rep) {
        this.rep = rep;
    }
    @Override
    public String toString() {
        return JSONObject.toJSONString(this, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteDateUseDateFormat);
java110-bean/src/main/java/com/java110/vo/api/auditAppUserBindingOwner/ApiAuditAppUserBindingOwnerDataVo.java
@@ -15,6 +15,8 @@
    private String state;
    private String stateName;
    private String createTime;
    private String appType;
    private String appTypeName;
    private String areaCode;
    private String areaName;
@@ -142,4 +144,20 @@
    public void setUserId(String userId) {
        this.userId = userId;
    }
    public String getAppType() {
        return appType;
    }
    public void setAppType(String appType) {
        this.appType = appType;
    }
    public String getAppTypeName() {
        return appTypeName;
    }
    public void setAppTypeName(String appTypeName) {
        this.appTypeName = appTypeName;
    }
}
java110-bean/src/main/java/com/java110/vo/api/junkRequirement/PhotoVo.java
@@ -13,6 +13,8 @@
public class PhotoVo implements Serializable {
    private String url;
    private String relTypeCd;
    public String getUrl() {
        return url;
    }
@@ -20,4 +22,12 @@
    public void setUrl(String url) {
        this.url = url;
    }
    public String getRelTypeCd() {
        return relTypeCd;
    }
    public void setRelTypeCd(String relTypeCd) {
        this.relTypeCd = relTypeCd;
    }
}
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml
@@ -1522,11 +1522,9 @@
    </select>
    <select id="queryRepairForStaff" parameterType="Map" resultType="Map">
        /*select r.staff_id staffId,r.staff_name staffName from r_repair_user r
        where r.state != "10005" and r.status_cd = "0"*/
        SELECT r.staff_id staffId,r.staff_name staffName FROM r_repair_user r
        WHERE r.state!='10005' AND
        (r.state!='10001' AND r.repair_event!='payUser') AND r.repair_event!="startUser"
        r.repair_event!='payUser' AND r.repair_event!="startUser"
        <if test="communityId != null and communityId !=''">
            and r.community_id = #{communityId}
        </if>
@@ -1535,6 +1533,9 @@
        </if>
        group by r.staff_id
        order by r.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
    </select>
</mapper>
java110-db/src/main/resources/mapper/user/OwnerAppUserServiceDaoImplMapper.xml
@@ -7,10 +7,10 @@
    <!-- 保存绑定业主信息 add by wuxw 2018-07-03 -->
    <insert id="saveBusinessOwnerAppUserInfo" parameterType="Map">
        insert into business_owner_app_user(
        id_card,open_id,link,remark,operate,app_user_name,community_name,state,app_user_id,community_id,app_type_cd,b_id,member_id,user_id,app_type
        id_card,open_id,link,remark,operate,app_user_name,community_name,state,app_user_id,community_id,app_type_cd,b_id,member_id,user_id,app_type,nickname,headimgurl
        ) values (
        #{idCard},#{openId},#{link},#{remark},#{operate},#{appUserName},#{communityName},#{state},#{appUserId},#{communityId},
        #{appTypeCd},#{bId},#{memberId},#{userId},#{appType}
        #{appTypeCd},#{bId},#{memberId},#{userId},#{appType},#{nickName},#{headImgUrl}
        )
    </insert>
@@ -21,7 +21,7 @@
        openId,t.link,t.remark,t.operate,t.app_user_name,t.app_user_name appUserName,t.community_name,t.community_name
        communityName,t.state,t.app_user_id,t.app_user_id appUserId,t.community_id,t.community_id
        communityId,t.app_type_cd,t.app_type_cd appTypeCd,t.b_id,t.b_id bId,t.member_id,t.member_id memberId,t.user_id,
        t.user_id userId,t.app_type,t.app_type appType
        t.user_id userId,t.app_type,t.app_type appType,t.nickname,t.nickname nickName,t.headimgurl,t.headimgurl headImgUrl
        from business_owner_app_user t
        where 1 =1
        <if test="idCard !=null and idCard != ''">
@@ -74,10 +74,10 @@
    <insert id="saveOwnerAppUserInfoInstance" parameterType="Map">
        insert into owner_app_user(
        id_card,open_id,link,remark,status_cd,app_user_name,community_name,state,app_user_id,community_id,app_type_cd,b_id,member_id,user_id,
        app_type
        app_type,nickname,headimgurl
        ) select
        t.id_card,t.open_id,t.link,t.remark,'0',t.app_user_name,t.community_name,t.state,t.app_user_id,t.community_id,t.app_type_cd,t.b_id,
        t.member_id,t.user_id,t.app_type
        t.member_id,t.user_id,t.app_type,t.nickname,t.headimgurl
        from business_owner_app_user t where 1=1
        <if test="idCard !=null and idCard != ''">
            and t.id_card= #{idCard}
@@ -119,6 +119,12 @@
        <if test="userId !=null and userId != ''">
            and t.user_id= #{userId}
        </if>
        <if test="nickName !=null and nickName != ''">
            and t.nickname= #{nickName}
        </if>
        <if test="headImgUrl !=null and headImgUrl != ''">
            and t.headimgurl= #{headImgUrl}
        </if>
    </insert>
@@ -126,7 +132,7 @@
    <!-- 查询绑定业主信息 add by wuxw 2018-07-03 -->
    <select id="getOwnerAppUserInfo" parameterType="Map" resultType="Map">
        select t.id_card,t.id_card idCard,t.open_id,t.open_id openId,t.link,t.remark,t.status_cd,t.status_cd
        statusCd,t.app_user_name,t.app_user_name appUserName,t.community_name,t.community_name
        statusCd,t.nickname,t.headimgurl,t.app_user_name,t.app_user_name appUserName,t.community_name,t.community_name
        communityName,t.state,t.app_user_id,t.app_user_id appUserId,t.community_id,t.community_id
        communityId,t.app_type_cd,t.app_type_cd appTypeCd,t.b_id,t.b_id bId,t.member_id,t.member_id memberId,
        td1.name stateName,t.user_id,t.user_id userId,t.app_type,t.app_type appType,t.create_time createTime,
@@ -245,6 +251,12 @@
        <if test="appType !=null and appType != ''">
            , t.app_type = #{appType}
        </if>
        <if test="nickName !=null and nickName != ''">
            , t.nickname= #{nickName}
        </if>
        <if test="headImgUrl !=null and headImgUrl != ''">
            , t.headimgurl= #{headImgUrl}
        </if>
        where 1=1
        <if test="appUserId !=null and appUserId != ''">
            and t.app_user_id= #{appUserId}
service-api/src/main/java/com/java110/api/listener/fee/PayFeePreListener.java
@@ -100,9 +100,6 @@
        } else if (AppDto.WECHAT_OWNER_APP_ID.equals(appId)) {  //微信公众号支付
            paramObj.put("primeRate", "6");
            paramObj.put("remark", "线上公众号支付");
        }else{ // 默认 小程序支付
            paramObj.put("primeRate", "5");
            paramObj.put("remark", "其他支付");
        }
        //添加单元信息
service-api/src/main/java/com/java110/api/listener/owner/ListAuditAppUserBindingOwnersListener.java
@@ -74,6 +74,12 @@
            auditAppUserBindingOwners = BeanConvertUtil.covertBeanList(ownerAppUserInnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto), ApiAuditAppUserBindingOwnerDataVo.class);
            List<Map> mark = getPrivilegeOwnerList("/roomCreateFee", userId);
            for (ApiAuditAppUserBindingOwnerDataVo owner : auditAppUserBindingOwners) {
                //区分小程序和和公众号
                if (owner.getAppType().equals("WECHAT")) {
                    owner.setAppTypeName("公众号");
                } else if (owner.getAppType().equals("WECHAT_MINA")) {
                    owner.setAppTypeName("小程序");
                }
                //对业主身份证号隐藏处理
                String idCard = owner.getIdCard();
                if (mark.size() == 0 && idCard != null && !idCard.equals("") && idCard.length() > 16) {
service-api/src/main/java/com/java110/api/listener/owner/RefreshAppUserBindingOwnerOpenIdListener.java
@@ -61,6 +61,8 @@
            ownerAppUserPo.setAppUserId("-1");
            ownerAppUserPo.setAppType(reqJson.getString("appType"));
            ownerAppUserPo.setOpenId(reqJson.getString("openId"));
            ownerAppUserPo.setNickName(reqJson.getString("nickName"));
            ownerAppUserPo.setHeadImgUrl(reqJson.getString("headImgUrl"));
            super.insert(context, ownerAppUserPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_OWNER_APP_USER);
            return;
@@ -70,6 +72,8 @@
        ownerAppUserPo.setAppUserId(appUserId);
        ownerAppUserPo.setCommunityId(reqJson.getString("communityId"));
        ownerAppUserPo.setOpenId(reqJson.getString("openId"));
        ownerAppUserPo.setNickName(reqJson.getString("nickName"));
        ownerAppUserPo.setHeadImgUrl(reqJson.getString("headImgUrl"));
        super.update(context, ownerAppUserPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_OWNER_APP_USER);
    }
service-api/src/main/java/com/java110/api/listener/ownerRepair/ListOwnerRepairsListener.java
@@ -125,19 +125,44 @@
        //刷入图片信息
        List<PhotoVo> photoVos = null;
        List<PhotoVo> repairPhotos = null;  //业主上传维修图片
        List<PhotoVo> beforePhotos = null;  //维修前图片
        List<PhotoVo> afterPhotos = null;  //维修后图片
        PhotoVo photoVo = null;
        for (RepairDto repairDto : ownerRepairs) {
            FileRelDto fileRelDto = new FileRelDto();
            fileRelDto.setObjId(repairDto.getRepairId());
            List<FileRelDto> fileRelDtos = fileRelInnerServiceSMOImpl.queryFileRels(fileRelDto);
            photoVos = new ArrayList<>();
            repairPhotos = new ArrayList<>();
            beforePhotos = new ArrayList<>();
            afterPhotos = new ArrayList<>();
            for (FileRelDto tmpFileRelDto : fileRelDtos) {
                photoVo = new PhotoVo();
                photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairDto.getCommunityId());
                photoVo.setRelTypeCd(tmpFileRelDto.getRelTypeCd());
                photoVos.add(photoVo);
                if (tmpFileRelDto.getRelTypeCd().equals("14000")) {  //维修图片
                    photoVo = new PhotoVo();
                    photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairDto.getCommunityId());
                    photoVo.setRelTypeCd(tmpFileRelDto.getRelTypeCd());
                    repairPhotos.add(photoVo);  //维修图片
                } else if (tmpFileRelDto.getRelTypeCd().equals("19000")) {  //维修前图片
                    photoVo = new PhotoVo();
                    photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairDto.getCommunityId());
                    photoVo.setRelTypeCd(tmpFileRelDto.getRelTypeCd());
                    beforePhotos.add(photoVo);  //维修前图片
                } else if (tmpFileRelDto.getRelTypeCd().equals("200000")) {  //维修后图片
                    photoVo = new PhotoVo();
                    photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairDto.getCommunityId());
                    photoVo.setRelTypeCd(tmpFileRelDto.getRelTypeCd());
                    afterPhotos.add(photoVo);
                }
            }
            repairDto.setPhotos(photoVos);
            repairDto.setRepairPhotos(repairPhotos);
            repairDto.setBeforePhotos(beforePhotos);
            repairDto.setAfterPhotos(afterPhotos);
        }
    }
service-api/src/main/java/com/java110/api/listener/ownerRepair/ListRepairStaffsListener.java
@@ -5,6 +5,8 @@
import com.java110.core.annotation.Java110Listener;
import com.java110.core.context.DataFlowContext;
import com.java110.core.event.service.api.ServiceDataFlowEvent;
import com.java110.dto.file.FileRelDto;
import com.java110.intf.common.IFileRelInnerServiceSMO;
import com.java110.intf.community.IRepairInnerServiceSMO;
import com.java110.intf.community.IRepairUserInnerServiceSMO;
import com.java110.dto.repair.RepairUserDto;
@@ -12,6 +14,7 @@
import com.java110.utils.util.BeanConvertUtil;
import com.java110.utils.util.DateUtil;
import com.java110.vo.ResultVo;
import com.java110.vo.api.junkRequirement.PhotoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
@@ -32,6 +35,9 @@
    @Autowired
    private IRepairUserInnerServiceSMO repairUserInnerServiceSMOImpl;
    @Autowired
    private IFileRelInnerServiceSMO fileRelInnerServiceSMOImpl;
    @Override
    public String getServiceCode() {
@@ -96,6 +102,27 @@
            }
            repairUserDto.setDuration(getCostTime(duration));
        }
        //刷入图片信息
        List<PhotoVo> photoVos = null;  //业主上传维修图片
        PhotoVo photoVo = null;
        for (RepairUserDto repairUserDto : repairUserDtos) {
            FileRelDto fileRelDto = new FileRelDto();
            fileRelDto.setObjId(repairUserDto.getRepairId());
            List<FileRelDto> fileRelDtos = fileRelInnerServiceSMOImpl.queryFileRels(fileRelDto);
            photoVos = new ArrayList<>();
            for (FileRelDto tmpFileRelDto : fileRelDtos) {
                if (tmpFileRelDto.getRelTypeCd().equals("14000")) {  //维修图片
                    photoVo = new PhotoVo();
                    photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairUserDto.getCommunityId());
                    photoVo.setRelTypeCd(tmpFileRelDto.getRelTypeCd());
                    photoVos.add(photoVo);
                } else {
                    continue;
                }
            }
            repairUserDto.setPhotoVos(photoVos);
        }
    }
service-api/src/main/java/com/java110/api/listener/ownerRepair/RepairFinishListener.java
@@ -1,5 +1,6 @@
package com.java110.api.listener.ownerRepair;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.java110.api.bmo.ownerRepair.IOwnerRepairBMO;
import com.java110.api.listener.AbstractServiceApiPlusListener;
@@ -10,20 +11,27 @@
import com.java110.dto.fee.FeeAttrDto;
import com.java110.dto.fee.FeeConfigDto;
import com.java110.dto.fee.FeeDto;
import com.java110.dto.file.FileDto;
import com.java110.dto.file.FileRelDto;
import com.java110.dto.repair.RepairDto;
import com.java110.dto.repair.RepairUserDto;
import com.java110.intf.common.IFileInnerServiceSMO;
import com.java110.intf.common.IFileRelInnerServiceSMO;
import com.java110.intf.community.IRepairInnerServiceSMO;
import com.java110.intf.community.IRepairUserInnerServiceSMO;
import com.java110.intf.fee.IFeeConfigInnerServiceSMO;
import com.java110.po.fee.FeeAttrPo;
import com.java110.po.fee.PayFeePo;
import com.java110.po.file.FileRelPo;
import com.java110.po.owner.RepairUserPo;
import com.java110.utils.constant.BusinessTypeConstant;
import com.java110.utils.constant.FeeTypeConstant;
import com.java110.utils.constant.ServiceCodeRepairDispatchStepConstant;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.utils.util.DateUtil;
import com.java110.vo.ResultVo;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -53,6 +61,12 @@
    @Autowired
    private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl;
    @Autowired
    private IFileInnerServiceSMO fileInnerServiceSMOImpl;
    @Autowired
    private IFileRelInnerServiceSMO fileRelInnerServiceSMO;
    @Override
    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
@@ -109,6 +123,58 @@
        repairUserPo.setCommunityId(reqJson.getString("communityId"));
        super.insert(context, repairUserPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_REPAIR_USER);
        //维修前图片处理
        if (reqJson.containsKey("beforeRepairPhotos") && !StringUtils.isEmpty(reqJson.getString("beforeRepairPhotos"))) {
            JSONArray beforeRepairPhotos = reqJson.getJSONArray("beforeRepairPhotos");
            for (int _photoIndex = 0; _photoIndex < beforeRepairPhotos.size(); _photoIndex++) {
                FileDto fileDto = new FileDto();
                fileDto.setFileId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_file_id));
                fileDto.setFileName(fileDto.getFileId());
                fileDto.setContext(beforeRepairPhotos.getJSONObject(_photoIndex).getString("photo"));
                fileDto.setSuffix("jpeg");
                fileDto.setCommunityId(reqJson.getString("communityId"));
                String fileName = fileInnerServiceSMOImpl.saveFile(fileDto);
                reqJson.put("ownerPhotoId", fileDto.getFileId());
                reqJson.put("fileSaveName", fileName);
                JSONObject businessUnit = new JSONObject();
                businessUnit.put("fileRelId", "-" + (_photoIndex + 1));
                businessUnit.put("relTypeCd", FileRelDto.BEFORE_REPAIR_PHOTOS);
                businessUnit.put("saveWay", "ftp");
                businessUnit.put("objId", reqJson.getString("repairId"));
                businessUnit.put("fileRealName", fileName);
                businessUnit.put("fileSaveName", fileName);
                FileRelPo fileRelPo = BeanConvertUtil.covertBean(businessUnit, FileRelPo.class);
                fileRelInnerServiceSMO.saveFileRel(fileRelPo);
//                super.insert(context, fileRelPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_FILE_REL);
            }
        }
        //维修后图片处理
        if (reqJson.containsKey("afterRepairPhotos") && !StringUtils.isEmpty(reqJson.getString("afterRepairPhotos"))) {
            JSONArray afterRepairPhotos = reqJson.getJSONArray("afterRepairPhotos");
            for (int _photoIndex = 0; _photoIndex < afterRepairPhotos.size(); _photoIndex++) {
                FileDto fileDto = new FileDto();
                fileDto.setFileId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_file_id));
                fileDto.setFileName(fileDto.getFileId());
                fileDto.setContext(afterRepairPhotos.getJSONObject(_photoIndex).getString("photo"));
                fileDto.setSuffix("jpeg");
                fileDto.setCommunityId(reqJson.getString("communityId"));
                String fileName = fileInnerServiceSMOImpl.saveFile(fileDto);
                reqJson.put("ownerFinishPhotoId", fileDto.getFileId());
                reqJson.put("fileFinishSaveName", fileName);
                JSONObject businessUnit = new JSONObject();
                businessUnit.put("fileRelId", "-" + (_photoIndex + 1));
                businessUnit.put("relTypeCd", FileRelDto.AFTER_REPAIR_PHOTOS);
                businessUnit.put("saveWay", "ftp");
                businessUnit.put("objId", reqJson.getString("repairId"));
                businessUnit.put("fileRealName", fileName);
                businessUnit.put("fileSaveName", fileName);
                FileRelPo fileRelPo = BeanConvertUtil.covertBean(businessUnit, FileRelPo.class);
                fileRelInnerServiceSMO.saveFileRel(fileRelPo);
//                super.insert(context, fileRelPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_FILE_REL);
            }
        }
        if ("200".equals(reqJson.getString("feeFlag"))) { // 没有费用
            ownerRepairBMOImpl.modifyBusinessRepairDispatch(reqJson, context, RepairDto.STATE_APPRAISE);
            ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_OK, ResultVo.MSG_OK);
service-front/src/main/java/com/java110/front/smo/login/impl/OwnerAppLoginSMOImpl.java
@@ -212,6 +212,16 @@
        //获取 openId
        String openId = paramObj.getString("openid");
        String userinfo_url = WechatConstant.APP_GET_USER_INFO_URL
                .replace("ACCESS_TOKEN", paramObj.getString("access_token"))
                .replace("OPENID", openId);
        ResponseEntity<String> userinfo_paramOut = outRestTemplate.getForEntity(userinfo_url, String.class);
        logger.debug("调用微信换去openId ", userinfo_paramOut);
        if (userinfo_paramOut.getStatusCode() != HttpStatus.OK) {
            return ResultVo.redirectPage("/");
        }
        JSONObject userinfo_paramObj = JSONObject.parseObject(userinfo_paramOut.getBody());
        int loginFlag = paramIn.getInteger("loginFlag");
@@ -220,6 +230,8 @@
            //将openId放到redis 缓存,给前段下发临时票据
            String code = UUID.randomUUID().toString();
            CommonCache.setValue(code, openId, expireTime);
            CommonCache.setValue(code+"-nickname",  userinfo_paramObj.getString("nickname"), expireTime);
            CommonCache.setValue(code+"-headimgurl",  userinfo_paramObj.getString("headimgurl"), expireTime);
            if (errorUrl.indexOf("?") > 0) {
                errorUrl += ("&code=" + code);
            } else {
@@ -240,6 +252,8 @@
            //将openId放到redis 缓存,给前段下发临时票据
            String code = UUID.randomUUID().toString();
            CommonCache.setValue(code, openId, expireTime);
            CommonCache.setValue(code+"-nickname",  userinfo_paramObj.getString("nickname"), expireTime);
            CommonCache.setValue(code+"-headimgurl",  userinfo_paramObj.getString("headimgurl"), expireTime);
            if (errorUrl.indexOf("?") > 0) {
                errorUrl += ("&code=" + code);
            } else {
@@ -267,6 +281,8 @@
        if (StringUtil.isEmpty(tmpUserDto.getKey())) {
            String code = UUID.randomUUID().toString();
            CommonCache.setValue(code, openId, expireTime);
            CommonCache.setValue(code+"-nickname",  userinfo_paramObj.getString("nickname"), expireTime);
            CommonCache.setValue(code+"-headimgurl",  userinfo_paramObj.getString("headimgurl"), expireTime);
            if (errorUrl.indexOf("?") > 0) {
                errorUrl += ("&code=" + code);
            } else {
@@ -335,7 +351,7 @@
            openUrl = WechatConstant.OPEN_AUTH
                    .replace("APPID", smallWeChatDto.getAppId())
                    .replace("SCOPE", "snsapi_base")
                    .replace("SCOPE", "snsapi_userinfo")
                    .replace(
                            "REDIRECT_URL",
                            URLEncoder
@@ -379,6 +395,8 @@
        String code = paramIn.getString("code");
        String openId = CommonCache.getValue(code);
        String nickname = CommonCache.getValue(code+"-nickname");
        String headimgurl = CommonCache.getValue(code+"-headimgurl");
        if (StringUtil.isEmpty(openId)) {
            responseEntity = new ResponseEntity<>("页面失效,请刷新后重试", HttpStatus.UNAUTHORIZED);
@@ -395,6 +413,8 @@
        JSONObject userOwnerInfo = new JSONObject();
        OwnerAppUserDto ownerAppUserDto = new OwnerAppUserDto();
        ownerAppUserDto.setOpenId(openId);
        ownerAppUserDto.setNickName(nickname);
        ownerAppUserDto.setHeadImgUrl(headimgurl);
        ownerAppUserDto.setAppType(OwnerAppUserDto.APP_TYPE_WECHAT);
        if (curOwnerApp != null) {
            ownerAppUserDto.setAppUserId(curOwnerApp.getAppUserId());
service-job/src/main/java/com/java110/job/adapt/Repair/MachineAddOwnerRepairAdapt.java
@@ -140,9 +140,6 @@
            staffAppAuthDto.setStaffId(userDto.getUserId());
            staffAppAuthDto.setAppType("WECHAT");
            List<StaffAppAuthDto> staffAppAuthDtos = staffAppAuthInnerServiceSMO.queryStaffAppAuths(staffAppAuthDto);
            if(staffAppAuthDtos == null || staffAppAuthDtos.size()<1){
                continue;
            }
            String openId = staffAppAuthDtos.get(0).getOpenId();
            Data data = new Data();
            PropertyFeeTemplateMessage templateMessage = new PropertyFeeTemplateMessage();
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java
@@ -375,9 +375,6 @@
            reportFeeMonthStatisticsTotalDto = new ReportFeeMonthStatisticsTotalDto();
        }
        /*FeeDetailResultVo resultVo = new FeeDetailResultVo(countInfo.getDouble("totalReceivableAmount"), countInfo.getDouble("totalReceivedAmount"),
                (int) Math.ceil((double) count / (double) reportFeeMonthStatisticsDto.getRow()), count, reportList);*/
        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reportFeeMonthStatisticsDto.getRow()), count, reportList, reportFeeMonthStatisticsTotalDto);
        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
@@ -476,12 +473,24 @@
        //获取员工id和姓名集合
        List<RepairUserDto> staffs;
        if (StringUtil.isEmpty(repairUserDto.getStaffId())) {
            repairUserDto.setPage(-1);
            staffs = reportFeeMonthStatisticsInnerServiceSMOImpl.queryRepairForStaff(repairUserDto);
        } else {
            repairUserDto.setPage(-1);
            repairUserDto.setStaffId(null);
            staffs = reportFeeMonthStatisticsInnerServiceSMOImpl.queryRepairForStaff(repairUserDto);
        }
        List<RepairUserDto> repairUserList = new ArrayList<>();
        //处理中总数量
        int dealNumber = 0;
        //结单总数量
        int statementNumber = 0;
        //退单总数量
        int chargebackNumber = 0;
        //转单总数量
        int transferOrderNumber = 0;
        //派单总数量
        int dispatchNumber = 0;
        if (count > 0) {
            for (RepairUserDto repairUser : repairUsers) {
                RepairUserDto repairUserInfo = new RepairUserDto();
@@ -528,27 +537,51 @@
                    repairUserInfo.setStaffName(repairUser.getStaffName());
                    //处理中报修数量
                    repairUserInfo.setDealAmount(Integer.toString(dealAmount));
                    //处理中报修总数量
                    repairUserInfo.setDealNumber(Integer.toString(dealNumber));
                    //结单报修数量
                    repairUserInfo.setStatementAmount(Integer.toString(statementAmount));
                    //结单报修总数量
                    repairUserInfo.setStatementNumber(Integer.toString(statementNumber));
                    //退单报修数量
                    repairUserInfo.setChargebackAmount(Integer.toString(chargebackAmount));
                    //退单报修总数量
                    repairUserInfo.setChargebackNumber(Integer.toString(chargebackNumber));
                    //转单报修数量
                    repairUserInfo.setTransferOrderAmount(Integer.toString(transferOrderAmount));
                    //转单报修总数量
                    repairUserInfo.setTransferOrderNumber(Integer.toString(transferOrderNumber));
                    //派单报修数量
                    repairUserInfo.setDispatchAmount(Integer.toString(dispatchAmount));
                    //派单报修总数量
                    repairUserInfo.setDispatchNumber(Integer.toString(dispatchNumber));
                    //员工id和姓名信息集合
                    repairUserInfo.setRepairList(staffs);
                    repairUserList.add(repairUserInfo);
                } else {
                    continue;
                }
                dealNumber = Integer.parseInt(repairUserInfo.getDealAmount()) + dealNumber;
                statementNumber = Integer.parseInt(repairUserInfo.getStatementAmount()) + statementNumber;
                chargebackNumber = Integer.parseInt(repairUserInfo.getChargebackAmount()) + chargebackNumber;
                transferOrderNumber = Integer.parseInt(repairUserInfo.getTransferOrderAmount()) + transferOrderNumber;
                dispatchNumber = Integer.parseInt(repairUserInfo.getDispatchAmount()) + dispatchNumber;
            }
        } else {
            repairUserList = new ArrayList<>();
        }
        int size = repairUserList.size();
        ResultVo resultVo = new ResultVo((int) Math.ceil((double) size / (double) repairUserDto.getRow()), size, repairUserList, staffs);
        RepairUserDto repairUser = new RepairUserDto();
        repairUser.setDealNumber(Integer.toString(dealNumber));
        repairUser.setStatementNumber(Integer.toString(statementNumber));
        repairUser.setChargebackNumber(Integer.toString(chargebackNumber));
        repairUser.setTransferOrderNumber(Integer.toString(transferOrderNumber));
        repairUser.setDispatchNumber(Integer.toString(dispatchNumber));
        //获取总条数
        int size = staffs.size();
        ResultVo resultVo = new ResultVo((int) Math.ceil((double) size / (double) repairUserDto.getRow()), repairUserList.size(), repairUserList, staffs, repairUser);
        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
service-report/src/main/java/com/java110/report/smo/impl/ReportFeeMonthStatisticsInnerServiceSMOImpl.java
@@ -340,6 +340,13 @@
     */
    @Override
    public List<RepairUserDto> queryRepairForStaff(RepairUserDto repairUserDto) {
        //校验是否传了 分页信息
        int page = repairUserDto.getPage();
        if (page != PageDto.DEFAULT_PAGE) {
            repairUserDto.setPage((page - 1) * repairUserDto.getRow());
        }
        List<RepairUserDto> repairUserDtoList = BeanConvertUtil.covertBeanList(reportFeeMonthStatisticsServiceDaoImpl.getRepairStaff(BeanConvertUtil.beanCovertMap(repairUserDto)), RepairUserDto.class);
        return repairUserDtoList;
    }
service-user/src/main/java/com/java110/user/listener/ownerAppUser/AbstractOwnerAppUserBusinessServiceDataFlowListener.java
@@ -51,6 +51,8 @@
        businessOwnerAppUserInfo.put("memberId", businessOwnerAppUserInfo.get("member_id"));
        businessOwnerAppUserInfo.put("userId", businessOwnerAppUserInfo.get("user_id"));
        businessOwnerAppUserInfo.put("appType", businessOwnerAppUserInfo.get("app_type"));
        businessOwnerAppUserInfo.put("nickName", businessOwnerAppUserInfo.get("nickname"));
        businessOwnerAppUserInfo.put("headImgUrl", businessOwnerAppUserInfo.get("headimgurl"));
        businessOwnerAppUserInfo.remove("bId");
        businessOwnerAppUserInfo.put("statusCd", statusCd);
    }
@@ -89,6 +91,8 @@
        currentOwnerAppUserInfo.put("memberId", currentOwnerAppUserInfo.get("member_id"));
        currentOwnerAppUserInfo.put("userId", currentOwnerAppUserInfo.get("user_id"));
        currentOwnerAppUserInfo.put("appType", currentOwnerAppUserInfo.get("app_type"));
        currentOwnerAppUserInfo.put("nickName", currentOwnerAppUserInfo.get("nickname"));
        currentOwnerAppUserInfo.put("headImgUrl", currentOwnerAppUserInfo.get("headimgurl"));
        currentOwnerAppUserInfo.put("operate", StatusConstant.OPERATE_DEL);