Commit 1fe38fcf authored by suhuiguang's avatar suhuiguang

1大屏企业统计检验检测问题

parent 154cbd5d
...@@ -32,24 +32,17 @@ ...@@ -32,24 +32,17 @@
COALESCE(use_unit_certificate, '身份证') AS useUnitCertificate COALESCE(use_unit_certificate, '身份证') AS useUnitCertificate
FROM FROM
tz_base_enterprise_info tz_base_enterprise_info
<if test=" tzBaseEnterpriseInfoDto.unitType.indexOf('检验检测机构') !=-1 "> <where>
JOIN (select unit_code,max(accept_date) from tz_jyjc_opening_application <if test="tzBaseEnterpriseInfoDto.unitType.indexOf('检验检测机构') !=-1 and tzBaseEnterpriseInfoDto.jyjcStatus!=null and tzBaseEnterpriseInfoDto.jyjcStatus!=''">
where 1=1 use_unit_code in
<if test=" tzBaseEnterpriseInfoDto.jyjcStatus!=null and tzBaseEnterpriseInfoDto.jyjcStatus!='' "> (select distinct unit_code from tz_jyjc_opening_application
and status = #{tzBaseEnterpriseInfoDto.jyjcStatus} where
</if> status = #{tzBaseEnterpriseInfoDto.jyjcStatus}
<if test=" tzBaseEnterpriseInfoDto.jyjcType!=null and tzBaseEnterpriseInfoDto.jyjcType!='' "> <if test=" tzBaseEnterpriseInfoDto.jyjcType!=null and tzBaseEnterpriseInfoDto.jyjcType!='' ">
and open_biz_type = #{tzBaseEnterpriseInfoDto.jyjcType} and open_biz_type = #{tzBaseEnterpriseInfoDto.jyjcType}
</if> </if>
group by unit_code,open_biz_type) t1 )
ON t1.unit_code = use_code
</if> </if>
<where>
<!-- <if-->
<!-- test="tzBaseEnterpriseInfoDto.unitType!=null and tzBaseEnterpriseInfoDto.unitType!='' and tzBaseEnterpriseInfoDto.unitType!='使用单位' ">-->
<!-- -->
<!-- AND unit_type LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.unitType},'%')-->
<!-- </if>-->
<if test="unitTypeList != null and !unitTypeList.isEmpty()"> <if test="unitTypeList != null and !unitTypeList.isEmpty()">
AND ( AND (
<foreach collection="unitTypeList" item="item" separator=" OR "> <foreach collection="unitTypeList" item="item" separator=" OR ">
......
...@@ -77,6 +77,13 @@ public class EnterpriseBizServiceImpl { ...@@ -77,6 +77,13 @@ public class EnterpriseBizServiceImpl {
} }
} }
Page<TzBaseEnterpriseInfoDto> page = new Page<>(pageParam.getCurrent(), pageParam.getSize()); Page<TzBaseEnterpriseInfoDto> page = new Page<>(pageParam.getCurrent(), pageParam.getSize());
if (tzBaseEnterpriseInfoDto.getCityCode() != null) {
String orgCode = stCommonService.getAndSetOrgCode(tzBaseEnterpriseInfoDto.getCityCode());
if (orgCode == null) {
return page;
}
orgCodeList.add(orgCode);
} else {
List<JSONObject> companyType1 = this.getCompanyType(); List<JSONObject> companyType1 = this.getCompanyType();
if (!ValidationUtil.isEmpty(companyType1)) { if (!ValidationUtil.isEmpty(companyType1)) {
for (JSONObject jsonObject : companyType1) { for (JSONObject jsonObject : companyType1) {
...@@ -86,12 +93,6 @@ public class EnterpriseBizServiceImpl { ...@@ -86,12 +93,6 @@ public class EnterpriseBizServiceImpl {
} }
} }
} }
if (tzBaseEnterpriseInfoDto.getCityCode() != null) {
String orgCode = stCommonService.getAndSetOrgCode(tzBaseEnterpriseInfoDto.getCityCode());
if (orgCode == null) {
return page;
}
orgCodeList.add(orgCode);
} }
List<String> unitTypeList = new ArrayList<>(); List<String> unitTypeList = new ArrayList<>();
...@@ -101,8 +102,8 @@ public class EnterpriseBizServiceImpl { ...@@ -101,8 +102,8 @@ public class EnterpriseBizServiceImpl {
} }
if(tzBaseEnterpriseInfoDto.getUnitType() != null && tzBaseEnterpriseInfoDto.getUnitType().contains(UnitTypeEnum.JYJCJG.getName())){ if(tzBaseEnterpriseInfoDto.getUnitType() != null && tzBaseEnterpriseInfoDto.getUnitType().contains(UnitTypeEnum.JYJCJG.getName())){
if(!ObjectUtils.isEmpty(tzBaseEnterpriseInfoDto.getJyjcStatus())){ if(StringUtils.isNotEmpty(tzBaseEnterpriseInfoDto.getJyjcStatus())){
String jyjcStatus = tzBaseEnterpriseInfoDto.getJyjcStatus(); String jyjcStatus = tzBaseEnterpriseInfoDto.getJyjcStatus().trim();
String[] array = jyjcStatus.split("-"); String[] array = jyjcStatus.split("-");
tzBaseEnterpriseInfoDto.setJyjcStatus(array[0]); tzBaseEnterpriseInfoDto.setJyjcStatus(array[0]);
if(array.length > 1){ if(array.length > 1){
......
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