add:需求单排序;fix:退料入库

This commit is contained in:
zhaoyf
2026-08-19 16:35:36 +08:00
parent 1389507ede
commit 654651e8a5
7 changed files with 14 additions and 16 deletions

View File

@@ -247,10 +247,6 @@ public class InboundPdaServiceImpl implements InboundPdaService {
List<AddInvParam> addInvParams = new ArrayList<>();
for (UsualInboundDto.UsualInboundDtlDto item : usualInboundDto.getDetailList()) {
//判断当前物料是否在库内
// List<GroupPlate> inStockGps = iMdPbGroupplateService.list(new LambdaQueryWrapper<GroupPlate>()
// .eq(GroupPlate::getMaterial_code, item.getSku_code())
// .eq(GroupPlate::getStatus, GROUP_PLATE_STATUS.code("入库"))
// .likeRight(GroupPlate::getStoragevehicle_code, "VTP"));
List<StructattrVechielDto> structattrVechielDtos = iStructattrService.collectVechicle(
MapOf.of("sect_code", usualInboundDto.getSect_code(), "material_code", item.getSku_code()));
@@ -568,12 +564,10 @@ public class InboundPdaServiceImpl implements InboundPdaService {
List<AddInvParam> addInvParams = new ArrayList<>();
for (ReturnInboundDto.ReturnInboundDtlDto item : returnInboundDto.getDetailList()) {
//判断当前物料是否在库内
List<GroupPlate> inStockGps = iMdPbGroupplateService.list(new LambdaQueryWrapper<GroupPlate>()
.eq(GroupPlate::getMaterial_code, item.getSku_code())
.eq(GroupPlate::getStatus, GROUP_PLATE_STATUS.code("入库"))
.likeRight(GroupPlate::getStoragevehicle_code, "VTP"));
if (!inStockGps.isEmpty()){
GroupPlate groupPlate = inStockGps.get(0);
List<StructattrVechielDto> structattrVechielDtos = iStructattrService.collectVechicle(
MapOf.of("sect_code", returnInboundDto.getSect_code(), "material_code", item.getSku_code()));
if (!structattrVechielDtos.isEmpty()){
StructattrVechielDto groupPlate = structattrVechielDtos.get(0);
Structattr structattr = iStructattrService.getOne(new LambdaQueryWrapper<Structattr>()
.eq(Structattr::getStoragevehicle_code, groupPlate.getStoragevehicle_code())
.eq(Structattr::getSect_code, returnInboundDto.getSect_code())

View File

@@ -29,6 +29,7 @@ public class PmDemand extends Model<PmDemand> {
private Integer priority;
private String status;
private String seq_no;
@TableField("work_order")
private String work_order;

View File

@@ -8,6 +8,7 @@
<result property="createTime" column="create_time"/>
<result property="priority" column="priority"/>
<result property="status" column="status"/>
<result property="seqNo" column="seq_no"/>
<result property="workOrder" column="work_order"/>
<result property="skuCode" column="sku_code"/>
<result property="skuName" column="sku_name"/>
@@ -56,6 +57,6 @@
<if test="query.endTime != null and query.endTime != ''">
and d.create_time &lt;= #{query.endTime}
</if>
order by d.priority desc, d.create_time desc
order by d.seq_no asc,d.priority desc, d.create_time desc
</select>
</mapper>

View File

@@ -13,6 +13,7 @@ public class PmDemandDto implements Serializable {
private String createTime;
private Integer priority;
private String status;
private String seqNo;
private String workOrder;
private String skuCode;
private String skuName;

View File

@@ -1,9 +1,6 @@
package org.nl.wms.pm_manage.demand.service.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import lombok.Data;
import org.nl.common.domain.handler.IsoToLocalDateTimeStringDeserializer;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
@@ -31,6 +28,7 @@ public class PmDemandParam {
private Integer priority;
private String status;
private String seqNo;
@NotBlank(message = "工单编号不能为空")
private String workOrder;

View File

@@ -109,6 +109,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
demand.setCreate_time(param.getCreateTime());
demand.setPriority(param.getPriority());
demand.setStatus(param.getStatus());
demand.setSeq_no(param.getSeqNo());
demand.setWork_order(param.getWorkOrder());
demand.setSku_code(param.getSkuCode());
demand.setSku_name(param.getSkuName());
@@ -146,6 +147,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
demand.setCreate_time(pmDemandParam.getCreateTime());
demand.setPriority(pmDemandParam.getPriority());
demand.setStatus(pmDemandParam.getStatus());
demand.setSeq_no(pmDemandParam.getSeqNo());
demand.setWork_order(pmDemandParam.getWorkOrder());
demand.setSku_code(pmDemandParam.getSkuCode());
demand.setSku_name(pmDemandParam.getSkuName());

View File

@@ -50,7 +50,8 @@ public class DealReturnBillCallback implements CallbackStrategy {
pmReturnService.lambdaUpdate()
.set(PmReturn::getAssign_qty, pmReturn.getAssign_qty())
.set(PmReturn::getUpdate_time, DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss"))
.eq(PmReturn::getId, orderCode)
.set(PmReturn::getStatus, 80)
.eq(PmReturn::getId, pmReturn.getId())
.update();
//保存回传
// 创建最外层的JSONObject
@@ -99,7 +100,7 @@ public class DealReturnBillCallback implements CallbackStrategy {
pmReturnService.lambdaUpdate()
.set(PmReturn::getAssign_qty, pmReturn.getAssign_qty())
.set(PmReturn::getUpdate_time, DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss"))
.eq(PmReturn::getId, orderCode)
.eq(PmReturn::getId, pmReturn.getId())
.update();
}
}