| | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.WorkflowMainMapper; |
| | | import com.whyc.pojo.db_user.User; |
| | | import com.whyc.pojo.web_site.WorkflowDevice; |
| | | import com.whyc.pojo.web_site.WorkflowLink; |
| | | import com.whyc.pojo.web_site.WorkflowMain; |
| | | import com.whyc.util.ActionUtil; |
| | |
| | | |
| | | @Autowired(required = false) |
| | | private WorkflowLinkService linkService; |
| | | |
| | | @Autowired |
| | | private WorkflowDeviceService deviceService; |
| | | |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 通用提交方法,提交给角色-角色层 |
| | | * 如果related_id不为空,则需要特殊处理. 证明会影响到关联单据 |
| | | * |
| | | * 涉及到新的问题需要解决,现场故障后,设备维修申请 或 报废申请 是多个,并存入工单设备表中. 并不只是单纯的数量. TODO ?自动化处理怎么更新 |
| | | */ |
| | | |
| | | @Transactional |
| | |
| | | main.setQuantityUnprocessed(main.getQuantity()); |
| | | } |
| | | add(main); |
| | | //主表关联的物料插入 |
| | | List<WorkflowDevice> deviceList = main.getDeviceList(); |
| | | for (WorkflowDevice device : deviceList) { |
| | | device.setMainId(main.getId()); |
| | | } |
| | | deviceService.addBatch(deviceList); |
| | | |
| | | //内存中去除已插入数据库的单号 |
| | | ServletContext application = ActionUtil.getApplication(); |
| | | List<String> orderIdList = (List<String>) application.getAttribute("orderIdList"); |