1、优化报修汇总报表增加汇总数据展示2、增加业主绑定后登录获取头像和昵称3、员工办结维修前图片和维修后图片上传4、业主手机端查询详情时刷入图片信息
| | |
| | | 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; |
| | |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | private String nickName; |
| | | private String headImgUrl; |
| | | |
| | | |
| | | public String getIdCard() { |
| | | return idCard; |
| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | private String preRuId; |
| | | private String ruId; |
| | | |
| | | //业主上传维修图片 |
| | | private List<PhotoVo> repairPhotos; |
| | | //维修前图片 |
| | | private List<PhotoVo> beforePhotos; |
| | | //维修后图片 |
| | | private List<PhotoVo> afterPhotos; |
| | | |
| | | |
| | | public String getRepairName() { |
| | | return repairName; |
| | |
| | | public void setPreRuId(String preRuId) { |
| | | this.preRuId = preRuId; |
| | | } |
| | | |
| | | public String getbId() { |
| | | return bId; |
| | | } |
| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | 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() { |
| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | private String state; |
| | | private String remark; |
| | | private String userId; |
| | | private String nickName; |
| | | private String headImgUrl; |
| | | |
| | | public String getAppUserId() { |
| | | return appUserId; |
| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | //用来存放大计、小计金额 |
| | | private Object sumTotal; |
| | | |
| | | //所需数据 |
| | | private Object rep; |
| | | |
| | | public ResultVo() { |
| | | } |
| | | |
| | |
| | | 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) { |
| | |
| | | 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); |
| | |
| | | private String state; |
| | | private String stateName; |
| | | private String createTime; |
| | | private String appType; |
| | | private String appTypeName; |
| | | |
| | | private String areaCode; |
| | | private String areaName; |
| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | public class PhotoVo implements Serializable { |
| | | private String url; |
| | | |
| | | private String relTypeCd; |
| | | |
| | | public String getUrl() { |
| | | return url; |
| | | } |
| | |
| | | public void setUrl(String url) { |
| | | this.url = url; |
| | | } |
| | | |
| | | public String getRelTypeCd() { |
| | | return relTypeCd; |
| | | } |
| | | |
| | | public void setRelTypeCd(String relTypeCd) { |
| | | this.relTypeCd = relTypeCd; |
| | | } |
| | | } |
| | |
| | | </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> |
| | |
| | | </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> |
| | |
| | | <!-- 保存绑定业主信息 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> |
| | | |
| | |
| | | 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 != ''"> |
| | |
| | | <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} |
| | |
| | | <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> |
| | | |
| | |
| | | <!-- 查询绑定业主信息 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, |
| | |
| | | <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} |
| | |
| | | } else if (AppDto.WECHAT_OWNER_APP_ID.equals(appId)) { //微信公众号支付 |
| | | paramObj.put("primeRate", "6"); |
| | | paramObj.put("remark", "线上公众号支付"); |
| | | }else{ // 默认 小程序支付 |
| | | paramObj.put("primeRate", "5"); |
| | | paramObj.put("remark", "其他支付"); |
| | | } |
| | | |
| | | //添加单元信息 |
| | |
| | | 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) { |
| | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | |
| | | //刷入图片信息 |
| | | 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); |
| | | } |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | |
| | | @Autowired |
| | | private IRepairUserInnerServiceSMO repairUserInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFileRelInnerServiceSMO fileRelInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | |
| | | } |
| | | 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); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | |
| | | @Autowired |
| | | private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFileInnerServiceSMO fileInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFileRelInnerServiceSMO fileRelInnerServiceSMO; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | |
| | | 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); |
| | |
| | | |
| | | //获取 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"); |
| | | |
| | |
| | | //将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 { |
| | |
| | | //将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 { |
| | |
| | | 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 { |
| | |
| | | |
| | | openUrl = WechatConstant.OPEN_AUTH |
| | | .replace("APPID", smallWeChatDto.getAppId()) |
| | | .replace("SCOPE", "snsapi_base") |
| | | .replace("SCOPE", "snsapi_userinfo") |
| | | .replace( |
| | | "REDIRECT_URL", |
| | | URLEncoder |
| | |
| | | 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); |
| | |
| | | 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()); |
| | |
| | | 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(); |
| | |
| | | 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); |
| | |
| | | //获取员工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(); |
| | |
| | | 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); |
| | | |
| | |
| | | */ |
| | | @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; |
| | | } |
| | |
| | | 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); |
| | | } |
| | |
| | | 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); |