add:需求单新增显示平库立库库存
This commit is contained in:
@@ -25,36 +25,37 @@
|
||||
</resultMap>
|
||||
|
||||
<select id="queryPage" resultMap="DemandDtoMap">
|
||||
select *
|
||||
from pm_demand
|
||||
select d.*,g.qty pkInv
|
||||
from pm_demand d
|
||||
left join md_pb_groupplate g on d.sku_code = g.material_code and g.storagevehicle_code = 'VTP0006'
|
||||
where is_deleted = 0
|
||||
<if test="query.id != null and query.id != ''">
|
||||
and id = #{query.id}
|
||||
and d.id = #{query.id}
|
||||
</if>
|
||||
<if test="query.creator != null and query.creator != ''">
|
||||
and creator like concat('%', #{query.creator}, '%')
|
||||
and d.creator like concat('%', #{query.creator}, '%')
|
||||
</if>
|
||||
<if test="query.status != null">
|
||||
and status = #{query.status}
|
||||
and d.status = #{query.status}
|
||||
</if>
|
||||
<if test="query.workOrder != null and query.workOrder != ''">
|
||||
and work_order like concat('%', #{query.workOrder}, '%')
|
||||
and d.work_order like concat('%', #{query.workOrder}, '%')
|
||||
</if>
|
||||
<if test="query.skuCode != null and query.skuCode != ''">
|
||||
and (sku_code like concat('%', #{query.skuCode}, '%') or sku_name like concat('%', #{query.skuCode}, '%'))
|
||||
and (d.sku_code like concat('%', #{query.skuCode}, '%') or d.sku_name like concat('%', #{query.skuCode}, '%'))
|
||||
</if>
|
||||
<if test="query.productionLine != null and query.productionLine != ''">
|
||||
and production_line like concat('%', #{query.productionLine}, '%')
|
||||
and d.production_line like concat('%', #{query.productionLine}, '%')
|
||||
</if>
|
||||
<if test="query.targetArea != null and query.targetArea != ''">
|
||||
and target_area like concat('%', #{query.targetArea}, '%')
|
||||
and d.target_area like concat('%', #{query.targetArea}, '%')
|
||||
</if>
|
||||
<if test="query.startTime != null and query.startTime != ''">
|
||||
and create_time >= #{query.startTime}
|
||||
and d.create_time >= #{query.startTime}
|
||||
</if>
|
||||
<if test="query.endTime != null and query.endTime != ''">
|
||||
and create_time <= #{query.endTime}
|
||||
and d.create_time <= #{query.endTime}
|
||||
</if>
|
||||
order by priority desc, create_time desc
|
||||
order by d.priority desc, d.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.nl.wms.pm_manage.demand.service.dto;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -27,5 +26,7 @@ public class PmDemandDto implements Serializable {
|
||||
private String sn;
|
||||
private String createAt;
|
||||
private String inventoryDis;
|
||||
private BigDecimal pkInv;
|
||||
private BigDecimal lkInv;
|
||||
private Integer isDeleted;
|
||||
}
|
||||
|
||||
@@ -87,6 +87,15 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
||||
com.github.pagehelper.Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
page.setOrderBy("priority desc, create_time desc");
|
||||
List<PmDemandDto> records = this.baseMapper.queryPage(query);
|
||||
ResponseEntity<List<ZDInventory>> responseEntity = wmsToZDWmdService.queryInventory("");
|
||||
List<ZDInventory> zdInventorys = responseEntity.getBody();
|
||||
Map<String, BigDecimal> collect = zdInventorys.stream().collect(Collectors.toMap(
|
||||
ZDInventory::getSkuCode,
|
||||
ZDInventory::getQty
|
||||
));
|
||||
for (PmDemandDto record : records) {
|
||||
record.setLkInv(collect.get(record.getSkuCode()));
|
||||
}
|
||||
Page<PmDemandDto> dtoPage = new Page<>(page.getPageNum(), page.getPageSize(), page.getTotal());
|
||||
dtoPage.setRecords(records);
|
||||
return dtoPage;
|
||||
|
||||
@@ -501,8 +501,8 @@ public class ReceiveOutReturnServiceImpl extends ServiceImpl<ReceiveOutReturnMap
|
||||
if (!CollectionUtils.isEmpty(needDetail)){
|
||||
final ErpUtil login = ErpUtil.create().login();
|
||||
iReceiveOutReturnService.callEasByAllBill(entity, needDetail, now, login);
|
||||
this.refreshUploadResult(entity.getId());
|
||||
}
|
||||
this.refreshUploadResult(entity.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -105,6 +105,16 @@
|
||||
<el-table-column prop="targetArea" label="目标库存地点" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column prop="targetHouseCode" label="目标库" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column prop="inventoryDis" label="分配仓库" width="110" />
|
||||
<el-table-column prop="pkInv" label="平库库存" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.pkInv || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lkInv" label="立库库存" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.lkInv || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="carrierType" label="托盘类型" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column prop="productionLine" label="产线" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="sn" label="车辆序列号" min-width="140" show-overflow-tooltip />
|
||||
|
||||
Reference in New Issue
Block a user