change - add生产计划信息加工作量字段

maser
yinq 1 week ago
parent 636370a476
commit 593183e75b

@ -79,11 +79,11 @@ public class BaseProductLine extends BaseEntity
@Excel(name = "工位类型", readConverterExp = "1=生产工位,2=质检工位")
private String stationType;
/** SAP工作中心编号 */
/** SAP工作中心编号、压延总工位 */
@Excel(name = "SAP工作中心编号")
private String workCenterCode;
/** SAP工作中心描述 */
/** SAP工作中心描述、工序编号 */
@Excel(name = "SAP工作中心描述")
private String workCenterName;

@ -64,4 +64,13 @@ public interface IBaseDeviceLedgerService
* @return
*/
public String getDeviceCode();
/**
*
* @param equipmentNo
* @param processStage
* @return
*/
BaseDeviceLedger selectBaseDeviceLedgerByDeviceCode(String equipmentNo, String processStage);
}

@ -3,6 +3,8 @@ package com.os.mes.base.service.impl;
import java.util.List;
import com.os.common.utils.DateUtils;
import com.os.common.utils.StringUtils;
import com.os.mes.base.domain.BaseProductLine;
import com.os.mes.base.mapper.BaseProductLineMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.os.mes.base.mapper.BaseDeviceLedgerMapper;
@ -21,6 +23,9 @@ public class BaseDeviceLedgerServiceImpl implements IBaseDeviceLedgerService
@Autowired
private BaseDeviceLedgerMapper baseDeviceLedgerMapper;
@Autowired
private BaseProductLineMapper baseProductLineMapper;
/**
*
*
@ -114,4 +119,27 @@ public class BaseDeviceLedgerServiceImpl implements IBaseDeviceLedgerService
return "E" + formattedNumber;
}
/**
*
* @param equipmentNo
* @param processStage
* @return
*/
@Override
public BaseDeviceLedger selectBaseDeviceLedgerByDeviceCode(String equipmentNo, String processStage) {
BaseDeviceLedger baseDeviceLedger = baseDeviceLedgerMapper.selectBaseDeviceLedgerByDeviceCode(equipmentNo);
if (processStage.equals("出布") || processStage.equals("成型") || processStage.equals("包胶")) {
BaseProductLine productLine = new BaseProductLine();
productLine.setProductLineName(processStage);
productLine.setWorkCenterCode(baseDeviceLedger.getProductLineCode());
List<BaseProductLine> productLineList = baseProductLineMapper.selectBaseProductLineList(productLine);
if (!productLineList.isEmpty()){
BaseProductLine baseProductLine = productLineList.get(0);
baseDeviceLedger.setProductLineCode(baseProductLine.getPlantCode());
baseDeviceLedger.setProcessCode(baseProductLine.getWorkCenterName());
}
}
return baseDeviceLedger;
}
}

@ -24,6 +24,9 @@ public class ProdPlanErpInfo extends BaseEntity
/** 主键标识 */
private Long objId;
@Excel(name = "工作量")
private BigDecimal workload;
/** 硬件 */
@Excel(name = "硬件")
private String hardware;
@ -301,6 +304,14 @@ public class ProdPlanErpInfo extends BaseEntity
private String processCode;
private String stationCode;
public BigDecimal getWorkload() {
return workload;
}
public void setWorkload(BigDecimal workload) {
this.workload = workload;
}
public String getTeamNo() {
return teamNo;
}

@ -5,7 +5,7 @@ import java.util.List;
import com.os.common.utils.DateUtils;
import com.os.common.utils.StringUtils;
import com.os.mes.base.domain.BaseDeviceLedger;
import com.os.mes.base.mapper.BaseDeviceLedgerMapper;
import com.os.mes.base.service.IBaseDeviceLedgerService;
import com.os.mes.prod.domain.ProdPlanInfo;
import com.os.mes.prod.service.IProdPlanInfoService;
import org.springframework.beans.factory.annotation.Autowired;
@ -30,7 +30,7 @@ public class ProdPlanErpInfoServiceImpl implements IProdPlanErpInfoService {
private IProdPlanInfoService prodPlanInfoService;
@Autowired
private BaseDeviceLedgerMapper deviceLedgerMapper;
private IBaseDeviceLedgerService deviceLedgerService;
/**
*
@ -111,19 +111,20 @@ public class ProdPlanErpInfoServiceImpl implements IProdPlanErpInfoService {
public void insertOrUpdateProdPlanErpInfoList(List<ProdPlanErpInfo> dataList) {
for (ProdPlanErpInfo planErpInfo : dataList) {
String equipmentNo = planErpInfo.getEquipmentNo();
String processStage = planErpInfo.getProcessStage();
if (StringUtils.isNotEmpty(equipmentNo)) {
BaseDeviceLedger deviceLedger = deviceLedgerMapper.selectBaseDeviceLedgerByDeviceCode(equipmentNo);
BaseDeviceLedger deviceLedger = deviceLedgerService.selectBaseDeviceLedgerByDeviceCode(equipmentNo, processStage);
if (StringUtils.isNotNull(deviceLedger)) {
// 出布、成型、包胶、硫化
planErpInfo.setStationCode(deviceLedger.getProductLineCode());
planErpInfo.setProcessCode(deviceLedger.getProcessCode());
planErpInfo.setStationCode(deviceLedger.getProductLineCode());
}
}
String seqNo = planErpInfo.getSeqNo();
ProdPlanErpInfo selectErpInfo = new ProdPlanErpInfo();
selectErpInfo.setSeqNo(seqNo);
List<ProdPlanErpInfo> infoList = prodPlanErpInfoMapper.selectProdPlanErpInfoList(selectErpInfo);
if (infoList.size() > 0){
if (!infoList.isEmpty()) {
ProdPlanInfo prodPlanInfo = new ProdPlanInfo();
prodPlanInfo.setPlanCode(seqNo);
List<ProdPlanInfo> planInfoList = prodPlanInfoService.selectProdPlanInfoList(prodPlanInfo);

@ -76,6 +76,7 @@
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="workload" column="workload"/>
</resultMap>
<sql id="selectProdPlanErpInfoVo">
@ -146,6 +147,7 @@
taskForce,
teamName,
groupLeader,
workload,
create_by,
create_time,
update_by,
@ -327,6 +329,7 @@
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="workload != null">workload,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="hardware != null">#{hardware},</if>
@ -399,6 +402,7 @@
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="workload != null">#{workload},</if>
</trim>
</insert>
@ -482,6 +486,7 @@
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="workload != null">workload = #{workload},</if>
</trim>
where obj_id = #{objId}
</update>

Loading…
Cancel
Save