| | |
| | | //查询工单 |
| | | public Map<String, Object> defaultDateWork(Date selectTime1, Date selectTime2, Integer state, OrderGlassDetail orderGlassDetail) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (state == 1) { |
| | | if (state == 1) {//已转工单 |
| | | map.put("data", workOrderMapper.selectWordOrder(selectTime1, selectTime2, orderGlassDetail)); |
| | | } else { |
| | | } else {//未转工单 |
| | | map.put("data", workOrderMapper.selectWordOrderNo(selectTime1, selectTime2, orderGlassDetail)); |
| | | } |
| | | |
| | |
| | | Integer noWorkCount = workOrderMapper.selectWorkCount(orderId); |
| | | //查询该订单转生产订单的条数 |
| | | Integer yesWorkCount = workOrderMapper.selectYesWorkCount(orderId); |
| | | if (noWorkCount.equals(yesWorkCount)) { |
| | | workOrderMapper.updateWorkType(orderId, state); |
| | | if (noWorkCount.equals(yesWorkCount)) {//判断订单是否全部转工单 |
| | | workOrderMapper.updateWorkType(orderId, state);//全部 |
| | | } else { |
| | | workOrderMapper.updateWorkType(orderId, states); |
| | | workOrderMapper.updateWorkType(orderId, states);//部分 |
| | | } |
| | | return true; |
| | | } |