|
@@ -83,14 +83,14 @@ public class ProductionProcessesServiceImpl extends ServiceImpl<ProductionProces
|
|
|
@Override
|
|
|
public void edit(ProductionProcessesDto productionProcessesDto) {
|
|
|
List<ObsFile> fileList = productionProcessesDto.getFileList();
|
|
|
- if(fileList.size()>0) {
|
|
|
+ if (fileList.size() > 0) {
|
|
|
ObsFile obsFile = fileList.get(0);
|
|
|
productionProcessesDto.setFileName(obsFile.getFileName());
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
productionProcessesDto.setFileName(null);
|
|
|
}
|
|
|
this.updateById(productionProcessesDto);
|
|
|
- baseMapper.updateFileName(productionProcessesDto.getId(),productionProcessesDto.getFileName());
|
|
|
+ baseMapper.updateFileName(productionProcessesDto.getId(), productionProcessesDto.getFileName());
|
|
|
ObsFileUtil.editFile(productionProcessesDto.getFileList(), productionProcessesDto.getId());
|
|
|
}
|
|
|
|
|
@@ -105,7 +105,7 @@ public class ProductionProcessesServiceImpl extends ServiceImpl<ProductionProces
|
|
|
* 根据工单详细获取基本工序
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<ProductionProcesses> getBaseProductionProcessesList(WorkOrder workOrder){
|
|
|
+ public List<ProductionProcesses> getBaseProductionProcessesList(WorkOrder workOrder) {
|
|
|
ApplicableProducts applicableProducts = applicableProductsService.getOne(q -> q.eq(ApplicableProducts::getProductId, workOrder.getProductId()));
|
|
|
if (ObjectUtil.isEmpty(applicableProducts)) {
|
|
|
throw new ServiceException("未找到适用于该产品的工艺信息");
|
|
@@ -119,7 +119,11 @@ public class ProductionProcessesServiceImpl extends ServiceImpl<ProductionProces
|
|
|
throw new ServiceException("工艺线路为空");
|
|
|
}
|
|
|
String[] split = processRoute.split(",");
|
|
|
- return this.list(q -> q.in(ProductionProcesses::getId, split));
|
|
|
+ //查询工序并自定义排序
|
|
|
+ IWrapper<ProductionProcesses> wrapper = IWrapper.getWrapper();
|
|
|
+ wrapper.in(ProductionProcesses::getId, split);
|
|
|
+ wrapper.orderByAsc("FIELD( id, " + processRoute + ")");
|
|
|
+ return this.list(wrapper);
|
|
|
}
|
|
|
|
|
|
}
|