2024-11-8 设备-切线调拨、工单切线 - 微信提醒调整

master
元气满满(jgy) 5 months ago
parent e0f6e198ca
commit e31986dd44

@ -3,7 +3,7 @@ package com.op.system.api;
import com.op.common.core.constant.ServiceNameConstants;
import com.op.common.core.domain.R;
import com.op.system.api.domain.DataSourcePropertyDTO;
import com.op.system.api.domain.device.EquPlanDTO;
import com.op.system.api.domain.device.WorkOrderTangentDTO;
import com.op.system.api.factory.RemoteDeviceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
@ -45,5 +45,5 @@ public interface RemoteDeviceService {
//切线后创建当日新的点检工单
@PostMapping("/deviceTask/createSpotCheckWorkOrder")
public R createSpotCheckWorkOrder(@RequestBody EquPlanDTO equPlanDTO);
public R createSpotCheckWorkOrder(@RequestBody WorkOrderTangentDTO workOrderTangentDTO);
}

@ -1,633 +0,0 @@
package com.op.system.api.domain.device;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.op.common.core.annotation.Excel;
import com.op.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
import java.util.List;
/**
* equ_plan
*
* @author Open Platform
* @date 2023-10-16
*/
public class EquPlanDTO extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private String planId;
/**
*
*/
@Excel(name = "计划编码")
private String planCode;
/**
*
*/
@Excel(name = "计划名称")
private String planName;
/**
*
*/
@Excel(name = "车间编码")
private String planWorkshop;
/**
* 线
*/
private String planProdLine;
/**
*
*/
private String equipmentName;
/**
*
*/
private String equipmentCode;
/**
*
*/
@Excel(name = "循环周期")
private String planLoop;
/**
*
*/
@Excel(name = "循环周期类型")
private String planLoopType;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "循环执行时间开始", width = 30, dateFormat = "yyyy-MM-dd")
private Date planLoopStart;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "循环执行时间结束", width = 30, dateFormat = "yyyy-MM-dd")
private Date planLoopEnd;
/**
*
*/
private String planPerson;
/**
*
*/
@Excel(name = "计划状态")
private String planStatus;
/**
* -
*/
@Excel(name = "是否可生产-限制")
private String planRestrict;
/**
*
*/
private String planType;
/**
*
*/
private String planOutsource;
/**
*
*/
@Excel(name = "委外工单编码")
private String workCode;
/**
*
*/
@Excel(name = "工厂")
private String factoryCode;
/**
* 1
*/
private String attr1;
/**
* 2
*/
private String attr2;
/**
* 3
*/
private String attr3;
/**
*
*/
private String delFlag;
// 创建日期范围list
private List<Date> createTimeArray;
// 更新日期范围list
private List<Date> updateTimeArray;
// 更新日期开始
private String updateTimeStart;
// 更新日期结束
private String updateTimeEnd;
// 创建日期开始
private String createTimeStart;
// 创建日期结束
private String createTimeEnd;
private List<Date> planTimeArray;
private List<String> personListVO;
private String workCenterName;
// 保养类型
@Excel(name = "保养类型")
private String upkeep;
// 计划保养时间计算规则
private String calculationRule;
// 是否停机保养
@Excel(name = "是否停机保养")
private String shutDown;
private String planEquId;
private List<Date> loopStartArray;
private Date loopStart;
private Date loopEnd;
private List<Date> loopEndArray;
private Date loopEndArrayStart;
private Date getLoopEndArrayEnd;
@Excel(name = "委外人员")
private String workPerson;
@Excel(name = "委外单位")
private String workOutsourcingUnit;
@Excel(name = "联系方式")
private String workConnection;
@Excel(name = "委外原因")
private String workReason;
//jgy 新增 生产线体编码 每天生成线体信息的时候只生成计划生产的
private String lineCode;
private List<String> lineCodes;
private String workOrderCode;//工单号
private String changeLineType;//切线类型
public String getWorkOutsourcingUnit() {
return workOutsourcingUnit;
}
public void setWorkOutsourcingUnit(String workOutsourcingUnit) {
this.workOutsourcingUnit = workOutsourcingUnit;
}
public String getWorkConnection() {
return workConnection;
}
public void setWorkConnection(String workConnection) {
this.workConnection = workConnection;
}
public String getWorkReason() {
return workReason;
}
public void setWorkReason(String workReason) {
this.workReason = workReason;
}
public String getWorkPerson() {
return workPerson;
}
public void setWorkPerson(String workPerson) {
this.workPerson = workPerson;
}
public List<Date> getLoopEndArray() {
return loopEndArray;
}
public void setLoopEndArray(List<Date> loopEndArray) {
this.loopEndArray = loopEndArray;
}
public Date getLoopEndArrayStart() {
return loopEndArrayStart;
}
public void setLoopEndArrayStart(Date loopEndArrayStart) {
this.loopEndArrayStart = loopEndArrayStart;
}
public Date getGetLoopEndArrayEnd() {
return getLoopEndArrayEnd;
}
public void setGetLoopEndArrayEnd(Date getLoopEndArrayEnd) {
this.getLoopEndArrayEnd = getLoopEndArrayEnd;
}
public Date getLoopEnd() {
return loopEnd;
}
public void setLoopEnd(Date loopEnd) {
this.loopEnd = loopEnd;
}
public Date getLoopStart() {
return loopStart;
}
public void setLoopStart(Date loopStart) {
this.loopStart = loopStart;
}
public List<Date> getLoopStartArray() {
return loopStartArray;
}
public void setLoopStartArray(List<Date> loopStartArray) {
this.loopStartArray = loopStartArray;
}
public String getPlanEquId() {
return planEquId;
}
public void setPlanEquId(String planEquId) {
this.planEquId = planEquId;
}
public String getUpkeep() {
return upkeep;
}
public void setUpkeep(String upkeep) {
this.upkeep = upkeep;
}
public String getCalculationRule() {
return calculationRule;
}
public void setCalculationRule(String calculationRule) {
this.calculationRule = calculationRule;
}
public String getShutDown() {
return shutDown;
}
public void setShutDown(String shutDown) {
this.shutDown = shutDown;
}
public String getWorkCenterName() {
return workCenterName;
}
public void setWorkCenterName(String workCenterName) {
this.workCenterName = workCenterName;
}
public List<String> getPersonListVO() {
return personListVO;
}
public void setPersonListVO(List<String> personListVO) {
this.personListVO = personListVO;
}
public List<Date> getPlanTimeArray() {
return planTimeArray;
}
public void setPlanTimeArray(List<Date> planTimeArray) {
this.planTimeArray = planTimeArray;
}
public List<Date> getCreateTimeArray() {
return createTimeArray;
}
public void setCreateTimeArray(List<Date> createTimeArray) {
this.createTimeArray = createTimeArray;
}
public List<Date> getUpdateTimeArray() {
return updateTimeArray;
}
public void setUpdateTimeArray(List<Date> updateTimeArray) {
this.updateTimeArray = updateTimeArray;
}
public String getUpdateTimeStart() {
return updateTimeStart;
}
public void setUpdateTimeStart(String updateTimeStart) {
this.updateTimeStart = updateTimeStart;
}
public String getUpdateTimeEnd() {
return updateTimeEnd;
}
public void setUpdateTimeEnd(String updateTimeEnd) {
this.updateTimeEnd = updateTimeEnd;
}
public String getCreateTimeStart() {
return createTimeStart;
}
public void setCreateTimeStart(String createTimeStart) {
this.createTimeStart = createTimeStart;
}
public String getCreateTimeEnd() {
return createTimeEnd;
}
public void setCreateTimeEnd(String createTimeEnd) {
this.createTimeEnd = createTimeEnd;
}
public void setPlanId(String planId) {
this.planId = planId;
}
public String getPlanId() {
return planId;
}
public void setPlanCode(String planCode) {
this.planCode = planCode;
}
public String getPlanCode() {
return planCode;
}
public void setPlanName(String planName) {
this.planName = planName;
}
public String getPlanName() {
return planName;
}
public void setPlanWorkshop(String planWorkshop) {
this.planWorkshop = planWorkshop;
}
public String getPlanWorkshop() {
return planWorkshop;
}
public void setPlanProdLine(String planProdLine) {
this.planProdLine = planProdLine;
}
public String getPlanProdLine() {
return planProdLine;
}
public void setEquipmentName(String equipmentName) {
this.equipmentName = equipmentName;
}
public String getEquipmentName() {
return equipmentName;
}
public void setEquipmentCode(String equipmentCode) {
this.equipmentCode = equipmentCode;
}
public String getEquipmentCode() {
return equipmentCode;
}
public void setPlanLoop(String planLoop) {
this.planLoop = planLoop;
}
public String getPlanLoop() {
return planLoop;
}
public void setPlanLoopType(String planLoopType) {
this.planLoopType = planLoopType;
}
public String getPlanLoopType() {
return planLoopType;
}
public void setPlanLoopStart(Date planLoopStart) {
this.planLoopStart = planLoopStart;
}
public Date getPlanLoopStart() {
return planLoopStart;
}
public void setPlanLoopEnd(Date planLoopEnd) {
this.planLoopEnd = planLoopEnd;
}
public Date getPlanLoopEnd() {
return planLoopEnd;
}
public void setPlanPerson(String planPerson) {
this.planPerson = planPerson;
}
public String getPlanPerson() {
return planPerson;
}
public void setPlanStatus(String planStatus) {
this.planStatus = planStatus;
}
public String getPlanStatus() {
return planStatus;
}
public void setPlanRestrict(String planRestrict) {
this.planRestrict = planRestrict;
}
public String getPlanRestrict() {
return planRestrict;
}
public void setPlanType(String planType) {
this.planType = planType;
}
public String getPlanType() {
return planType;
}
public void setPlanOutsource(String planOutsource) {
this.planOutsource = planOutsource;
}
public String getPlanOutsource() {
return planOutsource;
}
public void setWorkCode(String workCode) {
this.workCode = workCode;
}
public String getWorkCode() {
return workCode;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
public void setLineCode(String lineCode) {
this.lineCode = lineCode;
}
public String getLineCode() {
return lineCode;
}
public void setLineCodes(List<String> lineCodes) {
this.lineCodes = lineCodes;
}
public List<String> getLineCodes() {
return lineCodes;
}
public void setWorkOrderCode(String workOrderCode) {
this.workOrderCode = workOrderCode;
}
public String getWorkOrderCode() {
return workOrderCode;
}
public void setChangeLineType(String changeLineType) {
this.changeLineType = changeLineType;
}
public String getChangeLineType() {
return changeLineType;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("planId", getPlanId())
.append("planCode", getPlanCode())
.append("planName", getPlanName())
.append("planWorkshop", getPlanWorkshop())
.append("planProdLine", getPlanProdLine())
.append("equipmentName", getEquipmentName())
.append("equipmentCode", getEquipmentCode())
.append("planLoop", getPlanLoop())
.append("planLoopType", getPlanLoopType())
.append("planLoopStart", getPlanLoopStart())
.append("planLoopEnd", getPlanLoopEnd())
.append("planPerson", getPlanPerson())
.append("planStatus", getPlanStatus())
.append("planRestrict", getPlanRestrict())
.append("planType", getPlanType())
.append("planOutsource", getPlanOutsource())
.append("workCode", getWorkCode())
.append("factoryCode", getFactoryCode())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -0,0 +1,97 @@
package com.op.system.api.domain.device;
import com.op.common.core.web.domain.BaseEntity;
import java.util.List;
/**
* 线 workOrderTangent
*
* @author jgy
* @date 2024-11-7
*/
public class WorkOrderTangentDTO extends BaseEntity {
private static final long serialVersionUID = 1L;
private String planProdLine;//产线
private String equipmentName;//设备名称
private String equipmentCode;//设备编码
private String factoryCode;//工厂
//jgy 新增 切线调拨 工单切线能用到的参数
private String lineCode;
private List<String> addLineCodes;
private String workOrderCode;//工单号
private String changeLineType;//切线类型
private List<String> previousLineCodes;//之前的产线
private List<String> currentLineCodes;//现在的产线
public void setPlanProdLine(String planProdLine) {
this.planProdLine = planProdLine;
}
public String getPlanProdLine() {
return planProdLine;
}
public void setEquipmentName(String equipmentName) {
this.equipmentName = equipmentName;
}
public String getEquipmentName() {
return equipmentName;
}
public void setEquipmentCode(String equipmentCode) {
this.equipmentCode = equipmentCode;
}
public String getEquipmentCode() {
return equipmentCode;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
public void setLineCode(String lineCode) {
this.lineCode = lineCode;
}
public String getLineCode() {
return lineCode;
}
public void setAddLineCodes(List<String> addLineCodes) {
this.addLineCodes = addLineCodes;
}
public List<String> getAddLineCodes() {
return addLineCodes;
}
public void setWorkOrderCode(String workOrderCode) {
this.workOrderCode = workOrderCode;
}
public String getWorkOrderCode() {
return workOrderCode;
}
public void setChangeLineType(String changeLineType) {
this.changeLineType = changeLineType;
}
public String getChangeLineType() {
return changeLineType;
}
public void setPreviousLineCodes(List<String> previousLineCodes) {
this.previousLineCodes = previousLineCodes;
}
public List<String> getPreviousLineCodes() {
return previousLineCodes;
}
public void setCurrentLineCodes(List<String> currentLineCodes) {
this.currentLineCodes = currentLineCodes;
}
public List<String> getCurrentLineCodes() {
return currentLineCodes;
}
}

@ -59,7 +59,7 @@ public class RemoteDeviceFallbackFactory implements FallbackFactory<RemoteDevice
}
@Override
public R createSpotCheckWorkOrder(com.op.system.api.domain.device.EquPlanDTO equPlanDTO) {
public R createSpotCheckWorkOrder(com.op.system.api.domain.device.WorkOrderTangentDTO workOrderTangentDTO) {
return R.fail("切换产线,新增点检工单失败:" + throwable.getMessage());
}
};

@ -8,7 +8,7 @@ import com.op.common.datasource.creator.DynamicDatasourceCreator;
import com.op.device.service.IDeviceTaskService;
import com.op.system.api.domain.DataSourcePropertyDTO;
import com.op.common.core.utils.bean.BeanUtils;
import com.op.system.api.domain.device.EquPlanDTO;
import com.op.system.api.domain.device.WorkOrderTangentDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -124,8 +124,8 @@ public class DeviceTaskController {
* @return
*/
@PostMapping("/createSpotCheckWorkOrder")
public R createSpotCheckWorkOrder(@RequestBody EquPlanDTO equPlanDTO) {
AjaxResult result = taskService.createSpotCheckWorkOrder(equPlanDTO);
public R createSpotCheckWorkOrder(@RequestBody WorkOrderTangentDTO workOrderTangentDTO) {
AjaxResult result = taskService.createSpotCheckWorkOrder(workOrderTangentDTO);
if (result.isSuccess()) {
return R.ok("切线后新点检工单生成成功");
}

@ -1,7 +1,7 @@
package com.op.device.service;
import com.op.common.core.web.domain.AjaxResult;
import com.op.system.api.domain.device.EquPlanDTO;
import com.op.system.api.domain.device.WorkOrderTangentDTO;
/**
* TaskService
@ -21,5 +21,5 @@ public interface IDeviceTaskService {
AjaxResult equipmentBKTask();
AjaxResult createSpotCheckWorkOrder(EquPlanDTO equPlanDTO);//切线后创建新的点检工单
AjaxResult createSpotCheckWorkOrder(WorkOrderTangentDTO workOrderTangentDTO);//切线后创建新的点检工单
}

@ -15,7 +15,7 @@ import com.op.system.api.RemoteOpenService;
import com.op.system.api.RemoteUserService;
import com.op.system.api.domain.SysNoticeGroup;
import com.op.system.api.domain.SysUser;
import com.op.system.api.domain.device.EquPlanDTO;
import com.op.system.api.domain.device.WorkOrderTangentDTO;
import com.op.system.api.domain.dto.WechartDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -281,14 +281,14 @@ public class DeviceTaskServiceImpl implements IDeviceTaskService {
}
//切线后 创建点检工单
public AjaxResult createSpotCheckWorkOrder(com.op.system.api.domain.device.EquPlanDTO equPlanDTO) {
DynamicDataSourceContextHolder.push(equPlanDTO.getFactoryCode());// 这是数据源的key
logger.info(equPlanDTO.getFactoryCode() + "工厂切线接口传输参数:" + JSONArray.toJSONString(equPlanDTO));
DynamicDataSourceContextHolder.push(equPlanDTO.getFactoryCode());// 这是数据源的key
public AjaxResult createSpotCheckWorkOrder(com.op.system.api.domain.device.WorkOrderTangentDTO workOrderTangentDTO) {
DynamicDataSourceContextHolder.push(workOrderTangentDTO.getFactoryCode());// 这是数据源的key
logger.info(workOrderTangentDTO.getFactoryCode() + "工厂切线接口传输参数:" + JSONArray.toJSONString(workOrderTangentDTO));
DynamicDataSourceContextHolder.push(workOrderTangentDTO.getFactoryCode());// 这是数据源的key
EquPlan equPlan = new EquPlan();
equPlan.setPlanType("spotInspection");
List<EquPlan> plans = deviceTaskMapper.getPlans(equPlan);//所有的
List<String> changeLineCodeList = equPlanDTO.getLineCodes();//切线后的实际传过来的要新增的产线信息
List<String> changeLineCodeList = workOrderTangentDTO.getAddLineCodes();//切线后的实际传过来的要新增的产线信息
List<EquPlan> addProducePlans = new ArrayList<>();//切线后,真正能生成的生产线 下面的设备的点检计划
List<String> addProduceLine = new ArrayList<>();//真正能生成的切线生产线
@ -298,7 +298,7 @@ public class DeviceTaskServiceImpl implements IDeviceTaskService {
if(!StringUtils.isBlank(plan.getLineCode())){
if(plan.getLineCode().equals(lineCode)){
addProducePlans.add(plan);
logger.info(equPlanDTO.getFactoryCode() + "工厂切线后新生成计划信息:" + JSONArray.toJSONString(plan));
logger.info(workOrderTangentDTO.getFactoryCode() + "工厂切线后新生成计划信息:" + JSONArray.toJSONString(plan));
addProduceLine.add(lineCode);
}
}
@ -306,7 +306,7 @@ public class DeviceTaskServiceImpl implements IDeviceTaskService {
}
}
addProduceLine = addProduceLine.stream().distinct().collect(Collectors.toList());
logger.info(equPlanDTO.getFactoryCode() + "工厂切线后新生成产线:" + JSONArray.toJSONString(addProduceLine));
logger.info(workOrderTangentDTO.getFactoryCode() + "工厂切线后新生成产线:" + JSONArray.toJSONString(addProduceLine));
addSpotCheckTask = new ArrayList<>();
for (EquPlan plan : addProducePlans) {
@ -323,14 +323,14 @@ public class DeviceTaskServiceImpl implements IDeviceTaskService {
}
}
logger.info("++++++++++++" + equPlanDTO.getFactoryCode() + "++++切线后创建微信提醒开始++++++++++");
this.spotCheckSendWeChat(addProduceLine,equPlanDTO);
logger.info("++++++++++++" + equPlanDTO.getFactoryCode() + "++++切线后创建微信提醒结束++++++++++");
logger.info("++++++++++++" + equPlanDTO.getFactoryCode() + "++++切线后创建点检工单流程结束++++++++++");
logger.info("++++++++++++" + workOrderTangentDTO.getFactoryCode() + "++++切线后创建微信提醒开始++++++++++");
this.spotCheckSendWeChat(addProduceLine,workOrderTangentDTO);
logger.info("++++++++++++" + workOrderTangentDTO.getFactoryCode() + "++++切线后创建微信提醒结束++++++++++");
logger.info("++++++++++++" + workOrderTangentDTO.getFactoryCode() + "++++切线后创建点检工单流程结束++++++++++");
return success();
}
private void spotCheckSendWeChat(List<String> addProduceLine, EquPlanDTO equPlanDTO) {
private void spotCheckSendWeChat(List<String> addProduceLine, WorkOrderTangentDTO workOrderTangentDTO) {
//发企业微信--------------------开始(跟班组有关)
SimpleDateFormat myFmt=new SimpleDateFormat("yyyy年MM月dd日 HH时mm分ss秒"); //规范时间格式
SysNoticeGroup noticeQo = new SysNoticeGroup();
@ -349,10 +349,12 @@ public class DeviceTaskServiceImpl implements IDeviceTaskService {
//在前端填的时候,需要判空!!!!!!
contentInfo = contentInfo
.replace("${n}", "\n")
.replace("${productLineCode}", addProduceLine + "")//产线
.replace("${changeLineType}", equPlanDTO.getChangeLineType())//切线类型
.replace("${previousLines}", workOrderTangentDTO.getPreviousLineCodes() + "\n")//切线前产线
.replace("${currentLines}", workOrderTangentDTO.getCurrentLineCodes() + "\n")//切线后产线
.replace("${addLines}", addProduceLine + "\n")//新增产线
.replace("${changeLineType}", workOrderTangentDTO.getChangeLineType())//切线类型
.replace("${orderCode}", addSpotCheckTask + "")//点检工单号
.replace("${workOrderCode}", equPlanDTO.getWorkOrderCode());//工单号
.replace("${workOrderCode}", workOrderTangentDTO.getWorkOrderCode());//工单号
//替换标签
Pattern p= Pattern.compile("<[^>]+>");
@ -362,7 +364,7 @@ public class DeviceTaskServiceImpl implements IDeviceTaskService {
wechart0.setText(contentInfo);
wecharts.add(wechart0);
}
logger.info(equPlanDTO.getChangeLineType()+ "后,企业微信提醒维修请求:" + JSONObject.toJSONString(wecharts));
logger.info(workOrderTangentDTO.getChangeLineType()+ "后,企业微信提醒维修请求:" + JSONObject.toJSONString(wecharts));
if (!CollectionUtils.isEmpty(wecharts)) {
new Thread(() -> {
AjaxResult wxResult = remoteOpenService.sendWeChartMessage(wecharts);

@ -23,7 +23,7 @@ import com.op.plan.mapper.*;
import com.op.plan.service.IProOrderWorkorderService;
import com.op.system.api.RemoteDeviceService;
import com.op.system.api.RemoteSapService;
import com.op.system.api.domain.device.EquPlanDTO;
import com.op.system.api.domain.device.WorkOrderTangentDTO;
import com.op.system.api.domain.dto.MesPrepareDTO;
import com.op.system.api.domain.dto.MesPrepareDetailDTO;
import com.op.system.api.domain.sap.*;
@ -1819,13 +1819,15 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
addLines = addLines.stream().distinct().collect(Collectors.toList());
if(!CollectionUtils.isEmpty(addLines)){//如果 现在的产线是空 以前可能是空的 也可能不是空的 证明没有进行切线
EquPlanDTO equPlanDTO = new EquPlanDTO();
equPlanDTO.setWorkOrderCode(splitOrderDTO.getProOrderWorkorder().getWorkorderCode());
equPlanDTO.setFactoryCode(poolName);
equPlanDTO.setLineCodes(addLines);
equPlanDTO.setChangeLineType(changeLineType);
WorkOrderTangentDTO workOrderTangentDTO = new WorkOrderTangentDTO();
workOrderTangentDTO.setWorkOrderCode(splitOrderDTO.getProOrderWorkorder().getWorkorderCode());
workOrderTangentDTO.setFactoryCode(poolName);
workOrderTangentDTO.setAddLineCodes(addLines);
workOrderTangentDTO.setChangeLineType(changeLineType);
workOrderTangentDTO.setPreviousLineCodes(previousLines);
workOrderTangentDTO.setCurrentLineCodes(currentLines);
logger.info(poolName + "工厂进行切线,生成产线" + addLines + "的新点检信息");
remoteDeviceService.createSpotCheckWorkOrder(equPlanDTO);
remoteDeviceService.createSpotCheckWorkOrder(workOrderTangentDTO);
}else{
logger.info(poolName + "工厂进行切线,没有新产线需要点检。");
}

Loading…
Cancel
Save