add wql修改1
This commit is contained in:
@@ -21,10 +21,10 @@ import org.nl.b_lms.sch.tasks.slitter.constant.SlitterConstant;
|
||||
import org.nl.b_lms.sch.tasks.slitter.mapper.dto.BhTubeMovePointDto;
|
||||
import org.nl.b_lms.sch.tasks.slitter.mapper.dto.BhTubePointDto;
|
||||
import org.nl.b_lms.sch.tasks.slitter.util.SlitterTaskUtil;
|
||||
import org.nl.b_lms.storage_manage.md.service.MaterialbaseService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.wms.basedata.master.service.MaterialbaseService;
|
||||
import org.nl.wms.basedata.master.service.dto.MaterialbaseDto;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@@ -22,7 +22,6 @@ import java.math.BigDecimal;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("st_ivt_iostorinvdis")
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
public class StIvtIostorinvdis implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -163,4 +162,5 @@ public class StIvtIostorinvdis implements Serializable {
|
||||
*/
|
||||
private String is_upload;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ import java.math.BigDecimal;
|
||||
* @since 2023-11-16
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("st_ivt_iostorinvdtl")
|
||||
@Builder
|
||||
public class StIvtIostorinvdtl implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dto.IostorInvQuery;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
@@ -42,4 +43,11 @@ public interface StIvtIostorinvMapper extends BaseMapper<StIvtIostorinv> {
|
||||
* @return 分配明细集合
|
||||
*/
|
||||
List<JSONObject> queryFirstInBox(String box_no);
|
||||
|
||||
|
||||
/**
|
||||
* 查询入库单
|
||||
*/
|
||||
|
||||
List<IostorInvQuery> getIosInv(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -118,6 +118,102 @@
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getIosInv" parameterType="com.alibaba.fastjson.JSONObject" resultType="org.nl.b_lms.storage_manage.ios.service.iostorInv.dto.IostorInvQuery">
|
||||
SELECT
|
||||
ios.*,
|
||||
IFNULL(dtl.vbeln, '') AS vbeln
|
||||
FROM ST_IVT_IOStorInv ios
|
||||
LEFT JOIN st_ivt_iostorinvdtl dtl ON ios.iostorinv_id = dtl.iostorinv_id
|
||||
LEFT JOIN st_ivt_iostorinvdis dis ON dtl.iostorinvdtl_id = dis.iostorinvdtl_id
|
||||
LEFT JOIN pdm_bi_subpackagerelationrecord sub ON sub.container_name = dis.pcsn AND ios.bill_code = sub.bill_code
|
||||
WHERE
|
||||
ios.is_delete = '0'
|
||||
AND ios.io_type = '0'
|
||||
|
||||
<!-- 仓库 in 查询 -->
|
||||
<if test="in_stor_id != null and in_stor_id != ''">
|
||||
AND ios.stor_id IN
|
||||
<foreach item="item" collection="in_stor_id.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<!-- bill_code 模糊匹配 -->
|
||||
<if test="bill_code != null and bill_code != ''">
|
||||
AND ios.bill_code LIKE CONCAT('%', #{bill_code}, '%')
|
||||
</if>
|
||||
|
||||
<!-- box_no 模糊 or in -->
|
||||
<if test="box_no != null and box_no != '' and box_no_in == null">
|
||||
AND dis.box_no LIKE CONCAT('%', #{box_no}, '%')
|
||||
</if>
|
||||
<if test="box_no_in != null and !box_no_in.isEmpty()">
|
||||
AND dis.box_no IN
|
||||
<foreach item="item" collection="box_no_in" open="(" separator="," close=")">
|
||||
'#{item}'
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<!-- vbeln 模糊 or in -->
|
||||
<if test="vbeln != null and vbeln != '' and vbeln_in == null">
|
||||
AND dtl.vbeln LIKE CONCAT('%', #{vbeln}, '%')
|
||||
</if>
|
||||
<if test="vbeln_in != null and !vbeln_in.isEmpty()">
|
||||
AND dtl.vbeln IN
|
||||
<foreach item="item" collection="vbeln_in" open="(" separator="," close=")">
|
||||
'#{item}'
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<!-- sap_pcsn 模糊 or in -->
|
||||
<if test="sap_pcsn != null and sap_pcsn != '' and sap_pcsn_in == null">
|
||||
AND sub.sap_pcsn LIKE CONCAT('%', #{sap_pcsn}, '%')
|
||||
</if>
|
||||
<if test="sap_pcsn_in != null and !sap_pcsn_in.isEmpty()">
|
||||
AND sub.sap_pcsn IN
|
||||
<foreach item="item" collection="sap_pcsn_in" open="(" separator="," close=")">
|
||||
'#{item}'
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<!-- pcsn 模糊 or in -->
|
||||
<if test="pcsn != null and pcsn != '' and pcsn_in == null">
|
||||
AND dis.pcsn LIKE CONCAT('%', #{pcsn}, '%')
|
||||
</if>
|
||||
<if test="pcsn_in != null and !pcsn_in.isEmpty()">
|
||||
AND dis.pcsn IN
|
||||
<foreach item="item" collection="pcsn_in" open="(" separator="," close=")">
|
||||
'#{item}'
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<!-- 等值查询 -->
|
||||
<if test="stor_id != null and stor_id != ''">
|
||||
AND ios.stor_id = #{stor_id}
|
||||
</if>
|
||||
<if test="bill_type != null and bill_type != ''">
|
||||
AND ios.bill_type = #{bill_type}
|
||||
</if>
|
||||
<if test="create_mode != null and create_mode != ''">
|
||||
AND ios.create_mode = #{create_mode}
|
||||
</if>
|
||||
<if test="bill_status != null and bill_status != ''">
|
||||
AND ios.bill_status = #{bill_status}
|
||||
</if>
|
||||
|
||||
<!-- 时间范围 -->
|
||||
<if test="begin_time != null and begin_time != ''">
|
||||
AND ios.input_time >= #{begin_time}
|
||||
</if>
|
||||
<if test="end_time != null and end_time != ''">
|
||||
AND ios.input_time <= #{end_time}
|
||||
</if>
|
||||
|
||||
ORDER BY ios.iostorinv_id DESC
|
||||
LIMIT #{offset}, #{limit}
|
||||
</select>
|
||||
|
||||
<select id="queryBoxMst" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT DISTINCT
|
||||
CONVERT(ios.iostorinv_id , CHAR ) AS iostorinv_id
|
||||
|
||||
@@ -128,4 +128,6 @@
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
package org.nl.b_lms.storage_manage.md.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author zhouz
|
||||
* @description /
|
||||
* @date 2021-12-07
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("md_me_materialbase")
|
||||
|
||||
public class MdMeMaterialBase implements Serializable {
|
||||
|
||||
/**
|
||||
* 防止精度丢失
|
||||
*/
|
||||
@TableId
|
||||
private Long material_id;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String material_code;
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
private String material_name;
|
||||
|
||||
private String material_spec;
|
||||
|
||||
private String material_model;
|
||||
|
||||
private String english_name;
|
||||
|
||||
private long base_unit_id;
|
||||
|
||||
private long assist_unit_id;
|
||||
private String base_unit_name;
|
||||
|
||||
private String approve_fileno;
|
||||
|
||||
private String print_no;
|
||||
|
||||
/**
|
||||
* 物料分类
|
||||
*/
|
||||
private Long material_type_id;
|
||||
|
||||
private Long len_unit_id;
|
||||
|
||||
private BigDecimal length;
|
||||
|
||||
private BigDecimal width;
|
||||
|
||||
private BigDecimal height;
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
private Long weight_unit_id;
|
||||
|
||||
private BigDecimal gross_weight;
|
||||
|
||||
private BigDecimal net_weight;
|
||||
|
||||
private Long cubage_unit_id;
|
||||
|
||||
private BigDecimal cubage;
|
||||
|
||||
private String create_id;
|
||||
|
||||
private String create_name;
|
||||
|
||||
private String create_time;
|
||||
|
||||
private String update_optid;
|
||||
|
||||
private String update_optname;
|
||||
|
||||
private String update_time;
|
||||
|
||||
private String is_used_time;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private String is_used;
|
||||
|
||||
private String is_delete;
|
||||
|
||||
private String ext_id;
|
||||
|
||||
private String material_height_type;
|
||||
|
||||
private Long ass_unit_id;
|
||||
|
||||
private Long product_series;
|
||||
|
||||
private Integer standing_time;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.nl.b_lms.storage_manage.md.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinvdis;
|
||||
import org.nl.b_lms.storage_manage.md.dao.MdMeMaterialBase;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 物料基本信息表表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-16
|
||||
*/
|
||||
public interface MdMeMaterialBaseMapper extends BaseMapper<MdMeMaterialBase> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.b_lms.storage_manage.md.dao.mapper.MdMeMaterialBaseMapper">
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,12 +1,12 @@
|
||||
package org.nl.wms.basedata.master.rest;
|
||||
package org.nl.b_lms.storage_manage.md.rest;
|
||||
|
||||
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.storage_manage.md.service.MaterialbaseService;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
|
||||
import org.nl.wms.basedata.master.service.MaterialbaseService;
|
||||
import org.nl.wms.basedata.master.service.dto.MaterialbaseDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.nl.wms.basedata.master.service;
|
||||
package org.nl.b_lms.storage_manage.md.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.nl.wms.basedata.master.service.impl;
|
||||
package org.nl.b_lms.storage_manage.md.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
@@ -11,6 +11,7 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.storage_manage.md.service.MaterialbaseService;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.WQL;
|
||||
@@ -18,7 +19,6 @@ import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
|
||||
import org.nl.wms.basedata.master.service.ClassstandardService;
|
||||
import org.nl.wms.basedata.master.service.MaterialbaseService;
|
||||
import org.nl.wms.basedata.master.service.dto.MaterialbaseDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -0,0 +1,73 @@
|
||||
package org.nl.wms.st.inbill.rest;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.nl.wms.st.inbill.service.RawAssistIStorService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
|
||||
@RequestMapping("/api/in/rawAssist")
|
||||
@Slf4j
|
||||
public class RawAssistIStorController {
|
||||
|
||||
@Autowired
|
||||
private RawAssistIStorService rawAssistIStorService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询入库单据")
|
||||
|
||||
//@PreAuthorize("@el.check('checkoutbill:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(rawAssistIStorService.pageQuery(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("删除出入库单")
|
||||
|
||||
//@PreAuthorize("@el.check('sectattr:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||
rawAssistIStorService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getBillDtl")
|
||||
@Log("查询入库单来源")
|
||||
|
||||
//@PreAuthorize("@el.check('materialtype:list')")
|
||||
public ResponseEntity<Object> getBillDtl(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(rawAssistIStorService.getBillDtl(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PutMapping
|
||||
@Log("修改入库单")
|
||||
|
||||
//@PreAuthorize("@el.check('sectattr:edit')")
|
||||
public ResponseEntity<Object> update(@RequestBody Map whereJson) {
|
||||
rawAssistIStorService.update(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/divStruct")
|
||||
@Log("分配货位")
|
||||
|
||||
//@PreAuthorize("@el.check('materialtype:list')")
|
||||
public ResponseEntity<Object> divStruct(@RequestBody Map whereJson) {
|
||||
rawAssistIStorService.divStruct(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.nl.wms.st.inbill.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface RawAssistIStorService {
|
||||
/**
|
||||
* 查询数据分页
|
||||
*
|
||||
* @param whereJson 条件
|
||||
* @param page 分页参数
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> pageQuery(Map whereJson, Pageable page);
|
||||
|
||||
Map<String, Object> getBillDtl(Map whereJson, Pageable page);
|
||||
|
||||
|
||||
void deleteAll(Long[] ids);
|
||||
|
||||
void update(Map whereJson);
|
||||
|
||||
void divStruct(Map whereJson);
|
||||
|
||||
|
||||
JSONObject autoDis(JSONObject whereJson);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,10 +8,10 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.storage_manage.md.service.MaterialbaseService;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.wms.basedata.master.service.ClassstandardService;
|
||||
import org.nl.wms.basedata.master.service.MaterialbaseService;
|
||||
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
Reference in New Issue
Block a user