| | |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public PageResponse<InoutCheckData> updateSampleData(InoutCheckData data) throws Exception { |
| | | public PageResponse<InoutCheckData> updateSampleData(InoutCheckData data){ |
| | | |
| | | // 获取业务数据信息 |
| | | InoutParam param = new InoutParam(); |
| | | param.setCompanyId(data.getCompanyId()); |
| | | param.setId(data.getId()); |
| | | InoutData curData = inoutService.inoutProgressQuery(param); |
| | | if (null == curData) { |
| | | try { |
| | | // 获取业务数据信息 |
| | | InoutParam param = new InoutParam(); |
| | | param.setCompanyId(data.getCompanyId()); |
| | | param.setId(data.getId()); |
| | | InoutData curData = inoutService.inoutProgressQuery(param); |
| | | if (null == curData) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), |
| | | "没有获取到入库业务数据信息,更新失败", data); |
| | | } |
| | | if (InoutConstant.PROGRESS_RECORD.equals(curData.getProgress())) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), |
| | | "当前流程已经结束,不支持修改"); |
| | | } |
| | | |
| | | //扦样信息 |
| | | curData.setSampleTime(data.getSampleTime()); |
| | | curData.setSampleType(data.getSampleType()); |
| | | curData.setSampleUser(data.getSampleUser()); |
| | | |
| | | String msg = inoutService.updateSampleData(curData); |
| | | |
| | | if (null != msg) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg); |
| | | } |
| | | |
| | | return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功"); |
| | | } catch (Exception e) { |
| | | log.error("后台异常:{}", e); |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), |
| | | "没有获取到入库业务数据信息,更新失败", data); |
| | | "后台异常:" + e.getMessage(), null); |
| | | } |
| | | if (InoutConstant.PROGRESS_RECORD.equals(curData.getProgress())) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), |
| | | "当前流程已经结束,不支持修改"); |
| | | } |
| | | |
| | | //扦样信息 |
| | | curData.setSampleTime(data.getSampleTime()); |
| | | curData.setSampleType(data.getSampleType()); |
| | | curData.setSampleUser(data.getSampleUser()); |
| | | |
| | | String msg = inoutService.updateSampleData(curData); |
| | | |
| | | if (null != msg) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg); |
| | | } |
| | | |
| | | return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功"); |
| | | } |
| | | |
| | | } |