Commit bc1e59d5 authored by yangyang's avatar yangyang

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents b62470ad 6017e703
...@@ -2861,105 +2861,151 @@ ...@@ -2861,105 +2861,151 @@
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回' and a.status <![CDATA[ <> ]]> '已作废' and a.status <![CDATA[ <> ]]> '已完成') and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回' and a.status <![CDATA[ <> ]]> '已作废' and a.status <![CDATA[ <> ]]> '已完成')
group by b.equ_id group by b.equ_id
UNION all UNION all
select select
count(1) as inUseNumber, count(1) as inUseNumber,
b.equ_id as record b.equ_id as record
from from
tzs_jg_change_registration_reform a, tzs_jg_change_registration_reform a,
tzs_jg_change_registration_reform_eq b tzs_jg_change_registration_reform_eq b
where where
a.sequence_nbr = b.equip_transfer_id a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0 and a.is_delete = 0
and b.equ_id in and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_change_registration_transfer a,
tzs_jg_change_registration_transfer_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_change_registration_unit a,
tzs_jg_change_registration_unit_eq b
where
a.sequence_nbr = b.unit_change_registration_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '已作废')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_scrap_cancel a,
tzs_jg_scrap_cancel_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_enable_disable a,
tzs_jg_enable_disable_eq b
where
a.sequence_nbr = b.enable_disable_apply_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")"> <foreach collection="records" item="record" separator="," open="(" close=")">
#{record} #{record}
</foreach> </foreach>
and (a.audit_status <![CDATA[ <> ]]> '待提交' and a.audit_status <![CDATA[ <> ]]> '已作废') and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
group by b.equ_id group by b.equ_id
UNION all UNION all
select select
count(1) as inUseNumber, count(1) as inUseNumber,
ne.record b.equ_id as record
from from
(SELECT tzs_jg_change_registration_transfer a,
json_array_elements(e.equip_info)->>'SEQUENCE_NBR' AS record tzs_jg_change_registration_transfer_eq b
FROM where
tzs_jg_change_registration_name_eq e, a.sequence_nbr = b.equip_transfer_id
tzs_jg_change_registration_name n and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_change_registration_unit a,
tzs_jg_change_registration_unit_eq b
where
a.sequence_nbr = b.unit_change_registration_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '已作废')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_scrap_cancel a,
tzs_jg_scrap_cancel_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_equip_transfer a,
tzs_jg_equip_transfer_eq b
where
a.sequence_nbr = b.equip_transfer_id
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and a.is_delete = 0
and (a.apply_status <![CDATA[ <> ]]> '6617' AND a.apply_status <![CDATA[ <> ]]> '6610')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_enable_disable a,
tzs_jg_enable_disable_eq b
where where
n.sequence_nbr = e.name_change_registration_id a.sequence_nbr = b.enable_disable_apply_id
and n.is_delete = 0 and a.is_delete = 0
and n.audit_status <![CDATA[ <> ]]> '使用单位待提交' and n.audit_status <![CDATA[ <> ]]> '已作废') ne and b.equ_id in
where <foreach collection="records" item="record" separator="," open="(" close=")">
ne.record in #{record}
<foreach collection="records" item="record" separator="," open="(" close=")"> </foreach>
#{record} and (a.audit_status <![CDATA[ <> ]]> '待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
</foreach> group by b.equ_id
group by ne.record UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_vehicle_information a,
tzs_jg_vehicle_information_eq b
where
a.sequence_nbr = b.vehicle_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '已作废')
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_change_vehicle_registration_unit a,
tzs_jg_change_vehicle_registration_unit_eq b
where
a.sequence_nbr = b.unit_change_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '已作废')
UNION all
select
count(1) as inUseNumber,
ne.record
from
(SELECT
json_array_elements(e.equip_info)->>'SEQUENCE_NBR' AS record
FROM
tzs_jg_change_registration_name_eq e,
tzs_jg_change_registration_name n
where
n.sequence_nbr = e.name_change_registration_id
and n.is_delete = 0
and n.audit_status <![CDATA[ <> ]]> '使用单位待提交' and n.audit_status <![CDATA[ <> ]]> '已作废') ne
where
ne.record in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
group by ne.record
) )
group by record group by record
</select> </select>
...@@ -2982,84 +3028,98 @@ ...@@ -2982,84 +3028,98 @@
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回' and a.status <![CDATA[ <> ]]> '已作废' and a.status <![CDATA[ <> ]]> '已完成') and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回' and a.status <![CDATA[ <> ]]> '已作废' and a.status <![CDATA[ <> ]]> '已完成')
group by a.project_contraption_id group by a.project_contraption_id
union all union all
select select
count(1) as inUseNumber, count(1) as inUseNumber,
a.project_contraption_id as projectContraptionId a.project_contraption_id as projectContraptionId
from from
tzs_jg_maintain_notice a tzs_jg_maintain_notice a
where where
a.is_delete = 0 a.is_delete = 0
and (a.notice_status <![CDATA[ <> ]]> '6617' AND a.notice_status <![CDATA[ <> ]]> '6610') and (a.notice_status <![CDATA[ <> ]]> '6617' AND a.notice_status <![CDATA[ <> ]]> '6610')
and a.project_contraption_id in and a.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")"> <foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId} #{projectContraptionId}
</foreach> </foreach>
group by a.project_contraption_id group by a.project_contraption_id
union all union all
select select
count(1) as inUseNumber, count(1) as inUseNumber,
a.project_contraption_id as projectContraptionId a.project_contraption_id as projectContraptionId
from from
tzs_jg_reform_notice a tzs_jg_reform_notice a
where where
a.is_delete = 0 a.is_delete = 0
and (a.notice_status <![CDATA[ <> ]]> '6617' AND a.notice_status <![CDATA[ <> ]]> '6610') and (a.notice_status <![CDATA[ <> ]]> '6617' AND a.notice_status <![CDATA[ <> ]]> '6610')
and a.project_contraption_id in and a.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")"> <foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId} #{projectContraptionId}
</foreach> </foreach>
group by a.project_contraption_id group by a.project_contraption_id
union all union all
SELECT SELECT
count(1) as inUseNumber, count(1) as inUseNumber,
a.project_contraption_id as projectContraptionId a.project_contraption_id as projectContraptionId
from from
tzs_jg_change_registration_reform a tzs_jg_change_registration_reform a
where
a.is_delete = 0
and ( a.audit_status <![CDATA[ <> ]]> '已作废' AND a.audit_status <![CDATA[ <> ]]> '使用单位待提交')
and a.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId}
</foreach>
group by a.project_contraption_id
union all
select
count(1) as inUseNumber,
a.project_contraption_seq as projectContraptionId
from
tzs_jg_equip_transfer a
where where
a.is_delete = 0 and a.project_contraption_seq in
and ( a.audit_status <![CDATA[ <> ]]> '已作废' AND a.audit_status <![CDATA[ <> ]]> '使用单位待提交') <foreach collection="records" item="record" separator="," open="(" close=")">
and a.project_contraption_id in #{record}
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")"> </foreach>
#{projectContraptionId} and a.is_delete = 0
</foreach> and (a.apply_status <![CDATA[ <> ]]> '6617' AND a.apply_status <![CDATA[ <> ]]> '6610')
group by a.project_contraption_id group by a.project_contraption_seq
union all union all
SELECT SELECT
count(1) as inUseNumber, count(1) as inUseNumber,
b.project_contraption_id as projectContraptionId b.project_contraption_id as projectContraptionId
from from
tzs_jg_change_registration_unit a, tzs_jg_change_registration_unit a,
tzs_jg_change_registration_unit_eq b tzs_jg_change_registration_unit_eq b
where where
a.sequence_nbr = b.unit_change_registration_id a.sequence_nbr = b.unit_change_registration_id
and (a.status <![CDATA[ <> ]]> '已作废' AND a.status <![CDATA[ <> ]]> '使用单位待提交') and (a.status <![CDATA[ <> ]]> '已作废' AND a.status <![CDATA[ <> ]]> '使用单位待提交')
and a.is_delete = 0 and a.is_delete = 0
and b.project_contraption_id in and b.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")"> <foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId} #{projectContraptionId}
</foreach> </foreach>
group by b.project_contraption_id group by b.project_contraption_id
union all union all
SELECT SELECT
count(1) as inUseNumber, count(1) as inUseNumber,
pc.sequence_nbr as projectContraptionId pc.sequence_nbr as projectContraptionId
from from
tzs_jg_change_registration_name_eq e, tzs_jg_change_registration_name_eq e,
tzs_jg_change_registration_name n, tzs_jg_change_registration_name n,
tzs_jg_use_registration_manage m, tzs_jg_use_registration_manage m,
idx_biz_jg_project_contraption pc idx_biz_jg_project_contraption pc
where where
n.sequence_nbr = e.name_change_registration_id n.sequence_nbr = e.name_change_registration_id
and e.certificate_seq = m.sequence_nbr and e.certificate_seq = m.sequence_nbr
and n.is_delete = 0 and n.is_delete = 0
and pc.use_registration_code = m.use_registration_code and pc.use_registration_code = m.use_registration_code
and m.equ_list_code ='8000' and m.equ_list_code ='8000'
and n.audit_status <![CDATA[ <> ]]> '使用单位待提交' and n.audit_status <![CDATA[ <> ]]> '已作废' and n.audit_status <![CDATA[ <> ]]> '使用单位待提交' and n.audit_status <![CDATA[ <> ]]> '已作废'
AND pc.sequence_nbr in AND pc.sequence_nbr in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")"> <foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId} #{projectContraptionId}
</foreach> </foreach>
group by pc.sequence_nbr group by pc.sequence_nbr
) )
group by projectContraptionId group by projectContraptionId
</select> </select>
......
...@@ -37,6 +37,9 @@ public class TzsCustomFilterContentDto extends BaseEntity { ...@@ -37,6 +37,9 @@ public class TzsCustomFilterContentDto extends BaseEntity {
@ApiModelProperty(value = "筛选条件内容") @ApiModelProperty(value = "筛选条件内容")
private Object filterContent; private Object filterContent;
@ApiModelProperty(value = "选择筛选条件后全部中展示的内容")
private Object filterResult;
@ApiModelProperty(value = "创建人ID") @ApiModelProperty(value = "创建人ID")
private String createUserId; private String createUserId;
......
...@@ -71,4 +71,11 @@ public class TzsCustomFilterContent extends BaseEntity { ...@@ -71,4 +71,11 @@ public class TzsCustomFilterContent extends BaseEntity {
@TableField("filter_type") @TableField("filter_type")
private String filterType; private String filterType;
/**
* 选择筛选条件后全部中展示的内容
*/
@TableField("filter_result")
private Object filterResult;
} }
...@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.statistics.api.dto.TzsCustomFilterContentDto ...@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.statistics.api.dto.TzsCustomFilterContentDto
import com.yeejoin.amos.boot.module.statistics.api.entity.TzsCustomFilterContent; import com.yeejoin.amos.boot.module.statistics.api.entity.TzsCustomFilterContent;
import com.yeejoin.amos.boot.module.statistics.api.mapper.TzsCustomFilterContentMapper; import com.yeejoin.amos.boot.module.statistics.api.mapper.TzsCustomFilterContentMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
...@@ -29,6 +30,7 @@ public class TzsCustomFilterContentServiceImpl extends BaseService<TzsCustomFilt ...@@ -29,6 +30,7 @@ public class TzsCustomFilterContentServiceImpl extends BaseService<TzsCustomFilt
model.setOrgName(company.getCompanyName()); model.setOrgName(company.getCompanyName());
model.setCreateUserId(RequestContext.getExeUserId()); model.setCreateUserId(RequestContext.getExeUserId());
model.setFilterContent(JSONObject.toJSONString(model.getFilterContent())); model.setFilterContent(JSONObject.toJSONString(model.getFilterContent()));
model.setFilterResult(ObjectUtils.isEmpty(model.getFilterResult()) ? null : JSONObject.toJSONString(model.getFilterResult()));
model.setCreateTime(new Date()); model.setCreateTime(new Date());
return this.createWithModel(model); return this.createWithModel(model);
} }
......
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