|
|
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil; |
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.BeanUtils; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
import com.google.common.collect.Lists; |
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
@ -12,18 +13,22 @@ import org.apache.commons.lang3.StringUtils; |
|
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
|
import org.springblade.desk.basic.service.IRelTeamSetUserService; |
|
|
|
|
import org.springblade.desk.dashboard.pojo.entity.BsProcessSetEntity; |
|
|
|
|
import org.springblade.desk.dashboard.pojo.entity.BsTeamSetEntity; |
|
|
|
|
import org.springblade.desk.dashboard.pojo.entity.PrReworkProcessEntity; |
|
|
|
|
import org.springblade.desk.dashboard.service.*; |
|
|
|
|
import org.springblade.desk.device.pojo.entity.EquipmentEntity; |
|
|
|
|
import org.springblade.desk.device.pojo.entity.FeiBaSetEntity; |
|
|
|
|
import org.springblade.desk.device.pojo.entity.RackSetEntity; |
|
|
|
|
import org.springblade.desk.device.service.IEquipmentService; |
|
|
|
|
import org.springblade.desk.device.service.IFeiBaSetService; |
|
|
|
|
import org.springblade.desk.device.service.IRackSetService; |
|
|
|
|
import org.springblade.desk.order.pojo.entity.YieldOrder; |
|
|
|
|
import org.springblade.desk.order.service.IYieldOrderService; |
|
|
|
|
import org.springblade.desk.produce.mapper.WorkPlanMapper; |
|
|
|
|
import org.springblade.desk.produce.pojo.dto.DeviceBindDTO; |
|
|
|
|
import org.springblade.desk.produce.pojo.dto.MesRbRedoRoutDTO; |
|
|
|
|
import org.springblade.desk.produce.pojo.dto.PrMacTooUseSpec; |
|
|
|
|
import org.springblade.desk.produce.pojo.dto.ShiftTransferDTO; |
|
|
|
|
@ -44,6 +49,8 @@ import java.time.format.DateTimeFormatter; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
import static com.fasterxml.jackson.databind.type.LogicalType.DateTime; |
|
|
|
|
|
|
|
|
|
@ -61,30 +68,10 @@ public class PdaSaveServiceImpl extends BaseServiceImpl<WorkPlanMapper, WorkPlan |
|
|
|
|
|
|
|
|
|
private final IBsProcessSetService bsProcessSetService; |
|
|
|
|
|
|
|
|
|
private final IDsProcessService dsProcessService; |
|
|
|
|
|
|
|
|
|
private final IPrReworkProcessService prReworkProcessService; |
|
|
|
|
|
|
|
|
|
private final IWorkPlanItemService workPlanItemService; |
|
|
|
|
|
|
|
|
|
private final IInspectionTaskService inspectionTaskService; |
|
|
|
|
|
|
|
|
|
private final IWorkOrderRunService workOrderRunService; |
|
|
|
|
|
|
|
|
|
private final IDsProcessMeasuringToolService processMeasuringToolService; |
|
|
|
|
|
|
|
|
|
private final IDsProcessProjectService dsProcessProjectService; |
|
|
|
|
|
|
|
|
|
private final IMakeRecService makeRecService; |
|
|
|
|
|
|
|
|
|
private final IMacToolUseService macToolUseService; |
|
|
|
|
|
|
|
|
|
private final IPlanTestService planTestService; |
|
|
|
|
|
|
|
|
|
private final IWorkOrderService workOrderService; |
|
|
|
|
|
|
|
|
|
private final IRelTeamSetUserService relTeamSetUserService; |
|
|
|
|
|
|
|
|
|
private final IRackSetService rackSetService; |
|
|
|
|
|
|
|
|
|
private final IFeiBaSetService feiBaSetService; |
|
|
|
|
@ -97,82 +84,134 @@ public class PdaSaveServiceImpl extends BaseServiceImpl<WorkPlanMapper, WorkPlan |
|
|
|
|
|
|
|
|
|
private final IWorkPlanLogService workPlanLogService; |
|
|
|
|
|
|
|
|
|
private final IEquipmentService equipmentService; |
|
|
|
|
|
|
|
|
|
private final IBsAdditionalMessService bsAdditionalMessService; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void bindingCard(Long rsId, Long fsId, Long ecId, String planListIds) { |
|
|
|
|
RackSetEntity rackSet = rackSetService.getById(rsId); |
|
|
|
|
//BsFeiBaSet bsFeiBaSet = this.getFeiBaSetByFsId(fsId);
|
|
|
|
|
//DeEquipmentCard equipmentCard = this.getEquipmentCardByEcId(ecId);
|
|
|
|
|
public void bindingCard(DeviceBindDTO deviceBindDTO) { |
|
|
|
|
Long rsId = deviceBindDTO.getRsId(); |
|
|
|
|
Long fsId = deviceBindDTO.getFsId(); |
|
|
|
|
Long ecId = deviceBindDTO.getEcId(); |
|
|
|
|
List<Long> planListIds = Func.toLongList(deviceBindDTO.getPlanListIds()); |
|
|
|
|
if (rsId == null && fsId == null && CollectionUtils.isEmpty(planListIds)) { |
|
|
|
|
throw new ServiceException("数据格式不正确!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//同槽号
|
|
|
|
|
RackSetEntity rackSet = this.getRackSetByRsId(rsId); |
|
|
|
|
FeiBaSetEntity feiBaSet = this.getFeiBaSetByFsId(fsId); |
|
|
|
|
EquipmentEntity equipment = this.getEquipmentCardByEcId(ecId); |
|
|
|
|
|
|
|
|
|
// 同槽号
|
|
|
|
|
String code = null; |
|
|
|
|
//rsId挂具绑定流程卡,fsId飞靶绑定流程卡
|
|
|
|
|
// rsId挂具绑定流程卡,fsId飞靶绑定流程卡
|
|
|
|
|
if (rsId != null) { |
|
|
|
|
List<MacToolUse> macToolUseList = macToolUseService.list(Wrappers.<MacToolUse>query().lambda() |
|
|
|
|
.eq(MacToolUse::getBsRackSet, rsId) |
|
|
|
|
.eq(MacToolUse::getFinished, false) |
|
|
|
|
.eq(MacToolUse::getIsDeleted, 0).orderByDesc(MacToolUse::getMtnCode) |
|
|
|
|
); |
|
|
|
|
if (macToolUseList.size() > 0) { |
|
|
|
|
code = macToolUseList.get(0).getMtnCode(); |
|
|
|
|
} |
|
|
|
|
code = macToolUseService.findMaxCodeByParams(rsId, null); |
|
|
|
|
//如果未找到满足条件的同槽号
|
|
|
|
|
if (StringUtils.isBlank(code)) { |
|
|
|
|
code = macToolUseService.nextCode(0); |
|
|
|
|
} |
|
|
|
|
//修改挂具状态
|
|
|
|
|
rackSet.setStatus(RackSetEntity.RS_STATUS_BOUND); |
|
|
|
|
rackSet.setBindQty((short) (rackSet.getBindQty() + 1)); |
|
|
|
|
rackSetService.updateById(rackSet); |
|
|
|
|
} else if (fsId != null) { |
|
|
|
|
code = macToolUseService.findMaxCodeByParams(null, fsId); |
|
|
|
|
//如果未找到满足条件的同槽号
|
|
|
|
|
if (StringUtils.isBlank(code)) { |
|
|
|
|
code = macToolUseService.nextCode(1); |
|
|
|
|
} |
|
|
|
|
//修改飞靶状态
|
|
|
|
|
feiBaSet.setStatus(FeiBaSetEntity.FS_STATUS_BOUND); |
|
|
|
|
feiBaSet.setBindQty((short) (feiBaSet.getBindQty() + 1)); |
|
|
|
|
feiBaSetService.updateById(feiBaSet); |
|
|
|
|
} else if (ecId != null) { |
|
|
|
|
code = macToolUseService.nextCode(2); |
|
|
|
|
} |
|
|
|
|
//fsId 是空,逻辑不会走
|
|
|
|
|
|
|
|
|
|
//处理绑定信息
|
|
|
|
|
WorkPlan prWorkPlan = null; |
|
|
|
|
MacToolUse mtu = null; |
|
|
|
|
//绑定日期
|
|
|
|
|
Date nowDate = new Date(); |
|
|
|
|
String[] str = planListIds.split(","); |
|
|
|
|
for (int i = 0; i < str.length; i++) { |
|
|
|
|
Long planId = Long.parseLong(str[i]); |
|
|
|
|
prWorkPlan = this.getById(planId); |
|
|
|
|
WorkPlan workPlan; |
|
|
|
|
MacToolUse mtu; |
|
|
|
|
List<WorkPlan> workPlans = this.listByIds(planListIds); |
|
|
|
|
// stream流将workPlans按照ID转换为map
|
|
|
|
|
Map<Long, WorkPlan> workPlanMap = workPlans.stream().collect(Collectors.toMap(WorkPlan::getId, wp -> wp)); |
|
|
|
|
for (Long planId : planListIds) { |
|
|
|
|
workPlan = workPlanMap.get(planId); |
|
|
|
|
mtu = new MacToolUse(); |
|
|
|
|
mtu.setMtnCode(code); |
|
|
|
|
mtu.setBsRackSet(rsId); |
|
|
|
|
mtu.setWpId(prWorkPlan.getId()); |
|
|
|
|
mtu.setCreateMan(AuthUtil.getUser().getUserId()); |
|
|
|
|
mtu.setUpdateTime(nowDate); |
|
|
|
|
mtu.setCreateTime(nowDate); |
|
|
|
|
macToolUseService.saveOrUpdate(mtu); |
|
|
|
|
mtu.setWpId(planId); |
|
|
|
|
this.packageMtu(mtu, rsId, fsId, ecId, code); |
|
|
|
|
macToolUseService.save(mtu); |
|
|
|
|
//修改作业计划绑定状态为绑定
|
|
|
|
|
prWorkPlan.setBindStatus(WorkPlan.BIND_STATUS_BIND); |
|
|
|
|
workPlan.setBindStatus(WorkPlan.BIND_STATUS_BIND); |
|
|
|
|
if (rsId == null) { |
|
|
|
|
prWorkPlan.setPrintType(WorkPlan.PRINT_TYPE_PROCESS); |
|
|
|
|
workPlan.setPrintType(WorkPlan.PRINT_TYPE_PROCESS); |
|
|
|
|
} |
|
|
|
|
this.updateById(prWorkPlan); |
|
|
|
|
this.updateById(workPlan); |
|
|
|
|
} |
|
|
|
|
// 存储同槽额外面积 没有表,后期添加
|
|
|
|
|
this.setBsAdditionalMess(code); |
|
|
|
|
this.setBsAdditionalMess(code, deviceBindDTO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private EquipmentEntity getEquipmentCardByEcId(Long ecId) { |
|
|
|
|
if (ecId == null) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
EquipmentEntity equipment = equipmentService.getById(ecId); |
|
|
|
|
if (equipment == null) { |
|
|
|
|
throw new ServiceException("此设备不存在!"); |
|
|
|
|
} |
|
|
|
|
return equipment; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private FeiBaSetEntity getFeiBaSetByFsId(Long fsId) { |
|
|
|
|
if (fsId == null) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FeiBaSetEntity feiBaSet = feiBaSetService.getById(fsId); |
|
|
|
|
if (feiBaSet == null) { |
|
|
|
|
throw new ServiceException("此飞靶不存在!"); |
|
|
|
|
} |
|
|
|
|
return feiBaSet; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private RackSetEntity getRackSetByRsId(Long rsId) { |
|
|
|
|
if (rsId == null) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
RackSetEntity rackSet = rackSetService.getById(rsId); |
|
|
|
|
if (rackSet == null) { |
|
|
|
|
throw new ServiceException("此挂具不存在!"); |
|
|
|
|
} |
|
|
|
|
return rackSet; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void binding(Long fsId, Long ecId, Boolean unFsBool, String hangNum, String rsListIds) { |
|
|
|
|
public void binding(DeviceBindDTO deviceBindDTO) { |
|
|
|
|
Long fsId = deviceBindDTO.getFsId(); |
|
|
|
|
Long ecId = deviceBindDTO.getEcId(); |
|
|
|
|
List<Long> rsListIds = Func.toLongList(deviceBindDTO.getRsList()); |
|
|
|
|
if (CollectionUtils.isEmpty(rsListIds) && fsId == null && ecId == null) { |
|
|
|
|
throw new ServiceException("数据格式不正确!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获取同槽号
|
|
|
|
|
String code = null; |
|
|
|
|
Date nowDate = new Date(); |
|
|
|
|
FeiBaSetEntity frackSet = feiBaSetService.getById(fsId); |
|
|
|
|
FeiBaSetEntity feiBaSet = this.getFeiBaSetByFsId(fsId); |
|
|
|
|
|
|
|
|
|
//挂具集合不为空,则代表是挂具相关绑定,反之则是飞靶绑定设备
|
|
|
|
|
if (rsListIds != null) { |
|
|
|
|
if (fsId != null) { |
|
|
|
|
List<MacToolUse> macToolUseList = macToolUseService.list(Wrappers.<MacToolUse>query().lambda() |
|
|
|
|
.eq(MacToolUse::getBsRackSet, fsId) |
|
|
|
|
.eq(MacToolUse::getFinished, false) |
|
|
|
|
.eq(MacToolUse::getIsDeleted, 0).orderByDesc(MacToolUse::getMtnCode) |
|
|
|
|
); |
|
|
|
|
if (macToolUseList.size() > 0) { |
|
|
|
|
code = macToolUseList.get(0).getMtnCode(); |
|
|
|
|
} |
|
|
|
|
code = macToolUseService.findMaxCodeByParams(null, fsId); |
|
|
|
|
//修改飞靶状态
|
|
|
|
|
feiBaSetService.updateById(frackSet); |
|
|
|
|
feiBaSet.setStatus(FeiBaSetEntity.FS_STATUS_BOUND); |
|
|
|
|
feiBaSet.setBindQty((short) (feiBaSet.getBindQty() + 1)); |
|
|
|
|
feiBaSetService.updateById(feiBaSet); |
|
|
|
|
//如果未找到满足条件的同槽号,则自动生成一个同槽号(飞靶)
|
|
|
|
|
if (StringUtils.isBlank(code)) { |
|
|
|
|
code = macToolUseService.nextCode(0); |
|
|
|
|
code = macToolUseService.nextCode(1); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
//如果未找到满足条件的同槽号,则自动生成一个同槽号(设备)
|
|
|
|
|
@ -182,51 +221,85 @@ public class PdaSaveServiceImpl extends BaseServiceImpl<WorkPlanMapper, WorkPlan |
|
|
|
|
} |
|
|
|
|
//挂具
|
|
|
|
|
RackSetEntity rackSet = null; |
|
|
|
|
String[] str = rsListIds.split(","); |
|
|
|
|
for (int i = 0; i < str.length; i++) { |
|
|
|
|
Long rsId = Long.parseLong(str[i]); |
|
|
|
|
for (Long rsId : rsListIds) { |
|
|
|
|
rackSet = rackSetService.getById(rsId); |
|
|
|
|
List<MacToolUse> macToolUseList = macToolUseService.list(Wrappers.<MacToolUse>query().lambda() |
|
|
|
|
.eq(MacToolUse::getBsRackSet, rsId) |
|
|
|
|
.eq(MacToolUse::getFinished, false) |
|
|
|
|
.eq(MacToolUse::getIsDeleted, 0) |
|
|
|
|
); |
|
|
|
|
List<MacToolUse> mtuLst = macToolUseService.listByParams(rsId, null, null, null); |
|
|
|
|
if (CollectionUtils.isEmpty(mtuLst)) { |
|
|
|
|
throw new ServiceException("挂具" + rackSet.getRsCode() + "未绑定流程卡!"); |
|
|
|
|
} |
|
|
|
|
//开始绑定
|
|
|
|
|
for (int i1 = 0; i1 < macToolUseList.size(); i1++) { |
|
|
|
|
MacToolUse mtu = macToolUseList.get(i1); |
|
|
|
|
mtu.setMtnCode(code); |
|
|
|
|
mtu.setBsRackSet(rsId); |
|
|
|
|
mtu.setUpdateTime(nowDate); |
|
|
|
|
mtu.setCreateMan(AuthUtil.getUser().getUserId()); |
|
|
|
|
macToolUseService.updateById(mtu); |
|
|
|
|
for (MacToolUse mtu : mtuLst) { |
|
|
|
|
// 如果挂具绑定了飞靶或者设备,则提示,不能重复绑定
|
|
|
|
|
if (mtu.getBsFeiBaSet() != null || mtu.getEquipmentCard() != null) { |
|
|
|
|
throw new ServiceException("挂具【" + rackSet.getRsCode() + "】已绑定" + (mtu.getBsFeiBaSet() == null ? "设备【" + mtu.getEquipmentCard() : "飞靶【" + mtu.getBsFeiBaSet()) + "】,不能重复绑定!"); |
|
|
|
|
} |
|
|
|
|
this.packageMtu(mtu, rsId, fsId, ecId, code); |
|
|
|
|
} |
|
|
|
|
macToolUseService.updateBatchById(mtuLst); |
|
|
|
|
// 存储同槽额外面积
|
|
|
|
|
this.setBsAdditionalMess(code); |
|
|
|
|
this.setBsAdditionalMess(code, deviceBindDTO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
List<MacToolUse> macToolUseList = macToolUseService.list(Wrappers.<MacToolUse>query().lambda() |
|
|
|
|
.eq(MacToolUse::getBsFeiBaSet, frackSet.getId()) |
|
|
|
|
.eq(MacToolUse::getIsDeleted, 0) |
|
|
|
|
); |
|
|
|
|
//未标记解绑飞靶,则代表正常绑定
|
|
|
|
|
if (unFsBool == null) { |
|
|
|
|
//获取以设备为基准的同槽号
|
|
|
|
|
List<MacToolUse> mtuLst = macToolUseService.listByParams(null, fsId, null, null); |
|
|
|
|
if (CollectionUtils.isEmpty(mtuLst)) { |
|
|
|
|
throw new ServiceException("此飞靶未绑定挂具!"); |
|
|
|
|
} |
|
|
|
|
// 未标记解绑飞靶,则代表正常绑定
|
|
|
|
|
if (deviceBindDTO.getUnFsBool() == null || "0".equals(deviceBindDTO.getUnFsBool())) { |
|
|
|
|
// 获取以设备为基准的同槽号
|
|
|
|
|
code = macToolUseService.nextCode(2); |
|
|
|
|
//开始绑定
|
|
|
|
|
for (int i = 0; i < macToolUseList.size(); i++) { |
|
|
|
|
MacToolUse mtu = macToolUseList.get(i); |
|
|
|
|
mtu.setMtnCode(code); |
|
|
|
|
mtu.setHangNum(null); |
|
|
|
|
mtu.setMtnCode(code); |
|
|
|
|
mtu.setUpdateTime(nowDate); |
|
|
|
|
mtu.setCreateMan(AuthUtil.getUser().getUserId()); |
|
|
|
|
macToolUseService.updateById(mtu); |
|
|
|
|
// 挂次号必填
|
|
|
|
|
if (StringUtils.isBlank(deviceBindDTO.getHangNum())) { |
|
|
|
|
throw new ServiceException("挂次号不能为空!"); |
|
|
|
|
} |
|
|
|
|
// 开始绑定
|
|
|
|
|
for (MacToolUse mtu : mtuLst) { |
|
|
|
|
// 如果飞靶绑定了设备,则提示,不能重复绑定
|
|
|
|
|
if (mtu.getEquipmentCard() != null) { |
|
|
|
|
throw new ServiceException("飞靶【" + feiBaSet.getFsCode() + "】已绑定设备【" + mtu.getEquipmentCard() + "】,不能重复绑定!"); |
|
|
|
|
} |
|
|
|
|
// 靶备绑定下更新同槽额外面积存储记录中的同槽编号
|
|
|
|
|
if (StringUtils.isNotBlank(mtu.getMtnCode())) { |
|
|
|
|
BsAdditionalMess dataByOneData = bsAdditionalMessService.getDataByOneData(mtu.getMtnCode(), (short) 1); |
|
|
|
|
if (dataByOneData != null && dataByOneData.getId() != null) { |
|
|
|
|
dataByOneData.setOneData(code); |
|
|
|
|
bsAdditionalMessService.updateById(dataByOneData); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
mtu.setHangNum(deviceBindDTO.getHangNum()); |
|
|
|
|
this.packageMtu(mtu, mtu.getBsRackSet(), fsId, ecId, code); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
// 开始绑定
|
|
|
|
|
MacToolUse newMtu = null; |
|
|
|
|
for (MacToolUse mtu : mtuLst) { |
|
|
|
|
newMtu = new MacToolUse(); |
|
|
|
|
newMtu.setWpId(mtu.getWpId()); |
|
|
|
|
// 直接共享产线设备的同槽(烘箱)
|
|
|
|
|
this.packageMtu(newMtu, mtu.getBsRackSet(), null, mtu.getEquipmentCard(), mtu.getMtnCode()); |
|
|
|
|
macToolUseService.save(newMtu); |
|
|
|
|
|
|
|
|
|
//标识绑定记录状态为解绑
|
|
|
|
|
mtu.setFinished(1); |
|
|
|
|
// 将飞拔状态改为空闲
|
|
|
|
|
if (mtu != null && mtu.getBsFeiBaSet() != null) { |
|
|
|
|
this.unBindBsFeiBaSet(feiBaSetService.getById(mtu.getBsFeiBaSet())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} //else 逻辑不走
|
|
|
|
|
//获取第一次烘箱的温度数据
|
|
|
|
|
// macToolUseService.haveHongXiaoTem(newMtu);
|
|
|
|
|
} |
|
|
|
|
macToolUseService.updateBatchById(mtuLst); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void packageMtu(MacToolUse mtu, Long rsId, Long fsId, Long ecId, String code) { |
|
|
|
|
mtu.setMtnCode(code); |
|
|
|
|
mtu.setBsRackSet(rsId); |
|
|
|
|
mtu.setBsFeiBaSet(fsId); |
|
|
|
|
mtu.setEquipmentCard(ecId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void sjBindingCard(SjEcBingCardVo sjEcBingCardVo) { |
|
|
|
|
MesEquipmentCardEntity equipmentCard = null; |
|
|
|
|
@ -682,8 +755,9 @@ public class PdaSaveServiceImpl extends BaseServiceImpl<WorkPlanMapper, WorkPlan |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void unBindDetail(List<MacToolUse> mtuList) { |
|
|
|
|
if (mtuList == null || mtuList.size() == 0) |
|
|
|
|
if (mtuList == null || mtuList.isEmpty()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (MacToolUse mtu : mtuList) { |
|
|
|
|
//修改作业计划绑定状态
|
|
|
|
|
@ -695,11 +769,17 @@ public class PdaSaveServiceImpl extends BaseServiceImpl<WorkPlanMapper, WorkPlan |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 存储同槽额外面积 |
|
|
|
|
* |
|
|
|
|
* @param code |
|
|
|
|
*/ |
|
|
|
|
private void setBsAdditionalMess(String code) { |
|
|
|
|
|
|
|
|
|
private void setBsAdditionalMess(String code, DeviceBindDTO deviceBindDTO) { |
|
|
|
|
if (StringUtils.isNotBlank(deviceBindDTO.getDopedParts()) || StringUtils.isNotBlank(deviceBindDTO.getNet()) || StringUtils.isNotBlank(deviceBindDTO.getRack())) { |
|
|
|
|
BsAdditionalMess bsAdditionalMess = new BsAdditionalMess(); |
|
|
|
|
bsAdditionalMess.setOneData(code); |
|
|
|
|
bsAdditionalMess.setTwoData(deviceBindDTO.getDopedParts()); |
|
|
|
|
bsAdditionalMess.setThreeData(deviceBindDTO.getNet()); |
|
|
|
|
bsAdditionalMess.setFourData(deviceBindDTO.getRack()); |
|
|
|
|
bsAdditionalMess.setType(BsAdditionalMess.TYPE_ONE); |
|
|
|
|
bsAdditionalMessService.save(bsAdditionalMess); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|