|
|
@@ -13,6 +13,7 @@ import com.github.zuihou.business.centralToolMagazine.dto.ToolStorgeSaveDTO;
|
|
|
import com.github.zuihou.business.centralToolMagazine.dto.ToolStorgeUpdateDTO;
|
|
|
import com.github.zuihou.business.centralToolMagazine.entity.ToolStorge;
|
|
|
import com.github.zuihou.business.centralToolMagazine.service.ToolStorgeService;
|
|
|
+import com.github.zuihou.business.classSchedule.entity.ScheduleUserChange;
|
|
|
import com.github.zuihou.business.edgeLibrary.dao.StockInfoMapper;
|
|
|
import com.github.zuihou.business.edgeLibrary.entity.StockInfo;
|
|
|
import com.github.zuihou.business.edgeLibrary.entity.Storge;
|
|
|
@@ -21,7 +22,9 @@ import com.github.zuihou.business.operationManagementCenter.entity.TTask;
|
|
|
import com.github.zuihou.business.operationManagementCenter.entity.TaskNode;
|
|
|
import com.github.zuihou.business.operationManagementCenter.service.WorkpieceService;
|
|
|
import com.github.zuihou.business.productionReadyCenter.dao.BomProcedureTrayMapper;
|
|
|
+import com.github.zuihou.business.productionReadyCenter.dao.CuttingToolMapper;
|
|
|
import com.github.zuihou.business.productionReadyCenter.entity.BomProcedureTray;
|
|
|
+import com.github.zuihou.business.productionReadyCenter.entity.CuttingTool;
|
|
|
import com.github.zuihou.business.productionReadyCenter.entity.Plate;
|
|
|
import com.github.zuihou.business.productionReadyCenter.entity.Tray;
|
|
|
import com.github.zuihou.business.productionReadyCenter.service.PlateService;
|
|
|
@@ -77,6 +80,9 @@ import static java.util.stream.Collectors.toList;
|
|
|
|
|
|
public class ToolStorgeServiceImpl extends SuperCacheServiceImpl<ToolStorgeMapper, ToolStorge> implements ToolStorgeService {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CuttingToolMapper cuttingToolMapper;
|
|
|
+
|
|
|
@Override
|
|
|
protected String getRegion() {
|
|
|
return TENANT;
|
|
|
@@ -132,6 +138,18 @@ public class ToolStorgeServiceImpl extends SuperCacheServiceImpl<ToolStorgeMappe
|
|
|
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public R<String> updateStrogeTool(ToolStorgeUpdateDTO model) {
|
|
|
+ CuttingTool cuttingTool = cuttingToolMapper.selectOne(Wraps.<CuttingTool>lbQ().eq(CuttingTool::getCutterCode, model.getCutterCode()));
|
|
|
+ if(Objects.isNull(cuttingTool)){
|
|
|
+ return R.fail("刀具不存在");
|
|
|
+ }
|
|
|
+ LambdaUpdateWrapper<ToolStorge> lambdaUpdateWrapper = new LambdaUpdateWrapper<ToolStorge>();
|
|
|
+ lambdaUpdateWrapper.set(ToolStorge::getToolId, cuttingTool.getId()).eq(ToolStorge::getId, model.getId());
|
|
|
+ baseMapper.update(null, lambdaUpdateWrapper);
|
|
|
+ return R.success("ok");
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public ToolStorge update(ToolStorgeUpdateDTO data) {
|