zhangtao
dongdingding 1 year ago
parent 31e8ca8509
commit 88d878e6c6

@ -98,7 +98,7 @@ public class BPlanEnterpriseController extends BaseController {
.sum(); .sum();
double ptSum = (double) checkEnterpriseCountSum /plannedEnterpriseCountSum; double ptSum = (double) checkEnterpriseCountSum /plannedEnterpriseCountSum;
BPlanEnterPriseTreeResponse resultObject = new BPlanEnterPriseTreeResponse(); BPlanEnterPriseTreeResponse resultObject = new BPlanEnterPriseTreeResponse();
resultObject.setInstitutionName("苏州"); resultObject.setInstitutionName("苏州");
resultObject.setPlannedEnterpriseCount(plannedEnterpriseCountSum); resultObject.setPlannedEnterpriseCount(plannedEnterpriseCountSum);
resultObject.setCheckEnterpriseCount(checkEnterpriseCountSum); resultObject.setCheckEnterpriseCount(checkEnterpriseCountSum);
resultObject.setPt(ptSum); resultObject.setPt(ptSum);
@ -208,8 +208,9 @@ public class BPlanEnterpriseController extends BaseController {
*/ */
@GetMapping("/getZhifa") @GetMapping("/getZhifa")
@ApiOperation(value = "执法结果-企业详情") @ApiOperation(value = "执法结果-企业详情")
public AjaxResult getZhifa(@Valid checkResultRequest req) { public TableDataInfo getZhifa(@Valid checkResultRequest req) {
return success(bPlanEnterpriseService.getZhifa(req)); startPage();
return getDataTable(bPlanEnterpriseService.getZhifa(req));
} }
/** /**

@ -101,6 +101,7 @@ public class BPlanEnterprise implements Serializable {
* *
*/ */
@ApiModelProperty(value = "行政区划") @ApiModelProperty(value = "行政区划")
@Excel(name = "行政区划")
private String district; private String district;

@ -29,17 +29,6 @@ public class checkResultRequest {
*/ */
@ApiModelProperty(value = "检查状态 1=已检查2=未检查") @ApiModelProperty(value = "检查状态 1=已检查2=未检查")
private Integer checkStatus; private Integer checkStatus;
/**
* size
*/
@ApiModelProperty("size")
private int pageSize;
/**
* num
*/
@ApiModelProperty("num")
private int pageNum;
} }

@ -7,6 +7,7 @@ import com.ruoyi.programManagement.entity.request.BPlanEnterprisePageRequest;
import com.ruoyi.programManagement.entity.request.PlanMxRequest; import com.ruoyi.programManagement.entity.request.PlanMxRequest;
import com.ruoyi.programManagement.entity.request.checkResultRequest; import com.ruoyi.programManagement.entity.request.checkResultRequest;
import com.ruoyi.programManagement.entity.request.zhifaRequest; import com.ruoyi.programManagement.entity.request.zhifaRequest;
import com.ruoyi.programManagement.entity.response.BPlanEnterpriseZhifaResponse;
import com.ruoyi.programManagement.entity.response.zhifaCountResponse; import com.ruoyi.programManagement.entity.response.zhifaCountResponse;
import com.ruoyi.programManagement.entity.response.zhifaPlanResponse; import com.ruoyi.programManagement.entity.response.zhifaPlanResponse;
@ -44,7 +45,7 @@ public interface BPlanEnterpriseService extends IService<BPlanEnterprise> {
* @param req * @param req
* @return * @return
*/ */
Map<String, Object> getZhifa(checkResultRequest req); List<BPlanEnterpriseZhifaResponse>getZhifa (checkResultRequest req);
/** /**

@ -52,14 +52,8 @@ public class BPlanEnterpriseServiceImpl extends ServiceImpl<BPlanEnterpriseMappe
} }
@Override @Override
public Map<String, Object> getZhifa(checkResultRequest req) { public List<BPlanEnterpriseZhifaResponse> getZhifa(checkResultRequest req) {
List<BPlanEnterpriseZhifaResponse> getZhifa = bPlanEnterpriseMapper.getZhifa(req); return bPlanEnterpriseMapper.getZhifa(req);
PageHelper.startPage(req.getPageNum(), req.getPageSize());
PageInfo<BPlanEnterpriseZhifaResponse> pageInfo = new PageInfo<>(getZhifa);
Map<String, Object> result = new HashMap<>();
result.put("total", pageInfo.getTotal());
result.put("list", pageInfo.getList());
return result;
} }
@Override @Override

@ -52,16 +52,16 @@
<select id="selectBPlanEnterPriseTreeRequestRequestList" <select id="selectBPlanEnterPriseTreeRequestRequestList"
resultType="com.ruoyi.programManagement.entity.request.BPlanEnterPriseTreeResponse"> resultType="com.ruoyi.programManagement.entity.request.BPlanEnterPriseTreeResponse">
-- SELECT a.subdistrict AS subdistrict,a.county,c.id,a.institution_name as institutionName, -- SELECT a.subdistrict AS subdistrict,a.county,c.id,a.institution_name as institutionName,
-- COUNT(b.subdistrict) AS enterpriseCount, -- COUNT(b.subdistrict) AS enterpriseCount,
-- COUNT(DISTINCT k.ent_code) - COUNT(DISTINCT c.enterprise_id) AS remainingKeyEnterpriseCount, -- COUNT(DISTINCT k.ent_code) - COUNT(DISTINCT c.enterprise_id) AS remainingKeyEnterpriseCount,
-- COUNT(DISTINCT c.enterprise_id) AS plannedEnterpriseCount, -- COUNT(DISTINCT c.enterprise_id) AS plannedEnterpriseCount,
-- COUNT(DISTINCT CASE WHEN k.ent_code IS NOT NULL THEN c.enterprise_id END) AS planneKeyEnterpriseCount -- COUNT(DISTINCT CASE WHEN k.ent_code IS NOT NULL THEN c.enterprise_id END) AS planneKeyEnterpriseCount
-- FROM b_administrative a -- FROM b_administrative a
-- LEFT JOIN sz_ent_basic_info b ON a.subdistrict = LPAD(b.subdistrict, LENGTH(a.subdistrict), '0') -- LEFT JOIN sz_ent_basic_info b ON a.subdistrict = LPAD(b.subdistrict, LENGTH(a.subdistrict), '0')
-- LEFT JOIN b_key_enterprise k ON a.subdistrict = k.district -- LEFT JOIN b_key_enterprise k ON a.subdistrict = k.district
-- LEFT JOIN b_plan_enterprise c ON k.ent_code = c.enterprise_id -- LEFT JOIN b_plan_enterprise c ON k.ent_code = c.enterprise_id
-- WHERE a.SUBDISTRICT LIKE '%13205%' -- WHERE a.SUBDISTRICT LIKE '%13205%'
select s.institutionName ,s.plannedEnterpriseCount,s.checkEnterpriseCount,s.pt from (SELECT select s.institutionName ,s.plannedEnterpriseCount,s.checkEnterpriseCount,s.pt from (SELECT
a. institution_name AS institutionName, a. institution_name AS institutionName,
COUNT(DISTINCT b.enterprise_id) AS plannedEnterpriseCount, COUNT(DISTINCT b.enterprise_id) AS plannedEnterpriseCount,
@ -73,7 +73,8 @@
LEFT JOIN sz_enfor_examine c ON b.enterprise_id = c.USC_CODE LEFT JOIN sz_enfor_examine c ON b.enterprise_id = c.USC_CODE
<where> <where>
<if test="req.plannedYear!=null and req.plannedYear!=''"> <if test="req.plannedYear!=null and req.plannedYear!=''">
b.planned_year=#{req.plannedYear} b.planned_year =#{req.plannedYear}
</if> </if>
</where> </where>
GROUP BY SUBSTRING(a.county, 1, 8) )s GROUP BY SUBSTRING(a.county, 1, 8) )s

@ -23,13 +23,13 @@
select id,ent_code as entCode ,year,enterprise_name as enterpriseName from b_key_enterprise select id,ent_code as entCode ,year,enterprise_name as enterpriseName from b_key_enterprise
<where> <where>
<if test=" req.year !=null"> <if test=" req.year !=null">
and year = #{req.year} and year =#{req.year}
</if> </if>
<if test=" req.entCode !=null"> <if test=" req.entCode !=null">
and ent_code = #{req.entCode} and ent_code = #{req.entCode}
</if> </if>
<if test=" req.enterpriseName !=null"> <if test=" req.enterpriseName !=null">
and enterprise_name = #{req.enterpriseName} and enterprise_name like concat('%',#{req.enterpriseName},'%')
</if> </if>
</where> </where>
order by id desc order by id desc

Loading…
Cancel
Save