机具库存收藏修改
This commit is contained in:
parent
4c8bf65bf3
commit
87762cbb01
|
|
@ -52,325 +52,135 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findUnFinishContent" parameterType="com.bonus.wf.beans.TaskRecordBean" resultMap="taskRecord">
|
<select id="findUnFinishContent" parameterType="com.bonus.wf.beans.TaskRecordBean" resultMap="taskRecord">
|
||||||
<!-- SELECT
|
(
|
||||||
wtr.id,
|
SELECT
|
||||||
wtr.DEFINITION_ID AS definitionId,
|
wtr.id AS id,
|
||||||
wtr.NUMBER AS number,
|
CASE
|
||||||
bp.`NAME` AS projectName,
|
WHEN wtr.DEFINITION_ID IN (1,2,8) THEN wtr.NUMBER
|
||||||
bu.`NAME` AS unitName,
|
WHEN wtr.DEFINITION_ID IN (5,11) THEN wtr1.NUMBER
|
||||||
|
END AS number,
|
||||||
wpd.NAME AS processName,
|
wpd.NAME AS processName,
|
||||||
wtd.NAME AS definitionName,
|
wtd.NAME AS definitionName,
|
||||||
pu.`NAME` AS creatorName,
|
pu.NAME AS creatorName,
|
||||||
DATE_FORMAT(wtr.OPERATION_TIME, '%Y-%m-%d') AS operationTime,
|
DATE_FORMAT(wtr.OPERATION_TIME, '%Y-%m-%d') AS operationTime,
|
||||||
task2.isExamine AS isExamine2,
|
|
||||||
task2.isApproval AS isApproval2,
|
|
||||||
task2.responer2 AS responer2,
|
|
||||||
task8.responer8 AS responer8,
|
|
||||||
task11.responer11 AS responer11,
|
|
||||||
task12.checkStatus AS checkStatus12,
|
|
||||||
task12.IS_EXAMINE AS isExamine12,
|
|
||||||
task12.IS_APPROVAL AS isApproval12,
|
|
||||||
task12.checker AS checker12,
|
|
||||||
task12.responer12 AS responer12,
|
|
||||||
task18.responer18 AS responer18,
|
|
||||||
task19.responer19 AS responer19,
|
|
||||||
task20.responer20 AS responer20,
|
|
||||||
task21.responer21 AS responer21,
|
|
||||||
task22.responer22 AS responer22,
|
|
||||||
task23.responer23 AS responer23,
|
|
||||||
task24.responer24 AS responer24,
|
|
||||||
task25.responer25 AS responer25
|
|
||||||
FROM
|
|
||||||
wf_task_record wtr
|
|
||||||
LEFT JOIN pm_user pu ON pu.id = wtr.OPERATION_USER
|
|
||||||
LEFT JOIN wf_task_definition wtd ON wtd.ID = wtr.DEFINITION_ID
|
|
||||||
LEFT JOIN wf_process_definition wpd ON wpd.id = wtr.PROCESS_ID
|
|
||||||
LEFT JOIN wf_agreement_task wat ON wat.TASK_ID = wtr.ID
|
|
||||||
LEFT JOIN wf_lease_agreement wla ON wla.ID = wat.AGREEMENT_ID
|
|
||||||
LEFT JOIN bm_project bp ON bp.ID = wla.PROJECT
|
|
||||||
LEFT JOIN bm_unit bu ON bu.ID = wla.LEASE_COMPANY
|
|
||||||
LEFT JOIN (
|
|
||||||
SELECT
|
|
||||||
wtr2.id AS wtr2Id,
|
|
||||||
wcd2.IS_EXAMINE AS isExamine,
|
|
||||||
wcd2.IS_APPROVAL AS isApproval,
|
|
||||||
pu2.NAME AS responer2
|
|
||||||
FROM
|
|
||||||
wf_task_record wtr2
|
|
||||||
LEFT JOIN wf_collar_details wcd2 ON wcd2.TASK_ID = wtr2.ID
|
|
||||||
LEFT JOIN pm_user pu2 ON pu2.id = wcd2.CUSTOMER_SERVICE_REP
|
|
||||||
WHERE
|
|
||||||
wtr2.IS_FINISH = 0
|
|
||||||
AND wtr2.DEFINITION_ID = 2
|
|
||||||
) task2 ON task2.wtr2Id = wtr.id
|
|
||||||
LEFT JOIN (
|
|
||||||
SELECT
|
|
||||||
wtr8.id,
|
|
||||||
pu8.`NAME` AS responer8
|
|
||||||
FROM
|
|
||||||
wf_task_record wtr8
|
|
||||||
LEFT JOIN pm_user pu8 ON pu8.id = wtr8.CHECKER_ID
|
|
||||||
WHERE
|
|
||||||
wtr8.IS_FINISH = 0
|
|
||||||
AND wtr8.DEFINITION_ID = 8
|
|
||||||
) task8 ON task8.id = wtr.ID
|
|
||||||
LEFT JOIN (
|
|
||||||
SELECT
|
|
||||||
wrmd.TASK_ID,
|
|
||||||
pu.`NAME` AS responer11
|
|
||||||
FROM
|
|
||||||
wf_return_material_details wrmd
|
|
||||||
LEFT JOIN wf_task_record wtr ON wtr.id = wrmd.TASK_ID
|
|
||||||
LEFT JOIN pm_user pu ON pu.id = wrmd.SERVICE_ID
|
|
||||||
WHERE
|
|
||||||
wtr.IS_FINISH = 0
|
|
||||||
AND wtr.DEFINITION_ID = 11
|
|
||||||
) task11 ON task11.TASK_ID = wtr.ID
|
|
||||||
LEFT JOIN (
|
|
||||||
SELECT
|
|
||||||
wnd.TASK_ID,
|
|
||||||
wnd.CHECK_STATUS as checkStatus,
|
|
||||||
wnd.IS_EXAMINE,
|
|
||||||
wnd.IS_APPROVAL,
|
|
||||||
pu.`NAME` AS checker,
|
|
||||||
puo.NAME AS responer12
|
|
||||||
FROM
|
|
||||||
wf_new_details wnd
|
|
||||||
LEFT JOIN pm_user pu ON pu.id = wnd.CHECKER
|
|
||||||
LEFT JOIN pm_user puo ON puo.id = wnd.CUSTOMER_SERVICE_REP
|
|
||||||
LEFT JOIN wf_task_record wtr ON wtr.id = wnd.TASK_ID
|
|
||||||
WHERE
|
|
||||||
wtr.IS_FINISH = 0
|
|
||||||
AND wtr.DEFINITION_ID = 12
|
|
||||||
) task12 ON task12.TASK_ID = wtr.id
|
|
||||||
LEFT JOIN (
|
|
||||||
SELECT
|
|
||||||
wrd.TASK_ID,
|
|
||||||
pu.`NAME` AS responer18
|
|
||||||
FROM
|
|
||||||
wf_repair_details wrd
|
|
||||||
LEFT JOIN wf_task_record wtr ON wtr.id = wrd.TASK_ID
|
|
||||||
LEFT JOIN pm_user pu ON pu.id = wrd.REPAIR_MAN
|
|
||||||
WHERE
|
|
||||||
wtr.IS_FINISH = 0
|
|
||||||
AND wtr.DEFINITION_ID = 18
|
|
||||||
) task18 ON task18.TASK_ID = wtr.ID
|
|
||||||
LEFT JOIN (
|
|
||||||
SELECT
|
|
||||||
wsd.TASK_ID,
|
|
||||||
pu.`NAME` AS responer19
|
|
||||||
FROM
|
|
||||||
wf_scrap_details wsd
|
|
||||||
LEFT JOIN wf_task_record wtr ON wtr.id = wsd.TASK_ID
|
|
||||||
LEFT JOIN pm_user pu ON pu.id = wsd.SCRAP_CHECKER
|
|
||||||
WHERE
|
|
||||||
wtr.IS_FINISH = 0
|
|
||||||
AND wtr.DEFINITION_ID = 19
|
|
||||||
) task19 ON task19.TASK_ID = wtr.ID
|
|
||||||
LEFT JOIN (
|
|
||||||
SELECT
|
|
||||||
wtr.id,
|
|
||||||
pu.`NAME` AS responer20
|
|
||||||
FROM
|
|
||||||
wf_task_record wtr
|
|
||||||
LEFT JOIN pm_user pu ON pu.id = wtr.CHECKER_ID
|
|
||||||
WHERE
|
|
||||||
wtr.IS_FINISH = 0
|
|
||||||
AND wtr.DEFINITION_ID = 20
|
|
||||||
) task20 ON task20.id = wtr.ID
|
|
||||||
LEFT JOIN (
|
|
||||||
SELECT
|
|
||||||
wpsd.TASK_ID,
|
|
||||||
pu.NAME AS responer21
|
|
||||||
FROM
|
|
||||||
wf_put_storage_details wpsd
|
|
||||||
LEFT JOIN pm_user pu ON pu.id = wpsd.CUSTOMER_SERVICE_REP
|
|
||||||
LEFT JOIN wf_task_record wtr ON wtr.id = wpsd.TASK_ID
|
|
||||||
WHERE
|
|
||||||
wtr.IS_FINISH = 0
|
|
||||||
AND wtr.DEFINITION_ID = 21
|
|
||||||
) task21 ON task21.TASK_ID = wtr.id
|
|
||||||
LEFT JOIN (
|
|
||||||
SELECT
|
|
||||||
wsd.TASK_ID,
|
|
||||||
pu.`NAME` AS responer22
|
|
||||||
FROM
|
|
||||||
wf_scrap_details wsd
|
|
||||||
LEFT JOIN wf_task_record wtr ON wtr.id = wsd.TASK_ID
|
|
||||||
LEFT JOIN pm_user pu ON pu.id = wsd.SCRAP_CHECKER
|
|
||||||
WHERE
|
|
||||||
wtr.IS_FINISH = 0
|
|
||||||
AND wtr.DEFINITION_ID = 22
|
|
||||||
) task22 ON task22.TASK_ID = wtr.ID
|
|
||||||
LEFT JOIN (
|
|
||||||
SELECT
|
|
||||||
wrd.TASK_ID,
|
|
||||||
pu.`NAME` AS responer23
|
|
||||||
FROM
|
|
||||||
wf_repair_details wrd
|
|
||||||
LEFT JOIN wf_task_record wtr ON wtr.id = wrd.TASK_ID
|
|
||||||
LEFT JOIN pm_user pu ON pu.id = wrd.REPAIR_MAN
|
|
||||||
WHERE
|
|
||||||
wtr.IS_FINISH = 0
|
|
||||||
AND wtr.DEFINITION_ID = 23
|
|
||||||
) task23 ON task23.TASK_ID = wtr.ID
|
|
||||||
LEFT JOIN (
|
|
||||||
SELECT
|
|
||||||
wrc.TASK_ID,
|
|
||||||
pu.`NAME` AS responer24
|
|
||||||
FROM
|
|
||||||
wf_repair_check wrc
|
|
||||||
LEFT JOIN wf_task_record wtr ON wtr.id = wrc.TASK_ID
|
|
||||||
LEFT JOIN wf_repair_details wrd ON wrd.id = wrc.REPAIR_ID
|
|
||||||
LEFT JOIN pm_user pu ON pu.id = wrd.CUSTOMER_SERVICE_REP
|
|
||||||
WHERE
|
|
||||||
wtr.IS_FINISH = 0
|
|
||||||
AND wtr.DEFINITION_ID = 24
|
|
||||||
) task24 ON task24.TASK_ID = wtr.ID
|
|
||||||
LEFT JOIN (
|
|
||||||
SELECT
|
|
||||||
wpsd.TASK_ID,
|
|
||||||
pu.NAME AS responer25
|
|
||||||
FROM
|
|
||||||
wf_put_storage_details wpsd
|
|
||||||
LEFT JOIN pm_user pu ON pu.id = wpsd.CUSTOMER_SERVICE_REP
|
|
||||||
LEFT JOIN wf_task_record wtr ON wtr.id = wpsd.TASK_ID
|
|
||||||
WHERE
|
|
||||||
wtr.IS_FINISH = 0
|
|
||||||
AND wtr.DEFINITION_ID = 25
|
|
||||||
) task25 ON task25.TASK_ID = wtr.id -->
|
|
||||||
|
|
||||||
select
|
|
||||||
a.id,
|
|
||||||
a.definitionId,
|
|
||||||
a.number,
|
|
||||||
a.processName,
|
|
||||||
a.definitionName,
|
|
||||||
a.creatorName,
|
|
||||||
a.operationTime,
|
|
||||||
a.isFinish
|
|
||||||
from
|
|
||||||
(SELECT
|
|
||||||
wtr.id,
|
|
||||||
wtr.DEFINITION_ID AS definitionId,
|
wtr.DEFINITION_ID AS definitionId,
|
||||||
wtr.NUMBER AS number,
|
CASE
|
||||||
wtr.IS_FINISH as isFinish,
|
WHEN wtr.DEFINITION_ID = 11 THEN wtr1.IS_FINISH
|
||||||
wpd.NAME AS processName,
|
ELSE wtr.IS_FINISH
|
||||||
wtd.NAME AS definitionName,
|
END AS isFinish,
|
||||||
pu.`NAME` AS creatorName,
|
'TASK' AS source
|
||||||
DATE_FORMAT( wtr.OPERATION_TIME, '%Y-%m-%d' ) AS operationTime
|
|
||||||
FROM
|
FROM
|
||||||
wf_task_record wtr
|
wf_task_record wtr
|
||||||
LEFT JOIN pm_user pu ON pu.id = wtr.OPERATION_USER
|
|
||||||
LEFT JOIN wf_task_definition wtd ON wtd.ID = wtr.DEFINITION_ID
|
|
||||||
LEFT JOIN wf_process_definition wpd ON wpd.id = wtr.PROCESS_ID
|
|
||||||
LEFT JOIN wf_agreement_task wat ON wat.TASK_ID = wtr.ID
|
|
||||||
LEFT JOIN wf_lease_agreement wla ON wla.ID = wat.AGREEMENT_ID
|
|
||||||
WHERE
|
|
||||||
|
|
||||||
wtr.DEFINITION_ID = 1 and wtr.IS_FINISH = #{param.isFinish}
|
|
||||||
AND wtr.IS_ACTIVE = 1 UNION
|
|
||||||
SELECT
|
|
||||||
wtr.id,
|
|
||||||
wtr.DEFINITION_ID AS definitionId,
|
|
||||||
wtr.NUMBER AS number,
|
|
||||||
wtr.IS_FINISH as isFinish,
|
|
||||||
wpd.NAME AS processName,
|
|
||||||
wtd.NAME AS definitionName,
|
|
||||||
pu.`NAME` AS creatorName,
|
|
||||||
DATE_FORMAT( wtr.OPERATION_TIME, '%Y-%m-%d' ) AS operationTime
|
|
||||||
FROM
|
|
||||||
wf_task_record wtr
|
|
||||||
LEFT JOIN pm_user pu ON pu.id = wtr.OPERATION_USER
|
|
||||||
LEFT JOIN wf_task_definition wtd ON wtd.ID = wtr.DEFINITION_ID
|
|
||||||
LEFT JOIN wf_process_definition wpd ON wpd.id = wtr.PROCESS_ID
|
|
||||||
LEFT JOIN wf_agreement_task wat ON wat.TASK_ID = wtr.ID
|
|
||||||
LEFT JOIN wf_lease_agreement wla ON wla.ID = wat.AGREEMENT_ID
|
|
||||||
WHERE
|
|
||||||
|
|
||||||
wtr.DEFINITION_ID = 2 and wtr.IS_FINISH = #{param.isFinish}
|
|
||||||
AND wtr.IS_ACTIVE = 1 UNION
|
|
||||||
SELECT
|
|
||||||
wtr.id,
|
|
||||||
wtr.DEFINITION_ID AS definitionId,
|
|
||||||
wtr1.NUMBER AS number,
|
|
||||||
wtr.IS_FINISH as isFinish,
|
|
||||||
wpd.NAME AS processName,
|
|
||||||
wtd.NAME AS definitionName,
|
|
||||||
pu.`NAME` AS creatorName,
|
|
||||||
DATE_FORMAT( wtr.OPERATION_TIME, '%Y-%m-%d' ) AS operationTime
|
|
||||||
FROM
|
|
||||||
wf_task_record wtr
|
|
||||||
LEFT JOIN pm_user pu ON pu.id = wtr.OPERATION_USER
|
|
||||||
LEFT JOIN wf_task_definition wtd ON wtd.ID = wtr.DEFINITION_ID
|
|
||||||
LEFT JOIN wf_process_definition wpd ON wpd.id = wtr.PROCESS_ID
|
|
||||||
LEFT JOIN wf_agreement_task wat ON wat.TASK_ID = wtr.ID
|
|
||||||
LEFT JOIN wf_lease_agreement wla ON wla.ID = wat.AGREEMENT_ID
|
|
||||||
LEFT JOIN wf_task_record wtr1 ON wtr1.ID = wtr.SUP_ID
|
LEFT JOIN wf_task_record wtr1 ON wtr1.ID = wtr.SUP_ID
|
||||||
WHERE
|
|
||||||
|
|
||||||
wtr.DEFINITION_ID = 5 and wtr.IS_FINISH = #{param.isFinish}
|
|
||||||
AND wtr.IS_ACTIVE = 1
|
|
||||||
UNION
|
|
||||||
SELECT
|
|
||||||
wtr.id,
|
|
||||||
wtr.DEFINITION_ID AS definitionId,
|
|
||||||
wtr.NUMBER AS number,
|
|
||||||
wtr.IS_FINISH as isFinish,
|
|
||||||
wpd.NAME AS processName,
|
|
||||||
wtd.NAME AS definitionName,
|
|
||||||
pu.`NAME` AS creatorName,
|
|
||||||
DATE_FORMAT( wtr.OPERATION_TIME, '%Y-%m-%d' ) AS operationTime
|
|
||||||
FROM
|
|
||||||
wf_task_record wtr
|
|
||||||
LEFT JOIN pm_user pu ON pu.id = wtr.OPERATION_USER
|
LEFT JOIN pm_user pu ON pu.id = wtr.OPERATION_USER
|
||||||
LEFT JOIN wf_task_definition wtd ON wtd.ID = wtr.DEFINITION_ID
|
LEFT JOIN wf_task_definition wtd ON wtd.ID = wtr.DEFINITION_ID
|
||||||
LEFT JOIN wf_process_definition wpd ON wpd.id = wtr.PROCESS_ID
|
LEFT JOIN wf_process_definition wpd ON wpd.id = wtr.PROCESS_ID
|
||||||
LEFT JOIN wf_agreement_task wat ON wat.TASK_ID = wtr.ID
|
|
||||||
LEFT JOIN wf_lease_agreement wla ON wla.ID = wat.AGREEMENT_ID
|
|
||||||
WHERE
|
WHERE
|
||||||
|
wtr.DEFINITION_ID IN (1, 2, 5, 8, 11)
|
||||||
wtr.DEFINITION_ID = 8 and wtr.IS_FINISH =#{param.isFinish}
|
AND (
|
||||||
|
(wtr.DEFINITION_ID = 11 AND wtr1.IS_FINISH = #{param.isFinish})
|
||||||
|
OR (wtr.DEFINITION_ID != 11 AND wtr.IS_FINISH = #{param.isFinish})
|
||||||
|
)
|
||||||
AND wtr.IS_ACTIVE = 1
|
AND wtr.IS_ACTIVE = 1
|
||||||
UNION
|
<if test="param.operationUserId != null and param.operationUserId != ''">
|
||||||
|
AND wtr.OPERATION_USER = #{param.operationUserId}
|
||||||
|
</if>
|
||||||
SELECT
|
|
||||||
wtr.id,
|
|
||||||
wtr.DEFINITION_ID AS definitionId,
|
|
||||||
wtr1.NUMBER AS number,
|
|
||||||
wtr1.IS_FINISH as isFinish,
|
|
||||||
wpd.NAME AS processName,
|
|
||||||
wtd.NAME AS definitionName,
|
|
||||||
pu.`NAME` AS creatorName,
|
|
||||||
DATE_FORMAT( wtr.OPERATION_TIME, '%Y-%m-%d' ) AS operationTime
|
|
||||||
FROM
|
|
||||||
wf_task_record wtr
|
|
||||||
LEFT JOIN pm_user pu ON pu.id = wtr.OPERATION_USER
|
|
||||||
LEFT JOIN wf_task_definition wtd ON wtd.ID = wtr.DEFINITION_ID
|
|
||||||
LEFT JOIN wf_process_definition wpd ON wpd.id = wtr.PROCESS_ID
|
|
||||||
LEFT JOIN wf_agreement_task wat ON wat.TASK_ID = wtr.ID
|
|
||||||
LEFT JOIN wf_lease_agreement wla ON wla.ID = wat.AGREEMENT_ID
|
|
||||||
LEFT join wf_task_record wtr1 on wtr1.ID=wtr.SUP_ID
|
|
||||||
WHERE
|
|
||||||
|
|
||||||
wtr.DEFINITION_ID = 11 and wtr1.IS_FINISH = #{param.isFinish}
|
|
||||||
AND wtr.IS_ACTIVE = 1
|
|
||||||
)a
|
|
||||||
WHERE
|
|
||||||
a.isFinish= #{param.isFinish}
|
|
||||||
<if test="param.keyWord != null and param.keyWord != ''">
|
<if test="param.keyWord != null and param.keyWord != ''">
|
||||||
AND (
|
AND (
|
||||||
wpd.NAME LIKE concat("%",#{param.keyWord},"%") or
|
wpd.NAME LIKE CONCAT('%', #{param.keyWord}, '%')
|
||||||
wtd.NAME LIKE concat("%",#{param.keyWord},"%") or
|
OR wtd.NAME LIKE CONCAT('%', #{param.keyWord}, '%')
|
||||||
pu.NAME LIKE concat("%",#{param.keyWord},"%") or
|
OR pu.NAME LIKE CONCAT('%', #{param.keyWord}, '%')
|
||||||
bp.`NAME` LIKE concat("%",#{param.keyWord},"%")
|
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
GROUP BY a.id
|
)
|
||||||
ORDER BY a.id DESC
|
|
||||||
|
UNION ALL
|
||||||
|
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
cpa.id AS id,
|
||||||
|
cpa.code AS number,
|
||||||
|
'用车计划' AS processName,
|
||||||
|
'用车申请' AS definitionName,
|
||||||
|
pu.NAME AS creatorName,
|
||||||
|
DATE_FORMAT(cpa.create_time, '%Y-%m-%d') AS operationTime,
|
||||||
|
NULL AS definitionId,
|
||||||
|
NULL AS isFinish,
|
||||||
|
'PLAN' AS source
|
||||||
|
FROM
|
||||||
|
car_plan_apply cpa
|
||||||
|
LEFT JOIN pm_user pu ON pu.id = cpa.creator
|
||||||
|
WHERE
|
||||||
|
cpa.status = '1'
|
||||||
|
AND (
|
||||||
|
<if test="param.operationUserId == null or param.operationUserId == ''">
|
||||||
|
1 = 1
|
||||||
|
</if>
|
||||||
|
<if test="param.operationUserId == '14'">
|
||||||
|
cpa.status_type = '3'
|
||||||
|
</if>
|
||||||
|
<if test="param.operationUserId in ('57','29','55','56','67')">
|
||||||
|
cpa.status_type = '4'
|
||||||
|
</if>
|
||||||
|
<if test="!(param.operationUserId == null
|
||||||
|
or param.operationUserId == ''
|
||||||
|
or param.operationUserId == '14'
|
||||||
|
or param.operationUserId in ('57','29','55','56','67'))">
|
||||||
|
1 = 0
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
<if test="param.keyWord != null and param.keyWord != ''">
|
||||||
|
AND pu.NAME LIKE CONCAT('%', #{param.keyWord}, '%')
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
|
||||||
|
UNION ALL
|
||||||
|
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
cpo.id AS id,
|
||||||
|
cpa.code AS number,
|
||||||
|
'派车计划' AS processName,
|
||||||
|
CASE cpo.type
|
||||||
|
WHEN 1 THEN '车辆派车'
|
||||||
|
WHEN 2 THEN '吊车派车'
|
||||||
|
ELSE '派车'
|
||||||
|
END AS definitionName,
|
||||||
|
pu.NAME AS creatorName,
|
||||||
|
DATE_FORMAT(cpo.create_time, '%Y-%m-%d') AS operationTime,
|
||||||
|
NULL AS definitionId,
|
||||||
|
cpo.status AS isFinish,
|
||||||
|
'OUT' AS source
|
||||||
|
FROM
|
||||||
|
car_plan_out cpo
|
||||||
|
LEFT JOIN pm_user pu ON pu.id = cpo.creator
|
||||||
|
LEFT JOIN car_plan_apply cpa ON cpo.apply_id = cpa.id
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
<if test="param.operationUserId in ('57','29','55','56','67')">
|
||||||
|
AND cpo.status = '0'
|
||||||
|
</if>
|
||||||
|
<if test="param.operationUserId in ('49','50')">
|
||||||
|
AND cpo.status = '1'
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="!(param.operationUserId == null
|
||||||
|
or param.operationUserId == ''
|
||||||
|
or param.operationUserId in ('49','50')
|
||||||
|
or param.operationUserId in ('57','29','55','56','67'))">
|
||||||
|
1 = 0
|
||||||
|
</if>
|
||||||
|
<if test="param.keyWord != null and param.keyWord != ''">
|
||||||
|
AND pu.NAME LIKE CONCAT('%', #{param.keyWord}, '%')
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
|
||||||
|
ORDER BY id DESC
|
||||||
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="find" parameterType="com.bonus.wf.beans.TaskRecordBean" resultMap="taskRecord">
|
<select id="find" parameterType="com.bonus.wf.beans.TaskRecordBean" resultMap="taskRecord">
|
||||||
SELECT wtr.ID,wtr.DEFINITION_ID as definitionId,wtd.`NAME` as definishtionName,wtr.PROCESS_ID as processId,
|
SELECT wtr.ID,wtr.DEFINITION_ID as definitionId,wtd.`NAME` as definishtionName,wtr.PROCESS_ID as processId,
|
||||||
wpd.`NAME` as processName,wtr.OPERATION_USER as operationUserId,pu.`NAME` as operationUserName,
|
wpd.`NAME` as processName,wtr.OPERATION_USER as operationUserId,pu.`NAME` as operationUserName,
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,13 @@ public class ReturnMaterialTaskRecordController extends BaseController<ReturnMat
|
||||||
public String findUnFinishContent(@RequestBody Page<TaskRecordBean> page,HttpServletRequest request,TaskRecordBean o,Model model, HttpSession sess) {
|
public String findUnFinishContent(@RequestBody Page<TaskRecordBean> page,HttpServletRequest request,TaskRecordBean o,Model model, HttpSession sess) {
|
||||||
try {
|
try {
|
||||||
String a = request.getParameter("isFinish");
|
String a = request.getParameter("isFinish");
|
||||||
|
String userId = UserShiroHelper.getRealCurrentUser().getId() + "";
|
||||||
// UserBean user = UserShiroHelper.getRealCurrentUser();
|
// UserBean user = UserShiroHelper.getRealCurrentUser();
|
||||||
// page.setUser(user);
|
// page.setUser(user);
|
||||||
|
page.setIsFinish(a);
|
||||||
|
if (!"1".equals(userId)) {
|
||||||
|
page.setOperationUserId(userId);
|
||||||
|
}
|
||||||
page.setIsFinish(a);
|
page.setIsFinish(a);
|
||||||
page = service.findUnFinishContent(page,o);
|
page = service.findUnFinishContent(page,o);
|
||||||
model.addAttribute("page", page);
|
model.addAttribute("page", page);
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,15 @@ public class Page<T> {
|
||||||
private String isFinish;
|
private String isFinish;
|
||||||
|
|
||||||
private String keyWord;
|
private String keyWord;
|
||||||
|
private String operationUserId;
|
||||||
|
|
||||||
|
public String getOperationUserId() {
|
||||||
|
return operationUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOperationUserId(String operationUserId) {
|
||||||
|
this.operationUserId = operationUserId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getIsFinish() {
|
public String getIsFinish() {
|
||||||
return isFinish;
|
return isFinish;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue