Merge remote-tracking branch 'origin/master'
commit
74798c322c
@ -0,0 +1,72 @@
|
||||
package com.glxp.api.res.inout;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author : zhangsan
|
||||
* @date : 2023/3/22 11:08
|
||||
* @modyified By :
|
||||
*/
|
||||
@Data
|
||||
public class IoCodeLostResponse {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private String code;
|
||||
|
||||
|
||||
private String batchNo;
|
||||
|
||||
|
||||
private String produceDate;
|
||||
|
||||
|
||||
private String expireDate;
|
||||
|
||||
|
||||
private String serialNo;
|
||||
|
||||
|
||||
private String supId;
|
||||
|
||||
|
||||
private Date createTime;
|
||||
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
private String remark;
|
||||
|
||||
//产品名称
|
||||
private String cpmctymc;
|
||||
//规格型号
|
||||
private String ggxh;
|
||||
|
||||
public static final String COL_ID = "id";
|
||||
|
||||
public static final String COL_CODE = "code";
|
||||
|
||||
public static final String COL_BATCHNO = "batchNo";
|
||||
|
||||
public static final String COL_PRODUCEDATE = "produceDate";
|
||||
|
||||
public static final String COL_EXPIREDATE = "expireDate";
|
||||
|
||||
public static final String COL_SERIALNO = "serialNo";
|
||||
|
||||
public static final String COL_SUPID = "supId";
|
||||
|
||||
public static final String COL_CREATETIME = "createTime";
|
||||
|
||||
public static final String COL_UPDATETIME = "updateTime";
|
||||
|
||||
public static final String COL_REMARK = "remark";
|
||||
|
||||
|
||||
}
|
@ -1,4 +1,29 @@
|
||||
<?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.inout.IoCodeLostMapper">
|
||||
|
||||
<select id="selectLost" parameterType="com.glxp.api.entity.inout.IoCodeLostEntity"
|
||||
resultType="com.glxp.api.res.inout.IoCodeLostResponse">
|
||||
select io_code_lost.*,basic_products.cpmctymc ,basic_products.ggxh from io_code_lost
|
||||
LEFT JOIN basic_products on io_code_lost.nameCode=basic_products.nameCode
|
||||
<where>
|
||||
<if test="code != '' and code != null">
|
||||
and code like concat('%',#{code},'%')
|
||||
</if>
|
||||
<if test="cpmctymc != '' and cpmctymc != null">
|
||||
and basic_products.cpmctymc like concat('%',#{cpmctymc},'%')
|
||||
</if>
|
||||
<if test="ggxh != '' and ggxh != null">
|
||||
and basic_products.ggxh like concat('%',#{ggxh},'%')
|
||||
</if>
|
||||
|
||||
<if test="batchNo != '' and batchNo != null">
|
||||
and batchNo like concat('%',#{batchNo},'%')
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND date_format(io_code_lost.createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -1,94 +1,97 @@
|
||||
<?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.purchase.PurOrderDao">
|
||||
<resultMap id="BaseResultMap" type="com.glxp.api.entity.purchase.PurOrderEntity">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table pur_order-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="billNo" jdbcType="VARCHAR" property="billNo" />
|
||||
<result column="billDate" jdbcType="TIMESTAMP" property="billDate" />
|
||||
<result column="status" jdbcType="TINYINT" property="status" />
|
||||
<result column="billType" jdbcType="VARCHAR" property="billType" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="invCode" jdbcType="VARCHAR" property="invCode" />
|
||||
<result column="deptCode" jdbcType="VARCHAR" property="deptCode" />
|
||||
<result column="createUser" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="auditUser" jdbcType="VARCHAR" property="auditUser" />
|
||||
<result column="auditTime" jdbcType="TIMESTAMP" property="auditTime" />
|
||||
<result column="auditRemark" jdbcType="VARCHAR" property="auditRemark" />
|
||||
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="updateUser" jdbcType="VARCHAR" property="updateUser" />
|
||||
<result column="applyCreateUser" jdbcType="VARCHAR" property="applyCreateUser" />
|
||||
<result column="applyAuditUser" jdbcType="VARCHAR" property="applyAuditUser" />
|
||||
<result column="applyRemark" jdbcType="VARCHAR" property="applyRemark" />
|
||||
<result column="applyBillNo" jdbcType="VARCHAR" property="applyBillNo" />
|
||||
<result column="stockOrderNo" jdbcType="VARCHAR" property="stockOrderNo" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, billNo, billDate, `status`, billType, remark, invCode, deptCode, `createUser`,
|
||||
createTime, auditUser, auditTime, auditRemark, updateTime, updateUser, applyCreateUser,
|
||||
applyAuditUser, applyRemark, applyBillNo, stockOrderNo
|
||||
</sql>
|
||||
<resultMap id="BaseResultMap" type="com.glxp.api.entity.purchase.PurOrderEntity">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table pur_order-->
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="billNo" jdbcType="VARCHAR" property="billNo"/>
|
||||
<result column="billDate" jdbcType="TIMESTAMP" property="billDate"/>
|
||||
<result column="status" jdbcType="TINYINT" property="status"/>
|
||||
<result column="billType" jdbcType="VARCHAR" property="billType"/>
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
||||
<result column="invCode" jdbcType="VARCHAR" property="invCode"/>
|
||||
<result column="deptCode" jdbcType="VARCHAR" property="deptCode"/>
|
||||
<result column="createUser" jdbcType="VARCHAR" property="createUser"/>
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="auditUser" jdbcType="VARCHAR" property="auditUser"/>
|
||||
<result column="auditTime" jdbcType="TIMESTAMP" property="auditTime"/>
|
||||
<result column="auditRemark" jdbcType="VARCHAR" property="auditRemark"/>
|
||||
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
<result column="updateUser" jdbcType="VARCHAR" property="updateUser"/>
|
||||
<result column="applyCreateUser" jdbcType="VARCHAR" property="applyCreateUser"/>
|
||||
<result column="applyAuditUser" jdbcType="VARCHAR" property="applyAuditUser"/>
|
||||
<result column="applyRemark" jdbcType="VARCHAR" property="applyRemark"/>
|
||||
<result column="applyBillNo" jdbcType="VARCHAR" property="applyBillNo"/>
|
||||
<result column="stockOrderNo" jdbcType="VARCHAR" property="stockOrderNo"/>
|
||||
<result column="supId" jdbcType="VARCHAR" property="supId"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, billNo, billDate, `status`, billType, remark, invCode, deptCode, `createUser`,
|
||||
createTime, auditUser, auditTime, auditRemark, updateTime, updateUser, applyCreateUser,
|
||||
applyAuditUser, applyRemark, applyBillNo, stockOrderNo,supId
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="queryPageList" parameterType="com.glxp.api.req.purchase.PurOrderRequest"
|
||||
resultType="com.glxp.api.res.purchase.PurOrderResponse">
|
||||
|
||||
SELECT
|
||||
pur_order.*,
|
||||
cb.employeeName createUserName,
|
||||
ab.employeeName auditUserName,
|
||||
auth_warehouse.NAME invName,
|
||||
auth_dept.`name` deptName
|
||||
FROM
|
||||
pur_order
|
||||
LEFT JOIN auth_user cb ON pur_order.createUser = cb.id
|
||||
LEFT JOIN auth_user ab ON pur_order.auditUser = ab.id
|
||||
LEFT JOIN auth_warehouse ON pur_order.invCode = auth_warehouse.`code`
|
||||
LEFT JOIN auth_dept ON auth_dept.CODE = pur_order.deptCode
|
||||
<where>
|
||||
<if test="billNo != '' and billNo != null">
|
||||
AND billNo = #{billNo}
|
||||
</if>
|
||||
<if test="startDate != null and startDate !=''">
|
||||
<![CDATA[ and DATE_FORMAT(pur_order.createTime,'%Y-%m-%d')>= #{startDate}]]>
|
||||
</if>
|
||||
<if test="endDate != null and endDate !=''">
|
||||
<![CDATA[ and DATE_FORMAT(pur_order.createTime,'%Y-%m-%d') <= #{endDate}]]>
|
||||
</if>
|
||||
<if test="startAuditDate != null and startAuditDate !=''">
|
||||
<![CDATA[ and DATE_FORMAT(pur_order.auditTime,'%Y-%m-%d')>= #{startAuditDate}]]>
|
||||
</if>
|
||||
<if test="endAuditDate != null and endAuditDate !=''">
|
||||
<![CDATA[ and DATE_FORMAT(pur_order.auditTime,'%Y-%m-%d') <= #{endAuditDate}]]>
|
||||
</if>
|
||||
<if test="status!=null and status!=10 and status!=11">
|
||||
and pur_order.status = #{status}
|
||||
</if>
|
||||
<if test="status ==10">
|
||||
and ( pur_order.status = 3 or pur_order.status=2 or pur_order.status=4)
|
||||
</if>
|
||||
<if test="status ==11">
|
||||
and ( pur_order.status = 1 or pur_order.status=2 or pur_order.status=4)
|
||||
</if>
|
||||
|
||||
<if test="deptCode != '' and deptCode != null">
|
||||
AND deptCode = #{deptCode}
|
||||
</if>
|
||||
<if test="invCode != '' and invCode != null">
|
||||
AND invCode = #{invCode}
|
||||
</if>
|
||||
<if test="auditUser != '' and auditUser != null">
|
||||
AND auditUser = #{auditUser}
|
||||
</if>
|
||||
<if test="createUser != '' and createUser != null">
|
||||
AND createUser = #{createUser}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="queryPageList" parameterType="com.glxp.api.req.purchase.PurOrderRequest"
|
||||
resultType="com.glxp.api.res.purchase.PurOrderResponse">
|
||||
SELECT pur_order.*,
|
||||
cb.employeeName createUserName,
|
||||
ab.employeeName auditUserName,
|
||||
auth_warehouse.NAME invName,
|
||||
auth_dept.`name` deptName
|
||||
FROM pur_order
|
||||
LEFT JOIN auth_user cb ON pur_order.createUser = cb.id
|
||||
LEFT JOIN auth_user ab ON pur_order.auditUser = ab.id
|
||||
LEFT JOIN auth_warehouse ON pur_order.invCode = auth_warehouse.`code`
|
||||
LEFT JOIN auth_dept ON auth_dept.CODE = pur_order.deptCode
|
||||
<where>
|
||||
<if test="billNo != '' and billNo != null">
|
||||
AND billNo = #{billNo}
|
||||
</if>
|
||||
<if test="startDate != null and startDate != ''">
|
||||
<![CDATA[
|
||||
and DATE_FORMAT(pur_order.createTime, '%Y-%m-%d') >= #{startDate}
|
||||
]]>
|
||||
</if>
|
||||
<if test="endDate != null and endDate != ''">
|
||||
<![CDATA[
|
||||
and DATE_FORMAT(pur_order.createTime, '%Y-%m-%d') <= #{endDate}
|
||||
]]>
|
||||
</if>
|
||||
<if test="startAuditDate != null and startAuditDate != ''">
|
||||
<![CDATA[
|
||||
and DATE_FORMAT(pur_order.auditTime, '%Y-%m-%d') >= #{startAuditDate}
|
||||
]]>
|
||||
</if>
|
||||
<if test="endAuditDate != null and endAuditDate != ''">
|
||||
<![CDATA[
|
||||
and DATE_FORMAT(pur_order.auditTime, '%Y-%m-%d') <= #{endAuditDate}
|
||||
]]>
|
||||
</if>
|
||||
<if test="status != null and status != 10 and status != 11">
|
||||
and pur_order.status = #{status}
|
||||
</if>
|
||||
<if test="status == 10">
|
||||
and (pur_order.status = 3 or pur_order.status = 2 or pur_order.status = 4)
|
||||
</if>
|
||||
<if test="status == 11">
|
||||
and (pur_order.status = 1 or pur_order.status = 2 or pur_order.status = 4)
|
||||
</if>
|
||||
|
||||
<if test="deptCode != '' and deptCode != null">
|
||||
AND deptCode = #{deptCode}
|
||||
</if>
|
||||
<if test="invCode != '' and invCode != null">
|
||||
AND invCode = #{invCode}
|
||||
</if>
|
||||
<if test="auditUser != '' and auditUser != null">
|
||||
AND auditUser = #{auditUser}
|
||||
</if>
|
||||
<if test="createUser != '' and createUser != null">
|
||||
AND createUser = #{createUser}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue