|
|
|
@ -188,9 +188,10 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService {
|
|
|
|
|
|
|
|
|
|
equCheckItemMapper.updateEquCheckItem(equCheckItem);
|
|
|
|
|
|
|
|
|
|
// 删除所有标准
|
|
|
|
|
equCheckItemDetailMapper.deleteEquCheckItemDetailByItemId(equCheckItem.getItemId());
|
|
|
|
|
|
|
|
|
|
for (EquCheckItemDetail detail : equCheckItemDTO.getFormStandard()) {
|
|
|
|
|
// 标准不存在则新增
|
|
|
|
|
if (detail.getDetailCode() == null) {
|
|
|
|
|
// 获取标准流水号
|
|
|
|
|
String detailSerialNum = String.format("%03d", equCheckItemDetailMapper.selectSerialNumber(equCheckItem.getItemCode()));
|
|
|
|
|
|
|
|
|
@ -205,11 +206,6 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService {
|
|
|
|
|
|
|
|
|
|
// 插入到数据库
|
|
|
|
|
equCheckItemDetailMapper.insertEquCheckItemDetail(detail);
|
|
|
|
|
}else {
|
|
|
|
|
detail.setUpdatedBy(SecurityContextHolder.getUserName());
|
|
|
|
|
detail.setUpdatedTime(DateUtils.getNowDate());
|
|
|
|
|
equCheckItemDetailMapper.updateEquCheckItemDetail(detail);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return success("修改成功");
|
|
|
|
|
}
|
|
|
|
|