Commit c0ecc32c authored by hezhuozhi's avatar hezhuozhi

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

parent d88eacdf
...@@ -552,8 +552,10 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -552,8 +552,10 @@ 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);
List<Map<String, Object>> deviceList = noticeDto.getDeviceList();
if(!CollectionUtils.isEmpty(deviceList)){
ArrayList<JgInstallationNoticeEq> jgInstallationNoticeEqs = new ArrayList<>(); ArrayList<JgInstallationNoticeEq> jgInstallationNoticeEqs = new ArrayList<>();
noticeDto.getDeviceList().forEach(item -> { deviceList.forEach(item -> {
JgInstallationNoticeEq jgInstallationNoticeEq = new JgInstallationNoticeEq(); JgInstallationNoticeEq jgInstallationNoticeEq = new JgInstallationNoticeEq();
jgInstallationNoticeEq.setEquId(!ValidationUtil.isEmpty(item.get("SEQUENCE_NBR")) ? String.valueOf(item.get("SEQUENCE_NBR")) : String.valueOf(item.get("record"))); 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.setEquCategoryCode(!ValidationUtil.isEmpty(item.get("EQU_CATEGORY_CODE")) ? String.valueOf(item.get("EQU_CATEGORY_CODE")) : String.valueOf(item.get("equCategory")));
...@@ -562,6 +564,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -562,6 +564,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
jgInstallationNoticeEqs.add(jgInstallationNoticeEq); jgInstallationNoticeEqs.add(jgInstallationNoticeEq);
}); });
jgInstallationNoticeEqMapper.insertBatchSomeColumn(jgInstallationNoticeEqs); 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