| | |
| | | /** |
| | | * MES 工艺路线工序 Service 实现类 |
| | | * |
| | | * @author 芋道源码 |
| | | * @author 超级管理员 |
| | | */ |
| | | @Service |
| | | @Validated |
| | |
| | | |
| | | // 2. 插入 |
| | | MesProRouteProcessDO routeProcess = BeanUtils.toBean(createReqVO, MesProRouteProcessDO.class); |
| | | if (CollUtil.isNotEmpty(createReqVO.getOutputItemIds())) { |
| | | routeProcess.setOutputItemId( |
| | | createReqVO.getOutputItemIds().stream() |
| | | .map(String::valueOf) |
| | | .collect(Collectors.joining(","))); |
| | | } |
| | | routeProcessMapper.insert(routeProcess); |
| | | |
| | | // 3. 更新工序链 |
| | |
| | | |
| | | // 2. 更新 |
| | | MesProRouteProcessDO updateObj = BeanUtils.toBean(updateReqVO, MesProRouteProcessDO.class); |
| | | if (CollUtil.isNotEmpty(updateReqVO.getOutputItemIds())) { |
| | | updateObj.setOutputItemId( |
| | | updateReqVO.getOutputItemIds().stream() |
| | | .map(String::valueOf) |
| | | .collect(Collectors.joining(","))); |
| | | } |
| | | routeProcessMapper.updateById(updateObj); |
| | | |
| | | // 3. 重建工序链 |