| | |
| | | recordList.add(getWorkrecordModel(user,wStock,mp,materialListDTO.getNum())); |
| | | } |
| | | } |
| | | |
| | | //批量插入投料记录 |
| | | workorderRecordExtMapper.insertBatch(recordList); |
| | | //单添加历史记录(不更新状态) |
| | | //单添加历史记录(判断更新为生产中) |
| | | updateOrderInfo(user,mp,Constants.WORKORDER_HISTORY_STATUS.material); |
| | | return param.getId(); |
| | | } |
| | |
| | | order.setStatus(Constants.WORKORDER_STATUS.material); |
| | | }else if(status ==Constants.WORKORDER_HISTORY_STATUS.done){ |
| | | order.setStatus(Constants.WORKORDER_STATUS.done); |
| | | }else if(status ==Constants.WORKORDER_HISTORY_STATUS.material){ |
| | | //投料操作 |
| | | if(Constants.equalsInteger(mp.getStatus(),Constants.WORKORDER_STATUS.create) |
| | | ||Constants.equalsInteger(mp.getStatus(),Constants.WORKORDER_STATUS.material)){ |
| | | //如果是已创建或者已备料状态的工单,修改其状态为【生产中】 |
| | | order.setStatus(Constants.WORKORDER_STATUS.producing); |
| | | } |
| | | } |
| | | workorderExtMapper.updateById(order); |
| | | workorderHistoryExtMapper.insertBatch(whList); |