机具库存收藏修改

This commit is contained in:
jiang 2025-12-03 19:52:59 +08:00
parent bc847087d8
commit 037c8e3e69
4 changed files with 94 additions and 81 deletions

View File

@ -97,51 +97,57 @@
</select> </select>
<select id="findGpsFlowPage" parameterType="com.bonus.ma.beans.GpsBindingBean" resultMap="gisBean"> <select id="findGpsFlowPage" parameterType="com.bonus.ma.beans.GpsBindingBean" resultMap="gisBean">
select DISTINCT select DISTINCT
mam.ID,matt.ID as tyoeId0,matt.`NAME` as typeName,mat.ID as tyoeId,mat.`NAME` as type, mam.ID,matt.ID as tyoeId0,matt.`NAME` as typeName,mat.ID as tyoeId,mat.`NAME` as type,
mam.OUT_FAC_TIME as outFactortTime,mam.DEVICE_CODE as deviceCode,mam.OUT_FAC_NUM as outFactortNum,ROUND(mat.BUY_PRICE) as buyPrice,mam.PIC_URL as picUrl, mam.OUT_FAC_TIME as outFactortTime,mam.DEVICE_CODE as deviceCode,mam.OUT_FAC_NUM as
mam.IS_FIXED_ASSETS as isFixedAssets,mat.LEASE_PRICE as leasePrice,ROUND(mat.PAY_PRICE) as payPrice, mam.ASSETS_NUM as assetNum,mam.CYCLE_NUM as outInNum, outFactortNum,ROUND(mat.BUY_PRICE) as buyPrice,mam.PIC_URL as picUrl,
mam.REMARK as remarks,mam.PROPERTY_DEPARTMENT as propertyDepartment,mam.USE_DEPARTMENT as useDepartment,mam.SERVICE_LIFE as serviceLife, mam.IS_FIXED_ASSETS as isFixedAssets,mat.LEASE_PRICE as leasePrice,ROUND(mat.PAY_PRICE) as payPrice,
mam.BATCH_STATUS as batchStatus,mam.GPS_CODE as gpsCode,mam.MAKE_ORDER_DATE as makeOrderDate,mam.INVOICE_DATE as invoiceDate,mam.QRCODE as qrcode,mam.DEVICE_TYPE as deviceType mam.ASSETS_NUM as assetNum,mam.CYCLE_NUM as outInNum,
,org.NAME companyName,mam.ORIGIN_NUM originNum,rel.ORG_ID orgId ,mam.GPS_CODE ,flow.OPERTER_TIME optTime,flow.OPERTER,user.`NAME` ,user.LOGIN_NAME userName mam.REMARK as remarks,mam.PROPERTY_DEPARTMENT as propertyDepartment,mam.USE_DEPARTMENT as
,flow.GIS_CODE gisCode,flow.type gisType useDepartment,mam.SERVICE_LIFE as serviceLife,
from ma_gis_code_flow flow mam.BATCH_STATUS as batchStatus,mam.GPS_CODE as gpsCode,mam.MAKE_ORDER_DATE as makeOrderDate,mam.INVOICE_DATE as
LEFT JOIN mm_machines mam on flow.MA_ID=mam.id invoiceDate,mam.QRCODE as qrcode,mam.DEVICE_TYPE as deviceType
LEFT JOIN ma_status mas on mam.BATCH_STATUS = mas.BATCH_STATUS ,org.NAME companyName,mam.ORIGIN_NUM originNum,rel.ORG_ID orgId ,mam.GPS_CODE ,flow.OPERTER_TIME
left join pm_user user on user.id=flow.OPERTER optTime,flow.OPERTER,user.`NAME` ,user.LOGIN_NAME userName
LEFT JOIN mm_type mat on mam.TYPE = mat.ID ,flow.GIS_CODE gisCode,flow.type gisType
LEFT JOIN mm_type matt on matt.ID = mat.PARENT_ID from ma_gis_code_flow flow
LEFT JOIN ma_org_relation rel on rel.TYPE_ID=mat.ID LEFT JOIN mm_machines mam on flow.MA_ID=mam.id
LEFT JOIN pm_organization org on org.ID=rel.ORG_ID LEFT JOIN ma_status mas on mam.BATCH_STATUS = mas.BATCH_STATUS
where 1=1 and mam.id is not null left join pm_user user on user.id=flow.OPERTER
<if test='param.orgId !=null and param.orgId!="" and param.orgId !="1" '> LEFT JOIN mm_type mat on mam.TYPE = mat.ID
and rel.ORG_ID=#{param.orgId} LEFT JOIN mm_type matt on matt.ID = mat.PARENT_ID
</if> LEFT JOIN ma_org_relation rel on rel.TYPE_ID=mat.ID
<if test="param.batchStatus != 0"> LEFT JOIN pm_organization org on org.ID=rel.ORG_ID
and mas.MA_STATUS = #{param.batchStatus} where 1=1 and mam.id is not null
</if> <if test='param.orgId !=null and param.orgId!="" and param.orgId !="1" '>
<if test="param.deviceType != 0"> and rel.ORG_ID=#{param.orgId}
and mam.DEVICE_TYPE = #{param.deviceType} </if>
</if> <if test="param.batchStatus != 0">
<if test="param.typeName != null and param.typeName != ''"> and mas.MA_STATUS = #{param.batchStatus}
and matt.`NAME` = #{param.typeName} </if>
</if> <if test="param.deviceType != 0">
<if test="param.type != null and param.type != ''"> and mam.DEVICE_TYPE = #{param.deviceType}
and mat.`NAME` = #{param.type} </if>
</if> <if test="param.typeName != null and param.typeName != ''">
<if test="param.keyWord !=null and param.keyWord !=''"> and matt.`NAME` LIKE CONCAT('%', #{param.typeName},'%')
and ( </if>
matt.`NAME` LIKE CONCAT('%',#{param.keyWord},'%') OR <if test="param.type != null and param.type != ''">
mam.DEVICE_CODE LIKE CONCAT('%',#{param.keyWord},'%') OR and mat.`NAME` LIKE CONCAT('%',#{param.type},'%')
mat.`NAME` LIKE CONCAT('%',#{param.keyWord},'%') OR </if>
mam.QRCODE LIKE CONCAT('%',#{param.keyWord},'%') OR <if test="param.keyWord !=null and param.keyWord !=''">
mam.BATCH_STATUS LIKE CONCAT('%',#{param.keyWord},'%') OR and (
flow.GIS_CODE LIKE CONCAT('%',#{param.keyWord},'%') OR matt.`NAME` LIKE CONCAT('%',#{param.keyWord},'%') OR
user.LOGIN_NAME LIKE CONCAT('%',#{param.keyWord},'%') mam.DEVICE_CODE LIKE CONCAT('%',#{param.keyWord},'%') OR
) mat.`NAME` LIKE CONCAT('%',#{param.keyWord},'%') OR
</if> mam.QRCODE LIKE CONCAT('%',#{param.keyWord},'%') OR
mam.BATCH_STATUS LIKE CONCAT('%',#{param.keyWord},'%') OR
flow.GIS_CODE LIKE CONCAT('%',#{param.keyWord},'%') OR
user.LOGIN_NAME LIKE CONCAT('%',#{param.keyWord},'%') OR
org.NAME LIKE CONCAT('%',#{param.keyWord},'%')
)
</if>
</select> </select>
<select id="getGisCodeBylist" parameterType="com.bonus.ma.beans.GpsBindingBean" resultMap="gisBean"> <select id="getGisCodeBylist" parameterType="com.bonus.ma.beans.GpsBindingBean" resultMap="gisBean">

View File

@ -28,7 +28,9 @@
AND( AND(
wsa.`CODE` LIKE CONCAT('%',#{param.keyWord},'%') wsa.`CODE` LIKE CONCAT('%',#{param.keyWord},'%')
OR wsa.CREATOR LIKE CONCAT('%',#{param.keyWord},'%') OR wsa.CREATOR LIKE CONCAT('%',#{param.keyWord},'%')
OR wsa.APPLY_REMARK LIKE CONCAT('%',#{param.keyWord},'%') OR wsa.APPLY_REMARK LIKE CONCAT('%',#{param.keyWord},'%')
OR pu.`NAME` LIKE CONCAT('%',#{param.keyWord},'%')
OR mt2.`NAME` LIKE CONCAT('%',#{param.keyWord},'%')
) )
</if> </if>
GROUP BY wsa.id GROUP BY wsa.id

View File

@ -29,42 +29,46 @@
</resultMap> </resultMap>
<select id="findByPage" resultMap="scrap" parameterType="com.bonus.scrap.beans.ScrapAuditBean"> <select id="findByPage" resultMap="scrap" parameterType="com.bonus.scrap.beans.ScrapAuditBean">
SELECT SELECT
wsa.ID, wsa.ID,
wsa.`CODE`, wsa.`CODE`,
wsa.CREATE_TIME AS applyTime, wsa.CREATE_TIME AS applyTime,
wsa.apply_remark AS applyRemark, wsa.apply_remark AS applyRemark,
pu.`NAME` AS applyer, pu.`NAME` AS applyer,
pu2.`NAME` AS auditor, pu2.`NAME` AS auditor,
wsa.AUDIT_TIME AS auditTime, wsa.AUDIT_TIME AS auditTime,
wsa.AUDIT_REMARK AS auditRemark , wsa.AUDIT_REMARK AS auditRemark ,
wsa.`STATUS`, wsa.`STATUS`,
GROUP_CONCAT(DISTINCT mt2.`NAME`) as typeName GROUP_CONCAT(DISTINCT mt2.`NAME`) as typeName
FROM FROM
wf_scrap_apply wsa wf_scrap_apply wsa
LEFT JOIN scrap_apply_details sad ON sad.apply_id = wsa.ID LEFT JOIN scrap_apply_details sad ON sad.apply_id = wsa.ID
LEFT JOIN mm_type mt ON mt.ID = sad.type_id LEFT JOIN mm_type mt ON mt.ID = sad.type_id
LEFT JOIN mm_type mt2 ON mt2.ID = mt.PARENT_ID LEFT JOIN mm_type mt2 ON mt2.ID = mt.PARENT_ID
LEFT JOIN pm_user pu on wsa.CREATOR = pu.ID LEFT JOIN pm_user pu on wsa.CREATOR = pu.ID
LEFT JOIN pm_user pu2 on wsa.AUDITOR = pu2.ID LEFT JOIN pm_user pu2 on wsa.AUDITOR = pu2.ID
where wsa.`STATUS` in (0,1,2) where wsa.`STATUS` in (0,1,2)
<if test="param.status != null and param.status != ''"> <if test="param.status != null and param.status != ''">
AND wsa.status = #{param.status} AND wsa.status = #{param.status}
</if> </if>
<if test="param.keyWord != null and param.keyWord != ''"> <if test="param.keyWord != null and param.keyWord != ''">
AND ( AND (
wsa.`CODE` LIKE CONCAT('%',#{param.keyWord},'%') wsa.`CODE` LIKE CONCAT('%',#{param.keyWord},'%')
or pu.`NAME` LIKE CONCAT('%',#{param.keyWord},'%') or pu.`NAME` LIKE CONCAT('%',#{param.keyWord},'%')
or pu2.`NAME` LIKE CONCAT('%',#{param.keyWord},'%') or pu2.`NAME` LIKE CONCAT('%',#{param.keyWord},'%')
OR wsa.CREATOR LIKE CONCAT('%',#{param.keyWord},'%')
) OR wsa.APPLY_REMARK LIKE CONCAT('%',#{param.keyWord},'%')
</if> OR pu.`NAME` LIKE CONCAT('%',#{param.keyWord},'%')
GROUP BY wsa.ID OR mt2.`NAME` LIKE CONCAT('%',#{param.keyWord},'%')
order by wsa.ID desc
</select> )
</if>
GROUP BY wsa.ID
order by wsa.ID desc
</select>
<select id="findScrapApplyById" resultMap="baseResultMap" parameterType="com.bonus.scrap.beans.ScrapAuditBean"> <select id="findScrapApplyById" resultMap="baseResultMap" parameterType="com.bonus.scrap.beans.ScrapAuditBean">

View File

@ -32,6 +32,7 @@
OR mam.ASSETS_NUM LIKE CONCAT('%',#{param.keyWord},'%') OR mam.ASSETS_NUM LIKE CONCAT('%',#{param.keyWord},'%')
OR mam.DEVICE_CODE LIKE CONCAT('%',#{param.keyWord},'%') OR mam.DEVICE_CODE LIKE CONCAT('%',#{param.keyWord},'%')
OR mam.REMARK LIKE CONCAT('%',#{param.keyWord},'%') OR mam.REMARK LIKE CONCAT('%',#{param.keyWord},'%')
OR sup2.NUMBER LIKE CONCAT('%',#{param.keyWord},'%')
) )
</if> </if>
<!-- union <!-- union