Commit 5b0beef4 authored by suhuiguang's avatar suhuiguang

feat(jyjc): 报检开发调整

1.报检规则4.0开发
parent 61e12da9
...@@ -123,9 +123,6 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR ...@@ -123,9 +123,6 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
UseInfoMapper useInfoMapper; UseInfoMapper useInfoMapper;
@Autowired @Autowired
IdxBizJgInspectionDetectionInfoMapper inspectionDetectionInfoMapper;
@Autowired
private SnowflakeIdUtil sequence; private SnowflakeIdUtil sequence;
@Autowired @Autowired
...@@ -349,22 +346,21 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR ...@@ -349,22 +346,21 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
// 2.检验信息更新或者插入 // 2.检验信息更新或者插入
IdxBizJgInspectionDetectionInfo info = new IdxBizJgInspectionDetectionInfo(); IdxBizJgInspectionDetectionInfo info = new IdxBizJgInspectionDetectionInfo();
LambdaQueryWrapper<IdxBizJgInspectionDetectionInfo> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<IdxBizJgInspectionDetectionInfo> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IdxBizJgInspectionDetectionInfo::getInspectReportNo, model.getResultNo()); wrapper.eq(IdxBizJgInspectionDetectionInfo::getResultSeq, model.getSequenceNbr());
wrapper.eq(IdxBizJgInspectionDetectionInfo::getRecord, record); wrapper.eq(IdxBizJgInspectionDetectionInfo::getRecord, record);
wrapper.eq(IdxBizJgInspectionDetectionInfo::getInspectOrgCode, model.getInspectionUnitCode()); List<IdxBizJgInspectionDetectionInfo> list = idxBizJgInspectionDetectionInfoMapper.selectList(wrapper);
List<IdxBizJgInspectionDetectionInfo> list = inspectionDetectionInfoMapper.selectList(wrapper);
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
// 无则插入 // 无则插入
commonService.buildInspectInfo(model, info, jybgFile, record); commonService.buildInspectInfo(model, info, jybgFile, record);
info.setSequenceNbr(sequence.nextId() + ""); info.setSequenceNbr(sequence.nextId() + "");
inspectionDetectionInfoMapper.insert(info); idxBizJgInspectionDetectionInfoMapper.insert(info);
// 对方不查询库 所以无事务操作 // 对方不查询库 所以无事务操作
bizEmqPublisher.sendInspectionMsgAfterSave(info, "insert"); bizEmqPublisher.sendInspectionMsgAfterSave(info, "insert");
} else { } else {
// 已经维护过则更新 // 已经维护过则更新
info = list.get(0); info = list.get(0);
commonService.buildInspectInfo(model, info, jybgFile, record); commonService.buildInspectInfo(model, info, jybgFile, record);
inspectionDetectionInfoMapper.updateById(info); idxBizJgInspectionDetectionInfoMapper.updateById(info);
// 对方不查询库 所以无事务操作 // 对方不查询库 所以无事务操作
bizEmqPublisher.sendInspectionMsgAfterSave(info, "update"); bizEmqPublisher.sendInspectionMsgAfterSave(info, "update");
} }
...@@ -399,17 +395,17 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR ...@@ -399,17 +395,17 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
IdxBizJgInspectionDetectionInfo info = new IdxBizJgInspectionDetectionInfo(); IdxBizJgInspectionDetectionInfo info = new IdxBizJgInspectionDetectionInfo();
QueryWrapper<IdxBizJgInspectionDetectionInfo> wrapper = new QueryWrapper<>(); QueryWrapper<IdxBizJgInspectionDetectionInfo> wrapper = new QueryWrapper<>();
wrapper.lambda().eq(IdxBizJgInspectionDetectionInfo::getResultSeq, model.getSequenceNbr()); wrapper.lambda().eq(IdxBizJgInspectionDetectionInfo::getResultSeq, model.getSequenceNbr());
List<IdxBizJgInspectionDetectionInfo> list = inspectionDetectionInfoMapper.selectList(wrapper); List<IdxBizJgInspectionDetectionInfo> list = idxBizJgInspectionDetectionInfoMapper.selectList(wrapper);
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
commonService.buildInspectInfo(model, info, jybgFile, model.getEquipUnicode()); commonService.buildInspectInfo(model, info, jybgFile, model.getEquipUnicode());
info.setSequenceNbr(sequence.nextId() + ""); info.setSequenceNbr(sequence.nextId() + "");
inspectionDetectionInfoMapper.insert(info); idxBizJgInspectionDetectionInfoMapper.insert(info);
// 对方不查询库 所以无事务操作 // 对方不查询库 所以无事务操作
bizEmqPublisher.sendInspectionMsgAfterSave(info, "insert"); bizEmqPublisher.sendInspectionMsgAfterSave(info, "insert");
} else { } else {
info = list.get(0); info = list.get(0);
commonService.buildInspectInfo(model, info, jybgFile, model.getEquipUnicode()); commonService.buildInspectInfo(model, info, jybgFile, model.getEquipUnicode());
inspectionDetectionInfoMapper.updateById(info); idxBizJgInspectionDetectionInfoMapper.updateById(info);
// 对方不查询库 所以无事务操作 // 对方不查询库 所以无事务操作
bizEmqPublisher.sendInspectionMsgAfterSave(info, "update"); bizEmqPublisher.sendInspectionMsgAfterSave(info, "update");
} }
......
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