追溯查询模块代码修改

cert
schry 2 years ago
parent e0cda8dc83
commit c0e32958d8

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

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

@ -3,38 +3,15 @@
<mapper namespace="com.glxp.api.dao.trace.TraceRecordMapper">
<select id="filterTraces" parameterType="com.glxp.api.req.trace.TraceRecordRequest"
resultType="com.glxp.api.res.trace.TraceRecordResponse">
select *
from trace_record
inner join trace_record_detail
on trace_record.id = trace_record_detail.recordIdFk
SELECT tr.recordCode,tr.remark,trd.*,mid.*
FROM trace_record tr
LEFT JOIN trace_record_detail trd ON trd.recordIdFk = tr.id
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>
<if test="id != '' and id != null">
and id = #{id}
</if>
<if test="recordCode != '' and recordCode != null">
and recordCode = #{recordCode}
</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">
and cpmctymc = #{cpmctymc}
</if>
@ -45,6 +22,5 @@
and `batchNo` = #{batchNo}
</if>
</where>
ORDER BY id DESC
</select>
</mapper>

Loading…
Cancel
Save