Commit c0ecc32c authored by hezhuozhi's avatar hezhuozhi

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

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