| | |
| | | @ResponseBody |
| | | @RequestMapping("/updateOrderBatchInfo") |
| | | public ResponseData updateOrderBatchInfo(ProductionOrderBatchInfoParam productionOrderBatchInfoParam) { |
| | | Long id = getCheckLocationCodeList(productionOrderBatchInfoParam).get(0).getId(); |
| | | ProductionOrderBatchInfo byId = productionOrderBatchInfoService.getById(id); |
| | | List<ProductionOrderBatchInfo> checkLocationCodeList = getCheckLocationCodeList(productionOrderBatchInfoParam); |
| | | ProductionOrderBatchInfo batchInfo = checkLocationCodeList.get(0); |
| | | ProductionOrderBatchInfo byId = productionOrderBatchInfoService.getById(batchInfo.getId()); |
| | | byId.setSpareField1(productionOrderBatchInfoParam.getSpareField1()); |
| | | if(batchInfo.getState().equals("是")){ |
| | | if(!productionOrderBatchInfoParam.getLoadingCode().equals(batchInfo.getLoadingCode())){ |
| | | return ResponseData.success("0"); |
| | | }else { |
| | | Integer count1 = Integer.parseInt(productionOrderBatchInfoParam.getSpareField1())+Integer.parseInt(batchInfo.getSpareField1()); |
| | | byId.setSpareField1(count1.toString()); |
| | | } |
| | | } |
| | | byId.setState("是"); |
| | | byId.setLoadingCode(productionOrderBatchInfoParam.getLoadingCode()); |
| | | byId.setSpareField1(productionOrderBatchInfoParam.getSpareField1()); |
| | | productionOrderBatchInfoService.saveOrUpdate(byId); |
| | | return ResponseData.success("1"); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @RequestMapping("/resetting") |
| | | public ResponseData resetting(ProductionOrderBatchInfoParam productionOrderBatchInfoParam) { |
| | | ProductionOrderBatchInfo byId = productionOrderBatchInfoService.getById(productionOrderBatchInfoParam.getId()); |
| | | byId.setState("否"); |
| | | byId.setSpareField1("0"); |
| | | byId.setLoadingCode(""); |
| | | productionOrderBatchInfoService.saveOrUpdate(byId); |
| | | return ResponseData.success(); |
| | | } |