refactor: 根据料箱查询任务时,将料箱rfid绑定至相关任务

This commit is contained in:
Kelvin 2024-12-18 14:25:27 +08:00
parent 79d23c9e99
commit 726d14eeb4
3 changed files with 18 additions and 201 deletions

View File

@ -95,6 +95,9 @@ public class WmsInTaskController extends BaseController {
if (wmsInTask == null) { if (wmsInTask == null) {
return AjaxResult.error("未查询到相关任务"); return AjaxResult.error("未查询到相关任务");
} }
// 将料箱rfid绑定至任务
wmsInTask.setBoxRfid(rfid);
wmsInTaskService.updateWmsInTask(wmsInTask);
return AjaxResult.success(wmsInTask); return AjaxResult.success(wmsInTask);
} }

View File

@ -1,5 +1,7 @@
package com.ktg.mes.wm.domain; package com.ktg.mes.wm.domain;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ktg.common.annotation.Excel; import com.ktg.common.annotation.Excel;
@ -13,6 +15,8 @@ import java.util.List;
* @author yinjinlu * @author yinjinlu
* @date 2024-11-01 * @date 2024-11-01
*/ */
@Setter
@Getter
public class WmsInTask extends BaseEntity { public class WmsInTask extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -139,208 +143,10 @@ public class WmsInTask extends BaseEntity {
*/ */
private String planTypeCode; private String planTypeCode;
private String boxRfid;
private List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList; private List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList;
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
public void setTaskInCode(String taskInCode) {
this.taskInCode = taskInCode;
}
public String getTaskInCode() {
return taskInCode;
}
public void setPlanInId(Long planInId) {
this.planInId = planInId;
}
public Long getPlanInId() {
return planInId;
}
public void setTaskInQuantity(Integer taskInQuantity) {
this.taskInQuantity = taskInQuantity;
}
public Integer getTaskInQuantity() {
return taskInQuantity;
}
public void setActualInQuantity(Integer actualInQuantity) {
this.actualInQuantity = actualInQuantity;
}
public Integer getActualInQuantity() {
return actualInQuantity;
}
public void setCellTgt(Long cellTgt) {
this.cellTgt = cellTgt;
}
public Long getCellTgt() {
return cellTgt;
}
public void setCellOrig(String cellOrig) {
this.cellOrig = cellOrig;
}
public String getCellOrig() {
return cellOrig;
}
public String getCellName() {
return cellName;
}
public void setCellName(String cellName) {
this.cellName = cellName;
}
public String getCellCode() {
return cellCode;
}
public void setCellCode(String cellCode) {
this.cellCode = cellCode;
}
public String getCellX() {
return cellX;
}
public void setCellX(String cellX) {
this.cellX = cellX;
}
public String getCellY() {
return cellY;
}
public void setCellY(String cellY) {
this.cellY = cellY;
}
public String getCellZ() {
return cellZ;
}
public void setCellZ(String cellZ) {
this.cellZ = cellZ;
}
public void setIsActive(String isActive) {
this.isActive = isActive;
}
public String getIsActive() {
return isActive;
}
public void setIsDelete(String isDelete) {
this.isDelete = isDelete;
}
public String getIsDelete() {
return isDelete;
}
public void setBatch(String batch) {
this.batch = batch;
}
public String getBatch() {
return batch;
}
public void setMaterialId(String materialId) {
this.materialId = materialId;
}
public String getMaterialId() {
return materialId;
}
public void setPlanTypeId(String planTypeId) {
this.planTypeId = planTypeId;
}
public String getPlanTypeId() {
return planTypeId;
}
public void setPlanInStatus(String planInStatus) {
this.planInStatus = planInStatus;
}
public String getPlanInStatus() {
return planInStatus;
}
public void setPlanInCode(String planInCode) {
this.planInCode = planInCode;
}
public String getPlanInCode() {
return planInCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getMaterialCode() {
return materialCode;
}
public Long getDetailInId() {
return detailInId;
}
public void setDetailInId(Long detailInId) {
this.detailInId = detailInId;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getMaterialUnit() {
return materialUnit;
}
public void setMaterialUnit(String materialUnit) {
this.materialUnit = materialUnit;
}
public List<WmsInPlanDetailEntity> getWmsInPlanDetailEntityList() {
return wmsInPlanDetailEntityList;
}
public void setWmsInPlanDetailEntityList(List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList) {
this.wmsInPlanDetailEntityList = wmsInPlanDetailEntityList;
}
public String getPlanTypeCode() {
return planTypeCode;
}
public void setPlanTypeCode(String planTypeCode) {
this.planTypeCode = planTypeCode;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

View File

@ -31,6 +31,7 @@
<result property="materialUnit" column="MATERIAL_UNIT"/> <result property="materialUnit" column="MATERIAL_UNIT"/>
<result property="materialName" column="MATERIAL_NAME"/> <result property="materialName" column="MATERIAL_NAME"/>
<result property="detailInId" column="DETAIL_IN_ID"/> <result property="detailInId" column="DETAIL_IN_ID"/>
<result property="boxRfid" column="BOX_RFID"/>
</resultMap> </resultMap>
<sql id="selectWmsInTaskVo"> <sql id="selectWmsInTaskVo">
@ -56,6 +57,7 @@
a.PLAN_IN_CODE, a.PLAN_IN_CODE,
a.MATERIAL_CODE, a.MATERIAL_CODE,
a.DETAIL_IN_ID, a.DETAIL_IN_ID,
a.BOX_RFID,
b.AREA_CODE as CELL_CODE, b.AREA_CODE as CELL_CODE,
b.AREA_NAME as CELL_NAME, b.AREA_NAME as CELL_NAME,
c.UNIT_NAME AS MATERIAL_UNIT, c.UNIT_NAME AS MATERIAL_UNIT,
@ -89,8 +91,11 @@
<if test="planTypeCode != null and planTypeCode != ''">and PLAN_TYPE_CODE = #{planTypeCode}</if> <if test="planTypeCode != null and planTypeCode != ''">and PLAN_TYPE_CODE = #{planTypeCode}</if>
<if test="planInStatus != null and planInStatus != ''">and PLAN_IN_STATUS = #{planInStatus}</if> <if test="planInStatus != null and planInStatus != ''">and PLAN_IN_STATUS = #{planInStatus}</if>
<if test="planInCode != null and planInCode != ''">and PLAN_IN_CODE = #{planInCode}</if> <if test="planInCode != null and planInCode != ''">and PLAN_IN_CODE = #{planInCode}</if>
<if test="materialCode != null and materialCode != ''">and MATERIAL_CODE like concat('%', #{materialCode}, '%')</if> <if test="materialCode != null and materialCode != ''">and MATERIAL_CODE like concat('%', #{materialCode},
'%')
</if>
<if test="detailInId != null and detailInId != ''">and DETAIL_IN_ID = #{detailInId}</if> <if test="detailInId != null and detailInId != ''">and DETAIL_IN_ID = #{detailInId}</if>
<if test="boxRfid != null and boxRfid != ''">and BOX_RFID = #{boxRfid}</if>
</where> </where>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
</select> </select>
@ -124,6 +129,7 @@
<if test="planInCode != null">PLAN_IN_CODE,</if> <if test="planInCode != null">PLAN_IN_CODE,</if>
<if test="materialCode != null">MATERIAL_CODE,</if> <if test="materialCode != null">MATERIAL_CODE,</if>
<if test="detailInId != null">DETAIL_IN_ID,</if> <if test="detailInId != null">DETAIL_IN_ID,</if>
<if test="boxRfid != null">BOX_RFID,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskInCode != null">#{taskInCode},</if> <if test="taskInCode != null">#{taskInCode},</if>
@ -147,6 +153,7 @@
<if test="planInCode != null">#{planInCode},</if> <if test="planInCode != null">#{planInCode},</if>
<if test="materialCode != null">#{materialCode},</if> <if test="materialCode != null">#{materialCode},</if>
<if test="detailInId != null">#{detailInId},</if> <if test="detailInId != null">#{detailInId},</if>
<if test="boxRfid != null">#{boxRfid},</if>
</trim> </trim>
</insert> </insert>
@ -174,6 +181,7 @@
<if test="planInCode != null">PLAN_IN_CODE = #{planInCode},</if> <if test="planInCode != null">PLAN_IN_CODE = #{planInCode},</if>
<if test="materialCode != null">MATERIAL_CODE = #{materialCode},</if> <if test="materialCode != null">MATERIAL_CODE = #{materialCode},</if>
<if test="detailInId != null">DETAIL_IN_ID = #{detailInId},</if> <if test="detailInId != null">DETAIL_IN_ID = #{detailInId},</if>
<if test="boxRfid != null">BOX_RFID = #{boxRfid},</if>
</trim> </trim>
where ID = #{id} where ID = #{id}
</update> </update>