| | |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.sd.OrderProcessDetail; |
| | | import com.example.erp.entity.userInfo.Log; |
| | | import com.example.erp.mapper.pp.FlowCardMapper; |
| | | import com.example.erp.mapper.sd.OrderGlassDetailMapper; |
| | | import com.example.erp.mapper.sd.OrderProcessDetailMapper; |
| | | import com.example.erp.service.userInfo.LogService; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | OrderGlassDetailMapper orderGlassDetailMapper; |
| | | final |
| | | OrderProcessDetailMapper orderProcessDetailMapper; |
| | | final |
| | | LogService logService; |
| | | |
| | | public FlowCardService(FlowCardMapper flowCardMapper, OrderGlassDetailMapper orderGlassDetailMapper, OrderProcessDetailMapper orderProcessDetailMapper) { |
| | | public FlowCardService(FlowCardMapper flowCardMapper, OrderGlassDetailMapper orderGlassDetailMapper, OrderProcessDetailMapper orderProcessDetailMapper,LogService logService) { |
| | | this.flowCardMapper = flowCardMapper; |
| | | this.orderGlassDetailMapper = orderGlassDetailMapper; |
| | | this.orderProcessDetailMapper = orderProcessDetailMapper; |
| | | this.logService= logService; |
| | | } |
| | | |
| | | //流程卡管理查询 |
| | |
| | | } |
| | | |
| | | //删除流程卡 |
| | | public Boolean deleteFlowCardSv(String orderId, String processId) { |
| | | public Boolean deleteFlowCardSv(String orderId, String processId, String userId, String userName) { |
| | | if (!orderId.isEmpty() && !processId.isEmpty()) { |
| | | //判断该流程卡是否报工 |
| | | Integer count = flowCardMapper.reportingWorkCount(processId); |
| | |
| | | //修改订单表分架状态为1,删除部分 |
| | | flowCardMapper.updateProcessingCard(orderId, 1); |
| | | } |
| | | |
| | | //保存日志 |
| | | Log log = new Log(); |
| | | log.setContent(orderId+processId); |
| | | log.setFunction("deleteFlowCardSv流程卡删除"); |
| | | log.setOperatorId(userId); |
| | | log.setOperator(userName); |
| | | logService.saveLog(log); |
| | | return true; |
| | | } else { |
| | | return false; |
| | |
| | | //赋值订单工艺表 |
| | | orderProcessDetailMapper.insertOrderProcessDetail(orderProcessDetailList); |
| | | } |
| | | |
| | | //保存日志 |
| | | Log log = new Log(); |
| | | log.setContent(object.toString()); |
| | | log.setFunction("addFlowCardSv流程卡新增"); |
| | | log.setOperatorId((String) object.get("userId")); |
| | | log.setOperator((String) object.get("userName")); |
| | | logService.saveLog(log); |
| | | return true; |
| | | } else { |
| | | return false; |