Conflicts:
	ruoyi-system/src/main/resources/mapper/yingji/BEnterpriseNewMapper.xml
zhangtao
laozt 2 years ago
commit a69f1ffb65

@ -23,7 +23,7 @@ import java.util.List;
*/
@Api(tags = "企业新表")
@RestController
@RequestMapping("/programManagement/new")
@RequestMapping("/pharmaceuticals/new")
public class BEnterpriseNewController extends BaseController {
@Resource
private IBEnterpriseNewService bEnterpriseNewService;

@ -75,14 +75,27 @@ public class BPlanEnterpriseController extends BaseController {
@ApiOperation(value = "查询首页", response = BPlanEnterPriseTreeResponse.class)
@GetMapping("/tree")
public AjaxResult tree(BPlanEnterprisePageRequest req) {
return success(bPlanEnterpriseService.getShouyeList(req));
return success(bPlanEnterpriseService.getShouyeList(req));
}
/**
*
*/
@ApiOperation(value = "首页导出")
@GetMapping("/exportpage")
public void exportpage(HttpServletResponse response, BPlanEnterprisePageRequest req) {
List<BPlanEnterPriseTreeResponse> list = bPlanEnterpriseService.getShouyeList(req);
ExcelUtil<BPlanEnterPriseTreeResponse> util = new ExcelUtil<BPlanEnterPriseTreeResponse>(BPlanEnterPriseTreeResponse. class);
util.exportExcel(response, list, "行政区划数据");
}
/**
*
*

@ -1,5 +1,6 @@
package com.ruoyi.programManagement.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
@ -105,5 +106,13 @@ public class BEnterpriseNew extends BaseEntity {
@ApiModelProperty(value = "部门权限id")
private Long deptId;
/**
*
*/
@TableField(exist = false)
@ApiModelProperty(value = "是否重点企业")
private Long isPoint;
}

@ -0,0 +1,50 @@
//package com.ruoyi.programManagement.entity.response;
//
//import com.ruoyi.common.annotation.Excel;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//
//@Data
//@ApiModel("重点企业导出响应类")
//public class BKeyEnterpriseExportResponse {
//
// /**
// * 成功数量
// */
// @ApiModelProperty(value = "成功数量")
// private Integer success;
//
//
//
// /**
// * 失败数量
// */
// @ApiModelProperty(value = "失败数量")
// private Integer faile;
//
//
//
// /**
// * 企业代码
// */
//
// @ApiModelProperty(value = "企业代码")
// private String entCode;
//
//
// /**
// * 年份
// */
//
// @ApiModelProperty("年份")
// private String year;
//
//
// /**
// * 企业名称
// */
// @ApiModelProperty(value = "企业名称")
// @Excel(name = "企业名称")
// private String enterpriseName;
//}

@ -1,5 +1,6 @@
package com.ruoyi.programManagement.entity.response;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -14,6 +15,7 @@ public class BPlanEnterPriseTreeResponse {
/**
*
*/
@Excel(name = "执法地区")
@ApiModelProperty(value = "执法地区")
private String lawAreas;
@ -21,23 +23,27 @@ public class BPlanEnterPriseTreeResponse {
/**
*
*/
@ApiModelProperty(value = "排序")
private String sort;
/**
*
*/
@Excel(name = "执法计划数量")
@ApiModelProperty("执法计划数量")
private Integer count;
/**
*
*/
@Excel(name = "完成执法数量")
@ApiModelProperty("完成执法数量")
private Integer completed;
/**
*
*/
@Excel(name = "百分比")
@ApiModelProperty("百分比")
private double completionRate;

@ -222,9 +222,5 @@ public class BPlanEnterpriseZhifaResponse {
@ApiModelProperty(value = "上次检查时间")
private Date examineEndTime;
/**
* id
*/
@ApiModelProperty(value = "检查表id")
private Long eid;
}

@ -44,8 +44,12 @@ public interface BKeyEnterpriseMapper extends BaseMapper<BKeyEnterprise> {
BKeyEnterprise getByentCode(@Param("entCode") String entCode);
/**
*
* @param req
* @return
*/
List<BKeyEnterprise> select(@Param("req") BKeyEnterprise req);
// /**
// * 根据行政区划代码查询重点企业数量
// *

@ -29,11 +29,23 @@ public class BKeyEnterpriseServiceImpl extends ServiceImpl<BKeyEnterpriseMapper,
@Resource
private ISzEntBasicInfoService iSzEntBasicInfoService;
@Override
public String importUser(List<BKeyEnterprise> bKeyEnterpriseList) {
StringBuilder successMsg = new StringBuilder();
// List<BKeyEnterpriseExportResponse> list =new ArrayList<>();
// Integer faile=0;
// Integer success=0;
if (!bKeyEnterpriseList.isEmpty()) {
for (BKeyEnterprise bKeyEnterprise : bKeyEnterpriseList) {
// //根据企业信用代码,年份查询是否存在
// List<BKeyEnterprise> count = bKeyEnterpriseMapper.select(bKeyEnterprise);
// if (!count.isEmpty()){
// faile=faile+1;
// list.add()
// }else{
//
// }
baseMapper.bKeyEnterpriseAdd(bKeyEnterprise);
}
successMsg.append("导入成功");

@ -43,27 +43,46 @@
user_id,
dept_id
from b_enterprise_new
</sql>
<select id="selectBEnterpriseNewList" parameterType="BEnterpriseNew" resultMap="BEnterpriseNewResult">
<include refid="selectBEnterpriseNewVo"/>
<select id="selectBEnterpriseNewList" parameterType="BEnterpriseNew" resultType="BEnterpriseNew">
select a.id,
a. enterprise_id,
a.enterprise_name,
a.district,
a.SUPERVISION_LARGE,
a.RISK_LEVEL,
a.STAND_LEVEL,
a.EXAMINE_END_TIME,
a. create_id,
a.create_by,
a.create_time,
a.update_id,
a.update_by,
a.update_time,
a. remark,
a.user_id,
a.dept_id,
CASE WHEN b.ent_code IS NOT NULL THEN 1 ELSE 2 END AS isPoint
from b_enterprise_new a
LEFT JOIN b_key_enterprise b ON a.enterprise_id = b.ent_code COLLATE utf8mb4_unicode_ci
<where>
<if test="enterpriseId != null and enterpriseId != ''">and enterprise_id = #{enterpriseId}</if>
<if test="enterpriseName != null and enterpriseName != ''">and enterprise_name like concat('%',
<if test="enterpriseId != null and enterpriseId != ''">and a.enterprise_id = #{enterpriseId}</if>
<if test="enterpriseName != null and enterpriseName != ''">and a.enterprise_name like concat('%',
#{enterpriseName}, '%')
</if>
<if test="district != null and district != ''">and district like concat('%',
#{district}, '%')</if>
<if test="supervisionLarge != null and supervisionLarge != ''">and SUPERVISION_LARGE =
<if test="district != null and district != ''">and a.district = #{district}</if>
<if test="supervisionLarge != null and supervisionLarge != ''">and a.SUPERVISION_LARGE =
#{supervisionLarge}
</if>
<if test="riskLevel != null and riskLevel != ''">and RISK_LEVEL = #{riskLevel}</if>
<if test="standLevel != null and standLevel != ''">and STAND_LEVEL = #{standLevel}</if>
<if test="examineEndTime != null ">and EXAMINE_END_TIME = #{examineEndTime}</if>
<if test="createId != null ">and create_id = #{createId}</if>
<if test="updateId != null ">and update_id = #{updateId}</if>
<if test="userId != null ">and user_id = #{userId}</if>
<if test="deptId != null ">and dept_id = #{deptId}</if>
<if test="riskLevel != null and riskLevel != ''">and a.RISK_LEVEL = #{riskLevel}</if>
<if test="standLevel != null and standLevel != ''">and a.STAND_LEVEL = #{standLevel}</if>
<if test="examineEndTime != null ">and a.EXAMINE_END_TIME = #{examineEndTime}</if>
<if test="createId != null ">and a.create_id = #{createId}</if>
<if test="updateId != null ">and a.update_id = #{updateId}</if>
<if test="userId != null ">and a.user_id = #{userId}</if>
<if test="deptId != null ">and a.dept_id = #{deptId}</if>
</where>
</select>

@ -47,4 +47,7 @@
<select id="getByentCode" resultType="com.ruoyi.programManagement.entity.BKeyEnterprise">
select * from b_key_enterprise where ent_code =#{entCode}
</select>
<select id="select" resultType="com.ruoyi.programManagement.entity.BKeyEnterprise">
select * from b_key_enterprise where ent_code =#{req.entCode} and year=#{req.year}
</select>
</mapper>

@ -119,7 +119,7 @@
c.RISK_LEVEL as riskLevel,
c.STAND_LEVEL as standLevel,
c.EXAMINE_END_TIME as examineEndTime,
c.id as eid,
CASE WHEN b.ent_code IS NOT NULL THEN 1 ELSE 2 END AS isPoint
FROM b_plan_enterprise a
LEFT JOIN b_key_enterprise b ON a.enterprise_id = b.ent_code

Loading…
Cancel
Save