Commit 9111e398 authored by 麻笑宇's avatar 麻笑宇

大屏调整提交

parent a366f743
......@@ -36,4 +36,8 @@ public class DPFilterParamDto {
* month , year
*/
private String searchType;
/**
* 1生产单位 2使用单位 3充装单位 4检验检测机构
*/
private String companyType;
}
package com.yeejoin.amos.boot.module.common.api.enums;
import lombok.Getter;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
@Getter
public enum UnitTypeEnum {
//type 1生产单位 2使用单位 3充装单位 4检验检测机构
//制造单位
ZZDW("制造单位","1236","1"),
//设计单位
SJDW("设计单位","1235","1"),
//安改维单位
AGWDW("安装改造维修单位","1234","1"),
//使用单位
SYDW("使用单位","1232","2"),
//充装单位
CZDW("充装单位","1231","3"),
//检验检测机构
JYJCJG("检验检测机构","1233","4"),
;
String name;
String code;
String type;
private UnitTypeEnum(String name, String code, String type) {
this.name = name;
this.code = code;
this.type = type;
}
public static List<String> getNameListByType(String type) {
List<String> list = new ArrayList<>();
for (UnitTypeEnum testEnum : EnumSet.allOf(UnitTypeEnum.class)) {
if (testEnum.getType().equals(type)) {
list.add(testEnum.getName());
}
}
return list;
}
}
package com.yeejoin.amos.boot.module.common.api.enums;
import lombok.Getter;
import java.util.*;
@Getter
public enum UserPostEnum {
//type 1生产单位 2使用单位 3充装单位 4检验检测机构
//主要负责人
ZYFZR("主要负责人","6548","1,2,3"),
//质量安全总监
ZLAQZJ("质量安全总监","6550","1"),
//质量安全员
ZLAQY("质量安全员","6551","1"),
//作业人员
ZYRY("作业人员","6552","1,2,3,4"),
//检验人员
ZJRY("检验人员","66151","1,4"),
//检测人员
JCRY("检测人员","66152","1,4"),
//安全总监
AQZJ("安全总监","6547","2,3"),
//安全员
AQY("安全员","6549","2,3"),
//质量保证体系人员(非字典表字段,后期修改code)
ZLBZTXRY("质量保证体系人员","nullnull","1,3,4"),
;
String name;
String code;
String type;
private UserPostEnum(String name, String code, String type) {
this.name = name;
this.code = code;
this.type = type;
}
public static List<Map<String,String>> getEnumListByType(String type) {
List<Map<String,String>> list = new ArrayList<>();
for (UserPostEnum testEnum : EnumSet.allOf(UserPostEnum.class)) {
Map<String,String> map = new HashMap<>();
if (testEnum.getType().contains(type)) {
map.put("name",testEnum.getName());
map.put("code",testEnum.getCode());
list.add(map);
}
}
return list;
}
}
......@@ -26,4 +26,6 @@ public interface ZLStatisticsMapper {
List<Map<String, Object>> supervisorCount(@Param("screenDto") DPFilterParamDto screenDto);
String getOrgCodeByCompanyCode(@Param("cityCode") String cityCode);
List<Map<String, String>> userCountNew(@Param("screenDto") DPFilterParamDto screenDto, @Param("unitTypeList") List<String> unitTypeList);
}
......@@ -11,7 +11,7 @@
WHERE company_code = #{screenDto.cityCode}
) AS subquery
JOIN tz_base_enterprise_info bi ON bi.supervise_org_code LIKE CONCAT(subquery.org_code, '%')
where bi.equip_category is not null and bi.equip_category != '[]' and bi.unit_type is not null;
where bi.unit_type is not null
</select>
<select id="testOrg" resultType="java.util.Map">
SELECT COUNT(1),
......@@ -35,7 +35,7 @@
INNER JOIN tzs_user_info tui ON bi.use_unit_code = tui.unit_code
WHERE
tui.post LIKE concat ( '%', '6552', '%' )
AND bi.unit_type IS NOT NULL;
AND bi.unit_type IS NOT NULL
</select>
<select id="supervisorCount" resultType="java.util.Map">
SELECT
......@@ -52,6 +52,23 @@
<select id="getOrgCodeByCompanyCode" resultType="java.lang.String">
select org_code from privilege_company where company_code = #{cityCode} limit 1
</select>
<select id="userCountNew" resultType="java.util.Map">
SELECT
tui.post
FROM
( SELECT org_code FROM privilege_company WHERE company_code = #{screenDto.cityCode} ) AS subquery
INNER JOIN tz_base_enterprise_info bi ON bi.supervise_org_code LIKE CONCAT ( subquery.org_code, '%' )
INNER JOIN tzs_user_info tui ON bi.use_unit_code = tui.unit_code
WHERE
bi.unit_type IS NOT NULL
AND tui.post IS NOT NULL
<if test="unitTypeList != null and unitTypeList.size() > 0">
AND
<foreach collection="unitTypeList" item="unitType" open="(" separator="OR" close=")">
bi.unit_type LIKE concat ( '%', #{unitType}, '%' )
</foreach>
</if>
</select>
</mapper>
......
......@@ -57,6 +57,13 @@ public class ZLDPStatisticsController {
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/userCountNew")
@ApiOperation(httpMethod = "POST", value = "大屏-总览-左屏-人员统计新", notes = "大屏-总览-左屏-人员统计")
public ResponseModel<Map<String, Object>> userCountNew(@RequestBody DPFilterParamDto screenDto) {
return ResponseHelper.buildResponse(statisticsService.userCountNew(screenDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/supervisorCount")
@ApiOperation(httpMethod = "POST", value = "大屏-总览-左屏-行业主管部门统计", notes = "大屏-总览-左屏-行业主管部门统计")
public ResponseModel<Map<String, Object>> supervisorCount(@RequestBody DPFilterParamDto screenDto) {
......
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