| | |
| | | acceptUserName,t.status_cd,t.status_cd statusCd,t.remark,t.store_id,t.store_id storeId,t.res_id,t.res_id |
| | | resId,t.res_name,t.res_name resName,t.start_user_id,t.start_user_id startUserId,t.start_user_name, |
| | | t.start_user_name startUserName,t.aus_id,t.aus_id ausId,t.b_id,t.b_id |
| | | bId,t.stock,t.give_quantity,t.give_quantity giveQuantity |
| | | bId,t.stock,t.give_quantity,t.give_quantity giveQuantity,t.create_time createTime,rst.name rstName,rss.spec_name |
| | | specName,td1.name unitCodeName,td2.name miniUnitCodeName,rst1.name parentRstName,rs.is_fixed isFixed,rs.res_code resCode,td3.name isFixedName |
| | | from allocation_user_storehouse t |
| | | left join resource_store rs on t.res_id = rs.res_id and rs.status_cd = '0' |
| | | left join resource_store_type rst on rs.rst_id = rst.rst_id and rst.status_cd = '0' |
| | | left join resource_store_type rst1 on rs.parent_rst_id = rst1.rst_id and rst1.status_cd = '0' |
| | | left join resource_store_specification rss on rs.rss_id=rss.rss_id and rss.status_cd = '0' |
| | | left join t_dict td1 on rs.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns = 'unit_code' |
| | | left join t_dict td2 on rs.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns = 'unit_code' |
| | | left join t_dict td3 on rs.is_fixed = td3.status_cd and td3.table_name = 'resource_store' and td3.table_columns = 'is_fixed' |
| | | where 1 = 1 |
| | | <if test="acceptUserId !=null and acceptUserId != ''"> |
| | | and t.accept_user_id= #{acceptUserId} |
| | | </if> |
| | | <if test="acceptUserName !=null and acceptUserName != ''"> |
| | | and t.accept_user_name= #{acceptUserName} |
| | | and t.accept_user_name like '%${acceptUserName}%' |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | |
| | | and t.res_id= #{resId} |
| | | </if> |
| | | <if test="resName !=null and resName != ''"> |
| | | and t.res_name= #{resName} |
| | | and t.res_name like '%${resName}%' |
| | | </if> |
| | | <if test="startUserId !=null and startUserId != ''"> |
| | | and t.start_user_id= #{startUserId} |
| | | </if> |
| | | <if test="startUserName !=null and startUserName != ''"> |
| | | and t.start_user_name= #{startUserName} |
| | | and t.start_user_name like '%${startUserName}%' |
| | | </if> |
| | | <if test="ausId !=null and ausId != ''"> |
| | | and t.aus_id= #{ausId} |
| | |
| | | </if> |
| | | <if test="giveQuantity !=null and giveQuantity != ''"> |
| | | and t.give_quantity= #{giveQuantity} |
| | | </if> |
| | | <if test="rstId !=null and rstId != ''"> |
| | | and rs.rst_id= #{rstId} |
| | | </if> |
| | | <if test="parentRstId !=null and parentRstId != ''"> |
| | | and rs.parent_rst_id= #{parentRstId} |
| | | </if> |
| | | <if test="rssId !=null and rssId != ''"> |
| | | and rs.rss_id= #{rssId} |
| | | </if> |
| | | <if test="isFixed !=null and isFixed != ''"> |
| | | and rs.is_fixed= #{isFixed} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | |
| | | <select id="queryAllocationUserStorehousesCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from allocation_user_storehouse t |
| | | left join resource_store rs on t.res_id = rs.res_id and rs.status_cd = '0' |
| | | left join resource_store_type rst on rs.rst_id = rst.rst_id and rst.status_cd = '0' |
| | | left join resource_store_specification rss on rs.rss_id=rss.rss_id and rss.status_cd = '0' |
| | | left join t_dict td1 on rs.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns = 'unit_code' |
| | | left join t_dict td2 on rs.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns = 'unit_code' |
| | | where 1 =1 |
| | | <if test="acceptUserId !=null and acceptUserId != ''"> |
| | | and t.accept_user_id= #{acceptUserId} |
| | | </if> |
| | | <if test="acceptUserName !=null and acceptUserName != ''"> |
| | | and t.accept_user_name= #{acceptUserName} |
| | | and t.accept_user_name like '%${acceptUserName}%' |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | |
| | | and t.res_id= #{resId} |
| | | </if> |
| | | <if test="resName !=null and resName != ''"> |
| | | and t.res_name= #{resName} |
| | | and t.res_name like '%${resName}%' |
| | | </if> |
| | | <if test="startUserId !=null and startUserId != ''"> |
| | | and t.start_user_id= #{startUserId} |
| | | </if> |
| | | <if test="startUserName !=null and startUserName != ''"> |
| | | and t.start_user_name= #{startUserName} |
| | | and t.start_user_name like '%${startUserName}%' |
| | | </if> |
| | | <if test="ausId !=null and ausId != ''"> |
| | | and t.aus_id= #{ausId} |
| | |
| | | <if test="giveQuantity !=null and giveQuantity != ''"> |
| | | and t.give_quantity= #{giveQuantity} |
| | | </if> |
| | | <if test="rstId !=null and rstId != ''"> |
| | | and rs.rst_id= #{rstId} |
| | | </if> |
| | | <if test="isFixed !=null and isFixed != ''"> |
| | | and rs.is_fixed= #{isFixed} |
| | | </if> |
| | | <if test="parentRstId !=null and parentRstId != ''"> |
| | | and rs.parent_rst_id= #{parentRstId} |
| | | </if> |
| | | <if test="rssId !=null and rssId != ''"> |
| | | and rs.rss_id= #{rssId} |
| | | </if> |
| | | </select> |
| | | </mapper> |