|
|
@ -3,7 +3,7 @@ |
|
|
|
<mapper namespace="com.yxt.anrui.base.biz.commoncontract.CommonContractMapper"> |
|
|
|
<insert id="saveList"> |
|
|
|
INSERT INTO common_contract(sid, contractNo, contractType, partyA, partyB, partyC, createBySid, |
|
|
|
createDate, address, deposit, contractAmount, remarks) |
|
|
|
createDate, address, deposit, contractAmount, remarks) |
|
|
|
VALUES |
|
|
|
<foreach collection="list" item="item" index="index" separator=","> |
|
|
|
(UUID(),<!--sid--> |
|
|
@ -23,9 +23,28 @@ |
|
|
|
<!-- <where> ${ew.sqlSegment} </where>--> |
|
|
|
<!-- ${ew.customSqlSegment} --> |
|
|
|
<select id="selectPageVo" resultType="com.yxt.anrui.base.api.commoncontract.CommonContractVo"> |
|
|
|
SELECT * |
|
|
|
FROM common_contract |
|
|
|
${ew.customSqlSegment} |
|
|
|
SELECT sid, |
|
|
|
busSid, |
|
|
|
contractNo, |
|
|
|
contractTypeKey, |
|
|
|
contractType, |
|
|
|
staffName, |
|
|
|
partyA, |
|
|
|
partyB, |
|
|
|
modelSid, |
|
|
|
modelName, |
|
|
|
num, |
|
|
|
price, |
|
|
|
oneDeposit, |
|
|
|
contractAmount, |
|
|
|
sceneSignUrl, |
|
|
|
customerSid, |
|
|
|
deposit, |
|
|
|
if(length(nodeState) > 0, nodeState, '待提交') as nodeState, |
|
|
|
DATE_FORMAT(createDate,'%Y-%m-%d') as createDate, |
|
|
|
address, |
|
|
|
remarks |
|
|
|
FROM common_contract ${ew.customSqlSegment} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectCountByTypeAndOrgAndCreateDate" resultType="int"> |
|
|
@ -37,19 +56,19 @@ |
|
|
|
</select> |
|
|
|
<select id="listExcel" resultType="com.yxt.anrui.base.api.commoncontract.CommonContractExportVo"> |
|
|
|
SELECT cc.`contractNo`, |
|
|
|
cc.`contractType`, |
|
|
|
cc.`partyA`, |
|
|
|
cc.`partyB`, |
|
|
|
cc.`partyC`, |
|
|
|
suser.`userName` creatName, |
|
|
|
cc.`createDate`, |
|
|
|
cc.`address`, |
|
|
|
cc.`deposit`, |
|
|
|
cc.`contractAmount`, |
|
|
|
cc.`remarks` |
|
|
|
cc.`contractType`, |
|
|
|
cc.`partyA`, |
|
|
|
cc.`partyB`, |
|
|
|
cc.`partyC`, |
|
|
|
suser.`userName` creatName, |
|
|
|
cc.`createDate`, |
|
|
|
cc.`address`, |
|
|
|
cc.`deposit`, |
|
|
|
cc.`contractAmount`, |
|
|
|
cc.`remarks` |
|
|
|
FROM common_contract cc |
|
|
|
LEFT JOIN anrui_portal.`sys_user` suser |
|
|
|
ON cc.createBySid = suser.`sid` |
|
|
|
LEFT JOIN anrui_portal.`sys_user` suser |
|
|
|
ON cc.createBySid = suser.`sid` |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
@ -66,27 +85,27 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getContractList" resultType="com.yxt.anrui.base.api.commoncontract.AppCommonContractPageVo"> |
|
|
|
SELECT sid AS contractSid, |
|
|
|
contractNo AS contractId, |
|
|
|
contractType, |
|
|
|
partyB, |
|
|
|
modelName as model, |
|
|
|
staffName as handler, |
|
|
|
contractAmount AS contractPrice, |
|
|
|
if(length(nodeState) > 0, nodeState, '待提交') as nodeState, |
|
|
|
if(length(nodeState) > 0, false, true) as isShowUpdate, |
|
|
|
commonContractUrl, |
|
|
|
num |
|
|
|
SELECT sid AS contractSid, |
|
|
|
contractNo AS contractId, |
|
|
|
contractType, |
|
|
|
partyB, |
|
|
|
modelName as model, |
|
|
|
staffName as handler, |
|
|
|
contractAmount AS contractPrice, |
|
|
|
if(length(nodeState) > 0, nodeState, '待提交') as nodeState, |
|
|
|
if(length(nodeState) > 0, false, true) as isShowUpdate, |
|
|
|
commonContractUrl, |
|
|
|
num |
|
|
|
FROM common_contract |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
<if test="names != null and names != ''"> |
|
|
|
and concat(IFNULL(contractNo |
|
|
|
, '') |
|
|
|
, ifnull(partyB |
|
|
|
, '')) LIKE concat('%' |
|
|
|
, #{names} |
|
|
|
, '%') |
|
|
|
, '') |
|
|
|
, ifnull(partyB |
|
|
|
, '')) LIKE concat('%' |
|
|
|
, #{names} |
|
|
|
, '%') |
|
|
|
</if> |
|
|
|
order by id desc |
|
|
|
</where> |
|
|
@ -135,7 +154,7 @@ |
|
|
|
<update id="updateFlowFiled"> |
|
|
|
UPDATE common_contract |
|
|
|
SET nodeState=#{nodeState} |
|
|
|
, nodeId=#{taskDefKey} |
|
|
|
, nodeId=#{taskDefKey} |
|
|
|
<if test="procDefId != null and procDefId != ''"> |
|
|
|
, procDefId=#{procDefId} |
|
|
|
</if> |
|
|
@ -161,17 +180,15 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getAppContractList" resultType="com.yxt.anrui.base.api.commoncontract.AppCommonContractListVo"> |
|
|
|
SELECT |
|
|
|
contractNo AS contractId, |
|
|
|
sid AS contractSid, |
|
|
|
partyB AS customer, |
|
|
|
modelName AS model, |
|
|
|
modelSid, |
|
|
|
configSid, |
|
|
|
num AS carNum, |
|
|
|
price |
|
|
|
FROM |
|
|
|
common_contract |
|
|
|
SELECT contractNo AS contractId, |
|
|
|
sid AS contractSid, |
|
|
|
partyB AS customer, |
|
|
|
modelName AS model, |
|
|
|
modelSid, |
|
|
|
configSid, |
|
|
|
num AS carNum, |
|
|
|
price |
|
|
|
FROM common_contract |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
|