opt:提交盘点功能优化
This commit is contained in:
@@ -6,6 +6,7 @@ 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.wms.st.instor.check.service.dto.QueryPageParam;
|
||||
import org.nl.wms.st.instor.service.CheckService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -33,8 +34,8 @@ public class CheckController {
|
||||
|
||||
@GetMapping("/getDtlView")
|
||||
@Log("查询盘点单明细详情")
|
||||
public ResponseEntity<Object> getDtlView(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(checkService.getDtlView(whereJson, page), HttpStatus.OK);
|
||||
public ResponseEntity<Object> getDtlView(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(checkService.getDtlView(whereJson, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getExceptionDispose")
|
||||
@@ -78,8 +79,8 @@ public class CheckController {
|
||||
|
||||
@GetMapping("/getStructIvt")
|
||||
@Log("查询可盘点库存")
|
||||
public ResponseEntity<Object> getStructIvt(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(checkService.getStructIvt(whereJson, page), HttpStatus.OK);
|
||||
public ResponseEntity<Object> getStructIvt(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(checkService.getStructIvt(whereJson, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/confirm")
|
||||
|
||||
@@ -167,6 +167,16 @@ public class StIvtCheckdtl implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private String material_name;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String struct_code;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String sect_code;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String process_optname;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String date_of_production;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,9 +3,13 @@ package org.nl.wms.st.instor.check.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||
import org.nl.wms.st.instor.check.service.dao.StIvtCheckMst;
|
||||
import org.nl.wms.st.instor.check.service.dao.StIvtCheckdtl;
|
||||
import org.nl.wms.st.instor.check.service.dto.CheckStructIvt;
|
||||
import org.nl.wms.st.instor.check.service.dto.QueryPageParam;
|
||||
import org.nl.wms.st.outbill.service.dto.OutBillQueryPageParam;
|
||||
|
||||
import java.util.List;
|
||||
@@ -23,4 +27,16 @@ public interface StIvtCheckMstMapper extends BaseMapper<StIvtCheckMst> {
|
||||
List<String> recordQuery(List<String> ids);
|
||||
|
||||
IPage<StIvtCheckdtl> getExceptionDispose(IPage<StIvtIostorinv> pages, OutBillQueryPageParam paramMap);
|
||||
|
||||
List<StIvtCheckdtl> getOutBillDtl2(@Param("paramMap") QueryPageParam paramMap);
|
||||
|
||||
IPage<PdmBiSubpackagerelation> getDtlView(IPage<PdmBiSubpackagerelation> pages, @Param("paramMap") QueryPageParam paramMap);
|
||||
|
||||
IPage<CheckStructIvt> getStructIvt(IPage<CheckStructIvt> pages, @Param("paramMap") QueryPageParam paramMap);
|
||||
|
||||
List<StIvtCheckdtl> getOutBillDtl22(@Param("paramMap") QueryPageParam paramMap);
|
||||
|
||||
List<StIvtCheckdtl> getOutBillDtl222(@Param("paramMap") QueryPageParam paramMap);
|
||||
|
||||
List<StIvtCheckdtl> getOutBillDtl(@Param("paramMap") QueryPageParam paramMap);
|
||||
}
|
||||
|
||||
@@ -36,4 +36,301 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getOutBillDtl2" resultType="org.nl.wms.st.instor.check.service.dao.StIvtCheckdtl" >
|
||||
SELECT
|
||||
CheckDtl.checkdtl_id,
|
||||
CheckDtl.check_id,
|
||||
CheckDtl.check_code,
|
||||
CheckDtl.seq_no,
|
||||
CheckDtl.sect_id,
|
||||
CheckDtl.sect_name,
|
||||
CheckDtl.struct_id,
|
||||
CheckDtl.struct_name,
|
||||
CheckDtl.checkpoint_id,
|
||||
CheckDtl.storagevehicle_id,
|
||||
CheckDtl.storagevehicle_code,
|
||||
CheckDtl.material_id,
|
||||
ROUND(CheckDtl.base_qty,3) AS base_qty,
|
||||
CheckDtl.qty_unit_id,
|
||||
CheckDtl.qty_unit_name,
|
||||
CheckDtl.STATUS,
|
||||
CheckDtl.is_down,
|
||||
CheckDtl.fac_qty,
|
||||
CheckDtl.check_result,
|
||||
CheckDtl.check_optid,
|
||||
CheckDtl.check_optname,
|
||||
CheckDtl.check_time,
|
||||
CheckDtl.is_process,
|
||||
CheckDtl.process_type,
|
||||
CheckDtl.process_optid,
|
||||
CheckDtl.process_time,
|
||||
CheckDtl.remark,
|
||||
struct.struct_code,
|
||||
struct.sect_code,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
user1.person_name AS process_optname
|
||||
FROM
|
||||
ST_IVT_CheckDtl CheckDtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = CheckDtl.material_id
|
||||
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = CheckDtl.struct_id
|
||||
LEFT JOIN sys_user user1 ON user1.user_id = CheckDtl.process_optid
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="paramMap.check_id != null and paramMap.check_id !=''">
|
||||
AND CheckDtl.check_id = #{paramMap.check_id}
|
||||
</if>
|
||||
<if test="paramMap.checkdtl_id != null and paramMap.checkdtl_id !=''">
|
||||
AND CheckDtl.checkdtl_id = #{paramMap.checkdtl_id}
|
||||
</if>
|
||||
<if test="paramMap.status != null and paramMap.status !=''">
|
||||
AND CheckDtl.status <![CDATA[ <= ]]> #{paramMap.status}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getDtlView" resultType="org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation">
|
||||
SELECT
|
||||
sub.*
|
||||
FROM
|
||||
st_ivt_structivt ivt
|
||||
LEFT JOIN st_ivt_structattr attr ON ivt.struct_id = attr.struct_id
|
||||
LEFT JOIN pdm_bi_subpackagerelation sub ON ivt.pcsn = sub.container_name AND sub.package_box_sn = attr.storagevehicle_code
|
||||
WHERE
|
||||
1=1
|
||||
<if test="paramMap.pcsn != null and paramMap.pcsn !=''">
|
||||
AND ivt.pcsn like '%${paramMap.pcsn}%'
|
||||
</if>
|
||||
<if test="paramMap.sap_pcsn != null and paramMap.sap_pcsn !=''">
|
||||
AND sub.sap_pcsn like '%${paramMap.sap_pcsn}%'
|
||||
</if>
|
||||
<if test="paramMap.box_no != null and paramMap.box_no !=''">
|
||||
AND sub.package_box_sn = #{paramMap.box_no}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getStructIvt" resultType="org.nl.wms.st.instor.check.service.dto.CheckStructIvt">
|
||||
SELECT
|
||||
struct.sect_id,
|
||||
MAX(struct.sect_code) AS sect_code,
|
||||
MAX(struct.sect_name) AS sect_name,
|
||||
MAX(struct.struct_id) AS struct_id,
|
||||
MAX(struct.struct_code) AS struct_code,
|
||||
MAX(struct.struct_name) AS struct_name,
|
||||
MAX(struct.storagevehicle_code) AS storagevehicle_code,
|
||||
MAX(mb.material_id) AS material_id,
|
||||
MAX(mb.material_name) AS material_name,
|
||||
MAX(mb.material_code) AS material_code,
|
||||
'1' AS base_qty,
|
||||
'0' AS fac_qty,
|
||||
'箱' AS qty_unit_name,
|
||||
'1585604690706567168' AS measure_unit_id
|
||||
FROM
|
||||
st_ivt_structivt ivt
|
||||
LEFT JOIN st_ivt_structattr struct ON ivt.struct_id = struct.struct_id
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = ivt.material_id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND struct.lock_type = '1'
|
||||
AND IFNULL(struct.storagevehicle_code,'') <![CDATA[ <> ]]> ''
|
||||
|
||||
<if test="paramMap.struct_code != null and paramMap.struct_code !=''">
|
||||
AND struct.struct_code like '%${paramMap.struct_code}%'
|
||||
</if>
|
||||
<if test="paramMap.remark != null and paramMap.remark !=''">
|
||||
AND (mb.material_code like '%${paramMap.remark}%' OR mb.material_name like '%${paramMap.remark}%')
|
||||
</if>
|
||||
<if test="paramMap.box_no != null and paramMap.box_no !=''">
|
||||
AND struct.storagevehicle_code = #{paramMap.box_no}
|
||||
</if>
|
||||
<if test="paramMap.stor_id != null and paramMap.stor_id !=''">
|
||||
AND struct.stor_id = #{paramMap.stor_id}
|
||||
</if>
|
||||
<if test="paramMap.sect_id != null and paramMap.sect_id !=''">
|
||||
AND struct.sect_id = #{paramMap.sect_id}
|
||||
</if>
|
||||
group by ivt.struct_id
|
||||
</select>
|
||||
|
||||
<select id="getOutBillDtl22" resultType="org.nl.wms.st.instor.check.service.dao.StIvtCheckdtl">
|
||||
SELECT
|
||||
CheckDtl.checkdtl_id,
|
||||
CheckDtl.check_id,
|
||||
CheckDtl.check_code,
|
||||
CheckDtl.seq_no,
|
||||
CheckDtl.sect_id,
|
||||
CheckDtl.sect_name,
|
||||
CheckDtl.struct_id,
|
||||
CheckDtl.struct_name,
|
||||
CheckDtl.checkpoint_id,
|
||||
CheckDtl.storagevehicle_id,
|
||||
CheckDtl.storagevehicle_code,
|
||||
CheckDtl.material_id,
|
||||
ROUND(CheckDtl.base_qty,3) AS base_qty,
|
||||
CheckDtl.qty_unit_id,
|
||||
CheckDtl.qty_unit_name,
|
||||
CheckDtl.STATUS,
|
||||
CheckDtl.is_down,
|
||||
CheckDtl.fac_qty,
|
||||
CheckDtl.check_result,
|
||||
CheckDtl.check_optid,
|
||||
CheckDtl.check_optname,
|
||||
CheckDtl.check_time,
|
||||
CheckDtl.is_process,
|
||||
CheckDtl.process_type,
|
||||
CheckDtl.process_optid,
|
||||
CheckDtl.process_time,
|
||||
CheckDtl.remark,
|
||||
struct.struct_code,
|
||||
struct.sect_code,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
user1.person_name AS process_optname,
|
||||
sub.date_of_production
|
||||
FROM
|
||||
ST_IVT_CheckDtl CheckDtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = CheckDtl.material_id
|
||||
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = CheckDtl.struct_id
|
||||
LEFT JOIN sys_user user1 ON user1.user_id = CheckDtl.process_optid
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
MIN(date_of_production) AS date_of_production,
|
||||
package_box_sn
|
||||
FROM
|
||||
pdm_bi_subpackagerelation
|
||||
WHERE
|
||||
1=1
|
||||
group by package_box_sn
|
||||
) sub ON sub.package_box_sn = CheckDtl.storagevehicle_code
|
||||
WHERE
|
||||
CheckDtl.status <![CDATA[ <> ]]> '1'
|
||||
|
||||
<if test="paramMap.check_id != null and paramMap.check_id !=''">
|
||||
AND CheckDtl.check_id = #{paramMap.check_id}
|
||||
</if>
|
||||
order by CheckDtl.seq_no
|
||||
</select>
|
||||
|
||||
<select id="getOutBillDtl222" resultType="org.nl.wms.st.instor.check.service.dao.StIvtCheckdtl">
|
||||
SELECT
|
||||
CheckDtl.checkdtl_id,
|
||||
CheckDtl.check_id,
|
||||
CheckDtl.check_code,
|
||||
CheckDtl.seq_no,
|
||||
CheckDtl.sect_id,
|
||||
CheckDtl.sect_name,
|
||||
CheckDtl.struct_id,
|
||||
CheckDtl.struct_name,
|
||||
CheckDtl.checkpoint_id,
|
||||
CheckDtl.storagevehicle_id,
|
||||
CheckDtl.storagevehicle_code,
|
||||
CheckDtl.material_id,
|
||||
ROUND(CheckDtl.base_qty,3) AS base_qty,
|
||||
CheckDtl.qty_unit_id,
|
||||
CheckDtl.qty_unit_name,
|
||||
CheckDtl.STATUS,
|
||||
CheckDtl.is_down,
|
||||
CheckDtl.fac_qty,
|
||||
CheckDtl.check_result,
|
||||
CheckDtl.check_optid,
|
||||
CheckDtl.check_optname,
|
||||
CheckDtl.check_time,
|
||||
CheckDtl.is_process,
|
||||
CheckDtl.process_type,
|
||||
CheckDtl.process_optid,
|
||||
CheckDtl.process_time,
|
||||
CheckDtl.remark,
|
||||
struct.struct_code,
|
||||
struct.sect_code,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
user1.person_name AS process_optname,
|
||||
sub.date_of_production
|
||||
FROM
|
||||
ST_IVT_CheckDtl CheckDtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = CheckDtl.material_id
|
||||
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = CheckDtl.struct_id
|
||||
LEFT JOIN sys_user user1 ON user1.user_id = CheckDtl.process_optid
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
MIN(date_of_production) AS date_of_production,
|
||||
package_box_sn
|
||||
FROM
|
||||
pdm_bi_subpackagerelation
|
||||
WHERE
|
||||
1=1
|
||||
group by package_box_sn
|
||||
) sub ON sub.package_box_sn = CheckDtl.storagevehicle_code
|
||||
WHERE
|
||||
CheckDtl.status = '1'
|
||||
<if test="paramMap.check_id != null and paramMap.check_id !=''">
|
||||
AND CheckDtl.check_id = #{paramMap.check_id}
|
||||
</if>
|
||||
order by CheckDtl.seq_no
|
||||
</select>
|
||||
|
||||
<select id="getOutBillDtl" resultType="org.nl.wms.st.instor.check.service.dao.StIvtCheckdtl">
|
||||
SELECT
|
||||
CheckDtl.checkdtl_id,
|
||||
CheckDtl.check_id,
|
||||
CheckDtl.check_code,
|
||||
CheckDtl.seq_no,
|
||||
CheckDtl.sect_id,
|
||||
CheckDtl.sect_name,
|
||||
CheckDtl.struct_id,
|
||||
CheckDtl.struct_name,
|
||||
CheckDtl.checkpoint_id,
|
||||
CheckDtl.storagevehicle_id,
|
||||
CheckDtl.storagevehicle_code,
|
||||
CheckDtl.material_id,
|
||||
ROUND(CheckDtl.base_qty,3) AS base_qty,
|
||||
CheckDtl.qty_unit_id,
|
||||
CheckDtl.qty_unit_name,
|
||||
CheckDtl.STATUS,
|
||||
CheckDtl.is_down,
|
||||
CheckDtl.fac_qty,
|
||||
CheckDtl.check_result,
|
||||
CheckDtl.check_optid,
|
||||
CheckDtl.check_optname,
|
||||
CheckDtl.check_time,
|
||||
CheckDtl.is_process,
|
||||
CheckDtl.process_type,
|
||||
CheckDtl.process_optid,
|
||||
CheckDtl.process_time,
|
||||
CheckDtl.remark,
|
||||
struct.struct_code,
|
||||
struct.sect_code,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
user1.person_name AS process_optname,
|
||||
sub.date_of_production
|
||||
FROM
|
||||
ST_IVT_CheckDtl CheckDtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = CheckDtl.material_id
|
||||
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = CheckDtl.struct_id
|
||||
LEFT JOIN sys_user user1 ON user1.user_id = CheckDtl.process_optid
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
MIN(date_of_production) AS date_of_production,
|
||||
package_box_sn
|
||||
FROM
|
||||
pdm_bi_subpackagerelation
|
||||
WHERE
|
||||
1=1
|
||||
group by package_box_sn
|
||||
) sub ON sub.package_box_sn = CheckDtl.storagevehicle_code
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="paramMap.check_id != null and paramMap.check_id !=''">
|
||||
AND CheckDtl.check_id = #{paramMap.check_id}
|
||||
</if>
|
||||
<if test="paramMap.checkdtl_id != null and paramMap.checkdtl_id !=''">
|
||||
AND CheckDtl.checkdtl_id = #{paramMap.checkdtl_id}
|
||||
</if>
|
||||
<if test="paramMap.status != null and paramMap.status !=''">
|
||||
AND CheckDtl.status <![CDATA[ <= ]]> #{paramMap.status}
|
||||
</if>
|
||||
order by CheckDtl.seq_no
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
package org.nl.wms.st.instor.check.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 出库任务分配明细
|
||||
*
|
||||
* @Author: lyd
|
||||
* @Date: 2025/7/4
|
||||
*/
|
||||
@Data
|
||||
public class CheckStructIvt implements Serializable {
|
||||
private String sect_id;
|
||||
|
||||
/**
|
||||
* 出入单标识
|
||||
*/
|
||||
private String sect_code;
|
||||
|
||||
/**
|
||||
* 出入单明细标识
|
||||
*/
|
||||
private String sect_name;
|
||||
|
||||
/**
|
||||
* 库区标识
|
||||
*/
|
||||
private String struct_id;
|
||||
|
||||
/**
|
||||
* 库区编码
|
||||
*/
|
||||
private String struct_code;
|
||||
|
||||
/**
|
||||
* 库区名称
|
||||
*/
|
||||
private String struct_name;
|
||||
|
||||
/**
|
||||
* 仓位标识
|
||||
*/
|
||||
private String storagevehicle_code;
|
||||
|
||||
/**
|
||||
* 仓位编码
|
||||
*/
|
||||
private String material_id;
|
||||
|
||||
/**
|
||||
* 仓位名称
|
||||
*/
|
||||
private String material_name;
|
||||
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private String material_code;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String measure_unit_id;
|
||||
|
||||
/**
|
||||
* 品质类型
|
||||
*/
|
||||
private String qty_unit_name;
|
||||
|
||||
/**
|
||||
* 计划数量
|
||||
*/
|
||||
private BigDecimal base_qty;
|
||||
|
||||
/**
|
||||
* 实际数量
|
||||
*/
|
||||
private BigDecimal fac_qty;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package org.nl.wms.st.instor.check.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Date: 2025/6/18
|
||||
*/
|
||||
@Data
|
||||
public class QueryPageParam implements Serializable {
|
||||
private String check_id;
|
||||
private String checkdtl_id;
|
||||
private String status;
|
||||
|
||||
private String box_no;
|
||||
|
||||
|
||||
private String pcsn;
|
||||
|
||||
private String sap_pcsn;
|
||||
|
||||
private String struct_code;
|
||||
|
||||
private String remark;
|
||||
|
||||
private String stor_id;
|
||||
|
||||
private String sect_id;
|
||||
}
|
||||
@@ -4,13 +4,16 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.st.instor.check.service.dao.StIvtCheckMst;
|
||||
import org.nl.wms.st.instor.check.service.dao.StIvtCheckdtl;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.nl.wms.st.instor.check.service.dto.CheckStructIvt;
|
||||
import org.nl.wms.st.instor.check.service.dto.QueryPageParam;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface CheckService extends IService<StIvtCheckMst> {
|
||||
@@ -30,7 +33,7 @@ public interface CheckService extends IService<StIvtCheckMst> {
|
||||
* @param page 分页参数
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> getDtlView(Map whereJson, Pageable page);
|
||||
IPage<PdmBiSubpackagerelation> getDtlView(Map whereJson, PageQuery page);
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
@@ -61,9 +64,9 @@ public interface CheckService extends IService<StIvtCheckMst> {
|
||||
* @param whereJson /
|
||||
* @return
|
||||
*/
|
||||
JSONArray getOutBillDtl(Map whereJson);
|
||||
List<StIvtCheckdtl> getOutBillDtl(Map whereJson);
|
||||
|
||||
JSONArray getOutBillDtl2(Map whereJson);
|
||||
List<StIvtCheckdtl> getOutBillDtl2(Map whereJson);
|
||||
|
||||
/**
|
||||
* 修改出库单
|
||||
@@ -78,7 +81,7 @@ public interface CheckService extends IService<StIvtCheckMst> {
|
||||
* @param whereJson /
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getStructIvt(Map whereJson, Pageable page);
|
||||
IPage<CheckStructIvt> getStructIvt(Map whereJson, PageQuery page);
|
||||
|
||||
/**
|
||||
* 出库单强制确认
|
||||
@@ -102,7 +105,7 @@ public interface CheckService extends IService<StIvtCheckMst> {
|
||||
* @param response
|
||||
* @throws IOException
|
||||
*/
|
||||
void download(JSONArray rows, HttpServletResponse response) throws IOException;
|
||||
void download( List<StIvtCheckdtl> rows, HttpServletResponse response) throws IOException;
|
||||
|
||||
/**
|
||||
* 处理确认
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.nl.wms.st.instor.service.impl;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
@@ -12,10 +13,10 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.b_lms.sch.tasks.slitter.constant.SlitterConstant;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
@@ -24,15 +25,15 @@ import org.nl.modules.common.utils.FileUtil;
|
||||
import org.nl.common.utils.CodeUtil;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
||||
import org.nl.wms.st.instor.check.service.dao.StIvtCheckMst;
|
||||
import org.nl.wms.st.instor.check.service.dao.StIvtCheckdtl;
|
||||
import org.nl.wms.st.instor.check.service.dao.mapper.StIvtCheckMstMapper;
|
||||
import org.nl.wms.st.instor.check.service.dao.mapper.StIvtCheckdtlMapper;
|
||||
import org.nl.wms.st.instor.check.service.dto.CheckStructIvt;
|
||||
import org.nl.wms.st.instor.check.service.dto.QueryPageParam;
|
||||
import org.nl.wms.st.instor.service.CheckService;
|
||||
import org.nl.wms.st.outbill.service.dto.OutBillQueryPageParam;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import javax.annotation.Resource;
|
||||
@@ -95,25 +96,18 @@ public class CheckServiceImpl extends ServiceImpl<StIvtCheckMstMapper, StIvtChec
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getDtlView(Map whereJson, Pageable page) {
|
||||
public IPage<PdmBiSubpackagerelation> getDtlView(Map whereJson, PageQuery page) {
|
||||
String box_no = MapUtil.getStr(whereJson, "box_no");
|
||||
String pcsn = MapUtil.getStr(whereJson, "pcsn");
|
||||
String sap_pcsn = MapUtil.getStr(whereJson, "sap_pcsn");
|
||||
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("box_no", box_no);
|
||||
map.put("flag", "9");
|
||||
QueryPageParam param = new QueryPageParam();
|
||||
param.setBox_no(box_no);
|
||||
param.setPcsn(pcsn);
|
||||
param.setSap_pcsn(sap_pcsn);
|
||||
IPage<PdmBiSubpackagerelation> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
return stIvtCheckMstMapper.getDtlView(pages, param);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(pcsn)) {
|
||||
map.put("pcsn", "%" + pcsn + "%");
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(sap_pcsn)) {
|
||||
map.put("sap_pcsn", "%" + sap_pcsn + "%");
|
||||
}
|
||||
|
||||
JSONObject json = WQL.getWO("QST_IVT_CHECK").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "sub.container_name ASC");
|
||||
|
||||
return json;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -204,38 +198,38 @@ public class CheckServiceImpl extends ServiceImpl<StIvtCheckMstMapper, StIvtChec
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray getOutBillDtl(Map whereJson) {
|
||||
public List<StIvtCheckdtl> getOutBillDtl(Map whereJson) {
|
||||
String type = MapUtil.getStr(whereJson, "type");
|
||||
|
||||
JSONArray jo = new JSONArray();
|
||||
QueryPageParam param = new QueryPageParam();
|
||||
if (ObjectUtil.isNotEmpty(type)) {
|
||||
if (StrUtil.equals(type, "1")) {
|
||||
// 1-已盘点
|
||||
whereJson.put("flag", "22");
|
||||
jo = WQL.getWO("QST_IVT_CHECK").addParamMap((HashMap) whereJson).process().getResultJSONArray(0);
|
||||
String check_id = MapUtil.getStr(whereJson, "check_id");
|
||||
param.setCheck_id(check_id);
|
||||
return stIvtCheckMstMapper.getOutBillDtl22(param);
|
||||
} else {
|
||||
// 1-未盘点
|
||||
whereJson.put("flag", "222");
|
||||
jo = WQL.getWO("QST_IVT_CHECK").addParamMap((HashMap) whereJson).process().getResultJSONArray(0);
|
||||
String check_id = MapUtil.getStr(whereJson, "check_id");
|
||||
param.setCheck_id(check_id);
|
||||
return stIvtCheckMstMapper.getOutBillDtl222(param);
|
||||
}
|
||||
} else {
|
||||
whereJson.put("flag", "2");
|
||||
jo = WQL.getWO("QST_IVT_CHECK")
|
||||
.addParamMap((HashMap) whereJson)
|
||||
.process()
|
||||
.getResultJSONArray(0);
|
||||
String check_id = MapUtil.getStr(whereJson, "check_id");
|
||||
String checkdtl_id = MapUtil.getStr(whereJson, "checkdtl_id");
|
||||
String status = MapUtil.getStr(whereJson, "status");
|
||||
param.setCheck_id(check_id);
|
||||
param.setStatus(status);
|
||||
param.setCheckdtl_id(checkdtl_id);
|
||||
return stIvtCheckMstMapper.getOutBillDtl(param);
|
||||
}
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray getOutBillDtl2(Map whereJson) {
|
||||
whereJson.put("flag", "8");
|
||||
JSONArray jo = WQL.getWO("QST_IVT_CHECK")
|
||||
.addParamMap((HashMap) whereJson)
|
||||
.process()
|
||||
.getResultJSONArray(0);
|
||||
return jo;
|
||||
public List<StIvtCheckdtl> getOutBillDtl2(Map whereJson) {
|
||||
ObjectMapper Om = new ObjectMapper();
|
||||
QueryPageParam param = Om.convertValue(whereJson,QueryPageParam.class);
|
||||
return stIvtCheckMstMapper.getOutBillDtl2(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -286,21 +280,23 @@ public class CheckServiceImpl extends ServiceImpl<StIvtCheckMstMapper, StIvtChec
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getStructIvt(Map whereJson, Pageable page) {
|
||||
HashMap<String, String> map = new HashMap<String, String>(whereJson);
|
||||
if (StrUtil.isNotEmpty(map.get("remark"))) {
|
||||
map.put("remark", "%" + map.get("remark") + "%");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(map.get("struct_code"))) {
|
||||
map.put("struct_code", "%" + map.get("struct_code") + "%");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(map.get("box_no"))) {
|
||||
map.put("box_no", "%" + map.get("box_no") + "%");
|
||||
}
|
||||
JSONObject jo = WQL.getWO("QST_IVT_CHECK")
|
||||
.addParam("flag", "3")
|
||||
.addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "struct.struct_code");
|
||||
return jo;
|
||||
public IPage<CheckStructIvt> getStructIvt(Map whereJson, PageQuery page) {
|
||||
String box_no = MapUtil.getStr(whereJson, "box_no");
|
||||
String struct_code = MapUtil.getStr(whereJson, "struct_code");
|
||||
String remark = MapUtil.getStr(whereJson, "remark");
|
||||
String stor_id = MapUtil.getStr(whereJson, "stor_id");
|
||||
String sect_id = MapUtil.getStr(whereJson, "sect_id");
|
||||
|
||||
QueryPageParam param = new QueryPageParam();
|
||||
param.setBox_no(box_no);
|
||||
param.setStruct_code(struct_code);
|
||||
param.setRemark(remark);
|
||||
param.setSect_id(sect_id);
|
||||
param.setStor_id(stor_id);
|
||||
|
||||
|
||||
IPage<CheckStructIvt> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
return stIvtCheckMstMapper.getStructIvt(pages, param);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -430,12 +426,13 @@ public class CheckServiceImpl extends ServiceImpl<StIvtCheckMstMapper, StIvtChec
|
||||
}
|
||||
|
||||
@Override
|
||||
public void download(JSONArray rows, HttpServletResponse response) throws IOException {
|
||||
public void download( List<StIvtCheckdtl> rows, HttpServletResponse response) throws IOException {
|
||||
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation");
|
||||
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
JSONObject jo = rows.getJSONObject(i);
|
||||
StIvtCheckdtl row = rows.get(i);
|
||||
JSONObject jo = (JSONObject) JSONObject.toJSON(row);
|
||||
|
||||
String storagevehicle_code = jo.getString("storagevehicle_code");
|
||||
JSONObject jsonSub = subTab.query("package_box_sn = '" + storagevehicle_code + "'").uniqueResult(0);
|
||||
|
||||
@@ -1,338 +0,0 @@
|
||||
[交易说明]
|
||||
交易名: 基础点位分页查询
|
||||
所属模块:
|
||||
功能简述:
|
||||
版权所有:
|
||||
表引用:
|
||||
版本经历:
|
||||
|
||||
[数据库]
|
||||
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||
|
||||
[IO定义]
|
||||
#################################################
|
||||
## 表字段对应输入参数
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.status TYPEAS s_string
|
||||
输入.check_code TYPEAS s_string
|
||||
输入.create_mode TYPEAS s_string
|
||||
输入.check_type TYPEAS s_string
|
||||
输入.stor_id TYPEAS s_string
|
||||
输入.check_id TYPEAS s_string
|
||||
输入.work_status TYPEAS s_string
|
||||
输入.end_time TYPEAS s_string
|
||||
输入.begin_time TYPEAS s_string
|
||||
输入.material_id TYPEAS s_string
|
||||
输入.quality_scode TYPEAS s_string
|
||||
输入.pcsn TYPEAS s_string
|
||||
输入.sap_pcsn TYPEAS s_string
|
||||
输入.ivt_level TYPEAS s_string
|
||||
输入.is_active TYPEAS s_string
|
||||
输入.sect_id TYPEAS s_string
|
||||
输入.moveinvdtl_id TYPEAS s_string
|
||||
输入.struct_id TYPEAS s_string
|
||||
输入.is_issued TYPEAS s_string
|
||||
输入.remark TYPEAS s_string
|
||||
输入.task_id TYPEAS s_string
|
||||
输入.struct_code TYPEAS s_string
|
||||
输入.ids TYPEAS f_string
|
||||
输入.storagevehicle_code TYPEAS s_string
|
||||
输入.box_no TYPEAS s_string
|
||||
输入.deptIds TYPEAS f_string
|
||||
输入.in_stor_id TYPEAS f_string
|
||||
输入.check_id_in TYPEAS f_string
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
|
||||
[临时变量]
|
||||
--所有中间过程变量均可在此处定义
|
||||
|
||||
[业务过程]
|
||||
|
||||
##########################################
|
||||
# 1、输入输出检查 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 2、主过程前处理 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 3、业务主过程 #
|
||||
##########################################
|
||||
|
||||
IF 输入.flag = "2"
|
||||
QUERY
|
||||
SELECT
|
||||
CheckDtl.*,
|
||||
struct.struct_code,
|
||||
struct.sect_code,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
user1.person_name AS process_optname,
|
||||
sub.date_of_production
|
||||
FROM
|
||||
ST_IVT_CheckDtl CheckDtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = CheckDtl.material_id
|
||||
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = CheckDtl.struct_id
|
||||
LEFT JOIN sys_user user1 ON user1.user_id = CheckDtl.process_optid
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
MIN(date_of_production) AS date_of_production,
|
||||
package_box_sn
|
||||
FROM
|
||||
pdm_bi_subpackagerelation
|
||||
WHERE
|
||||
1=1
|
||||
group by package_box_sn
|
||||
) sub ON sub.package_box_sn = CheckDtl.storagevehicle_code
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.check_id <> ""
|
||||
CheckDtl.check_id = 输入.check_id
|
||||
ENDOPTION
|
||||
OPTION 输入.checkdtl_id <> ""
|
||||
CheckDtl.checkdtl_id = 输入.checkdtl_id
|
||||
ENDOPTION
|
||||
OPTION 输入.status <> ""
|
||||
CheckDtl.status <= 输入.status
|
||||
ENDOPTION
|
||||
order by CheckDtl.seq_no
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "22"
|
||||
QUERY
|
||||
SELECT
|
||||
CheckDtl.*,
|
||||
struct.struct_code,
|
||||
struct.sect_code,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
user1.person_name AS process_optname,
|
||||
sub.date_of_production
|
||||
FROM
|
||||
ST_IVT_CheckDtl CheckDtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = CheckDtl.material_id
|
||||
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = CheckDtl.struct_id
|
||||
LEFT JOIN sys_user user1 ON user1.user_id = CheckDtl.process_optid
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
MIN(date_of_production) AS date_of_production,
|
||||
package_box_sn
|
||||
FROM
|
||||
pdm_bi_subpackagerelation
|
||||
WHERE
|
||||
1=1
|
||||
group by package_box_sn
|
||||
) sub ON sub.package_box_sn = CheckDtl.storagevehicle_code
|
||||
WHERE
|
||||
CheckDtl.status <> '1'
|
||||
OPTION 输入.check_id <> ""
|
||||
CheckDtl.check_id = 输入.check_id
|
||||
ENDOPTION
|
||||
|
||||
order by CheckDtl.seq_no
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "222"
|
||||
QUERY
|
||||
SELECT
|
||||
CheckDtl.*,
|
||||
struct.struct_code,
|
||||
struct.sect_code,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
user1.person_name AS process_optname,
|
||||
sub.date_of_production
|
||||
FROM
|
||||
ST_IVT_CheckDtl CheckDtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = CheckDtl.material_id
|
||||
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = CheckDtl.struct_id
|
||||
LEFT JOIN sys_user user1 ON user1.user_id = CheckDtl.process_optid
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
MIN(date_of_production) AS date_of_production,
|
||||
package_box_sn
|
||||
FROM
|
||||
pdm_bi_subpackagerelation
|
||||
WHERE
|
||||
1=1
|
||||
group by package_box_sn
|
||||
) sub ON sub.package_box_sn = CheckDtl.storagevehicle_code
|
||||
WHERE
|
||||
CheckDtl.status = '1'
|
||||
OPTION 输入.check_id <> ""
|
||||
CheckDtl.check_id = 输入.check_id
|
||||
ENDOPTION
|
||||
|
||||
order by CheckDtl.seq_no
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "3"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
struct.sect_id,
|
||||
MAX(struct.sect_code) AS sect_code,
|
||||
MAX(struct.sect_name) AS sect_name,
|
||||
MAX(struct.struct_id) AS struct_id,
|
||||
MAX(struct.struct_code) AS struct_code,
|
||||
MAX(struct.struct_name) AS struct_name,
|
||||
MAX(struct.storagevehicle_code) AS storagevehicle_code,
|
||||
MAX(mb.material_id) AS material_id,
|
||||
MAX(mb.material_name) AS material_name,
|
||||
MAX(mb.material_code) AS material_code,
|
||||
'1' AS base_qty,
|
||||
'0' AS fac_qty,
|
||||
'箱' AS qty_unit_name,
|
||||
'1585604690706567168' AS measure_unit_id
|
||||
FROM
|
||||
st_ivt_structivt ivt
|
||||
LEFT JOIN st_ivt_structattr struct ON ivt.struct_id = struct.struct_id
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = ivt.material_id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND struct.lock_type = '1'
|
||||
AND IFNULL(struct.storagevehicle_code,'') <> ''
|
||||
|
||||
OPTION 输入.remark <> ""
|
||||
(mb.material_code like 输入.remark or mb.material_name like 输入.remark)
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.struct_code <> ""
|
||||
struct.struct_code like 输入.struct_code
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.box_no <> ""
|
||||
struct.storagevehicle_code like 输入.box_no
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.stor_id <> ""
|
||||
struct.stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.sect_id <> ""
|
||||
struct.sect_id = 输入.sect_id
|
||||
ENDOPTION
|
||||
|
||||
group by ivt.struct_id
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "8"
|
||||
QUERY
|
||||
SELECT
|
||||
CheckDtl.checkdtl_id,
|
||||
CheckDtl.check_id,
|
||||
CheckDtl.check_code,
|
||||
CheckDtl.seq_no,
|
||||
CheckDtl.sect_id,
|
||||
CheckDtl.sect_name,
|
||||
CheckDtl.struct_id,
|
||||
CheckDtl.struct_name,
|
||||
CheckDtl.checkpoint_id,
|
||||
CheckDtl.storagevehicle_id,
|
||||
CheckDtl.storagevehicle_code,
|
||||
CheckDtl.material_id,
|
||||
ROUND(CheckDtl.base_qty,3) AS base_qty,
|
||||
CheckDtl.qty_unit_id,
|
||||
CheckDtl.qty_unit_name,
|
||||
CheckDtl.STATUS,
|
||||
CheckDtl.is_down,
|
||||
CheckDtl.fac_qty,
|
||||
CheckDtl.check_result,
|
||||
CheckDtl.check_optid,
|
||||
CheckDtl.check_optname,
|
||||
CheckDtl.check_time,
|
||||
CheckDtl.is_process,
|
||||
CheckDtl.process_type,
|
||||
CheckDtl.process_optid,
|
||||
CheckDtl.process_time,
|
||||
CheckDtl.remark,
|
||||
struct.struct_code,
|
||||
struct.sect_code,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
user1.person_name AS process_optname
|
||||
FROM
|
||||
ST_IVT_CheckDtl CheckDtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = CheckDtl.material_id
|
||||
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = CheckDtl.struct_id
|
||||
LEFT JOIN sys_user user1 ON user1.user_id = CheckDtl.process_optid
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.check_id <> ""
|
||||
CheckDtl.check_id = 输入.check_id
|
||||
ENDOPTION
|
||||
OPTION 输入.checkdtl_id <> ""
|
||||
CheckDtl.checkdtl_id = 输入.checkdtl_id
|
||||
ENDOPTION
|
||||
OPTION 输入.status <> ""
|
||||
CheckDtl.status <= 输入.status
|
||||
ENDOPTION
|
||||
order by CheckDtl.seq_no
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "9"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
sub.*
|
||||
FROM
|
||||
st_ivt_structivt ivt
|
||||
LEFT JOIN st_ivt_structattr attr ON ivt.struct_id = attr.struct_id
|
||||
LEFT JOIN pdm_bi_subpackagerelation sub ON ivt.pcsn = sub.container_name AND sub.package_box_sn = attr.storagevehicle_code
|
||||
WHERE
|
||||
1=1
|
||||
|
||||
OPTION 输入.box_no <> ""
|
||||
sub.package_box_sn = 输入.box_no
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.pcsn <> ""
|
||||
ivt.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.sap_pcsn <> ""
|
||||
sub.sap_pcsn like 输入.sap_pcsn
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "10"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
dtl.*,
|
||||
mater.material_code,
|
||||
mater.material_name
|
||||
FROM
|
||||
ST_IVT_CheckDtl dtl
|
||||
LEFT JOIN md_me_materialbase mater ON dtl.material_id = mater.material_id
|
||||
WHERE
|
||||
dtl.check_result = '2'
|
||||
and dtl.status in ('4','5')
|
||||
|
||||
OPTION 输入.box_no <> ""
|
||||
dtl.storagevehicle_code like 输入.box_no
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.check_code <> ""
|
||||
dtl.check_code = 输入.check_code
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
Reference in New Issue
Block a user