|
|
@ -5,21 +5,21 @@ |
|
|
|
<!-- ${ew.customSqlSegment} --> |
|
|
|
<select id="selectPageVo" resultType="com.yxt.anrui.buscenter.api.busmaindeposit.BusMainDepositListVo"> |
|
|
|
SELECT bmd.id, |
|
|
|
bmd.sid, |
|
|
|
bmd.billNo, |
|
|
|
bmd.depositBillTypeKey, |
|
|
|
bmd.depositBillType, |
|
|
|
bmd.createDate, |
|
|
|
bmd.staffName, |
|
|
|
bd.deposit, |
|
|
|
bd.usedDeposit, |
|
|
|
IF(bd.id IS NOT NULL, bd.draweeName, bdvc.customerName) name, |
|
|
|
IF(bd.id IS NOT NULL, bd.draweeMobile, bdvc.customerMobile) mobile, |
|
|
|
IF(COUNT(bdv.id) = 0, '', COUNT(bdv.id)) depositVehicle |
|
|
|
bmd.sid, |
|
|
|
bmd.billNo, |
|
|
|
bmd.depositBillTypeKey, |
|
|
|
bmd.depositBillType, |
|
|
|
bmd.createDate, |
|
|
|
bmd.staffName, |
|
|
|
bd.deposit, |
|
|
|
bd.usedDeposit, |
|
|
|
IF(bd.id IS NOT NULL, bd.draweeName, bdvc.customerName) name, |
|
|
|
IF(bd.id IS NOT NULL, bd.draweeMobile, bdvc.customerMobile) mobile, |
|
|
|
IF(COUNT(bdv.id) = 0, '', COUNT(bdv.id)) depositVehicle |
|
|
|
FROM bus_main_deposit bmd |
|
|
|
LEFT JOIN bus_deposit bd on bmd.sid = bd.billSid |
|
|
|
LEFT JOIN bus_deposit_vehicle_customer bdvc on bmd.sid = bdvc.billSid |
|
|
|
LEFT JOIN bus_deposit_vehicle bdv on bmd.sid = bdv.billSid |
|
|
|
LEFT JOIN bus_deposit bd on bmd.sid = bd.billSid |
|
|
|
LEFT JOIN bus_deposit_vehicle_customer bdvc on bmd.sid = bdvc.billSid |
|
|
|
LEFT JOIN bus_deposit_vehicle bdv on bmd.sid = bdv.billSid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
@ -35,64 +35,65 @@ |
|
|
|
|
|
|
|
<!--虚拟订单列表--> |
|
|
|
<select id="getVirtualOrders" resultType="com.yxt.anrui.buscenter.api.busmaindeposit.AppBusMainDepositVo"> |
|
|
|
SELECT bmd.sid AS virtualOrderSid, |
|
|
|
bmd.billNo AS virtualOrderId, |
|
|
|
bmd.createDate AS virtualOrderDate, |
|
|
|
bmd.depositBillTypeKey as virtualOrderType, |
|
|
|
bmd.staffName AS sellerName, |
|
|
|
bmd.nodeState AS virtualOrderState, |
|
|
|
bmd.remarks |
|
|
|
SELECT bmd.sid AS virtualOrderSid, |
|
|
|
bmd.billNo AS virtualOrderId, |
|
|
|
bmd.createDate AS virtualOrderDate, |
|
|
|
bmd.depositBillTypeKey as virtualOrderType, |
|
|
|
bmd.staffName AS sellerName, |
|
|
|
bmd.nodeState AS virtualOrderState, |
|
|
|
bmd.remarks |
|
|
|
FROM bus_main_deposit bmd |
|
|
|
LEFT JOIN bus_deposit_vehicle_customer bdvc ON bmd.sid = bdvc.billSid |
|
|
|
LEFT JOIN bus_deposit bd ON bmd.sid = bd.billSid |
|
|
|
LEFT JOIN bus_deposit_vehicle_customer bdvc ON bmd.sid = bdvc.billSid |
|
|
|
LEFT JOIN bus_deposit bd ON bmd.sid = bd.billSid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
<if test="name != '' and name != null"> |
|
|
|
and bmd.billNo LIKE concat('%' |
|
|
|
, #{name} |
|
|
|
, '%') |
|
|
|
, #{name} |
|
|
|
, '%') |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
<if test="name != '' and name != null"> |
|
|
|
UNION ALL |
|
|
|
SELECT bmd.sid AS virtualOrderSid, |
|
|
|
bmd.billNo AS virtualOrderId, |
|
|
|
bmd.createDate AS virtualOrderDate, |
|
|
|
bmd.depositBillTypeKey as virtualOrderType, |
|
|
|
bmd.staffName AS sellerName, |
|
|
|
bmd.nodeState AS virtualOrderState, |
|
|
|
bmd.remarks |
|
|
|
SELECT bmd.sid AS virtualOrderSid, |
|
|
|
bmd.billNo AS virtualOrderId, |
|
|
|
bmd.createDate AS virtualOrderDate, |
|
|
|
bmd.depositBillTypeKey as virtualOrderType, |
|
|
|
bmd.staffName AS sellerName, |
|
|
|
bmd.nodeState AS virtualOrderState, |
|
|
|
bmd.remarks |
|
|
|
FROM bus_main_deposit bmd |
|
|
|
LEFT JOIN bus_deposit_vehicle_customer bdvc ON bmd.sid = bdvc.billSid |
|
|
|
LEFT JOIN bus_deposit bd ON bmd.sid = bd.billSid |
|
|
|
LEFT JOIN bus_deposit_vehicle_customer bdvc ON bmd.sid = bdvc.billSid |
|
|
|
LEFT JOIN bus_deposit bd ON bmd.sid = bd.billSid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
<if test="name != '' and name != null"> |
|
|
|
and bdvc.customerName LIKE concat('%' |
|
|
|
, #{name} |
|
|
|
, '%') |
|
|
|
, #{name} |
|
|
|
, '%') |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
UNION ALL |
|
|
|
SELECT bmd.sid AS virtualOrderSid, |
|
|
|
bmd.billNo AS virtualOrderId, |
|
|
|
bmd.createDate AS virtualOrderDate, |
|
|
|
bmd.depositBillTypeKey as virtualOrderType, |
|
|
|
bmd.staffName AS sellerName, |
|
|
|
bmd.nodeState AS virtualOrderState, |
|
|
|
bmd.remarks |
|
|
|
SELECT bmd.sid AS virtualOrderSid, |
|
|
|
bmd.billNo AS virtualOrderId, |
|
|
|
bmd.createDate AS virtualOrderDate, |
|
|
|
bmd.depositBillTypeKey as virtualOrderType, |
|
|
|
bmd.staffName AS sellerName, |
|
|
|
bmd.nodeState AS virtualOrderState, |
|
|
|
bmd.remarks |
|
|
|
FROM bus_main_deposit bmd |
|
|
|
LEFT JOIN bus_deposit_vehicle_customer bdvc ON bmd.sid = bdvc.billSid |
|
|
|
LEFT JOIN bus_deposit bd ON bmd.sid = bd.billSid |
|
|
|
LEFT JOIN bus_deposit_vehicle_customer bdvc ON bmd.sid = bdvc.billSid |
|
|
|
LEFT JOIN bus_deposit bd ON bmd.sid = bd.billSid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
<if test="name != '' and name != null"> |
|
|
|
and bd.draweeName LIKE concat('%' |
|
|
|
, #{name} |
|
|
|
, '%') |
|
|
|
, #{name} |
|
|
|
, '%') |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</if> |
|
|
|
order by bmd.id desc |
|
|
|
</select> |
|
|
|
|
|
|
|
<delete id="deleteVirtualOrder"> |
|
|
@ -183,7 +184,7 @@ |
|
|
|
<update id="updateFlowFiled" parameterType="java.util.Map"> |
|
|
|
UPDATE bus_main_deposit |
|
|
|
SET nodeState=#{nodeState} |
|
|
|
, taskDefKey=#{taskDefKey} |
|
|
|
, taskDefKey=#{taskDefKey} |
|
|
|
<if test="procDefId != null and procDefId != ''"> |
|
|
|
, procDefId=#{procDefId} |
|
|
|
</if> |
|
|
@ -288,21 +289,21 @@ |
|
|
|
</select>--> |
|
|
|
|
|
|
|
<select id="pageAppList" resultMap="pageAppMap"> |
|
|
|
select bd.sid as virtualSid, |
|
|
|
bd.billNo as virtualId, |
|
|
|
bc.customerName, |
|
|
|
bc.customerMobile as mobile, |
|
|
|
bd.staffSid |
|
|
|
select bd.sid as virtualSid, |
|
|
|
bd.billNo as virtualId, |
|
|
|
bc.customerName, |
|
|
|
bc.customerMobile as mobile, |
|
|
|
bd.staffSid |
|
|
|
from bus_main_deposit bd |
|
|
|
left join bus_deposit_vehicle_customer bc on bd.sid = bc.billSid |
|
|
|
left join bus_deposit_vehicle_customer bc on bd.sid = bc.billSid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
<if test="name != null and name != ''"> |
|
|
|
and concat(bd.billNo |
|
|
|
, bc.customerName |
|
|
|
, bc.customerMobile) LIKE concat('%' |
|
|
|
, #{name} |
|
|
|
, '%') |
|
|
|
, bc.customerName |
|
|
|
, bc.customerMobile) LIKE concat('%' |
|
|
|
, #{name} |
|
|
|
, '%') |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|