diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BPlanEnterpriseController.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BPlanEnterpriseController.java index cd322a4..c1754fe 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BPlanEnterpriseController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BPlanEnterpriseController.java @@ -219,11 +219,12 @@ public class BPlanEnterpriseController extends BaseController { @ApiOperation(value = "导出执法结果") @PostMapping("/export") public void export(HttpServletResponse response, checkResultRequest req) { - if (req.getDistrict() != null && req.getDistrict().contains("000000000")) { - String result = req.getDistrict().replaceAll("0+$", ""); - req.setDistrict(result); - } List list = bPlanEnterpriseMapper.getZhifa(req); + for (BPlanEnterpriseZhifaResponse a : list) { + String district = a.getDistrict(); + String countyList = bAdministrativeService.getBydistinct(district); + a.setDistrict(countyList); + } ExcelUtil util = new ExcelUtil(BPlanEnterpriseZhifaResponse.class); util.exportExcel(response, list, "导出执法结果"); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/SzsEnterpriseInformationController.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/SzsEnterpriseInformationController.java index 13041cb..1a41b5c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/SzsEnterpriseInformationController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/SzsEnterpriseInformationController.java @@ -4,6 +4,7 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import com.ruoyi.programManagement.entity.SzsEnterpriseInformation; +import com.ruoyi.programManagement.entity.request.SzsEnterpriseInformationRequest; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; @@ -42,13 +43,11 @@ public class SzsEnterpriseInformationController extends BaseController /** * 查询省-企业基本信息列表 */ - @ApiOperation("查询省-企业基本信息列表") + @ApiOperation(value = "查询省-企业基本信息列表",response = SzsEnterpriseInformation.class) @GetMapping("/list") - public TableDataInfo list(SzsEnterpriseInformation szsEnterpriseInformation) + public AjaxResult page(SzsEnterpriseInformationRequest szsEnterpriseInformationRequest) { - startPage(); - List list = szsEnterpriseInformationService.selectSzsEnterpriseInformationList(szsEnterpriseInformation); - return getDataTable(list); + return AjaxResult.success(szsEnterpriseInformationService.selectList(szsEnterpriseInformationRequest)); } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/SzsEnterpriseInformation.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/SzsEnterpriseInformation.java index fd38d5a..7bf6067 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/SzsEnterpriseInformation.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/SzsEnterpriseInformation.java @@ -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; @@ -405,4 +406,19 @@ public class SzsEnterpriseInformation extends BaseEntity { */ @ApiModelProperty(value = "是否重点企业1:是2:否") private Integer isPoint; + + /** + * size + */ + @TableField(exist = false) + @ApiModelProperty("size") + private int pageSize; + + + /** + * num + */ + @TableField(exist = false) + @ApiModelProperty("num") + private int pageNum; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/SzsEnterpriseInformationRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/SzsEnterpriseInformationRequest.java new file mode 100644 index 0000000..d2013f6 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/SzsEnterpriseInformationRequest.java @@ -0,0 +1,433 @@ +package com.ruoyi.programManagement.entity.request; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * 查询省-企业基本信息列表响应类 + */ +@Data +@ApiModel("查询省-企业基本信息列表请求类") +public class SzsEnterpriseInformationRequest { + + /** + * $column.columnComment + */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date jhptUpdateTime; + + /** + * 法人移动电话 + */ + @Excel(name = "法人移动电话") + @ApiModelProperty("法人移动电话") + private String legalPersonCellphone; + + /** + * 国民经济中类 + */ + @Excel(name = "国民经济中类") + @ApiModelProperty("国民经济中类") + private String indusTypeMiddle; + + /** + * 法人类型 + */ + @Excel(name = "法人类型") + @ApiModelProperty("法人类型") + private String legalPersonType; + + /** + * 国民经济大类 + */ + @Excel(name = "国民经济大类") + @ApiModelProperty("国民经济大类") + private String indusTypeLagre; + + /** + * 行业监管大类 + */ + @Excel(name = "行业监管大类") + @ApiModelProperty("行业监管大类") + private String supervisionLarge; + + /** + * 所在市 + */ + @Excel(name = "所在市") + @ApiModelProperty("所在市") + private String CITY; + + /** + * 生产经营地址 + */ + @Excel(name = "生产经营地址") + @ApiModelProperty("生产经营地址") + private String businessAddress; + + /** + * 所在县(市、区) + */ + @ApiModelProperty("所在县(市、区)") + @Excel(name = "所在县", readConverterExp = "市=、区") + private String COUNTY; + + /** + * 报告历史id + */ + @Excel(name = "报告历史id") + @ApiModelProperty("报告历史id") + private String reportHistoryId; + + /** + * 登记时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty("登记时间") + @Excel(name = "登记时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date registerTime; + + /** + * 办公地址 + */ + @Excel(name = "办公地址") + @ApiModelProperty("办公地址") + private String enterpriseAddress; + + /** + * 所在省 + */ + @Excel(name = "所在省") + @ApiModelProperty("所在省") + private String PROVINCE; + + /** + * 申请人联系方式 + */ + @Excel(name = "申请人联系方式") + @ApiModelProperty("申请人联系方式") + private String SQRLXFS; + + /** + * 申请人 + */ + @Excel(name = "申请人") + @ApiModelProperty("申请人") + private String SQR; + + /** + * 有效期止 + */ + @ApiModelProperty("有效期止") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "有效期止", width = 30, dateFormat = "yyyy-MM-dd") + private Date termEnd; + + /** + * 主键ID + */ + @ApiModelProperty("主键ID") + private String ID; + + /** + * 所在村(社区) + */ + @Excel(name = "所在村", readConverterExp = "社=区") + @ApiModelProperty("所在村(社区)") + private String VILLAGE; + + /** + * 法人职务 + */ + @Excel(name = "法人职务") + @ApiModelProperty("法人职务") + private String legalPersonPost; + + /** + * 法定代表人 + */ + @Excel(name = "法定代表人") + @ApiModelProperty("法定代表人") + private String legalPerson; + + /** + * 企业类型 + */ + @Excel(name = "企业类型") + @ApiModelProperty("企业类型") + private String zjEconKind; + + /** + * 登记状态 + */ + @Excel(name = "登记状态") + @ApiModelProperty("登记状态") + private String corpStatus; + + /** + * 统一社会信用代码 + */ + @Excel(name = "统一社会信用代码") + @ApiModelProperty("统一社会信用代码") + private String uuitNo; + + /** + * 行业监管小类 + */ + @Excel(name = "行业监管小类") + @ApiModelProperty("行业监管小类") + private String supervisionSmall; + + /** + * 注册地址 + */ + @Excel(name = "注册地址") + @ApiModelProperty("注册地址") + private String rigisterAddress; + + /** + * 是否上报风险报告 + */ + @Excel(name = "是否上报风险报告") + @ApiModelProperty("是否上报风险报告") + private String riskReport; + + /** + * 国民经济小类 + */ + @Excel(name = "国民经济小类") + @ApiModelProperty("国民经济小类") + private String indusTypeSmall; + + /** + * 删除标识 + */ + @Excel(name = "删除标识") + @ApiModelProperty("删除标识") + private String isDelete; + + /** + * 经营范围 + */ + @Excel(name = "经营范围") + @ApiModelProperty("经营范围") + private String businessScope; + + /** + * 成立时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty("成立时间") + @Excel(name = "成立时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date startTime; + + /** + * 法人固定电话 + */ + @ApiModelProperty("法人固定电话") + @Excel(name = "法人固定电话") + private String legalPersonTel; + + /** + * 国民经济门类 + */ + @Excel(name = "国民经济门类") + @ApiModelProperty("国民经济门类") + private String indusTypeClass; + + /** + * 有效期起 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty("有效期起") + @Excel(name = "有效期起", width = 30, dateFormat = "yyyy-MM-dd") + private Date termStart; + + /** + * 企业规模 + */ + @Excel(name = "企业规模") + @ApiModelProperty("企业规模") + private String enterpristScale; + + /** + * 登记机关 + */ + @Excel(name = "登记机关") + @ApiModelProperty("登记机关") + private String registrationOrg; + + /** + * 行政区划 + */ + @Excel(name = "行政区划") + @ApiModelProperty("行政区划") + private String districtCode; + + /** + * 所在乡镇(街道) + */ + @Excel(name = "所在乡镇", readConverterExp = "街=道") + @ApiModelProperty("所在乡镇(街道) ") + private String subdistrict; + + /** + * 其他名称 + */ + @Excel(name = "其他名称") + @ApiModelProperty("其他名称 ") + private String otherName; + + /** + * 注册资金 + */ + @Excel(name = "注册资金") + @ApiModelProperty("注册资金 ") + private String rigisterFund; + + /** + * 企业名称 + */ + @Excel(name = "企业名称") + @ApiModelProperty("企业名称 ") + private String enterpriseName; + + /** + * 机构编码 + */ + @Excel(name = "机构编码") + @ApiModelProperty("机构编码 ") + private String orgCode; + + /** + * 是否规上企业 + */ + @Excel(name = "是否规上企业") + @ApiModelProperty("是否规上企业 ") + private String aboveDesignated; + + /** + * 法人证件号 + */ + @Excel(name = "法人证件号") + @ApiModelProperty("法人证件号 ") + private String FRZJH; + + /** + * 创建人 + */ + @Excel(name = "创建人") + @ApiModelProperty("创建人 ") + private String CREATER; + + /** + * 修改人 + */ + @Excel(name = "修改人") + @ApiModelProperty("修改人") + private String UPDATER; + + /** + * 上次调用省接口保存数据截至页数 + */ + @ApiModelProperty("上次调用省接口保存数据截至页数") + @Excel(name = "上次调用省接口保存数据截至页数") + private Long lastPageNumber; + + /** + * 占地面积 + */ + @Excel(name = "占地面积") + @ApiModelProperty("占地面积") + private String floorSpace; + + /** + * 企业规模 + */ + @Excel(name = "企业规模") + @ApiModelProperty("企业规模") + private String aboveDesignatedTwo; + + /** + * 安全生产投入占比 + */ + @Excel(name = "安全生产投入占比") + @ApiModelProperty("安全生产投入占比") + private String safetyProductionInvestment; + + /** + * 上一年经营收入 + */ + @ApiModelProperty("上一年经营收入") + @Excel(name = "上一年经营收入") + private String lastYearOperatingIncome; + + /** + * 企业上一年投入生产 + */ + @Excel(name = "企业上一年投入生产") + @ApiModelProperty("企业上一年投入生产") + private String lastYeatOnStream; + + /** + * 主营业务及产品 + */ + @Excel(name = "主营业务及产品") + @ApiModelProperty("主营业务及产品") + private String majorProduct; + + /** + * 工艺流程内容 + */ + @Excel(name = "工艺流程内容") + @ApiModelProperty("工艺流程内容") + private String htmlText; + + /** + * 固定资产 + */ + @ApiModelProperty("固定资产") + @Excel(name = "固定资产") + private String fixedAssets; + + /** + * 是否重点企业1:是2:否 + */ + @ApiModelProperty(value = "是否重点企业1:是2:否") + private Integer isPoint; + + /** + * size + */ + @TableField(exist = false) + @ApiModelProperty("size") + private int pageSize; + + + /** + * num + */ + @TableField(exist = false) + @ApiModelProperty("num") + private int pageNum; + + + /** + * newpageSize + */ + @TableField(exist = false) + private int newpageSize; + + + /** + * newpageNum + */ + @TableField(exist = false) + private int newpageNum; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/SzsEnterpriseInformationMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/SzsEnterpriseInformationMapper.java index f9c1d43..ab7d43b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/SzsEnterpriseInformationMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/SzsEnterpriseInformationMapper.java @@ -1,6 +1,8 @@ package com.ruoyi.programManagement.mapper; import com.ruoyi.programManagement.entity.SzsEnterpriseInformation; +import com.ruoyi.programManagement.entity.request.SzsEnterpriseInformationRequest; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -60,4 +62,13 @@ public interface SzsEnterpriseInformationMapper * @return 结果 */ public int deleteSzsEnterpriseInformationByIDs(String[] IDs); + + + /** + * 查询省-企业基本信息列表 + * + * @param req 省-企业基本信息 + * @return 省-企业基本信息集合 + */ + public List selectList(@Param("req") SzsEnterpriseInformationRequest req); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/ISzsEnterpriseInformationService.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/ISzsEnterpriseInformationService.java index 2745129..31b9573 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/ISzsEnterpriseInformationService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/ISzsEnterpriseInformationService.java @@ -1,8 +1,11 @@ package com.ruoyi.programManagement.service; import com.ruoyi.programManagement.entity.SzsEnterpriseInformation; +import com.ruoyi.programManagement.entity.request.BKeyEnterprisePageRequest; +import com.ruoyi.programManagement.entity.request.SzsEnterpriseInformationRequest; import java.util.List; +import java.util.Map; /** @@ -60,4 +63,13 @@ public interface ISzsEnterpriseInformationService * @return 结果 */ public int deleteSzsEnterpriseInformationByID(String ID); + + + /** + * 分页条件查询所有数据 + * + * @param szsEnterpriseInformationRequest 查询条件 + * @return 所有数据 + */ + public Map selectList(SzsEnterpriseInformationRequest szsEnterpriseInformationRequest); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/SzsEnterpriseInformationServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/SzsEnterpriseInformationServiceImpl.java index b597ac2..09cd6f8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/SzsEnterpriseInformationServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/SzsEnterpriseInformationServiceImpl.java @@ -1,13 +1,18 @@ package com.ruoyi.programManagement.service.impl; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.programManagement.entity.SzsEnterpriseInformation; +import com.ruoyi.programManagement.entity.request.SzsEnterpriseInformationRequest; import com.ruoyi.programManagement.mapper.SzsEnterpriseInformationMapper; import com.ruoyi.programManagement.service.ISzsEnterpriseInformationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * 省-企业基本信息Service业务层处理 @@ -87,4 +92,17 @@ public class SzsEnterpriseInformationServiceImpl implements ISzsEnterpriseInform public int deleteSzsEnterpriseInformationByID(String ID) { return szsEnterpriseInformationMapper.deleteSzsEnterpriseInformationByID(ID); } + + @Override + public Map selectList(SzsEnterpriseInformationRequest req) { + PageHelper.startPage(req.getPageNum(), req.getPageSize()); + req.setNewpageNum((req.getPageNum()-1)*req.getPageSize()); + req.setNewpageSize(req.getPageSize()); + List szEntBasicInfos = szsEnterpriseInformationMapper.selectList(req); + PageInfo pageInfo = new PageInfo<>(szEntBasicInfos); + Map result = new HashMap<>(); + result.put("total", pageInfo.getTotal()); + result.put("list", pageInfo.getList()); + return result; + } } diff --git a/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml b/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml index 84bc2f2..083838a 100644 --- a/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml @@ -178,11 +178,10 @@ SELECT a.*, b.DISTRICT_NAME AS institutionName, - c.ENTERPRISE_NAME as enterpriseName + a.ENTERPRISE_NAME as enterpriseName FROM b_plan_enterprise a LEFT JOIN szs_administrative_division b ON a.district = b.DISTRICT_CODE - LEFT JOIN szs_enterprise_information c ON a.enterprise_id = c.UUIT_NO AND a.district like concat('%', #{req.district}, '%') @@ -191,7 +190,7 @@ and a.planned_year =#{req.plannedYear} - and c.ENTERPRISE_NAME like concat('%', #{req.enterpriseName}, '%') + and a.ENTERPRISE_NAME like concat('%', #{req.enterpriseName}, '%') @@ -206,7 +205,7 @@ a.update_id, a.update_by, a. update_time, - a. remark, + a.remark, a.user_id, a. dept_id, a.district, @@ -214,8 +213,8 @@ a.plan_name, a.plan_content, a.is_point, - b.ENTERPRISE_NAME as entprName - from b_plan_enterprise a LEFT JOIN szs_enterprise_information b ON a.enterprise_id = b.UUIT_NO + a.enterprise_name as entprName + from b_plan_enterprise a where a.id=#{id} diff --git a/ruoyi-system/src/main/resources/mapper/yingji/SzsEnterpriseInformationMapper.xml b/ruoyi-system/src/main/resources/mapper/yingji/SzsEnterpriseInformationMapper.xml index bbfbf7b..22b5da5 100644 --- a/ruoyi-system/src/main/resources/mapper/yingji/SzsEnterpriseInformationMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/yingji/SzsEnterpriseInformationMapper.xml @@ -96,7 +96,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where ID = #{ID} - + + insert into szs_enterprise_information