| | |
| | | * @param data |
| | | * @return |
| | | */ |
| | | private InoutData updateCheckItems(InoutData data) throws Exception { |
| | | private InoutData updateCheckItems(InoutData data, boolean toSave) throws Exception { |
| | | |
| | | if (null == data.getCheckItems()) return data; |
| | | |
| | | //设置没有质检ID,取消执行持久化 |
| | | if (!toSave) data.setCheckId(null); |
| | | |
| | | // 更新检验项数据 |
| | | CheckUpdateResult checkUpdateResult = checkStandardManager.updateCheckItems(data.getCheckId(), data.getCompanyId(), data.getCheckItems()); |
| | |
| | | data.setEmptyWeightTime(DateUtil.getNewByMinute(new Date(), -10)); |
| | | } |
| | | |
| | | data = this.updateCheckItems(data); |
| | | data = this.updateCheckItems(data, false); |
| | | } else { |
| | | if (null == data.getEmptyWeightTime()) { |
| | | data.setEmptyWeightTime(DateUtil.getNewByMinute(new Date(), -50)); |
| | |
| | | } |
| | | } |
| | | |
| | | // 添加补单数据 |
| | | return inoutService.insertData(data); |
| | | |
| | | //先保存主表,后执行子表 |
| | | inoutService.insertData(data); |
| | | |
| | | if (InoutConstant.TYPE_IN.equals(data.getType())) { |
| | | this.updateCheckItems(data, true); |
| | | } |
| | | |
| | | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | // 保存检测项目 |
| | | if (InoutConstant.TYPE_IN.equals(data.getType())) { |
| | | data = updateCheckItems(data); |
| | | data = updateCheckItems(data, true); |
| | | } |
| | | |
| | | return inoutService.updateData(data); |
| | |
| | | data = updateBasicInfo(data, curProgress, nextProgress); |
| | | |
| | | // 入库称重可能调整质检单 |
| | | data = updateCheckItems(data); |
| | | data = updateCheckItems(data, true); |
| | | |
| | | // 执行数据更新 |
| | | String msg = inoutService.updateData(data); |