Commit c0ecc32c authored by hezhuozhi's avatar hezhuozhi

27562 监管业务系统,压力管道安装告知被监管单位驳回之后,安装单位通过工作台进代办列表点处理进入单据编辑,更换装置后提交,报错提示保存失败

parent d88eacdf
...@@ -552,16 +552,19 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -552,16 +552,19 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
LambdaQueryWrapper<JgInstallationNoticeEq> lambda = new QueryWrapper<JgInstallationNoticeEq>().lambda(); LambdaQueryWrapper<JgInstallationNoticeEq> lambda = new QueryWrapper<JgInstallationNoticeEq>().lambda();
lambda.eq(JgInstallationNoticeEq::getEquipTransferId, noticeDto.getSequenceNbr()); lambda.eq(JgInstallationNoticeEq::getEquipTransferId, noticeDto.getSequenceNbr());
jgInstallationNoticeEqMapper.delete(lambda); jgInstallationNoticeEqMapper.delete(lambda);
ArrayList<JgInstallationNoticeEq> jgInstallationNoticeEqs = new ArrayList<>(); List<Map<String, Object>> deviceList = noticeDto.getDeviceList();
noticeDto.getDeviceList().forEach(item -> { if(!CollectionUtils.isEmpty(deviceList)){
JgInstallationNoticeEq jgInstallationNoticeEq = new JgInstallationNoticeEq(); ArrayList<JgInstallationNoticeEq> jgInstallationNoticeEqs = new ArrayList<>();
jgInstallationNoticeEq.setEquId(!ValidationUtil.isEmpty(item.get("SEQUENCE_NBR")) ? String.valueOf(item.get("SEQUENCE_NBR")) : String.valueOf(item.get("record"))); deviceList.forEach(item -> {
jgInstallationNoticeEq.setEquCategoryCode(!ValidationUtil.isEmpty(item.get("EQU_CATEGORY_CODE")) ? String.valueOf(item.get("EQU_CATEGORY_CODE")) : String.valueOf(item.get("equCategory"))); JgInstallationNoticeEq jgInstallationNoticeEq = new JgInstallationNoticeEq();
jgInstallationNoticeEq.setEquListCode(!ValidationUtil.isEmpty(item.get("EQU_LIST_CODE")) ? String.valueOf(item.get("EQU_LIST_CODE")) : String.valueOf(item.get("equList"))); jgInstallationNoticeEq.setEquId(!ValidationUtil.isEmpty(item.get("SEQUENCE_NBR")) ? String.valueOf(item.get("SEQUENCE_NBR")) : String.valueOf(item.get("record")));
jgInstallationNoticeEq.setEquipTransferId(noticeDto.getSequenceNbr().toString()); jgInstallationNoticeEq.setEquCategoryCode(!ValidationUtil.isEmpty(item.get("EQU_CATEGORY_CODE")) ? String.valueOf(item.get("EQU_CATEGORY_CODE")) : String.valueOf(item.get("equCategory")));
jgInstallationNoticeEqs.add(jgInstallationNoticeEq); jgInstallationNoticeEq.setEquListCode(!ValidationUtil.isEmpty(item.get("EQU_LIST_CODE")) ? String.valueOf(item.get("EQU_LIST_CODE")) : String.valueOf(item.get("equList")));
}); jgInstallationNoticeEq.setEquipTransferId(noticeDto.getSequenceNbr().toString());
jgInstallationNoticeEqMapper.insertBatchSomeColumn(jgInstallationNoticeEqs); jgInstallationNoticeEqs.add(jgInstallationNoticeEq);
});
jgInstallationNoticeEqMapper.insertBatchSomeColumn(jgInstallationNoticeEqs);
}
return noticeDto; return noticeDto;
} catch (BadRequest | LocalBadRequest e) { } catch (BadRequest | LocalBadRequest e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
......
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