feat: 出库分页
This commit is contained in:
@@ -345,5 +345,7 @@ public class StIvtIostorinv implements Serializable {
|
||||
|
||||
@TableField(exist = false)
|
||||
private String vbeln;
|
||||
@TableField(exist = false)
|
||||
private String plan_qty;
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import org.nl.wms.st.inbill.service.dto.ChargePageParam;
|
||||
import org.nl.wms.st.inbill.service.dto.InBillQueryPageParam;
|
||||
import org.nl.wms.st.inbill.service.dto.RawAssistIStorDto;
|
||||
import org.nl.wms.st.inbill.service.vo.WriteOffVo;
|
||||
import org.nl.wms.st.outbill.service.dto.OutBillQueryPageParam;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
@@ -77,4 +78,12 @@ public interface StIvtIostorinvMapper extends BaseMapper<StIvtIostorinv> {
|
||||
* @return
|
||||
*/
|
||||
IPage<StIvtIostorinv> inBillPage(IPage<StIvtIostorinv> pages, InBillQueryPageParam paramMap);
|
||||
|
||||
/**
|
||||
* 出库单分页查询
|
||||
* @param pages
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
IPage<StIvtIostorinv> outBillPage(IPage<StIvtIostorinv> pages, OutBillQueryPageParam paramMap);
|
||||
}
|
||||
|
||||
@@ -578,7 +578,7 @@
|
||||
AND ios.bill_type = #{paramMap.bill_type}
|
||||
</if>
|
||||
<if test="paramMap.bill_code != null and paramMap.bill_code != ''">
|
||||
and ios.bill_code LIKE '%${paramMap.bill_code}%'
|
||||
AND ios.bill_code LIKE '%${paramMap.bill_code}%'
|
||||
</if>
|
||||
<if test="paramMap.create_mode != null and paramMap.create_mode != ''">
|
||||
AND ios.create_mode = #{paramMap.create_mode}
|
||||
@@ -653,5 +653,212 @@
|
||||
dtl.iostorinv_id
|
||||
) dtl2 ON ios2.iostorinv_id = dtl2.iostorinv_id
|
||||
</select>
|
||||
<select id="outBillPage" resultType="org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv">
|
||||
SELECT
|
||||
ios.iostorinv_id,
|
||||
ios.bill_code,
|
||||
ios.io_type,
|
||||
ios.buss_type,
|
||||
ios.bill_type,
|
||||
ios.biz_date,
|
||||
ios.stor_id,
|
||||
ios.stor_code,
|
||||
ios.stor_name,
|
||||
ios.source_id,
|
||||
ios.source_name,
|
||||
ios.source_type,
|
||||
ios.total_qty,
|
||||
ios.total_weight,
|
||||
ios.detail_count,
|
||||
ios.bill_status,
|
||||
ios.remark,
|
||||
ios.create_mode,
|
||||
ios.input_optid,
|
||||
ios.input_optname,
|
||||
ios.input_time,
|
||||
ios.update_optid,
|
||||
ios.update_optname,
|
||||
ios.update_time,
|
||||
ios.dis_optid,
|
||||
ios.dis_optname,
|
||||
ios.dis_time,
|
||||
ios.confirm_optid,
|
||||
ios.confirm_optname,
|
||||
ios.confirm_time,
|
||||
ios.sysdeptid,
|
||||
ios.syscompanyid,
|
||||
ios.is_delete,
|
||||
ios.is_upload,
|
||||
ios.upload_optid,
|
||||
ios.upload_time,
|
||||
ios.is_writeoff,
|
||||
ios.writeoff_optid,
|
||||
ios.writeoff_time,
|
||||
ios.consignee,
|
||||
ios.receiver,
|
||||
ios.receiptaddress,
|
||||
ios.receiptphone,
|
||||
ios.logisticscompany,
|
||||
ios.drivername,
|
||||
ios.carno,
|
||||
ios.driverphone,
|
||||
ios.contractno,
|
||||
ios.deliveryunit,
|
||||
ios.deliveryaddress,
|
||||
ios.deliveryname,
|
||||
ios.deliveryphone,
|
||||
ios.trans_code,
|
||||
ios.estimated_freight,
|
||||
ios.cust_code,
|
||||
ios.out_stor_id,
|
||||
ios.upload_mes,
|
||||
ios.upload_sap,
|
||||
ios.run_freight,
|
||||
ios.unload_freight,
|
||||
ios.other_freight,
|
||||
ios.order_number,
|
||||
ios.car_type,
|
||||
ios.is_overdue,
|
||||
a.plan_qty,
|
||||
IFNULL(c.vbeln,'') as vbeln
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
mst.*,
|
||||
cu.shd_dtl_num,
|
||||
cu.cust_name,
|
||||
cu.cust_simple_name,
|
||||
attr.stor_name AS out_stor_name
|
||||
FROM
|
||||
st_ivt_iostorinv mst
|
||||
LEFT JOIN md_cs_customerbase cu ON mst.cust_code = cu.cust_code
|
||||
LEFT JOIN st_ivt_bsrealstorattr attr ON attr.stor_id = mst.out_stor_id
|
||||
WHERE
|
||||
mst.io_type = '1'
|
||||
and mst.is_delete='0'
|
||||
<if test="paramMap.in_stor_id != null and !paramMap.in_stor_id.isEmpty()">
|
||||
AND mst.stor_id IN
|
||||
<foreach collection="paramMap.in_stor_id" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="paramMap.bill_code != null and paramMap.bill_code != ''">
|
||||
AND mst.bill_code LIKE '%${paramMap.bill_code}%'
|
||||
</if>
|
||||
<if test="paramMap.cust_code != null and paramMap.cust_code != ''">
|
||||
AND (cu.cust_code LIKE '%${paramMap.cust_code}%'
|
||||
OR cu.cust_simple_name LIKE '%${paramMap.cust_code}%')
|
||||
</if>
|
||||
<if test="paramMap.is_upload != null and paramMap.is_upload != ''">
|
||||
AND mst.is_upload LIKE '%${paramMap.is_upload}%'
|
||||
</if>
|
||||
<if test="paramMap.bill_type != null and !paramMap.bill_type.isEmpty()">
|
||||
AND mst.bill_type IN
|
||||
<foreach collection="paramMap.bill_type" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="paramMap.stor_id != null and !paramMap.stor_id.isEmpty()">
|
||||
AND mst.stor_id IN
|
||||
<foreach collection="paramMap.stor_id" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="paramMap.create_mode != null and paramMap.create_mode != ''">
|
||||
AND mst.create_mode = #{paramMap.create_mode}
|
||||
</if>
|
||||
<if test="paramMap.bill_status != null and !paramMap.bill_status.isEmpty()">
|
||||
AND mst.bill_status IN
|
||||
<foreach collection="paramMap.bill_status" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="paramMap.begin_time != null and paramMap.begin_time != ''">
|
||||
AND mst.input_time <![CDATA[ >= ]]> #{paramMap.begin_time}
|
||||
</if>
|
||||
<if test="paramMap.end_time != null and paramMap.end_time != ''">
|
||||
AND mst.input_time <![CDATA[ <= ]]> #{paramMap.end_time}
|
||||
</if>
|
||||
) ios
|
||||
inner JOIN (
|
||||
select
|
||||
dtl.iostorinv_id,
|
||||
dtl.vbeln
|
||||
from
|
||||
st_ivt_iostorinvdtl dtl
|
||||
where 1=1
|
||||
<if test="paramMap.vbeln != null and paramMap.vbeln != ''">
|
||||
AND dtl.vbeln LIKE '%${paramMap.vbeln}%'
|
||||
</if>
|
||||
<if test="paramMap.vbeln_in != null and !paramMap.vbeln_in.isEmpty()">
|
||||
AND dtl.vbeln IN
|
||||
<foreach collection="paramMap.vbeln_in" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="paramMap.width != null and paramMap.width != ''">
|
||||
AND dtl.width LIKE '%${paramMap.width}%'
|
||||
</if>
|
||||
GROUP BY
|
||||
dtl.iostorinv_id,
|
||||
dtl.vbeln
|
||||
) c ON ios.iostorinv_id = c.iostorinv_id
|
||||
|
||||
<if test="paramMap.flag != null and paramMap.flag != ''">
|
||||
inner JOIN (
|
||||
SELECT
|
||||
dis.iostorinv_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
LEFT JOIN pdm_bi_subpackagerelationrecord sub ON (sub.container_name = dis.pcsn AND dis.box_no =
|
||||
sub.package_box_sn AND dis.iostorinv_id = sub.bill_id)
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="paramMap.pcsn != null and paramMap.pcsn != ''">
|
||||
AND dis.pcsn LIKE '%${paramMap.pcsn}%'
|
||||
</if>
|
||||
<if test="paramMap.pcsn_in != null and !paramMap.pcsn_in.isEmpty()">
|
||||
AND dis.pcsn IN
|
||||
<foreach collection="paramMap.pcsn_in" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="paramMap.box_no != null and paramMap.box_no != ''">
|
||||
AND dis.box_no LIKE '%${paramMap.box_no}%'
|
||||
</if>
|
||||
<if test="paramMap.box_no_in != null and !paramMap.box_no_in.isEmpty()">
|
||||
AND dis.box_no IN
|
||||
<foreach collection="paramMap.box_no_in" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="paramMap.sap_pcsn != null and paramMap.sap_pcsn != ''">
|
||||
AND sub.sap_pcsn LIKE '%${paramMap.sap_pcsn}%'
|
||||
</if>
|
||||
<if test="paramMap.sap_pcsn_in != null and !paramMap.sap_pcsn_in.isEmpty()">
|
||||
AND sub.sap_pcsn IN
|
||||
<foreach collection="paramMap.sap_pcsn_in" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY
|
||||
dis.iostorinv_id
|
||||
) b ON b.iostorinv_id = ios.iostorinv_id
|
||||
</if>
|
||||
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
SUM(a.plan_qty) AS plan_qty,
|
||||
a.iostorinv_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis a
|
||||
LEFT JOIN ST_IVT_IOStorInv b ON a.iostorinv_id = b.iostorinv_id
|
||||
WHERE
|
||||
b.io_type = '1'
|
||||
and b.is_delete='0'
|
||||
and b.is_overdue = '0'
|
||||
GROUP BY a.iostorinv_id
|
||||
) a ON a.iostorinv_id = ios.iostorinv_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -1,18 +1,24 @@
|
||||
package org.nl.wms.st.outbill.rest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.nl.system.service.dict.ISysDictService;
|
||||
import org.nl.wms.st.outbill.service.CheckOutBillService;
|
||||
import org.nl.wms.st.outbill.service.dto.OutBillDtlQueryParam;
|
||||
import org.nl.wms.st.outbill.service.dto.OutBillQueryPageParam;
|
||||
import org.nl.wms.st.outbill.service.dto.OutBillTaskParam;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 出库单管理
|
||||
* @Author: lyd
|
||||
* @Date: 2025/6/11
|
||||
*/
|
||||
@@ -24,6 +30,12 @@ public class CheckOutBillController {
|
||||
private CheckOutBillService checkOutBillService;
|
||||
@Resource
|
||||
private ISysDictService dictService;
|
||||
@GetMapping
|
||||
@Log("查询出库单")
|
||||
//@PreAuthorize("@el.check('checkoutbill:list')")
|
||||
public ResponseEntity<Object> query(OutBillQueryPageParam paramMap, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(checkOutBillService.queryOutBillPage(paramMap, page)), HttpStatus.OK);
|
||||
}
|
||||
@GetMapping("/getOutBillDtl")
|
||||
@Log("查询出库明细")
|
||||
public ResponseEntity<Object> getOutBillDtl(OutBillDtlQueryParam param) {
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package org.nl.wms.st.outbill.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.st.outbill.service.dto.OutBillDtlQueryParam;
|
||||
import org.nl.wms.st.outbill.service.dto.OutBillQueryPageParam;
|
||||
import org.nl.wms.st.outbill.service.dto.OutBillTaskParam;
|
||||
import org.nl.wms.st.outbill.service.vo.OutBillDtlVo;
|
||||
import org.nl.wms.st.outbill.service.vo.OutBillTaskVo;
|
||||
@@ -25,4 +29,6 @@ public interface CheckOutBillService {
|
||||
* @return
|
||||
*/
|
||||
List<OutBillTaskVo> getOutBillTask2(OutBillTaskParam param);
|
||||
|
||||
IPage<StIvtIostorinv> queryOutBillPage(OutBillQueryPageParam paramMap, PageQuery page);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package org.nl.wms.st.outbill.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Date: 2025/6/18
|
||||
*/
|
||||
@Data
|
||||
public class OutBillQueryPageParam implements Serializable {
|
||||
private String bill_code;
|
||||
private List<String> stor_id;
|
||||
private List<String> bill_status;
|
||||
private List<String> bill_type;
|
||||
private String vbeln;
|
||||
private List<String> vbeln_in;
|
||||
private String box_no;
|
||||
private List<String> box_no_in;
|
||||
private String pcsn;
|
||||
private List<String> pcsn_in;
|
||||
private String sap_pcsn;
|
||||
private List<String> sap_pcsn_in;
|
||||
private List<String> in_stor_id;
|
||||
private String cust_code;
|
||||
private String width;
|
||||
private String is_upload;
|
||||
private String begin_time;
|
||||
private String end_time;
|
||||
private String create_mode;
|
||||
private String flag;
|
||||
}
|
||||
@@ -1,10 +1,20 @@
|
||||
package org.nl.wms.st.outbill.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvdisService;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvdtlService;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper.StIvtIostorinvMapper;
|
||||
import org.nl.b_lms.storage_manage.st.service.StIvtBsrealstorattrService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.common.utils.StringDealUtils;
|
||||
import org.nl.wms.st.outbill.service.CheckOutBillService;
|
||||
import org.nl.wms.st.outbill.service.dto.OutBillDtlQueryParam;
|
||||
import org.nl.wms.st.outbill.service.dto.OutBillQueryPageParam;
|
||||
import org.nl.wms.st.outbill.service.dto.OutBillTaskParam;
|
||||
import org.nl.wms.st.outbill.service.vo.OutBillDtlVo;
|
||||
import org.nl.wms.st.outbill.service.vo.OutBillTaskVo;
|
||||
@@ -24,6 +34,10 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
private IStIvtIostorinvdtlService iostorinvdtlService;
|
||||
@Autowired
|
||||
private IStIvtIostorinvdisService iostorinvdisService;
|
||||
@Autowired
|
||||
private StIvtBsrealstorattrService bsrealstorattrService;
|
||||
@Autowired
|
||||
private StIvtIostorinvMapper stIvtIostorinvMapper;
|
||||
@Override
|
||||
public List<OutBillDtlVo> getOutBillDtl(OutBillDtlQueryParam param) {
|
||||
return iostorinvdtlService.getOutBillDtl(param);
|
||||
@@ -33,4 +47,33 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
public List<OutBillTaskVo> getOutBillTask2(OutBillTaskParam param) {
|
||||
return iostorinvdisService.getOutBillTask2(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<StIvtIostorinv> queryOutBillPage(OutBillQueryPageParam paramMap, PageQuery page) {
|
||||
paramMap.setPcsn_in(StringDealUtils.splitString(paramMap.getPcsn()));
|
||||
paramMap.setBox_no_in(StringDealUtils.splitString(paramMap.getBox_no()));
|
||||
paramMap.setSap_pcsn_in(StringDealUtils.splitString(paramMap.getSap_pcsn()));
|
||||
paramMap.setVbeln_in(StringDealUtils.splitString(paramMap.getVbeln()));
|
||||
if (CollectionUtil.isNotEmpty(paramMap.getPcsn_in())) {
|
||||
paramMap.setPcsn("");
|
||||
paramMap.setFlag("1");
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(paramMap.getBox_no_in())) {
|
||||
paramMap.setBox_no("");
|
||||
paramMap.setFlag("1");
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(paramMap.getSap_pcsn_in())) {
|
||||
paramMap.setSap_pcsn("");
|
||||
paramMap.setFlag("1");
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(paramMap.getVbeln_in())) {
|
||||
paramMap.setVbeln("");
|
||||
paramMap.setFlag("1");
|
||||
}
|
||||
//获取人员对应的仓库
|
||||
List<String> storIds = bsrealstorattrService.getStoreForUser(SecurityUtils.getCurrentUserId());
|
||||
paramMap.setIn_stor_id(storIds);
|
||||
IPage<StIvtIostorinv> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
return stIvtIostorinvMapper.outBillPage(pages, paramMap);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableDtl"
|
||||
v-loading="loading"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
size="mini"
|
||||
@@ -126,6 +127,7 @@
|
||||
<el-table
|
||||
ref="table2"
|
||||
:data="tabledis"
|
||||
v-loading="loading2"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
size="mini"
|
||||
@@ -172,6 +174,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
loading2: false,
|
||||
loading: true,
|
||||
tableDtl: [],
|
||||
tabledis: [],
|
||||
billtypelist: [],
|
||||
@@ -212,6 +216,8 @@ export default {
|
||||
this.tableDtl = []
|
||||
this.tabledis = []
|
||||
this.$emit('TaskChanged')
|
||||
this.loading = true
|
||||
this.loading2 = false
|
||||
},
|
||||
bill_statusFormat(row) {
|
||||
return this.dict.label.io_bill_status[row.bill_status]
|
||||
@@ -229,6 +235,7 @@ export default {
|
||||
if (current !== null) {
|
||||
this.tabledis = []
|
||||
this.currentdtl = current
|
||||
this.loading2 = true
|
||||
this.queryTableDdis()
|
||||
} else {
|
||||
this.tabledis = []
|
||||
@@ -248,14 +255,17 @@ export default {
|
||||
queryTableDtl() {
|
||||
checkoutbill.getOutBillDtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
||||
this.tableDtl = res
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
queryTableDdis() {
|
||||
if (this.currentdtl !== null) {
|
||||
checkoutbill.getOutBillTask({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
|
||||
checkoutbill.getOutBillTask2({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
|
||||
this.tabledis = res
|
||||
}).catch(() => {
|
||||
this.tabledis = []
|
||||
}).finally(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 出库管理 -->
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
|
||||
Reference in New Issue
Block a user