Commit 37636d47 authored by suhuiguang's avatar suhuiguang

1.使用登记列表数据筛选转办数据权限不正确

parent 87768414
...@@ -20,7 +20,6 @@ public class JgUseRegistrationDto extends BaseDto { ...@@ -20,7 +20,6 @@ public class JgUseRegistrationDto extends BaseDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "设备监管码") @ApiModelProperty(value = "设备监管码")
private String supervisoryCode; private String supervisoryCode;
...@@ -96,6 +95,9 @@ public class JgUseRegistrationDto extends BaseDto { ...@@ -96,6 +95,9 @@ public class JgUseRegistrationDto extends BaseDto {
@ApiModelProperty(value = "设备代码") @ApiModelProperty(value = "设备代码")
private String equCode; private String equCode;
@ApiModelProperty(value = "设备种类")
private String equList;
private List<String> roleIds; private List<String> roleIds;
......
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
UPDATE tzs_jg_use_registration set promoter = null UPDATE tzs_jg_use_registration set promoter = null
where sequence_nbr = #{id} where sequence_nbr = #{id}
</update> </update>
<sql id="page-list">
<select id="getListPage" resultType="java.util.Map">
select ur.sequence_nbr as sequenceNbr, select ur.sequence_nbr as sequenceNbr,
ur.audit_status as auditStatus, ur.audit_status as auditStatus,
date_format(reg_date,'%Y-%m-%d') as regDate, date_format(reg_date,'%Y-%m-%d') as regDate,
...@@ -18,8 +16,9 @@ ...@@ -18,8 +16,9 @@
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory, (SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
jri.PRODUCT_NAME as productName, jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode, jri.EQU_CODE as equCode,
jri.EQU_LIST as equList,
(SELECT name from tz_equipment_category where code = jri.EQU_LIST) as equListName,
use.USE_INNER_CODE as innerCode, use.USE_INNER_CODE as innerCode,
-- concat(use.PROVINCE_NAME,use.CITY_NAME,use.COUNTY_NAME) as place,
ur.use_address as place, ur.use_address as place,
ur.instance_id as instanceId, ur.instance_id as instanceId,
re.equ_id as equipId, re.equ_id as equipId,
...@@ -38,9 +37,19 @@ ...@@ -38,9 +37,19 @@
LEFT JOIN idx_biz_jg_register_info jri on re.equ_id = jri.RECORD LEFT JOIN idx_biz_jg_register_info jri on re.equ_id = jri.RECORD
LEFT JOIN idx_biz_jg_use_info use on re.equ_id = use.RECORD LEFT JOIN idx_biz_jg_use_info use on re.equ_id = use.RECORD
LEFT JOIN idx_biz_jg_other_info other on re.equ_id = other.RECORD LEFT JOIN idx_biz_jg_other_info other on re.equ_id = other.RECORD
</sql>
<select id="getListPage" resultType="java.util.Map">
select
*
from
(<include refid="page-list"/>
<where> <where>
ur.is_delete = 0 ur.is_delete = 0
<if test="dto.equList != null and dto.equList != ''">
and jri. EQU_LIST= #{dto.equList}
</if>
<if test="dto.equCategory != null and dto.equCategory != ''"> <if test="dto.equCategory != null and dto.equCategory != ''">
and jri.EQU_CATEGORY = #{dto.equCategory} and jri.EQU_CATEGORY = #{dto.equCategory}
</if> </if>
...@@ -65,9 +74,29 @@ ...@@ -65,9 +74,29 @@
<if test="dto.dataType == 'company' "> <if test="dto.dataType == 'company' ">
and ur.use_unit_credit_code = #{dto.unitCode} and ur.use_unit_credit_code = #{dto.unitCode}
</if> </if>
OR (ur.transfer_to_user_ids LIKE concat ( '%', #{dto.currentUserId}, '%' ) AND ur.is_delete = 0 )
</where> </where>
order by ur.rec_date desc union
<include refid="page-list"/>
<where>
ur.is_delete = 0
and ur.transfer_to_user_ids LIKE concat ('%', #{dto.currentUserId}, '%')
<if test="dto.equList != null and dto.equList != ''">
and jri. EQU_LIST= #{dto.equList}
</if>
<if test="dto.equCategory != null and dto.equCategory != ''">
and jri.EQU_CATEGORY = #{dto.equCategory}
</if>
<if test="dto.status != null and dto.status != ''">
and ur.status = #{dto.status}
</if>
<if test="dto.equCode != null and dto.equCode != ''">
and jri.EQU_CODE like concat('%',#{dto.equCode},'%')
</if>
<if test="dto.useUnitName != null and dto.useUnitName != ''">
and ur.use_unit_name like concat('%',#{dto.useUnitName},'%')
</if>
</where>)
order by regDate desc
</select> </select>
<select id="getDetail" resultType="java.util.Map"> <select id="getDetail" resultType="java.util.Map">
SELECT SELECT
......
...@@ -405,7 +405,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -405,7 +405,7 @@ public class CommonServiceImpl implements ICommonService {
private String getFtlPathByBiz(UseFlagParamDto useFlagParamDto) { private String getFtlPathByBiz(UseFlagParamDto useFlagParamDto) {
String ftlPath = ""; String ftlPath = "";
// 锅炉、压力容器(气瓶除外)、起重机械、客运索道、大型游乐设施、场(厂)内专用机动车辆 使用式样一 // 锅炉、压力容器(气瓶除外)、起重机械、客运索道、大型游乐设施、场(厂)内专用机动车辆 使用式样一
String[] flag1EquipList = {"1000", "2000", "4000", "9000", "6000"}; String[] flag1EquipList = {"1000", "2000", "4000", "5000", "9000", "6000"};
if (Arrays.asList(flag1EquipList).contains(useFlagParamDto.getEquListCode())) { if (Arrays.asList(flag1EquipList).contains(useFlagParamDto.getEquListCode())) {
ftlPath = "flag1-use-equip.ftl"; ftlPath = "flag1-use-equip.ftl";
} }
......
...@@ -110,8 +110,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -110,8 +110,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private RedissonClient redissonClient; private RedissonClient redissonClient;
public Page<Map<String, Object>> getList(JgUseRegistrationDto dto, Page<Map<String, Object>> page, List<String> roleIds) { public Page<Map<String, Object>> getList(JgUseRegistrationDto dto, Page<Map<String, Object>> page, List<String> roleIds) {
Page<Map<String, Object>> listPage = this.baseMapper.getListPage(page, dto, roleIds); return this.baseMapper.getListPage(page, dto, roleIds);
return listPage;
} }
public Page<Map<String, Object>> getEquipList(Page<Map<String, Object>> page, String factoryNum, String equList, String equCategory) { public Page<Map<String, Object>> getEquipList(Page<Map<String, Object>> page, String factoryNum, String equList, String equCategory) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment