Commit ec778840 authored by zhangsen's avatar zhangsen

移装告知 和 安装告知 详情API修改

parent dd79e25f
...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON; ...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper; import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper;
...@@ -25,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum; ...@@ -25,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeEqMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeEqMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService; import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
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;
...@@ -108,6 +110,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -108,6 +110,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
JgInstallationNoticeEqMapper jgInstallationNoticeEqMapper; JgInstallationNoticeEqMapper jgInstallationNoticeEqMapper;
@Autowired @Autowired
JgUseRegistrationMapper jgUseRegistrationMapper;
@Autowired
private JgInstallationNoticeMapper jgInstallationNoticeMapper; private JgInstallationNoticeMapper jgInstallationNoticeMapper;
@Autowired @Autowired
...@@ -191,20 +196,40 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -191,20 +196,40 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
"proxyStatementAttachment", "installContractAttachment"}; "proxyStatementAttachment", "installContractAttachment"};
// 设备信息 // 设备信息
List<Map<String, Object>> equipmentInfos = jgInstallationNoticeMapper.queryEquipInformation(sequenceNbr); // List<Map<String, Object>> equipmentInfos = jgInstallationNoticeMapper.queryEquipInformation(sequenceNbr);
for (String s:fields) { for (String s:fields) {
if(installationInfo.containsKey(s)) { if(installationInfo.containsKey(s)) {
installationInfo.put(s, ObjectUtils.isEmpty(installationInfo.get(s)) ? new JSONArray() : parseArray(installationInfo.get(s).toString())); installationInfo.put(s, ObjectUtils.isEmpty(installationInfo.get(s)) ? new JSONArray() : parseArray(installationInfo.get(s).toString()));
} }
if(equipmentInfos.get(0).containsKey(s)) {
equipmentInfos.get(0).put(s, ObjectUtils.isEmpty(equipmentInfos.get(0).get(s)) ? new JSONArray() : parseArray(equipmentInfos.get(0).get(s).toString()));
}
} }
Map<String, Object> map = equipmentInfos.get(0); QueryWrapper<JgInstallationNoticeEq> wrapper = new QueryWrapper<>();
BeanUtil.copyProperties(installationInfo, map, "equList", "supervisoryCode", "factoryNum"); wrapper.lambda().eq(JgInstallationNoticeEq::getEquipTransferId, notice.getSequenceNbr());
JgInstallationNoticeEq jgInstallationNoticeEq = jgInstallationNoticeEqMapper.selectOne(wrapper);
Map<String, Object> detail = jgUseRegistrationMapper.getDetail(jgInstallationNoticeEq.getEquId());
Map<String, Object> inspectDetail = jgUseRegistrationMapper.getInspectDetail(jgInstallationNoticeEq.getEquId());
Map<String, Object> useDetail = jgUseRegistrationMapper.getUseDetail(jgInstallationNoticeEq.getEquId());
Map<String, Object> useDestail = jgUseRegistrationMapper.getDesDetail(jgInstallationNoticeEq.getEquId());
if (!ObjectUtils.isEmpty(inspectDetail)) {
detail.putAll(inspectDetail);
}
if (!ObjectUtils.isEmpty(useDetail)) {
detail.putAll(useDetail);
}
if (!ObjectUtils.isEmpty(useDestail)) {
detail.putAll(useDestail);
}
detail.put("proDuctPhoto", JSON.parse(String.valueOf(detail.get("proDuctPhoto"))));
detail.put("factoryStandard", JSON.parse(String.valueOf(detail.get("factoryStandard"))));
detail.put("productQualityYieldProve", JSON.parse(String.valueOf(detail.get("productQualityYieldProve"))));
detail.put("insUseMaintainExplain", JSON.parse(String.valueOf(detail.get("insUseMaintainExplain"))));
detail.put("inspectReport", JSON.parse(String.valueOf(detail.get("inspectReport"))));
detail.put("designStandard", JSON.parse(String.valueOf(detail.get("designStandard"))));
detail.put("designDoc", JSON.parse(String.valueOf(detail.get("designDoc"))));
BeanUtil.copyProperties(installationInfo, detail, "equList", "supervisoryCode", "factoryNum");
return new HashMap<String, Map<String, Object>>() {{ return new HashMap<String, Map<String, Object>>() {{
this.put("installationInfo", map); this.put("installationInfo", detail);
}}; }};
} }
......
...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON; ...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils; import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
...@@ -14,11 +15,13 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto; ...@@ -14,11 +15,13 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.dto.TaskMessageDto; import com.yeejoin.amos.boot.module.jg.api.dto.TaskMessageDto;
import com.yeejoin.amos.boot.module.jg.api.dto.TaskModelDto; import com.yeejoin.amos.boot.module.jg.api.dto.TaskModelDto;
import com.yeejoin.amos.boot.module.jg.api.dto.WorkflowResultDto; import com.yeejoin.amos.boot.module.jg.api.dto.WorkflowResultDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNoticeEq;
import com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice; 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.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.JgTransferNoticeEqMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgTransferNoticeEqMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgTransferNoticeMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgTransferNoticeMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgTransferNoticeService; import com.yeejoin.amos.boot.module.jg.api.service.IJgTransferNoticeService;
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;
...@@ -90,6 +93,9 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto ...@@ -90,6 +93,9 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
private TzBaseUnitLicenceMapper baseUnitLicenceMapper; private TzBaseUnitLicenceMapper baseUnitLicenceMapper;
@Autowired @Autowired
JgUseRegistrationMapper jgUseRegistrationMapper;
@Autowired
ICmWorkflowService iCmWorkflowService; ICmWorkflowService iCmWorkflowService;
/** /**
...@@ -121,8 +127,29 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto ...@@ -121,8 +127,29 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
"productQualityYieldProve", "insUseMaintainExplain", "inspectReport", "productQualityYieldProve", "insUseMaintainExplain", "inspectReport",
"proxyStatementAttachment", "installContractAttachment", "powerOfAttorney", "constructionContract"}; "proxyStatementAttachment", "installContractAttachment", "powerOfAttorney", "constructionContract"};
// 设备信息 // 设备信息
List<Map<String, Object>> equipmentInfos = jgTransferNoticeMapper.queryEquipInformation(sequenceNbr); QueryWrapper<JgTransferNoticeEq> wrapper = new QueryWrapper<>();
wrapper.lambda().eq(JgTransferNoticeEq::getEquipTransferId, notice.getSequenceNbr());
JgTransferNoticeEq jgTransferNoticeEq = jgTransferNoticeEqMapper.selectOne(wrapper);
Map<String, Object> detail = jgUseRegistrationMapper.getDetail(jgTransferNoticeEq.getEquId());
Map<String, Object> inspectDetail = jgUseRegistrationMapper.getInspectDetail(jgTransferNoticeEq.getEquId());
Map<String, Object> useDetail = jgUseRegistrationMapper.getUseDetail(jgTransferNoticeEq.getEquId());
Map<String, Object> useDestail = jgUseRegistrationMapper.getDesDetail(jgTransferNoticeEq.getEquId());
if (!ObjectUtils.isEmpty(inspectDetail)) {
detail.putAll(inspectDetail);
}
if (!ObjectUtils.isEmpty(useDetail)) {
detail.putAll(useDetail);
}
if (!ObjectUtils.isEmpty(useDestail)) {
detail.putAll(useDestail);
}
detail.put("proDuctPhoto", JSON.parse(String.valueOf(detail.get("proDuctPhoto"))));
detail.put("factoryStandard", JSON.parse(String.valueOf(detail.get("factoryStandard"))));
detail.put("productQualityYieldProve", JSON.parse(String.valueOf(detail.get("productQualityYieldProve"))));
detail.put("insUseMaintainExplain", JSON.parse(String.valueOf(detail.get("insUseMaintainExplain"))));
detail.put("inspectReport", JSON.parse(String.valueOf(detail.get("inspectReport"))));
detail.put("designStandard", JSON.parse(String.valueOf(detail.get("designStandard"))));
detail.put("designDoc", JSON.parse(String.valueOf(detail.get("designDoc"))));
for (String s : fields) { for (String s : fields) {
if (transferNotice.containsKey(s)) { if (transferNotice.containsKey(s)) {
if ("powerOfAttorney".equalsIgnoreCase(s)) { if ("powerOfAttorney".equalsIgnoreCase(s)) {
...@@ -133,14 +160,10 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto ...@@ -133,14 +160,10 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
transferNotice.put(s, ObjectUtils.isEmpty(transferNotice.get(s)) ? new JSONArray() : JSON.parseArray(transferNotice.get(s).toString())); transferNotice.put(s, ObjectUtils.isEmpty(transferNotice.get(s)) ? new JSONArray() : JSON.parseArray(transferNotice.get(s).toString()));
} }
} }
if (equipmentInfos.get(0).containsKey(s)) {
equipmentInfos.get(0).put(s, JSON.parseArray(equipmentInfos.get(0).get(s).toString()));
}
} }
Map<String, Object> map = equipmentInfos.get(0); BeanUtil.copyProperties(transferNotice, detail, "equList", "supervisoryCode");
BeanUtil.copyProperties(transferNotice, map, "equList", "supervisoryCode");
return new HashMap<String, Map<String, Object>>() {{ return new HashMap<String, Map<String, Object>>() {{
this.put("transferNoticeInfo", map); this.put("transferNoticeInfo", detail);
}}; }};
} }
......
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