add:入库查询
This commit is contained in:
@@ -2,6 +2,9 @@ package org.nl.b_lms.storage_manage.ios.service.iostorInv;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -12,4 +15,13 @@ import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||
* @since 2023-11-10
|
||||
*/
|
||||
public interface IStIvtIostorinvService extends IService<StIvtIostorinv> {
|
||||
|
||||
/**
|
||||
* 查询入库单
|
||||
* @param query: 查询条件
|
||||
* @param page: 分页工具
|
||||
* @return Object
|
||||
*/
|
||||
Object pageQuery(Map query, Pageable page);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,13 @@ package org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper;
|
||||
|
||||
|
||||
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.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -13,4 +19,12 @@ import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||
* @since 2023-11-10
|
||||
*/
|
||||
public interface StIvtIostorinvMapper extends BaseMapper<StIvtIostorinv> {
|
||||
|
||||
/**
|
||||
* 查询入库单
|
||||
* @param query: 查询条件
|
||||
* @param pageQuery: 分页工具
|
||||
* @return List<Map>
|
||||
*/
|
||||
List<Map> getPageQuery(@Param("query") Map query, @Param("pageQuery") Pageable pageQuery);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
<?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.ios.service.iostorInv.dao.mapper.StIvtIostorinvMapper">
|
||||
|
||||
<select id="getPageQuery" resultType="java.util.Map">
|
||||
SELECT DISTINCT
|
||||
CONVERT(ios.iostorinv_id , CHAR ) AS iostorinv_id,
|
||||
ios.bill_code,
|
||||
ios.io_type,
|
||||
ios.buss_type,
|
||||
ios.bill_type,
|
||||
ios.biz_date,
|
||||
CONVERT(ios.stor_id , CHAR ) AS 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,
|
||||
CONVERT(ios.input_optid , CHAR ) AS 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
|
||||
FROM
|
||||
ST_IVT_IOStorInv ios
|
||||
LEFT JOIN st_ivt_iostorinvdis dis ON dis.iostorinv_id = ios.iostorinv_id
|
||||
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.container_name = dis.pcsn
|
||||
<where>
|
||||
ios.is_delete = '0'
|
||||
AND
|
||||
ios.io_type = '0'
|
||||
AND
|
||||
ios.stor_id in ${query.in_stor_id}
|
||||
|
||||
<if test="query.bill_code != null and query.bill_code != ''">
|
||||
and ios.bill_code LIKE '%${query.bill_code}%'
|
||||
</if>
|
||||
|
||||
<if test="query.stor_id != null and query.stor_id != ''">
|
||||
and ios.stor_id = #{query.stor_id}
|
||||
</if>
|
||||
|
||||
<if test="query.begin_time != null">
|
||||
and ios.input_time >= #{query.begin_time}
|
||||
</if>
|
||||
|
||||
<if test="query.end_time != null">
|
||||
and #{query.end_time} >= ios.input_time
|
||||
</if>
|
||||
|
||||
<if test="query.create_mode != null and query.create_mode != ''">
|
||||
and ios.create_mode = #{query.create_mode}
|
||||
</if>
|
||||
|
||||
<if test="query.bill_status != null and query.bill_status != ''">
|
||||
and ios.bill_status = #{query.bill_status}
|
||||
</if>
|
||||
|
||||
<if test="query.bill_type != null and query.bill_type != ''">
|
||||
and ios.bill_type = #{query.bill_type}
|
||||
</if>
|
||||
|
||||
<if test="query.pcsn != null and query.pcsn != ''">
|
||||
and dis.pcsn LIKE '%${query.pcsn}%'
|
||||
</if>
|
||||
|
||||
<if test="query.sap_pcsn != null and query.sap_pcsn != ''">
|
||||
and sub.sap_pcsn LIKE '%${query.sap_pcsn}%'
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?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.ios.service.iostorInv.dao.mapper.StIvtIostorinvMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,11 +1,21 @@
|
||||
package org.nl.b_lms.storage_manage.ios.service.iostorInv.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvService;
|
||||
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.common.TableDataInfo;
|
||||
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 出入库单主表 服务实现类
|
||||
@@ -15,5 +25,26 @@ import org.springframework.stereotype.Service;
|
||||
* @since 2023-11-10
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper, StIvtIostorinv> implements IStIvtIostorinvService {
|
||||
|
||||
@Override
|
||||
public Object pageQuery(Map query, Pageable pageQuery) {
|
||||
Page<Object> page = PageHelper.startPage(pageQuery.getPageNumber() + 1, pageQuery.getPageSize());
|
||||
page.setOrderBy("input_time DESC");
|
||||
|
||||
//获取人员对应的仓库
|
||||
UserStorServiceImpl userStorService = new UserStorServiceImpl();
|
||||
String in_stor_id = userStorService.getInStor();
|
||||
|
||||
if (ObjectUtil.isNotEmpty(in_stor_id)) {
|
||||
query.put("in_stor_id", in_stor_id);
|
||||
}
|
||||
|
||||
List<Map> mst_detail = this.baseMapper.getPageQuery(query, pageQuery);
|
||||
|
||||
TableDataInfo<Map> build = TableDataInfo.build(mst_detail);
|
||||
build.setTotalElements(page.getTotal());
|
||||
return build;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,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.ios.service.iostorInv.IStIvtIostorinvService;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.nl.wms.st.inbill.service.RawAssistIStorService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -21,9 +22,18 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
public class RawAssistIStorController {
|
||||
|
||||
/**
|
||||
* 一期入库服务
|
||||
*/
|
||||
@Autowired
|
||||
private RawAssistIStorService rawAssistIStorService;
|
||||
|
||||
/**
|
||||
* 二期入库服务
|
||||
*/
|
||||
@Autowired
|
||||
private IStIvtIostorinvService iStIvtIostorinvService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询入库单据")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user