| | |
| | | log.setFunction("deleteWork报工删除"); |
| | | log.setOperatorId(userId); |
| | | log.setOperator(userName); |
| | | if(reportingWork.getReviewedState()==0){ |
| | | //查询当前报工编号完工次破数量的数据 |
| | | List<Map<String, Object>> workDateList = reportingWorkMapper.reportingWorkDate(reportingWorkId); |
| | | for (Map<String, Object> item : workDateList) { |
| | | //更新报工流程表数据 |
| | | reportingWorkMapper.updateWorkProcess(processId, item.get("order_number"), item.get("technology_number"), item.get("completed_quantity"), item.get("breakage_quantity"), thisProcess); |
| | | } |
| | | //删除报工,将审核状态改为-1 |
| | | reportingWorkMapper.deleteWork(reportingWorkId); |
| | | logService.saveLog(log); |
| | | return true; |
| | | } |
| | | |
| | | |
| | | //判断是否是入库工序 |
| | | if (lastProcess.equals(thisProcess)) {//是入库工序 |
| | |
| | | } |
| | | |
| | | } else {//不是入库工序 |
| | | if(reportingWork.getReviewedState()==0){ |
| | | //查询当前报工编号完工次破数量的数据 |
| | | List<Map<String, Object>> workDateList = reportingWorkMapper.reportingWorkDate(reportingWorkId); |
| | | for (Map<String, Object> item : workDateList) { |
| | | //更新报工流程表数据 |
| | | reportingWorkMapper.updateWorkProcess(processId, item.get("order_number"), item.get("technology_number"), item.get("completed_quantity"), item.get("breakage_quantity"), thisProcess); |
| | | } |
| | | //删除报工,将审核状态改为-1 |
| | | reportingWorkMapper.deleteWork(reportingWorkId); |
| | | logService.saveLog(log); |
| | | return true; |
| | | } |
| | | |
| | | if (count == 0) { |
| | | //查询当前报工编号完工次破数量的数据 |
| | | List<Map<String, Object>> workDateList = reportingWorkMapper.reportingWorkDate(reportingWorkId); |
| | |
| | | //更新报工流程表数据 |
| | | reportingWorkMapper.updateWorkProcess(processId, item.get("order_number"), item.get("technology_number"), item.get("completed_quantity"), item.get("breakage_quantity"), thisProcess); |
| | | } |
| | | System.out.println(1); |
| | | //删除报工,将审核状态改为-1 |
| | | reportingWorkMapper.deleteWork(reportingWorkId); |
| | | |
| | |
| | | .eq("order_sort", reportingWork.get("oldOrderNumber")) |
| | | .eq("review_status",0) |
| | | ); |
| | | if (patchLogs.isEmpty()){ |
| | | if (!patchLogs.isEmpty()){ |
| | | result.put("msg","旧订单存在补片未审核数据"); |
| | | result.put("data",false); |
| | | return result; |
| | |
| | | .eq("order_sort", reportingWork.get("oldOrderNumber")) |
| | | .eq("review_status",0) |
| | | ); |
| | | if (patchLogs.isEmpty()){ |
| | | if (!patchLogs.isEmpty()){ |
| | | result.put("msg","旧订单存在返工未审核数据,请先审核报工后再进行转出"); |
| | | result.put("data",false); |
| | | return result; |
| | |
| | | //restTemplate.postForObject("http://localhost:8086/order/test",orderNumberTransferList,String.class); |
| | | |
| | | //向mes发送http请求 |
| | | ResponseEntity<OrderNumberTransferDTO> response =restTemplate.exchange( |
| | | /*ResponseEntity<OrderNumberTransferDTO> response =restTemplate.exchange( |
| | | "http://localhost:88/api/loadGlass/order/order/orderChange", |
| | | HttpMethod.POST, |
| | | new HttpEntity<>(orderNumberTransferList), |
| | |
| | | }else{ |
| | | result.put("msg","连接mes响应超时"); |
| | | result.put("data",false); |
| | | } |
| | | }*/ |
| | | |
| | | result.put("data",true); |
| | | return result; |
| | | |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | public List<BasicDataProduce> selectEquipmentByProcessSv(String process) { |
| | | return reportingWorkMapper.SelectWorkBasicDeviceMp(process); |
| | | } |
| | | public List<BasicDataProduce> selectEquipmentByProcessSv(String process) { |
| | | return reportingWorkMapper.SelectWorkBasicDeviceMp(process); |
| | | } |
| | | |
| | | public String saveWorkStorage(Map<String, Object> object) { |
| | | //List<Map<String, Object>> flowCard = reportingWorkMapper.getStorageData(); |
| | | //finishedGoodsInventoryService.addSelectWarehousing(object); |
| | | return null; |
| | | }} |
| | | public String saveWorkStorage(Map<String, Object> object) { |
| | | //List<Map<String, Object>> flowCard = reportingWorkMapper.getStorageData(); |
| | | //finishedGoodsInventoryService.addSelectWarehousing(object); |
| | | return null; |
| | | } |
| | | |
| | | public Map<String, Object> mesBasicDataSv() { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //工序 |
| | | map.put("process",flowCardMapper.getProcessNameList()); |
| | | //设备下拉框 |
| | | map.put("device", reportingWorkMapper.mesSelectWorkBasicDeviceMp()); |
| | | //班组下拉框 |
| | | map.put("teams", reportingWorkMapper.mesSelectWorkBasicTeamsMp()); |
| | | //次破类型 |
| | | map.put("breakageType", reportingWorkMapper.selectBasicNameByType("breakagetype")); |
| | | //次破原因 |
| | | map.put("breakageReason", reportingWorkMapper.selectBasicNameByType("breakagereason")); |
| | | return map; |
| | | } |
| | | } |