追溯查询模块代码修改

cert
schry 2 years ago
parent e0cda8dc83
commit c0e32958d8

@ -63,6 +63,11 @@ public class TraceRecordResponse {
*/ */
private String ylqxzcrbarmc; private String ylqxzcrbarmc;
/**
*
*/
private String zczbhhzbapzbh;
/** /**
* DI * DI
*/ */
@ -98,4 +103,20 @@ public class TraceRecordResponse {
*/ */
private String serialNo; private String serialNo;
/**
*
*/
private String fromCorp;
/**
*
*/
private String toCorp;
/**
*
*/
private String companyName;
} }

@ -3,7 +3,8 @@
<mapper namespace="com.glxp.api.dao.trace.TraceOrderMapper"> <mapper namespace="com.glxp.api.dao.trace.TraceOrderMapper">
<select id="queryTraceOrderList" parameterType="com.glxp.api.req.trace.TraceOrderDetailRequest" <select id="queryTraceOrderList" parameterType="com.glxp.api.req.trace.TraceOrderDetailRequest"
resultType="com.glxp.api.res.trace.TraceOrderResponse"> resultType="com.glxp.api.res.trace.TraceOrderResponse">
SELECT tor.*,uc.companyName SELECT tor.*
,uc.companyName
FROM trace_order tor FROM trace_order tor
LEFT JOIN user_company uc ON uc.id = tor.companyIdFk LEFT JOIN user_company uc ON uc.id = tor.companyIdFk
LEFT JOIN (SELECT tr.recordCode,trd.* LEFT JOIN (SELECT tr.recordCode,trd.*

@ -3,38 +3,15 @@
<mapper namespace="com.glxp.api.dao.trace.TraceRecordMapper"> <mapper namespace="com.glxp.api.dao.trace.TraceRecordMapper">
<select id="filterTraces" parameterType="com.glxp.api.req.trace.TraceRecordRequest" <select id="filterTraces" parameterType="com.glxp.api.req.trace.TraceRecordRequest"
resultType="com.glxp.api.res.trace.TraceRecordResponse"> resultType="com.glxp.api.res.trace.TraceRecordResponse">
select * SELECT tr.recordCode,tr.remark,trd.*,mid.*
from trace_record FROM trace_record tr
inner join trace_record_detail LEFT JOIN trace_record_detail trd ON trd.recordIdFk = tr.id
on trace_record.id = trace_record_detail.recordIdFk LEFT JOIN (SELECT tor.recordCodeFk,tor.fromCorp,tor.toCorp,tor.createUser,uc.companyName
FROM trace_order tor LEFT JOIN user_company uc ON uc.id = tor.companyIdFk) mid ON mid.recordCodeFk = tr.recordCode
<where> <where>
<if test="id != '' and id != null">
and id = #{id}
</if>
<if test="recordCode != '' and recordCode != null"> <if test="recordCode != '' and recordCode != null">
and recordCode = #{recordCode} and recordCode = #{recordCode}
</if> </if>
<if test="fromType != '' and fromType != null">
and fromType = #{fromType}
</if>
<if test="createUser != '' and createUser != null">
and `createUser` = #{createUser}
</if>
<if test="traceType != '' and traceType != null">
and traceType = #{traceType}
</if>
<if test="udiCode != '' and udiCode != null">
and udiCode = #{udiCode}
</if>
<if test="creditNum != '' and creditNum != null">
and creditNum = #{creditNum}
</if>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
and `ylqxzcrbarmc` = #{ylqxzcrbarmc}
</if>
<if test="nameCode != '' and nameCode != null">
and nameCode = #{nameCode}
</if>
<if test="cpmctymc != '' and cpmctymc != null"> <if test="cpmctymc != '' and cpmctymc != null">
and cpmctymc = #{cpmctymc} and cpmctymc = #{cpmctymc}
</if> </if>
@ -45,6 +22,5 @@
and `batchNo` = #{batchNo} and `batchNo` = #{batchNo}
</if> </if>
</where> </where>
ORDER BY id DESC
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save