add:需求单新增显示平库立库库存
This commit is contained in:
@@ -25,36 +25,37 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="queryPage" resultMap="DemandDtoMap">
|
<select id="queryPage" resultMap="DemandDtoMap">
|
||||||
select *
|
select d.*,g.qty pkInv
|
||||||
from pm_demand
|
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
|
where is_deleted = 0
|
||||||
<if test="query.id != null and query.id != ''">
|
<if test="query.id != null and query.id != ''">
|
||||||
and id = #{query.id}
|
and d.id = #{query.id}
|
||||||
</if>
|
</if>
|
||||||
<if test="query.creator != null and query.creator != ''">
|
<if test="query.creator != null and query.creator != ''">
|
||||||
and creator like concat('%', #{query.creator}, '%')
|
and d.creator like concat('%', #{query.creator}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="query.status != null">
|
<if test="query.status != null">
|
||||||
and status = #{query.status}
|
and d.status = #{query.status}
|
||||||
</if>
|
</if>
|
||||||
<if test="query.workOrder != null and query.workOrder != ''">
|
<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>
|
||||||
<if test="query.skuCode != null and query.skuCode != ''">
|
<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>
|
||||||
<if test="query.productionLine != null and query.productionLine != ''">
|
<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>
|
||||||
<if test="query.targetArea != null and query.targetArea != ''">
|
<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>
|
||||||
<if test="query.startTime != null and query.startTime != ''">
|
<if test="query.startTime != null and query.startTime != ''">
|
||||||
and create_time >= #{query.startTime}
|
and d.create_time >= #{query.startTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="query.endTime != null and query.endTime != ''">
|
<if test="query.endTime != null and query.endTime != ''">
|
||||||
and create_time <= #{query.endTime}
|
and d.create_time <= #{query.endTime}
|
||||||
</if>
|
</if>
|
||||||
order by priority desc, create_time desc
|
order by d.priority desc, d.create_time desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package org.nl.wms.pm_manage.demand.service.dto;
|
package org.nl.wms.pm_manage.demand.service.dto;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@@ -27,5 +26,7 @@ public class PmDemandDto implements Serializable {
|
|||||||
private String sn;
|
private String sn;
|
||||||
private String createAt;
|
private String createAt;
|
||||||
private String inventoryDis;
|
private String inventoryDis;
|
||||||
|
private BigDecimal pkInv;
|
||||||
|
private BigDecimal lkInv;
|
||||||
private Integer isDeleted;
|
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());
|
com.github.pagehelper.Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||||
page.setOrderBy("priority desc, create_time desc");
|
page.setOrderBy("priority desc, create_time desc");
|
||||||
List<PmDemandDto> records = this.baseMapper.queryPage(query);
|
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());
|
Page<PmDemandDto> dtoPage = new Page<>(page.getPageNum(), page.getPageSize(), page.getTotal());
|
||||||
dtoPage.setRecords(records);
|
dtoPage.setRecords(records);
|
||||||
return dtoPage;
|
return dtoPage;
|
||||||
|
|||||||
@@ -501,8 +501,8 @@ public class ReceiveOutReturnServiceImpl extends ServiceImpl<ReceiveOutReturnMap
|
|||||||
if (!CollectionUtils.isEmpty(needDetail)){
|
if (!CollectionUtils.isEmpty(needDetail)){
|
||||||
final ErpUtil login = ErpUtil.create().login();
|
final ErpUtil login = ErpUtil.create().login();
|
||||||
iReceiveOutReturnService.callEasByAllBill(entity, needDetail, now, 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="targetArea" label="目标库存地点" min-width="140" show-overflow-tooltip />
|
||||||
<el-table-column prop="targetHouseCode" 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="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="carrierType" label="托盘类型" min-width="140" show-overflow-tooltip />
|
||||||
<el-table-column prop="productionLine" label="产线" min-width="100" 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 />
|
<el-table-column prop="sn" label="车辆序列号" min-width="140" show-overflow-tooltip />
|
||||||
@@ -122,7 +132,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import crudDemand, {queryInventory, allocate, batchAllocate, push, batchAllcation} from './demand'
|
import crudDemand, { queryInventory, allocate, batchAllocate, push, batchAllcation } from './demand'
|
||||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||||
import crudOperation from '@crud/CRUD.operation.vue'
|
import crudOperation from '@crud/CRUD.operation.vue'
|
||||||
import udOperation from '@crud/UD.operation.vue'
|
import udOperation from '@crud/UD.operation.vue'
|
||||||
|
|||||||
Reference in New Issue
Block a user