Commit 1fe38fcf authored by suhuiguang's avatar suhuiguang

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

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