| | |
| | | } |
| | | |
| | | private void updateOrderInfo(LoginUserInfo user, Workorder mp,int status) { |
| | | |
| | | List<WorkorderHistory> whList = new ArrayList<>(); |
| | | //工单历史数据 |
| | | Workorder order = new Workorder(); |
| | |
| | | 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){ |
| | | }else if(status ==Constants.WORKORDER_HISTORY_STATUS.material ||status ==Constants.WORKORDER_HISTORY_STATUS.produce){ |
| | | //投料操作 |
| | | if(Constants.equalsInteger(mp.getStatus(),Constants.WORKORDER_STATUS.create) |
| | | ||Constants.equalsInteger(mp.getStatus(),Constants.WORKORDER_STATUS.material)){ |
| | |
| | | workorderRecord.setSalary(BigDecimal.valueOf(createWorkorderRecordDTO.getDuration()).multiply(salaryParam.getSalary()).divide(new BigDecimal(3600))); |
| | | } |
| | | |
| | | //插入工单操作记录,并且判断是否更改为工单的状态【生产中】 |
| | | updateOrderInfo(loginUserInfo,workorder,Constants.WORKORDER_HISTORY_STATUS.produce); |
| | | workorderRecordExtMapper.insert(workorderRecord); |
| | | return workorderRecord; |
| | | } |