Commit 39010ac1 authored by suhuiguang's avatar suhuiguang

refeat(jg): 告知类增加记录施工流水

1.改造告知、移装告知、维修告知记录施工流水
parent d0c27405
package com.yeejoin.amos.boot.module.common.api.enums;
import lombok.Getter;
@Getter
public enum ConstructionTypeEnum {
AZ("安装", "6030" ),
GZ("改造", "6031" ),
WX("维修", "6032" ),
YZ("移装", "6033" );
private final String name;
private final String code;
ConstructionTypeEnum(String name, String code) {
this.name = name;
this.code = code;
}
}
...@@ -18,13 +18,13 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey; ...@@ -18,13 +18,13 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory; import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto; import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.common.api.enums.ConstructionTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.dto.*; import com.yeejoin.amos.boot.module.jg.api.dto.*;
import com.yeejoin.amos.boot.module.jg.api.entity.*; import com.yeejoin.amos.boot.module.jg.api.entity.*;
import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum; import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintainNoticeEqMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintainNoticeEqMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintainNoticeMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintainNoticeMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgRegistrationHistoryMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgRegistrationHistoryMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
import com.yeejoin.amos.boot.module.jg.api.service.IJgMaintainNoticeService; import com.yeejoin.amos.boot.module.jg.api.service.IJgMaintainNoticeService;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo; import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.MaintainVo; import com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.MaintainVo;
...@@ -37,7 +37,9 @@ import com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher; ...@@ -37,7 +37,9 @@ import com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher;
import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient; import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
import com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService; import com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService;
import com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis; import com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgConstructionInfoService;
import com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils; import com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
...@@ -98,11 +100,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -98,11 +100,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
private ICmWorkflowService iCmWorkflowService; private ICmWorkflowService iCmWorkflowService;
@Autowired @Autowired
IJgInstallationNoticeService iJgInstallationNoticeService;
@Autowired
EquipmentCategoryMapper equipmentCategoryMapper;
@Autowired
JgMaintainNoticeEqMapper jgMaintainNoticeEqMapper; JgMaintainNoticeEqMapper jgMaintainNoticeEqMapper;
@Autowired @Autowired
...@@ -116,7 +113,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -116,7 +113,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
RegistrationInfoMapper tzsJgRegistrationInfoMapper; RegistrationInfoMapper tzsJgRegistrationInfoMapper;
@Autowired @Autowired
OtherInfoMapper tzsJgOtherInfoMapper; IIdxBizJgConstructionInfoService constructionInfoService;
@Autowired @Autowired
ESEquipmentCategory esEquipmentCategory; ESEquipmentCategory esEquipmentCategory;
...@@ -124,8 +121,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -124,8 +121,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
@Autowired @Autowired
private SnowflakeIdUtil sequence; private SnowflakeIdUtil sequence;
@Autowired
SupervisoryCodeInfoMapper supervisoryCodeInfoMapper;
@Autowired @Autowired
IDataDictionaryService dataDictionaryService; IDataDictionaryService dataDictionaryService;
...@@ -1182,6 +1177,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -1182,6 +1177,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
if (!changeRecordEqList.isEmpty()) { if (!changeRecordEqList.isEmpty()) {
jgCertificateChangeRecordEqServiceImpl.saveBatch(changeRecordEqList); jgCertificateChangeRecordEqServiceImpl.saveBatch(changeRecordEqList);
} }
createConstruction2Db(jgMaintainNotice, jgMaintainNoticeEqList);
} }
private TaskResultDTO assembleData(JgMaintainNotice jgMaintainNotice, String op, String opinion) { private TaskResultDTO assembleData(JgMaintainNotice jgMaintainNotice, String op, String opinion) {
...@@ -1198,6 +1194,36 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -1198,6 +1194,36 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
return taskResultDTO; return taskResultDTO;
} }
private void createConstruction2Db(JgMaintainNotice jgMaintainNotice, List<JgMaintainNoticeEq> jgMaintainNoticeEqs) {
List<IdxBizJgConstructionInfo> constructionInfoList = jgMaintainNoticeEqs.stream().map(e->{
IdxBizJgConstructionInfo idxBizJgConstructionInfo = new IdxBizJgConstructionInfo();
idxBizJgConstructionInfo.setUscUnitCreditCode(jgMaintainNotice.getInstallUnitCreditCode());
idxBizJgConstructionInfo.setUscUnitName(jgMaintainNotice.getInstallUnitName());
idxBizJgConstructionInfo.setUscDate(jgMaintainNotice.getPlanDate());
idxBizJgConstructionInfo.setRecord(e.getEquId());
idxBizJgConstructionInfo.setRecDate(new Date());
idxBizJgConstructionInfo.setRecUserId(RequestContext.getExeUserId());
idxBizJgConstructionInfo.setNoticeId(jgMaintainNotice.getSequenceNbr() + "");
idxBizJgConstructionInfo.setInformCode(jgMaintainNotice.getInformNumber());
idxBizJgConstructionInfo.setConstructionLeaderName(jgMaintainNotice.getConstructionManager());
idxBizJgConstructionInfo.setConstructionLeaderPhone(jgMaintainNotice.getConstructionManagerPhone());
idxBizJgConstructionInfo.setProxyStatementAttachment(jgMaintainNotice.getPowerOfAttorney());
idxBizJgConstructionInfo.setConstructionOtherAccessories(jgMaintainNotice.getConstructionContract());
idxBizJgConstructionInfo.setConstructionProvince(jgMaintainNotice.getProvince());
idxBizJgConstructionInfo.setConstructionCity(jgMaintainNotice.getCity());
idxBizJgConstructionInfo.setConstructionCounty(jgMaintainNotice.getCounty());
idxBizJgConstructionInfo.setConstructionStreet(jgMaintainNotice.getFactoryUseSiteStreet());
idxBizJgConstructionInfo.setConstructionAddress(jgMaintainNotice.getAddress());
idxBizJgConstructionInfo.setConstructionProvinceName(jgMaintainNotice.getProvinceName());
idxBizJgConstructionInfo.setConstructionCityName(jgMaintainNotice.getCityName());
idxBizJgConstructionInfo.setConstructionCountyName(jgMaintainNotice.getCountyName());
idxBizJgConstructionInfo.setConstructionStreetName(jgMaintainNotice.getStreetName());
idxBizJgConstructionInfo.setConstructionType(ConstructionTypeEnum.WX.getCode());
return idxBizJgConstructionInfo;
}).collect(Collectors.toList());
constructionInfoService.saveBatch(constructionInfoList);
}
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
......
...@@ -21,11 +21,10 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; ...@@ -21,11 +21,10 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil; import com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory; import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto; import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.common.api.enums.ConstructionTypeEnum;
import com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent; import com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent;
import com.yeejoin.amos.boot.module.jg.api.dto.*; import com.yeejoin.amos.boot.module.jg.api.dto.*;
import com.yeejoin.amos.boot.module.jg.api.entity.JgReformNotice; import com.yeejoin.amos.boot.module.jg.api.entity.*;
import com.yeejoin.amos.boot.module.jg.api.entity.JgReformNoticeEq;
import com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory;
import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum; import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgReformNoticeEqMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgReformNoticeEqMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgReformNoticeMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgReformNoticeMapper;
...@@ -145,7 +144,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -145,7 +144,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
private final JgUseRegistrationServiceImpl useRegistrationService; private final JgUseRegistrationServiceImpl useRegistrationService;
private final JgResumeInfoServiceImpl jgResumeInfoService; private final JgResumeInfoServiceImpl jgResumeInfoService;
@Autowired @Autowired
@Lazy @Lazy
private JgInstallationNoticeServiceImpl jgInstallationNoticeService; private JgInstallationNoticeServiceImpl jgInstallationNoticeService;
...@@ -1001,6 +999,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -1001,6 +999,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
TaskV2Model taskV2Model1 = this.updateLastTodo(jgReformNotice, FlowStatusEnum.TO_BE_FINISHED); TaskV2Model taskV2Model1 = this.updateLastTodo(jgReformNotice, FlowStatusEnum.TO_BE_FINISHED);
this.updateById(jgReformNotice); this.updateById(jgReformNotice);
this.sendDataRefreshMsg(jgReformNotice, noticeEqs); this.sendDataRefreshMsg(jgReformNotice, noticeEqs);
// 记录施工流水
this.createConstruction2Db(jgReformNotice);
// 创建设备履历 // 创建设备履历
this.createResume(noticeEqs, jgReformNotice, taskV2Model1.getRoutePath()); this.createResume(noticeEqs, jgReformNotice, taskV2Model1.getRoutePath());
} else { } else {
...@@ -1184,7 +1184,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -1184,7 +1184,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
List<IdxBizJgUseInfo> useInfoList = new ArrayList<>(15); List<IdxBizJgUseInfo> useInfoList = new ArrayList<>(15);
List<IdxBizJgDesignInfo> designInfoList = new ArrayList<>(15); List<IdxBizJgDesignInfo> designInfoList = new ArrayList<>(15);
List<IdxBizJgFactoryInfo> factoryInfoList = new ArrayList<>(15); List<IdxBizJgFactoryInfo> factoryInfoList = new ArrayList<>(15);
List<IdxBizJgConstructionInfo> constructionInfoList = new ArrayList<>(15);
List<IdxBizJgRegisterInfo> registerInfoList = new ArrayList<>(15); List<IdxBizJgRegisterInfo> registerInfoList = new ArrayList<>(15);
List<IdxBizJgSupervisionInfo> supervisionInfoList = new ArrayList<>(15); List<IdxBizJgSupervisionInfo> supervisionInfoList = new ArrayList<>(15);
List<IdxBizJgOtherInfo> otherInfoList = new ArrayList<>(15); List<IdxBizJgOtherInfo> otherInfoList = new ArrayList<>(15);
...@@ -1230,15 +1229,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -1230,15 +1229,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
factoryInfo.setSequenceNbr(null); factoryInfo.setSequenceNbr(null);
factoryInfoList.add(factoryInfo); factoryInfoList.add(factoryInfo);
// 施工信息
String uscDate = pipData.getString("uscDate");
pipData.put("uscDate", uscDate != null ? DateUtil.parse(uscDate, DatePattern.NORM_MONTH_FORMAT) : null);
IdxBizJgConstructionInfo constructionInfo = JSON.parseObject(toJSONString(pipData), IdxBizJgConstructionInfo.class);
constructionInfo.setRecord(record);
constructionInfo.setRecDate(date);
constructionInfo.setSequenceNbr(null);
constructionInfoList.add(constructionInfo);
// 注册登记信息 // 注册登记信息
IdxBizJgRegisterInfo registerInfo = JSON.parseObject(toJSONString(pipData), IdxBizJgRegisterInfo.class); IdxBizJgRegisterInfo registerInfo = JSON.parseObject(toJSONString(pipData), IdxBizJgRegisterInfo.class);
registerInfo.setRecord(record); registerInfo.setRecord(record);
...@@ -1315,7 +1305,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -1315,7 +1305,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
}); });
idxBizJgUseInfoService.saveBatch(useInfoList); idxBizJgUseInfoService.saveBatch(useInfoList);
idxBizJgDesignInfoService.saveBatch(designInfoList); idxBizJgDesignInfoService.saveBatch(designInfoList);
iIdxBizJgConstructionInfoService.saveBatch(constructionInfoList);
idxBizJgFactoryInfoService.saveBatch(factoryInfoList); idxBizJgFactoryInfoService.saveBatch(factoryInfoList);
idxBizJgRegisterInfoServiceImpl.saveBatch(registerInfoList); idxBizJgRegisterInfoServiceImpl.saveBatch(registerInfoList);
iIdxBizJgOtherInfoService.saveBatch(otherInfoList); iIdxBizJgOtherInfoService.saveBatch(otherInfoList);
...@@ -1524,4 +1513,46 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -1524,4 +1513,46 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
commonService.saveExecuteFlowData2Redis(jgReformNotice.getInstanceId(), this.buildInstanceRuntimeData(jgReformNotice)); commonService.saveExecuteFlowData2Redis(jgReformNotice.getInstanceId(), this.buildInstanceRuntimeData(jgReformNotice));
} }
/**
* 记录施工流水
* @param jgReformNotice 主表
*/
private void createConstruction2Db(JgReformNotice jgReformNotice) {
// 新查询兼容管道新增加减的管道
LambdaQueryWrapper<JgReformNoticeEq> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(JgReformNoticeEq::getEquipTransferId, jgReformNotice.getSequenceNbr());
List<JgReformNoticeEq> reformNoticeEqs = jgReformNoticeEqMapper.selectList(queryWrapper);
List<IdxBizJgConstructionInfo> constructionInfoList = reformNoticeEqs.stream().map(e-> buildOne(jgReformNotice, e.getEquId())).collect(Collectors.toList());
iIdxBizJgConstructionInfoService.saveBatch(constructionInfoList);
}
private IdxBizJgConstructionInfo buildOne(JgReformNotice jgReformNotice, String record){
IdxBizJgConstructionInfo idxBizJgConstructionInfo = new IdxBizJgConstructionInfo();
idxBizJgConstructionInfo.setUscUnitCreditCode(jgReformNotice.getInstallUnitCreditCode());
idxBizJgConstructionInfo.setUscUnitName(jgReformNotice.getInstallUnitName());
idxBizJgConstructionInfo.setUscDate(jgReformNotice.getPlanDate());
idxBizJgConstructionInfo.setRecord(record);
idxBizJgConstructionInfo.setRecDate(new Date());
idxBizJgConstructionInfo.setRecUserId(RequestContext.getExeUserId());
idxBizJgConstructionInfo.setNoticeId(jgReformNotice.getSequenceNbr() + "");
idxBizJgConstructionInfo.setInformCode(jgReformNotice.getInformNumber());
idxBizJgConstructionInfo.setConstructionLeaderName(jgReformNotice.getConstructionManager());
idxBizJgConstructionInfo.setConstructionLeaderPhone(jgReformNotice.getConstructionManagerPhone());
idxBizJgConstructionInfo.setProxyStatementAttachment(JSON.toJSONString(jgReformNotice.getPowerOfAttorney()));
idxBizJgConstructionInfo.setConstructionContractAttachment(JSON.toJSONString(jgReformNotice.getConstructionContract()));
idxBizJgConstructionInfo.setConstructionOtherAccessories(JSON.toJSONString(jgReformNotice.getOtherAccessories()));
idxBizJgConstructionInfo.setConstructionProvince(jgReformNotice.getProvince());
idxBizJgConstructionInfo.setConstructionCity(jgReformNotice.getCity());
idxBizJgConstructionInfo.setConstructionCounty(jgReformNotice.getCounty());
idxBizJgConstructionInfo.setConstructionStreet(jgReformNotice.getFactoryUseSiteStreet());
idxBizJgConstructionInfo.setConstructionAddress(jgReformNotice.getAddress());
idxBizJgConstructionInfo.setConstructionProvinceName(jgReformNotice.getProvinceName());
idxBizJgConstructionInfo.setConstructionCityName(jgReformNotice.getCityName());
idxBizJgConstructionInfo.setConstructionCountyName(jgReformNotice.getCountyName());
idxBizJgConstructionInfo.setConstructionStreetName(jgReformNotice.getStreetName());
idxBizJgConstructionInfo.setConstructionType(ConstructionTypeEnum.YZ.getCode());
idxBizJgConstructionInfo.setConstructionIsXiXian(jgReformNotice.getIsXixian());
return idxBizJgConstructionInfo;
}
} }
\ No newline at end of file
...@@ -16,10 +16,9 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey; ...@@ -16,10 +16,9 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory; import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto; import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.common.api.enums.ConstructionTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.dto.*; import com.yeejoin.amos.boot.module.jg.api.dto.*;
import com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory; import com.yeejoin.amos.boot.module.jg.api.entity.*;
import com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice;
import com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNoticeEq;
import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum; import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.*; import com.yeejoin.amos.boot.module.jg.api.mapper.*;
import com.yeejoin.amos.boot.module.jg.api.service.IJgTransferNoticeService; import com.yeejoin.amos.boot.module.jg.api.service.IJgTransferNoticeService;
...@@ -32,8 +31,10 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.permission.FillingEditPermForCur ...@@ -32,8 +31,10 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.permission.FillingEditPermForCur
import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient; import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
import com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService; import com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService;
import com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis; import com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgConstructionInfoService;
import com.yeejoin.amos.boot.module.jg.biz.utils.ObjectCleanerUtils; import com.yeejoin.amos.boot.module.jg.biz.utils.ObjectCleanerUtils;
import com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils; import com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo;
import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
...@@ -127,6 +128,9 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto ...@@ -127,6 +128,9 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
@Autowired @Autowired
JgVehicleInformationMapper jgVehicleInformationMapper; JgVehicleInformationMapper jgVehicleInformationMapper;
@Autowired
private IIdxBizJgConstructionInfoService iIdxBizJgConstructionInfoService;
/** /**
* 根据sequenceNbr查询 * 根据sequenceNbr查询
* *
...@@ -952,6 +956,8 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto ...@@ -952,6 +956,8 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
jgTransferNoticeMapper.updateById(jgTransferNotice); jgTransferNoticeMapper.updateById(jgTransferNotice);
// 创建设备履历 // 创建设备履历
this.createResume(jgTransferNoticeEqs,jgTransferNotice, taskV2Model1.getRoutePath()); this.createResume(jgTransferNoticeEqs,jgTransferNotice, taskV2Model1.getRoutePath());
// 记录施工信息流水
this.createConstruction2Db(jgTransferNotice, jgTransferNoticeEqs);
} else { } else {
jgTransferNotice.setNextExecuteIds(workflowResultDto.getNextExecutorRoleIds()); jgTransferNotice.setNextExecuteIds(workflowResultDto.getNextExecutorRoleIds());
jgTransferNotice.setNextExecuteUserIds(workflowResultDto.getNextExecutorUserIds()); jgTransferNotice.setNextExecuteUserIds(workflowResultDto.getNextExecutorUserIds());
...@@ -1130,4 +1136,34 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto ...@@ -1130,4 +1136,34 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
commonService.saveExecuteFlowData2Redis(jgTransferNotice.getInstanceId(), this.buildInstanceRuntimeData(jgTransferNotice)); commonService.saveExecuteFlowData2Redis(jgTransferNotice.getInstanceId(), this.buildInstanceRuntimeData(jgTransferNotice));
} }
private void createConstruction2Db(JgTransferNotice jgTransferNotice, List<JgTransferNoticeEq> jgTransferNoticeEqs) {
List<IdxBizJgConstructionInfo> constructionInfoList = jgTransferNoticeEqs.stream().map(e->{
IdxBizJgConstructionInfo idxBizJgConstructionInfo = new IdxBizJgConstructionInfo();
idxBizJgConstructionInfo.setUscUnitCreditCode(jgTransferNotice.getInstallUnitCreditCode());
idxBizJgConstructionInfo.setUscUnitName(jgTransferNotice.getInstallUnitName());
idxBizJgConstructionInfo.setUscDate(jgTransferNotice.getPlanDate());
idxBizJgConstructionInfo.setRecord(e.getEquId());
idxBizJgConstructionInfo.setRecDate(new Date());
idxBizJgConstructionInfo.setRecUserId(RequestContext.getExeUserId());
idxBizJgConstructionInfo.setNoticeId(jgTransferNotice.getSequenceNbr() + "");
idxBizJgConstructionInfo.setConstructionLeaderName(jgTransferNotice.getConstructionManager());
idxBizJgConstructionInfo.setConstructionLeaderPhone(jgTransferNotice.getConstructionManagerPhone());
idxBizJgConstructionInfo.setProxyStatementAttachment(jgTransferNotice.getPowerOfAttorney());
idxBizJgConstructionInfo.setConstructionContractAttachment(jgTransferNotice.getConstructionContract());
idxBizJgConstructionInfo.setConstructionOtherAccessories(jgTransferNotice.getOtherAccessories());
idxBizJgConstructionInfo.setConstructionProvince(jgTransferNotice.getProvince());
idxBizJgConstructionInfo.setConstructionCity(jgTransferNotice.getCity());
idxBizJgConstructionInfo.setConstructionCounty(jgTransferNotice.getCounty());
idxBizJgConstructionInfo.setConstructionStreet(jgTransferNotice.getFactoryUseSiteStreet());
idxBizJgConstructionInfo.setConstructionAddress(jgTransferNotice.getAddress());
idxBizJgConstructionInfo.setConstructionProvinceName(jgTransferNotice.getProvinceName());
idxBizJgConstructionInfo.setConstructionCityName(jgTransferNotice.getCityName());
idxBizJgConstructionInfo.setConstructionCountyName(jgTransferNotice.getCountyName());
idxBizJgConstructionInfo.setConstructionStreetName(jgTransferNotice.getStreetName());
idxBizJgConstructionInfo.setConstructionType(ConstructionTypeEnum.GZ.getCode());
idxBizJgConstructionInfo.setConstructionIsXiXian(jgTransferNotice.getIsXixian());
return idxBizJgConstructionInfo;
}).collect(Collectors.toList());
iIdxBizJgConstructionInfoService.saveBatch(constructionInfoList);
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment