|
|
@ -5,29 +5,34 @@ |
|
|
|
<!-- ${ew.customSqlSegment} --> |
|
|
|
|
|
|
|
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmvehiclegression.ScmVehicleGressionVo"> |
|
|
|
SELECT * FROM scm_vehicle_gression |
|
|
|
<where>${ew.sqlSegment}</where> |
|
|
|
SELECT * |
|
|
|
FROM scm_vehicle_gression |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectListAllVo" resultType="com.yxt.anrui.scm.api.scmvehiclegression.ScmVehicleGressionVo"> |
|
|
|
SELECT * FROM scm_vehicle_gression |
|
|
|
<where>${ew.sqlSegment}</where> |
|
|
|
SELECT * |
|
|
|
FROM scm_vehicle_gression |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectCarTransferList" |
|
|
|
resultType="com.yxt.anrui.scm.api.scmvehiclegression.ScmVehicleGressionPageVo"> |
|
|
|
SELECT |
|
|
|
svg.sid, |
|
|
|
svg.vinNo as vin, |
|
|
|
svg.applicantNo as applyId, |
|
|
|
if(length(svg.nodeState) > 0, nodeState, '待提交') as `state`, |
|
|
|
svg.applicantName as applyName, |
|
|
|
svg.applicantDate as applyDate, |
|
|
|
svg.applicantFunds as applyPrice, |
|
|
|
svg.temporaryCard as downloadUrl, |
|
|
|
svg.location, |
|
|
|
svg.targetLocation, |
|
|
|
svg.operator |
|
|
|
SELECT svg.sid, |
|
|
|
svg.vinNo as vin, |
|
|
|
svg.applicantNo as applyId, |
|
|
|
if(length(svg.nodeState) > 0, nodeState, '待提交') as `state`, |
|
|
|
svg.applicantName as applyName, |
|
|
|
svg.applicantDate as applyDate, |
|
|
|
svg.applicantFunds as applyPrice, |
|
|
|
svg.temporaryCard as downloadUrl, |
|
|
|
svg.location, |
|
|
|
svg.targetLocation, |
|
|
|
svg.operator |
|
|
|
FROM scm_vehicle_gression svg |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
@ -37,24 +42,26 @@ |
|
|
|
|
|
|
|
<select id="getCarTransferList" |
|
|
|
resultType="com.yxt.anrui.scm.api.scmvehiclegression.AppScmVehicleGressionPageVo"> |
|
|
|
SELECT |
|
|
|
svg.sid, |
|
|
|
svg.vinNo as vin, |
|
|
|
svg.applicantNo as applyId, |
|
|
|
if(length(svg.nodeState) > 0, nodeState, '待提交') as `state`, |
|
|
|
if(length(svg.nodeState) > 0, false , true) as showDetectBtn, |
|
|
|
if(length(svg.nodeState) > 0, false , true) as showUpdateBtn, |
|
|
|
if(length(svg.nodeState) > 0, true , false) as showUploadBtn, |
|
|
|
if(length(svg.nodeState) > 0, true , false) as showDownloadBtn, |
|
|
|
svg.applicantName as applyName, |
|
|
|
svg.applicantDate as applyDate, |
|
|
|
svg.applicantFunds as applyPrice, |
|
|
|
svg.temporaryCard as downloadUrl |
|
|
|
SELECT svg.sid, |
|
|
|
svg.vinNo as vin, |
|
|
|
svg.applicantNo as applyId, |
|
|
|
if(length(svg.nodeState) > 0, nodeState, '待提交') as `state`, |
|
|
|
if(length(svg.nodeState) > 0, false, true) as showDetectBtn, |
|
|
|
if(length(svg.nodeState) > 0, false, true) as showUpdateBtn, |
|
|
|
if(length(svg.nodeState) > 0, true, false) as showUploadBtn, |
|
|
|
if(length(svg.nodeState) > 0, true, false) as showDownloadBtn, |
|
|
|
svg.applicantName as applyName, |
|
|
|
svg.applicantDate as applyDate, |
|
|
|
svg.applicantFunds as applyPrice, |
|
|
|
svg.temporaryCard as downloadUrl |
|
|
|
FROM scm_vehicle_gression svg |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
<if test="names != '' and names != null "> |
|
|
|
and concat(svg.applicantNo,svg.vinNo) LIKE concat('%', #{names}, '%') |
|
|
|
<if test="names != '' and names != null"> |
|
|
|
and concat(svg.applicantNo |
|
|
|
, svg.vinNo) LIKE concat('%' |
|
|
|
, #{names} |
|
|
|
, '%') |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
ORDER BY id DESC |
|
|
@ -90,11 +97,12 @@ |
|
|
|
and find_in_set(sid, #{list}) |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectNum" resultType="java.lang.Integer"> |
|
|
|
select RIGHT (applicantNo, 4) |
|
|
|
<select id="selectNum" resultType="java.lang.String"> |
|
|
|
select RIGHT(applicantNo, 4) |
|
|
|
from scm_vehicle_gression |
|
|
|
where applicantNo LIKE concat(#{bill}, '%') |
|
|
|
order by id desc limit 1 |
|
|
|
order by id desc |
|
|
|
limit 1 |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getlastTimeEqual" resultType="com.yxt.anrui.scm.api.scmvehiclegression.ScmVehicleGressionVo"> |
|
|
@ -103,14 +111,15 @@ |
|
|
|
where vinNo = #{vinNo} |
|
|
|
and targetLocationSid = #{targetLocationSid} |
|
|
|
and LENGTH(nodeState) > 0 |
|
|
|
order by id desc limit 1 |
|
|
|
order by id desc |
|
|
|
limit 1 |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<update id="updateFlowFiled"> |
|
|
|
UPDATE scm_vehicle_gression |
|
|
|
SET nodeState=#{nodeState} |
|
|
|
, nodeId=#{taskDefKey} |
|
|
|
, nodeId=#{taskDefKey} |
|
|
|
<if test="procDefId != null and procDefId != ''"> |
|
|
|
, procDefId=#{procDefId} |
|
|
|
</if> |
|
|
|