预验收功能
parent
ce2bb2475a
commit
c5dab991d3
@ -0,0 +1,10 @@
|
||||
package com.glxp.api.req.inv;
|
||||
|
||||
import com.glxp.api.util.page.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FilterInvPreinDetailRequest extends ListPageRequest {
|
||||
|
||||
private String orderId;
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package com.glxp.api.res.inv;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class InvPreinDetailResponse {
|
||||
|
||||
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 条码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 单据号外键
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 最小销售表示
|
||||
*/
|
||||
private String nameCode;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String batchNo;
|
||||
|
||||
/**
|
||||
* 生产日期
|
||||
*/
|
||||
private String produceDate;
|
||||
|
||||
/**
|
||||
* 失效日期
|
||||
*/
|
||||
private String expireDate;
|
||||
|
||||
/**
|
||||
* 序列号
|
||||
*/
|
||||
private String serialNo;
|
||||
|
||||
/**
|
||||
* 耗材字典主键
|
||||
*/
|
||||
private Long relId;
|
||||
|
||||
/**
|
||||
* 扫码数量
|
||||
*/
|
||||
private int count;
|
||||
|
||||
/**
|
||||
* 实际数量
|
||||
*/
|
||||
private int reCount;
|
||||
|
||||
private String productName;
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<?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="com.glxp.api.dao.inv.InvPreinDetailDao">
|
||||
<select id="filterList" parameterType="com.glxp.api.req.inv.FilterInvPreinDetailRequest"
|
||||
resultType="com.glxp.api.res.inv.InvPreinDetailResponse">
|
||||
select ic.*,
|
||||
bp.cpmctymc productName
|
||||
from inv_prein_detail ic
|
||||
left join basic_udirel bu on bu.id = ic.relId
|
||||
left join basic_products bp on bu.uuid = bp.uuid
|
||||
<where>
|
||||
<if test="orderId != null and orderId != ''">
|
||||
AND ic.orderId = #{orderId}
|
||||
</if>
|
||||
</where>
|
||||
group by ic.id
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,34 @@
|
||||
<?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="com.glxp.api.dao.inv.InvPreinOrderDao">
|
||||
<select id="filterList" parameterType="com.glxp.api.req.inv.FilterInvPreinRequest"
|
||||
resultType="com.glxp.api.res.inv.InvPreinOrderResponse">
|
||||
select io.*,
|
||||
(select name from basic_bussiness_type bus where bus.action = io.action) billTypeName,
|
||||
(select name from auth_dept ad where ad.code = io.deptCode) deptName,
|
||||
(select name from auth_warehouse aw where aw.code = io.invCode) invName,
|
||||
(select employeeName from auth_user au where au.id = io.createUser) createUserName,
|
||||
(select employeeName from auth_user au2 where au2.id = io.updateUser) updateUserName,
|
||||
(select employeeName from auth_user au3 where au3.id = io.reviewUser) reviewUserName,
|
||||
(select name from basic_corp bc where bc.erpId = io.fromCorp) fromCorpName
|
||||
from inv_prein_order as io
|
||||
<where>
|
||||
<if test="billNo != null and billNo != ''">
|
||||
AND billNo like concat('%', #{billNo}, '%')
|
||||
</if>
|
||||
<if test="fromCorp != null and fromCorp != ''">
|
||||
AND fromCorp = #{fromCorp}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND date_format(createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and
|
||||
date_format(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and (endTime == null or endTime == '')">
|
||||
AND date_format(createTime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != '' and (startTime == null or startTime == '')">
|
||||
AND date_format(createTime, '%Y-%m-%d') <= date_format(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue