1.修改单据查询代码

master
x_z 2 years ago
parent 4b085f0ae6
commit 3892f53aac

@ -8,7 +8,6 @@ import java.util.Date;
@Data
public class IoOrderResponse {
private Integer id;
/**
@ -66,6 +65,16 @@ public class IoOrderResponse {
*/
private Integer dealStatus;
/**
* -1: "草稿",
* 1: "等待处理",
* 1: "等待处理",
* 2: "等待校验",
* 3: "校验异常",
* 4: "校验成功",
*/
private String checkStatus;
/**
*
*/
@ -166,8 +175,6 @@ public class IoOrderResponse {
*/
private String reviewUserName;
private static final long serialVersionUID = 1L;
/**
*
*/
@ -179,10 +186,15 @@ public class IoOrderResponse {
private String fromInvName;
/**
*
*
*/
private String deptName;
/**
*
*/
private String invName;
/**
*
*/

@ -2,20 +2,20 @@
<!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.IoOrderDao">
<select id="filterList" resultType="com.glxp.api.res.inout.IoOrderResponse">
select io_order.*,
bu.name billTypeName,
auth_user.employeeName createUserName,
auth_dept.name deptName,
auth_warehouse.name invName
from io_order
left join basic_bussiness_type bu on io_order.action = bu.action
left join auth_user on auth_user.id = io_order.createUser or auth_user.id = io_order.updateUser
or auth_user.id = io_order.reviewUser
left join auth_dept on auth_dept.code = io_order.deptCode
left join auth_warehouse on auth_warehouse.code = io_order.invCode
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 auth_dept ad2 where ad2.code = io.fromDeptCode) fromDeptName,
(select name from auth_warehouse aw2 where aw2.code = io.fromInvCode) fromInvName,
(select name from basic_corp bc where bc.erpId = io.fromCorp) fromCorpName
from io_order as io
<where>
<if test="id != null and id != ''">
AND io_order.id = #{id}
AND id = #{id}
</if>
<if test="billNo != null and billNo != ''">
AND billNo like concat('%', #{billNo}, '%')
@ -30,19 +30,20 @@
AND invCode = #{invCode}
</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND io_order.createTime between #{startTime} and #{endTime}
AND createTime between #{startTime} and #{endTime}
</if>
<if test="startTime != null and startTime != ''">
AND io_order.createTime >= #{startTime}
AND createTime >= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND io_order.createTime &lt;= #{endTime}
AND createTime &lt;= #{endTime}
</if>
</where>
</select>
<select id="filterOrderList" resultType="com.glxp.api.entity.inout.IoOrderEntity">
select * from io_order
select *
from io_order
<where>
<if test="billNo != null and billNo != ''">
AND billNo like concat('%', #{billNo}, '%')

Loading…
Cancel
Save