|
@@ -1,10 +1,15 @@
|
|
|
package com.github.zuihou.business.productionResourceCenter.service.impl;
|
|
package com.github.zuihou.business.productionResourceCenter.service.impl;
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
+import cn.hutool.core.collection.CollectionUtil;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.github.zuihou.authority.service.common.DictionaryItemService;
|
|
import com.github.zuihou.authority.service.common.DictionaryItemService;
|
|
|
import com.github.zuihou.business.DemoLine.DemoLineConstant;
|
|
import com.github.zuihou.business.DemoLine.DemoLineConstant;
|
|
|
import com.github.zuihou.business.operationManagementCenter.dao.TTaskMapper;
|
|
import com.github.zuihou.business.operationManagementCenter.dao.TTaskMapper;
|
|
|
|
|
+import com.github.zuihou.business.operationManagementCenter.dao.WorkpieceMapper;
|
|
|
import com.github.zuihou.business.operationManagementCenter.entity.TTask;
|
|
import com.github.zuihou.business.operationManagementCenter.entity.TTask;
|
|
|
|
|
+import com.github.zuihou.business.operationManagementCenter.entity.TWorkpiece;
|
|
|
|
|
+import com.github.zuihou.business.operationManagementCenter.service.WorkpieceService;
|
|
|
import com.github.zuihou.business.productionResourceCenter.dao.ZZoneMapper;
|
|
import com.github.zuihou.business.productionResourceCenter.dao.ZZoneMapper;
|
|
|
import com.github.zuihou.business.productionResourceCenter.dao.ZZoneProductionresourceMapper;
|
|
import com.github.zuihou.business.productionResourceCenter.dao.ZZoneProductionresourceMapper;
|
|
|
import com.github.zuihou.business.productionResourceCenter.dto.ZZoneSaveDTO;
|
|
import com.github.zuihou.business.productionResourceCenter.dto.ZZoneSaveDTO;
|
|
@@ -27,6 +32,7 @@ import com.github.zuihou.database.mybatis.conditions.Wraps;
|
|
|
import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
|
|
import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
|
|
|
import com.github.zuihou.tenant.dao.ProductionresourceviewMapper;
|
|
import com.github.zuihou.tenant.dao.ProductionresourceviewMapper;
|
|
|
import com.github.zuihou.tenant.dto.CodeRuleSaveDTO;
|
|
import com.github.zuihou.tenant.dto.CodeRuleSaveDTO;
|
|
|
|
|
+import com.github.zuihou.tenant.entity.BrandSpecs;
|
|
|
import com.github.zuihou.tenant.entity.CodeRule;
|
|
import com.github.zuihou.tenant.entity.CodeRule;
|
|
|
import com.github.zuihou.tenant.service.CodeRuleService;
|
|
import com.github.zuihou.tenant.service.CodeRuleService;
|
|
|
import com.github.zuihou.tenant.service.ProductionresourceService;
|
|
import com.github.zuihou.tenant.service.ProductionresourceService;
|
|
@@ -89,6 +95,8 @@ public class ZZoneServiceImpl extends SuperServiceImpl<ZZoneMapper, ZZone> imple
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TTaskMapper taskMapper;
|
|
private TTaskMapper taskMapper;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private WorkpieceService workpieceService;
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ProductionresourceviewMapper productionresourceviewMapper;
|
|
private ProductionresourceviewMapper productionresourceviewMapper;
|
|
@@ -130,6 +138,19 @@ public class ZZoneServiceImpl extends SuperServiceImpl<ZZoneMapper, ZZone> imple
|
|
|
|
|
|
|
|
updateById(zZone);
|
|
updateById(zZone);
|
|
|
|
|
|
|
|
|
|
+ //修改workpiece当前正在执行的工序
|
|
|
|
|
+ //先查出
|
|
|
|
|
+ List<TWorkpiece>workpieceList = workpieceService.list(Wraps.<TWorkpiece>lbQ().eq(TWorkpiece::getIsEnd, "0"));
|
|
|
|
|
+
|
|
|
|
|
+ if(CollectionUtil.isNotEmpty(workpieceList)){
|
|
|
|
|
+ workpieceList.stream().map((t) -> {
|
|
|
|
|
+ t.setExchangeProcedureId(t.getProcedureId());
|
|
|
|
|
+ t.setExchangeZoneFlag("1");
|
|
|
|
|
+ return t;
|
|
|
|
|
+ }).collect(Collectors.toList());
|
|
|
|
|
+
|
|
|
|
|
+ workpieceService.saveBatch(workpieceList);
|
|
|
|
|
+ }
|
|
|
return zZone;
|
|
return zZone;
|
|
|
}
|
|
}
|
|
|
|
|
|