server/system_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -144,6 +144,7 @@ public static final String MYSQL_BACKUP_DIR ="MYSQL_BACKUP_DIR" ; public static final String EVENT_FILES_PRIVATE_DOMAIN ="EVENT_FILES_PRIVATE_DOMAIN" ; public static final String EVENT_FILES_PUBLIC_DOMAIN ="EVENT_FILES_PUBLIC_DOMAIN" ; public static final String YW_CONTRACT_FILE = "YW_CONTRACT_FILE"; public static boolean DEALING_HK_SYNCPRIVILEGE= false; public static boolean DEALING_HK_SYNCDEVICE = false; public static boolean DEALING_HK_SYNCPLATFORM = false; @@ -1235,6 +1236,8 @@ FN_DEVICE_FILE(5, "阜宁服务平台设备类型图片 ", "阜宁服务平台设备类型图片 "), FN_DEVICE_RECORD_FILE(6, "阜宁服务平台运维记录图片 ", "阜宁服务平台运维记录图片 "), FN_PATROL_POINT_FILE(7, "巡检点附件 ", "巡检点附件 "), YW_CONTRACT_FILE(9, "合同附件 ", "合同附件 ") ; // 成员变量 private String name; server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContract.java
@@ -158,6 +158,18 @@ @ApiModelProperty(value = "公司名称") @TableField(exist = false) private String companyName; @ApiModelProperty(value = "经办人姓名") @TableField(exist = false) private String userName; @ApiModelProperty(value = "项目名") @TableField(exist = false) private String projectName; @ApiModelProperty(value = "租客名称") @TableField(exist = false) private String renterName; @ApiModelProperty(value = "创建人姓名") @TableField(exist = false) private String creatorName; @ApiModelProperty(value = "租赁总面积", example = "1") @TableField(exist = false) private BigDecimal totalArea; server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwWorkorder.java
@@ -87,6 +87,9 @@ @ApiModelProperty(value = "所属房间编码(关联yw_room)", example = "1") @ExcelColumn(name="所属房间编码(关联yw_room)") private Integer roomId; @ApiModelProperty(value = "所属楼层编码(关联yw_floor)", example = "1") @ExcelColumn(name="所属楼层编码(关联yw_floor)") private Integer floorId; @ApiModelProperty(value = "提报人编码", example = "1") @ExcelColumn(name="提报人编码") server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java
@@ -1,5 +1,6 @@ package com.doumee.service.business.impl; import com.doumee.biz.system.SystemDictDataBiz; import com.doumee.core.constants.ResponseStatus; import com.doumee.core.exception.BusinessException; import com.doumee.core.model.LoginUserInfo; @@ -62,6 +63,8 @@ @Autowired private MemberMapper memberMapper; @Autowired private SystemDictDataBiz systemDictDataBiz; @Override @Transactional(rollbackFor = {BusinessException.class,Exception.class}) public Integer create(YwContract model) { @@ -400,7 +403,28 @@ return data; } private void initFiles(YwContract model) { List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() .eq(Multifile::getObjId, model.getId() ) .in(Multifile::getObjType, Arrays.asList(new Integer[]{Constants.MultiFile.YW_CONTRACT_FILE.getKey()})) .eq(Multifile::getIsdeleted,Constants.ZERO)); if(multifiles!=null){ String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() +systemDictDataBiz.queryByCode(Constants.FTP,Constants.YW_CONTRACT_FILE).getCode(); for(Multifile f : multifiles){ if(StringUtils.isBlank(f.getFileurl())){ continue; } f.setFileurlFull(path+f.getFileurl()); //现场情况 if(model.getFileList() == null){ model.setFileList(new ArrayList<>()); } model.getFileList().add(f); } } } private void dealMultifileBiz(YwContract model) { @@ -416,7 +440,7 @@ multifile.setIsdeleted(Constants.ZERO); multifile.setObjId(model.getId()); multifile.setCreator(model.getCreator()); multifile.setObjType(Constants.MultiFile.YW_WORKORDER_PROBLEM.getKey()); multifile.setObjType(Constants.MultiFile.YW_CONTRACT_FILE.getKey()); multifile.setSortnum(i+1); fileList.add(multifile); } @@ -597,7 +621,24 @@ @Override public YwContract findById(Integer id) { return ywContractMapper.selectById(id); MPJLambdaWrapper<YwContract> queryWrapper = new MPJLambdaWrapper<>(); queryWrapper.selectAll(YwContract.class ) .selectAs(Company::getName,YwContract::getCompanyName ) .selectAs(SystemUser::getRealname,YwContract::getUserName ) .selectAs(YwCustomer::getName,YwContract::getRenterName ) .selectAs(YwProject::getName,YwContract::getProjectName ) .select("t4.realname",YwContract::getCreatorName ) .leftJoin(Company.class,Company::getId,YwContract::getCompanyId) .leftJoin(SystemUser.class,SystemUser::getId,YwContract::getUserId) .leftJoin(SystemUser.class,SystemUser::getId,YwContract::getCreator) .leftJoin(YwProject.class,YwProject::getId,YwContract::getProjectId) .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId); YwContract model = ywContractMapper.selectJoinOne(YwContract.class,queryWrapper); if(model != null){ initFiles(model); } return model; } @Override server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java
@@ -57,6 +57,8 @@ private YwRoomMapper ywRoomMapper; @Autowired private YwBuildingMapper ywBuildingMapper; @Autowired private YwFloorMapper ywFloorMapper; @Override @Transactional(rollbackFor = {BusinessException.class,Exception.class}) @@ -130,13 +132,14 @@ model.setProjectId(room.getProjectId()); }else{ //如果是公共区域装修,必须选择楼宇信息 if(model.getBuildingId()==null){ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,请选择正确的楼宇信息!"); if(model.getFloorId()==null){ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,请选择正确的楼层信息!"); } YwBuilding room = ywBuildingMapper.selectById(model.getRoomId()); YwFloor room = ywFloorMapper.selectById(model.getFloorId()); if(room ==null || Constants.equalsInteger(room.getIsdeleted(),Constants.ONE)){ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,请选择正确的楼宇信息!"); throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,请选择正确的楼层信息!"); } model.setBuildingId(room.getBuildingId()); model.setProjectId(room.getProjectId()); } }