refactor: 入库计划实体修改
This commit is contained in:
parent
889f17d307
commit
c454bbf94c
@ -189,7 +189,7 @@ public class InventoryBatchServiceImpl implements IInventoryBatchService {
|
||||
// 获取当期入库明细数据
|
||||
List<HashMap<String, Object>> hashMapList = new ArrayList<>();
|
||||
WmsInPlanDetailEntity entityQuery = new WmsInPlanDetailEntity();
|
||||
entityQuery.setPlanId(Long.parseLong(inTask.getPlanInId()));
|
||||
entityQuery.setPlanId(inTask.getPlanInId());
|
||||
// entityQuery.setKnifeId(Long.parseLong(inTask.getPlanInId()));
|
||||
List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList = wmsInPlanDetailEntityMapper.selectWmsInPlanDetailEntityList(entityQuery);
|
||||
wmsInPlanDetailEntityList.forEach(inPlanDetailEntity -> {
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ktg.mes.wm.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
@ -55,7 +56,7 @@ public class WmsInPlan extends BaseEntity {
|
||||
* 计划日期
|
||||
*/
|
||||
@Excel(name = "计划日期")
|
||||
private String expectDate;
|
||||
private Date expectDate;
|
||||
|
||||
/**
|
||||
* 发布人
|
||||
@ -150,8 +151,13 @@ public class WmsInPlan extends BaseEntity {
|
||||
/**
|
||||
* 入库类型
|
||||
*/
|
||||
@Excel(name = "入库类型")
|
||||
private String planTypeId;
|
||||
@Excel(name = "入库类型ID")
|
||||
private Long planTypeId;
|
||||
|
||||
/**
|
||||
* 入库类型编码
|
||||
*/
|
||||
private String planTypeCode;
|
||||
|
||||
/**
|
||||
* 入库计划明细信息
|
||||
@ -206,11 +212,11 @@ public class WmsInPlan extends BaseEntity {
|
||||
return workOrderCode;
|
||||
}
|
||||
|
||||
public void setExpectDate(String expectDate) {
|
||||
public void setExpectDate(Date expectDate) {
|
||||
this.expectDate = expectDate;
|
||||
}
|
||||
|
||||
public String getExpectDate() {
|
||||
public Date getExpectDate() {
|
||||
return expectDate;
|
||||
}
|
||||
|
||||
@ -334,14 +340,22 @@ public class WmsInPlan extends BaseEntity {
|
||||
return planCode;
|
||||
}
|
||||
|
||||
public void setPlanTypeId(String planTypeId) {
|
||||
public void setPlanTypeId(Long planTypeId) {
|
||||
this.planTypeId = planTypeId;
|
||||
}
|
||||
|
||||
public String getPlanTypeId() {
|
||||
public Long getPlanTypeId() {
|
||||
return planTypeId;
|
||||
}
|
||||
|
||||
public String getPlanTypeCode() {
|
||||
return planTypeCode;
|
||||
}
|
||||
|
||||
public void setPlanTypeCode(String planTypeCode) {
|
||||
this.planTypeCode = planTypeCode;
|
||||
}
|
||||
|
||||
public List<WmsInPlanDetails> getWmsInPlanDetailsList() {
|
||||
return wmsInPlanDetailsList;
|
||||
}
|
||||
@ -381,6 +395,7 @@ public class WmsInPlan extends BaseEntity {
|
||||
.append("isDelete", getIsDelete())
|
||||
.append("planCode", getPlanCode())
|
||||
.append("planTypeId", getPlanTypeId())
|
||||
.append("planTypeCode", getPlanTypeCode())
|
||||
.append("wmsInPlanDetailsList", getWmsInPlanDetailsList())
|
||||
.toString();
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ public class WmsInPlanDetailEntityServiceImpl implements IWmsInPlanDetailEntityS
|
||||
// 获取入库计划信息
|
||||
WmsInPlan wmsInPlan = wmsInPlanMapper.selectWmsInPlanByPlanId(entity.getPlanId().toString());
|
||||
// 获取入库计划
|
||||
WmsBusinessType wmsBusinessType = wmsBusinessTypeMapper.selectWmsBusinessTypeByTypeId(wmsInPlan.getPlanTypeId());
|
||||
WmsBusinessType wmsBusinessType = wmsBusinessTypeMapper.selectWmsBusinessTypeByTypeId(wmsInPlan.getPlanTypeId().toString());
|
||||
|
||||
for (WmsInPlanDetails detail : wmsInPlan.getWmsInPlanDetailsList()) {
|
||||
// 匹配入库明细
|
||||
|
@ -385,7 +385,7 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService
|
||||
wmsInPlanTemp.setCellCode(wmStorageArea.getAreaCode());
|
||||
wmsInPlanTemp.setPlanCode(zdTask.getCode());
|
||||
wmsInPlanTemp.setRelBillCode("组装单据");
|
||||
wmsInPlanTemp.setPlanTypeId("13");
|
||||
wmsInPlanTemp.setPlanTypeId(13L);
|
||||
wmsInPlanTemp.setCreateBy(getUsername());
|
||||
wmsInPlanTemp.setCreateTime(DateUtils.getNowDate());
|
||||
|
||||
@ -431,7 +431,7 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService
|
||||
// 生成任务号
|
||||
String taskInCode = MultiModuleCodeGenerator.generateTaskCode("RKT");
|
||||
wmsInTask.setTaskInCode(taskInCode);
|
||||
wmsInTask.setPlanInId(wmsInPlan.getPlanId().toString());
|
||||
wmsInTask.setPlanInId(wmsInPlan.getPlanId());
|
||||
wmsInTask.setPlanInCode(wmsInPlan.getPlanCode());
|
||||
wmsInTask.setMaterialCode(mdItem.getItemCode());
|
||||
wmsInTask.setTaskInQuantity(zdTask.getProductIdQty());
|
||||
|
@ -33,6 +33,7 @@
|
||||
<result property="isDelete" column="IS_DELETE"/>
|
||||
<result property="planCode" column="PLAN_CODE"/>
|
||||
<result property="planTypeId" column="PLAN_TYPE_ID"/>
|
||||
<result property="planTypeCode" column="PLAN_TYPE_CODE"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="WmsInPlanWmsInPlanDetailsResult" type="WmsInPlan" extends="WmsInPlanResult">
|
||||
@ -54,7 +55,25 @@
|
||||
<result property="createTime" column="sub_CREATE_TIME"/>
|
||||
<result property="updateBy" column="sub_UPDATE_BY"/>
|
||||
<result property="updateTime" column="sub_UPDATE_TIME"/>
|
||||
<result property="isActivy" column="sub_IS_ACTIVY"/>
|
||||
<result property="isActive" column="sub_IS_ACTIVE"/>
|
||||
<result property="isDelete" column="sub_IS_DELETE"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="WmsInPlanDetails" id="BizWmsInPlanDetailsResult">
|
||||
<result property="detailsId" column="sub_DETAILS_ID"/>
|
||||
<result property="planId" column="sub_PLAN_ID"/>
|
||||
<result property="materialId" column="sub_MATERIAL_ID"/>
|
||||
<result property="batch" column="sub_BATCH"/>
|
||||
<result property="cellId" column="sub_CELL_ID"/>
|
||||
<result property="quantity" column="sub_QUANTITY"/>
|
||||
<result property="quantityIn" column="sub_QUANTITY_IN"/>
|
||||
<result property="planInStatus" column="sub_PLAN_IN_STATUS"/>
|
||||
<result property="remark" column="sub_REMARK"/>
|
||||
<result property="createBy" column="sub_CREATE_BY"/>
|
||||
<result property="createTime" column="sub_CREATE_TIME"/>
|
||||
<result property="updateBy" column="sub_UPDATE_BY"/>
|
||||
<result property="updateTime" column="sub_UPDATE_TIME"/>
|
||||
<result property="isActive" column="sub_IS_ACTIVE"/>
|
||||
<result property="isDelete" column="sub_IS_DELETE"/>
|
||||
</resultMap>
|
||||
|
||||
@ -86,7 +105,8 @@
|
||||
IS_ACTIVE,
|
||||
IS_DELETE,
|
||||
PLAN_CODE,
|
||||
PLAN_TYPE_ID
|
||||
PLAN_TYPE_ID,
|
||||
PLAN_TYPE_CODE
|
||||
from WMS_IN_PLAN
|
||||
</sql>
|
||||
|
||||
@ -122,11 +142,12 @@
|
||||
<if test="isDelete != null and isDelete != ''">and IS_DELETE = #{isDelete}</if>
|
||||
<if test="planCode != null and planCode != ''">and PLAN_CODE = #{planCode}</if>
|
||||
<if test="planTypeId != null and planTypeId != ''">and PLAN_TYPE_ID = #{planTypeId}</if>
|
||||
<if test="planTypeCode != null and planTypeCode != ''">and PLAN_TYPE_CODE = #{planTypeCode}</if>
|
||||
</where>
|
||||
order by CREATE_TIME desc
|
||||
</select>
|
||||
|
||||
<select id="selectWmsInPlanByPlanId" parameterType="String" resultMap="WmsInPlanWmsInPlanDetailsResult">
|
||||
<select id="selectWmsInPlanByPlanId" parameterType="LONG" resultMap="WmsInPlanWmsInPlanDetailsResult">
|
||||
select a.PLAN_ID,
|
||||
a.STATE,
|
||||
a.SOURCE_TYPE,
|
||||
@ -155,6 +176,7 @@
|
||||
a.IS_DELETE,
|
||||
a.PLAN_CODE,
|
||||
a.PLAN_TYPE_ID,
|
||||
a.PLAN_TYPE_CODE,
|
||||
b.DETAILS_ID as sub_DETAILS_ID,
|
||||
b.PLAN_ID as sub_PLAN_ID,
|
||||
b.MATERIAL_ID as sub_MATERIAL_ID,
|
||||
@ -204,6 +226,7 @@
|
||||
a.IS_DELETE,
|
||||
a.PLAN_CODE,
|
||||
a.PLAN_TYPE_ID,
|
||||
a.PLAN_TYPE_CODE,
|
||||
b.DETAILS_ID as sub_DETAILS_ID,
|
||||
b.PLAN_ID as sub_PLAN_ID,
|
||||
b.MATERIAL_ID as sub_MATERIAL_ID,
|
||||
@ -254,6 +277,7 @@
|
||||
<if test="isDelete != null">IS_DELETE,</if>
|
||||
<if test="planCode != null">PLAN_CODE,</if>
|
||||
<if test="planTypeId != null">PLAN_TYPE_ID,</if>
|
||||
<if test="planTypeCode != null">PLAN_TYPE_CODE,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="state != null">#{state},</if>
|
||||
@ -283,6 +307,7 @@
|
||||
<if test="isDelete != null">#{isDelete},</if>
|
||||
<if test="planCode != null">#{planCode},</if>
|
||||
<if test="planTypeId != null">#{planTypeId},</if>
|
||||
<if test="planTypeCode != null">#{planTypeCode},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -316,6 +341,7 @@
|
||||
<if test="isDelete != null">IS_DELETE = #{isDelete},</if>
|
||||
<if test="planCode != null">PLAN_CODE = #{planCode},</if>
|
||||
<if test="planTypeId != null">PLAN_TYPE_ID = #{planTypeId},</if>
|
||||
<if test="planTypeCode != null">PLAN_TYPE_CODE = #{planTypeCode},</if>
|
||||
</trim>
|
||||
where PLAN_ID = #{planId}
|
||||
</update>
|
||||
@ -361,4 +387,10 @@
|
||||
FROM WMS_IN_PLAN
|
||||
WHERE PLAN_CODE = #{value}
|
||||
</select>
|
||||
|
||||
<select id="selectWmsInPlanDetailById" resultMap="BizWmsInPlanDetailsResult">
|
||||
SELECT *
|
||||
FROM WMS_IN_PLAN_DETAILS
|
||||
WHERE DETAILS_ID = #{planDetailsId}
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user