From 0251f076d6905f88a4420e52f5ba3e2deb737ed9 Mon Sep 17 00:00:00 2001 From: dongdingding <207595406@qq.com> Date: Tue, 19 Dec 2023 14:53:58 +0800 Subject: [PATCH] bug fix --- .../controller/BPlanEnterpriseController.java | 95 ++++--- .../BStandardizationController.java | 87 +++++++ .../entity/BStandardization.java | 40 +++ .../request/BPlanEnterPriseTreeRequest.java | 69 +++++ .../BPlanEnterPrisetDistrictRequest.java | 67 +++++ .../request/BPlanEnterprisePageRequest.java | 14 ++ .../mapper/BAdministrativeDivisionMapper.java | 21 ++ .../mapper/BEnterpriseNewMapper.java | 16 +- .../mapper/BPlanEnterpriseMapper.java | 21 +- .../mapper/BStandardizationMapper.java | 62 +++++ .../mapper/SzEnforExamineMapper.java | 11 + .../quartz/EnterpristQuartz.java | 143 +++++++++++ .../service/BPlanEnterpriseService.java | 16 ++ .../IBAdministrativeDivisionService.java | 20 ++ .../service/IBStandardizationService.java | 62 +++++ .../service/ISzEnforExamineService.java | 26 +- .../BAdministrativeDivisionServiceImpl.java | 14 ++ .../impl/BPlanEnterpriseServiceImpl.java | 11 + .../impl/BStandardizationServiceImpl.java | 88 +++++++ .../impl/SzEnforExamineServiceImpl.java | 5 + .../yingji/BAdministrativeDivisionMapper.xml | 11 + .../mapper/yingji/BAdministrativeMapper.xml | 1 - .../mapper/yingji/BEnterpriseNewMapper.xml | 2 +- .../mapper/yingji/BPlanEnterpriseMapper.xml | 46 +++- .../mapper/yingji/BStandardizationMapper.xml | 61 +++++ .../mapper/yingji/SzEnforExamineMapper.xml | 198 ++++++++++----- .../yingji/SzsEnterpriseInformationMapper.xml | 237 +++++++++++------- 27 files changed, 1238 insertions(+), 206 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BStandardizationController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/BStandardization.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/BPlanEnterPriseTreeRequest.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/BPlanEnterPrisetDistrictRequest.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BStandardizationMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/programManagement/quartz/EnterpristQuartz.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/IBStandardizationService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/BStandardizationServiceImpl.java create mode 100644 ruoyi-system/src/main/resources/mapper/yingji/BStandardizationMapper.xml 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 c1754fe..e8b1394 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 @@ -7,14 +7,12 @@ import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.programManagement.entity.BKeyEnterprise; import com.ruoyi.programManagement.entity.BPlanEnterprise; -import com.ruoyi.programManagement.entity.request.BPlanEnterPriseTreeResponse; -import com.ruoyi.programManagement.entity.request.BPlanEnterprisePageRequest; -import com.ruoyi.programManagement.entity.request.PlanMxRequest; -import com.ruoyi.programManagement.entity.request.checkResultRequest; +import com.ruoyi.programManagement.entity.request.*; import com.ruoyi.programManagement.entity.response.BPlanEnterpriseZhifaResponse; import com.ruoyi.programManagement.mapper.BPlanEnterpriseMapper; import com.ruoyi.programManagement.service.BKeyEnterpriseService; import com.ruoyi.programManagement.service.BPlanEnterpriseService; +import com.ruoyi.programManagement.service.IBAdministrativeDivisionService; import com.ruoyi.programManagement.service.IBAdministrativeService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -25,6 +23,8 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; +import java.text.DecimalFormat; +import java.util.ArrayList; import java.util.List; /** @@ -57,7 +57,8 @@ public class BPlanEnterpriseController extends BaseController { @Autowired private IBAdministrativeService bAdministrativeService; - + @Resource + private IBAdministrativeDivisionService bAdministrativeDivisionService; /** * 查询计划企业列表 */ @@ -84,43 +85,55 @@ public class BPlanEnterpriseController extends BaseController { */ @ApiOperation(value = "查询首页", response = BPlanEnterPriseTreeResponse.class) @GetMapping("/tree") - public TableDataInfo tree(BPlanEnterprisePageRequest req) { + public AjaxResult tree(BPlanEnterprisePageRequest req) { + //区划list + List list = bAdministrativeDivisionService.selectByEnterPrisecountyList(); + //乡镇list + List listsub = bAdministrativeDivisionService.selectByEnterPriseList(); + List cascadingSelectData = new ArrayList<>(); + DecimalFormat decimalFormat = new DecimalFormat("0.00"); + for (BPlanEnterPrisetDistrictRequest item1 : list) { + req.setCode(item1.getDistrictCode()); + //获取计划企业数量 + Integer getEnterPriseCounty=bPlanEnterpriseService.getgetEnterPriseList(req); + //获取完成执法数量 + Integer getEnterPriseFinsh=bPlanEnterpriseService.getEnterPriseFinsh(req); + //完成率 + double result1 = (double) getEnterPriseFinsh / getEnterPriseCounty; + if(getEnterPriseFinsh.equals(0)||getEnterPriseCounty.equals(0)){ + result1=0; + } + if(!getEnterPriseFinsh.equals(0)){ + getEnterPriseFinsh=getEnterPriseFinsh-1; + } + if(!getEnterPriseCounty.equals(0)){ + getEnterPriseCounty=getEnterPriseCounty-1; + } + String formattedResult1 = decimalFormat.format(result1); + BPlanEnterPrisetDistrictRequest parentDto = new BPlanEnterPrisetDistrictRequest(item1.getDistrictCode(),item1.getDistrict(),getEnterPriseCounty,getEnterPriseFinsh,formattedResult1); + for (BPlanEnterPriseTreeRequest item2 : listsub) { + if (item2.getCountyCode() != null && !item2.getCountyCode().equals("")) { + if (item2.getCountyCode().substring(0,6).equals(item1.getDistrictCode())) { + req.setCode(item2.getCountyCode()); + //获取计划企业数量 + Integer getEnterPriseTown=bPlanEnterpriseService.getgetEnterPriseList(req); + //获取完成执法数量 + Integer getEnterPriseTownFinsh=bPlanEnterpriseService.getEnterPriseFinsh(req); + //完成率 + double result2 = (double) getEnterPriseTownFinsh / getEnterPriseTown; + if(getEnterPriseTown.equals(0)||getEnterPriseTownFinsh.equals(0)){ + result2=0; + } + String formattedResult2 = decimalFormat.format(result2); + BPlanEnterPriseTreeRequest childDto = new BPlanEnterPriseTreeRequest(item2.getCounty(), item2.getCountyCode(),item2.getSort(),getEnterPriseTown,getEnterPriseTownFinsh,formattedResult2); + parentDto.addChild(childDto); + } + } + } + cascadingSelectData.add(parentDto); + } + return success(cascadingSelectData); - List list = bAdministrativeService.selectBPlanEnterPriseTreeRequestRequestList(req); - int plannedEnterpriseCountSum = list.stream() - .mapToInt(BPlanEnterPriseTreeResponse::getPlannedEnterpriseCount) - .sum(); - int checkEnterpriseCountSum = list.stream() - .mapToInt(BPlanEnterPriseTreeResponse::getCheckEnterpriseCount) - .sum(); - double ptSum = (double) checkEnterpriseCountSum / plannedEnterpriseCountSum; - BPlanEnterPriseTreeResponse resultObject = new BPlanEnterPriseTreeResponse(); - resultObject.setInstitutionName("苏州市"); - resultObject.setPlannedEnterpriseCount(plannedEnterpriseCountSum); - resultObject.setCheckEnterpriseCount(checkEnterpriseCountSum); - resultObject.setPt(ptSum); - list.add(resultObject); - return getDataTable(list); -// List> groupedList = list.stream() -// .collect(Collectors.groupingBy(BPlanEnterPriseTreeResponse::getCounty)) -// .values() -// .stream() -// .collect(Collectors.toList()); -// List cascadingSelectData = new ArrayList<>(); -// for (List group : groupedList) { -// for (BPlanEnterPriseTreeResponse item1 : group) { -// BPlanEnterPriseTreeResponse parentDto = new BPlanEnterPriseTreeResponse(item1.getCounty(), item1.getSubdistrict()); -// for (BPlanEnterPriseTreeResponse item2 : list) { -// if (item2.getSubdistrict() != null) { -// if (item2.getSubdistrict().substring(0, 10).equals(item1.getCounty().substring(0, 10))) { -// BPlanEnterPriseTreeResponse childDto = new BPlanEnterPriseTreeResponse(item2.getCounty(), item2.getSubdistrict()); -// parentDto.addChild(childDto); -// } -// } -// } -// cascadingSelectData.add(parentDto); -// } - //} } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BStandardizationController.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BStandardizationController.java new file mode 100644 index 0000000..c60eb64 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BStandardizationController.java @@ -0,0 +1,87 @@ +package com.ruoyi.programManagement.controller; + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.programManagement.entity.BStandardization; +import com.ruoyi.programManagement.service.IBStandardizationService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 标准化Controller + * + * @author ruoyi + * @since 2023-12-18 + */ +@Api(tags = "标准化") +@RestController +@RequestMapping("/programManagement/standardization") +public class BStandardizationController extends BaseController { + @Resource + private IBStandardizationService bStandardizationService; + + /** + * 查询标准化列表 + */ + @ApiOperation(value = "查询标准化列表", response = BStandardization.class) + @GetMapping("/list") + public TableDataInfo list(BStandardization bStandardization) { + startPage(); + List list = bStandardizationService.selectBStandardizationList(bStandardization); + return getDataTable(list); + } + + /** + * 导出标准化列表 + */ + @ApiOperation(value = "导出标准化列表") + @PostMapping("/export") + public void export(HttpServletResponse response, BStandardization bStandardization) { + List list = bStandardizationService.selectBStandardizationList(bStandardization); + ExcelUtil util = new ExcelUtil(BStandardization.class); + util.exportExcel(response, list, "标准化数据"); + } + + /** + * 获取标准化详细信息 + */ + @ApiOperation(value = " 获取标准化详细信息") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(bStandardizationService.selectBStandardizationById(id)); + } + + /** + * 新增标准化 + */ + @ApiOperation(value = " 新增标准化") + @PostMapping + public AjaxResult add(@RequestBody BStandardization bStandardization) { + return toAjax(bStandardizationService.insertBStandardization(bStandardization)); + } + + /** + * 修改标准化 + */ + @ApiOperation(value = " 修改标准化") + @PutMapping + public AjaxResult edit(@RequestBody BStandardization bStandardization) { + return toAjax(bStandardizationService.updateBStandardization(bStandardization)); + } + + /** + * 删除标准化 + */ + @ApiOperation(value = " 删除标准化") + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(bStandardizationService.deleteBStandardizationByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/BStandardization.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/BStandardization.java new file mode 100644 index 0000000..9ef283c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/BStandardization.java @@ -0,0 +1,40 @@ +package com.ruoyi.programManagement.entity; + +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 标准化对象 b_standardization + * + * @author ruoyi + * @since 2023-12-18 + */ +@Data +@ApiModel("标准化") +public class BStandardization extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * $column.columnComment + */ + private Long id; + + /** + * 企业名称 + */ + @Excel(name = "企业名称") + @ApiModelProperty(value = "企业名称") + private String enterpriseName; + + /** + * 标准化等级 + */ + @Excel(name = "标准化等级") + @ApiModelProperty(value = "标准化等级") + private String standardizedGrade; + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/BPlanEnterPriseTreeRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/BPlanEnterPriseTreeRequest.java new file mode 100644 index 0000000..264e90c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/BPlanEnterPriseTreeRequest.java @@ -0,0 +1,69 @@ +package com.ruoyi.programManagement.entity.request; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 行政区划书请求类 + */ +@ApiModel +@Data +@Builder(toBuilder = true) +@NoArgsConstructor + +public class BPlanEnterPriseTreeRequest { + + + /** + * 所在乡镇 + * (街道) + */ + @ApiModelProperty("所在乡镇") + private String county; + + + /** + * 所在乡镇(街道)代码 + */ + @ApiModelProperty("所在乡镇(街道)代码") + private String countyCode; + + + /** + * 排序 + */ + @ApiModelProperty("排序") + private String sort; + + /** + * 计划企业数量 + */ + @ApiModelProperty("计划企业数量") + private Integer enterPriseCounty; + + /** + * 计划企业完成数量 + */ + @ApiModelProperty("计划企业完成数量") + private Integer enterPriseFinsh; + + /** + * 完成率 + */ + @ApiModelProperty("完成率") + private String result; + public BPlanEnterPriseTreeRequest(String county, String countyCode, String sort, Integer enterPriseCounty, Integer enterPriseFinsh,String result) { + this.county = county; + this.countyCode = countyCode; + this.enterPriseCounty = enterPriseCounty; + this.enterPriseFinsh = enterPriseFinsh; + this.result=result; + this.sort = sort; + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/BPlanEnterPrisetDistrictRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/BPlanEnterPrisetDistrictRequest.java new file mode 100644 index 0000000..d41bf6a --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/BPlanEnterPrisetDistrictRequest.java @@ -0,0 +1,67 @@ +package com.ruoyi.programManagement.entity.request; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.ArrayList; +import java.util.List; + +@ApiModel +@Data +@Builder(toBuilder = true) +@NoArgsConstructor +@AllArgsConstructor +public class BPlanEnterPrisetDistrictRequest { + /** + * 区划代码 + */ + @ApiModelProperty("区划代码") + private String districtCode; + /** + * 区划 + */ + @ApiModelProperty("区划") + private String district; + + /** + * 计划企业数量 + */ + @ApiModelProperty("计划企业数量") + private Integer enterPriseCounty; + + /** + * 计划企业完成数量 + */ + @ApiModelProperty("计划企业完成数量") + private Integer enterPriseFinsh; + + + /** + * 完成率 + */ + @ApiModelProperty("完成率") + private String result; + + + private List children; + + public BPlanEnterPrisetDistrictRequest(String districtCode, String district, Integer enterPriseCounty, Integer enterPriseFinsh,String result) { + this.districtCode = districtCode; + this.enterPriseCounty = enterPriseCounty; + this.enterPriseFinsh = enterPriseFinsh; + this.district = district; + this.result=result; + this.children = new ArrayList<>(); + } + + public void addChild(BPlanEnterPriseTreeRequest childDto) { + this.children.add(childDto); + } +} + + + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/BPlanEnterprisePageRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/BPlanEnterprisePageRequest.java index 465bcde..f134416 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/BPlanEnterprisePageRequest.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/BPlanEnterprisePageRequest.java @@ -17,4 +17,18 @@ public class BPlanEnterprisePageRequest { @ApiModelProperty(value = "计划年份") private String plannedYear; + + /** + * 计划月份 + */ + @ApiModelProperty(value = "计划月份") + private String[] plannedMonth; + + + /** + * 计划月份 + */ + @ApiModelProperty(value = "区划代码") + private String code; + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BAdministrativeDivisionMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BAdministrativeDivisionMapper.java index 7e9de41..b2e71a1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BAdministrativeDivisionMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BAdministrativeDivisionMapper.java @@ -5,6 +5,8 @@ import java.util.List; import com.ruoyi.programManagement.domain.BAdministrativeDivision; import com.ruoyi.programManagement.entity.request.BAdministrativeDistrictRequest; import com.ruoyi.programManagement.entity.request.BAdministrativeTreeRequest; +import com.ruoyi.programManagement.entity.request.BPlanEnterPriseTreeRequest; +import com.ruoyi.programManagement.entity.request.BPlanEnterPrisetDistrictRequest; /** * 行政区划Mapper接口 @@ -75,4 +77,23 @@ public interface BAdministrativeDivisionMapper { * @return list */ List selectBycountyList(); + + + + + /** + * 行政区划区划树结构 + * + * @return list + */ + List selectByEnterPrisecountyList(); + + + + /** + * 行政区划乡镇树结构 + * + * @return list + */ + List selectByEnterPriseList(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BEnterpriseNewMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BEnterpriseNewMapper.java index 92e0889..7273732 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BEnterpriseNewMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BEnterpriseNewMapper.java @@ -1,6 +1,12 @@ package com.ruoyi.programManagement.mapper; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; import com.ruoyi.programManagement.entity.BEnterpriseNew; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import java.util.List; @@ -12,7 +18,8 @@ import java.util.List; * @author ruoyi * @since 2023-12-12 */ -public interface BEnterpriseNewMapper { +@Mapper +public interface BEnterpriseNewMapper extends BaseMapper { /** * 查询企业新表 * @@ -60,4 +67,11 @@ public interface BEnterpriseNewMapper { * @return 结果 */ int deleteBEnterpriseNewByIds(Long[] ids); + + + @Select("SELECT COUNT(*) FROM b_enterprise_new ${ew.customSqlSegment}") + Long selectCount(@Param(Constants.WRAPPER) Wrapper wrapper); + + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BPlanEnterpriseMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BPlanEnterpriseMapper.java index ce26b0f..b69a95d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BPlanEnterpriseMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BPlanEnterpriseMapper.java @@ -2,7 +2,6 @@ package com.ruoyi.programManagement.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.programManagement.entity.BPlanEnterprise; -import com.ruoyi.programManagement.entity.SzEntBasicInfo; import com.ruoyi.programManagement.entity.request.BPlanEnterprisePageRequest; import com.ruoyi.programManagement.entity.request.PlanMxRequest; import com.ruoyi.programManagement.entity.request.checkResultRequest; @@ -32,8 +31,6 @@ public interface BPlanEnterpriseMapper extends BaseMapper { void deleteByPlanId(@Param("planId") Long planId); - - List getZhifa(@Param("req") checkResultRequest req); @@ -87,5 +84,23 @@ public interface BPlanEnterpriseMapper extends BaseMapper { */ BPlanEnterprise selectById(String id); + + /** + * 根据执法地区分组统计 + * + * @param req + * @return + */ + Integer getgetEnterPriseList(@Param("req") BPlanEnterprisePageRequest req); + + + /** + * 获取计划完成企业数量 + * + * @param req + * @return + */ + Integer getEnterPriseFinsh( @Param("req") BPlanEnterprisePageRequest req); + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BStandardizationMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BStandardizationMapper.java new file mode 100644 index 0000000..afa6007 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BStandardizationMapper.java @@ -0,0 +1,62 @@ +package com.ruoyi.programManagement.mapper; + +import com.ruoyi.programManagement.entity.BStandardization; + +import java.util.List; + + +/** + * 标准化Mapper接口 + * + * @author ruoyi + * @since 2023-12-18 + */ +public interface BStandardizationMapper { + /** + * 查询标准化 + * + * @param id 标准化主键 + * @return 标准化 + */ + public BStandardization selectBStandardizationById(Long id); + + /** + * 查询标准化列表 + * + * @param bStandardization 标准化 + * @return 标准化集合 + */ + List selectBStandardizationList(BStandardization bStandardization); + + /** + * 新增标准化 + * + * @param bStandardization 标准化 + * @return 结果 + */ + int insertBStandardization(BStandardization bStandardization); + + /** + * 修改标准化 + * + * @param bStandardization 标准化 + * @return 结果 + */ + int updateBStandardization(BStandardization bStandardization); + + /** + * 删除标准化 + * + * @param id 标准化主键 + * @return 结果 + */ + int deleteBStandardizationById(Long id); + + /** + * 批量删除标准化 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deleteBStandardizationByIds(Long[] ids); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/SzEnforExamineMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/SzEnforExamineMapper.java index 77c9ba5..e3cf6ea 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/SzEnforExamineMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/SzEnforExamineMapper.java @@ -60,4 +60,15 @@ public interface SzEnforExamineMapper * @return 结果 */ public int deleteSzEnforExamineByIDs(String[] IDs); + + + + + /** + * 根据企业id查询数据 + * + * @param enterPriseId + * @return + */ + List getByEnterPriseCode(String enterPriseId); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/quartz/EnterpristQuartz.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/quartz/EnterpristQuartz.java new file mode 100644 index 0000000..4c11a66 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/quartz/EnterpristQuartz.java @@ -0,0 +1,143 @@ +package com.ruoyi.programManagement.quartz; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.programManagement.entity.*; +import com.ruoyi.programManagement.mapper.BEnterpriseNewMapper; +import com.ruoyi.programManagement.mapper.BStandardizationMapper; +import com.ruoyi.programManagement.mapper.SzsEnterpriseInformationMapper; +import com.ruoyi.programManagement.service.BPlanEnterpriseService; +import com.ruoyi.programManagement.service.ISzEnforExamineService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; + +/** + * 定时任务更新企业新表 + */ +//@Configuration +//@EnableScheduling +@Api(tags = "定时任务") +@RestController +@RequestMapping("/pharmaceuticals/quartz") +public class EnterpristQuartz { + @Autowired + private SzsEnterpriseInformationMapper szsEnterpriseInformationMapper; + + @Autowired + private BEnterpriseNewMapper bEnterpriseNewMapper; + + @Autowired + private BStandardizationMapper bStandardizationMapper; + + @Autowired + private ISzEnforExamineService szEnforExamineService; + + + @Resource + private BPlanEnterpriseService bPlanEnterpriseService; + + // 每周一早上五点5点执行一次任务 生成企业新表 +// @Scheduled(cron = "0 0 17 ? * SUN") + @GetMapping("/getList") + @ApiOperation(value = "定时任务") + public AjaxResult updateInformationData() { + // 查询szs_enterprise_informa tion表中的数据 + List enterpriseInformationList = szsEnterpriseInformationMapper.selectSzsEnterpriseInformationList(null); + // 遍历数据并更新到b_enterprise_new表中 + List szsList = new ArrayList<>(); + for (SzsEnterpriseInformation enterpriseInformation : enterpriseInformationList) { + BEnterpriseNew enterpriseNew = new BEnterpriseNew(); + enterpriseNew.setEnterpriseId(enterpriseInformation.getUuitNo()); + enterpriseNew.setEnterpriseName(enterpriseInformation.getEnterpriseName()); + enterpriseNew.setDistrict(enterpriseInformation.getSubdistrict()); + enterpriseNew.setSupervisionLarge(enterpriseInformation.getSupervisionLarge()); + // 根据enterpriseId判断数据是否已存在 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("enterprise_id", enterpriseInformation.getUuitNo()); + //获取enterpriseName + szsList.add(enterpriseNew.getEnterpriseName()); + Long count = bEnterpriseNewMapper.selectCount(queryWrapper); + if (count > 0) { + // 更新数据 + bEnterpriseNewMapper.updateBEnterpriseNew(enterpriseNew); + } else { + // 插入数据 + bEnterpriseNewMapper.insertBEnterpriseNew(enterpriseNew); + } + } + // 查询b_enterprise_new表中的所有企业名称 + List enterpriseList = bEnterpriseNewMapper.selectBEnterpriseNewList(null); + // 查询b_standardization表中的所有企业名称 + List standardizationList = bStandardizationMapper.selectBStandardizationList(null); + //更新b_enterprise_new表中匹配的企业的STAND_LEVEL字段 + for (BEnterpriseNew enterprise : enterpriseList) { + for (BStandardization standardization : standardizationList) { + if (enterprise.getEnterpriseName().equals(standardization.getEnterpriseName())) { + // 执行更新操作,例如: + enterprise.setStandLevel(standardization.getStandardizedGrade()); + bEnterpriseNewMapper.updateBEnterpriseNew(enterprise); + } else { + enterprise.setStandLevel("/"); + bEnterpriseNewMapper.updateBEnterpriseNew(enterprise); + } + } + } + // 找出在b_standardization表中存在但在b_enterprise_new表中不存在的企业名称 + List notInEnterpriseNew = new ArrayList<>(); + for (BStandardization standardization : standardizationList) { + boolean found = false; + for (BEnterpriseNew enterprise : enterpriseList) { + if (enterprise.getEnterpriseName().equals(standardization.getEnterpriseName())) { + found = true; + break; + } + } + if (!found) { + BStandardization b = new BStandardization(); + b.setStandardizedGrade(standardization.getStandardizedGrade()); + b.setEnterpriseName(standardization.getEnterpriseName()); + notInEnterpriseNew.add(b); + } + + } + // 查询b_enterprise_new表中的所有企业名称 更新检查时间 + for (BEnterpriseNew a : enterpriseList) { + BEnterpriseNew bEnterpriseNew = new BEnterpriseNew(); + List szEnforExamineList = szEnforExamineService.getByEnterPriseCode(a.getEnterpriseId()); + for (SzEnforExamine b:szEnforExamineList) { + bEnterpriseNew.setId(a.getId()); + bEnterpriseNew.setExamineEndTime(b.getExamineEndTime()); + bEnterpriseNewMapper.updateBEnterpriseNew(bEnterpriseNew); + } + } + return AjaxResult.success(notInEnterpriseNew); + } + + + // 定时任务修改更新计划表的检查状态、检查id、检查时效字段 + @GetMapping("/updateExamine") + @ApiOperation(value = "定时任务修改更新计划表的检查状态、检查id、检查时效字段") + public AjaxResult updateExamine() { + //查询计划表中的所有数据 + List list = bPlanEnterpriseService.selectBPlanEnterpriseList(null); + for (BPlanEnterprise a:list){ + BEnterpriseNew bEnterpriseNew = new BEnterpriseNew(); + List szEnforExamineList = szEnforExamineService.getByEnterPriseCode(a.getEnterpriseId()); + for (SzEnforExamine b:szEnforExamineList) { + bEnterpriseNew.setId(a.getId()); + bEnterpriseNew.setExamineEndTime(b.getExamineEndTime()); + bEnterpriseNewMapper.updateBEnterpriseNew(bEnterpriseNew); + } + } + return null; + } + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/BPlanEnterpriseService.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/BPlanEnterpriseService.java index 7e30bae..b8e3622 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/BPlanEnterpriseService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/BPlanEnterpriseService.java @@ -89,5 +89,21 @@ public interface BPlanEnterpriseService extends IService { */ BPlanEnterprise selectById(String id); + + /** + * 根据执法地区统计计划企业数量 + * @param req + * @return + */ + Integer getgetEnterPriseList(BPlanEnterprisePageRequest req); + + + /** + * 获取计划完成企业数量 + * @param req + * @return + */ + Integer getEnterPriseFinsh(BPlanEnterprisePageRequest req); + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/IBAdministrativeDivisionService.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/IBAdministrativeDivisionService.java index 7ed5777..07e9772 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/IBAdministrativeDivisionService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/IBAdministrativeDivisionService.java @@ -3,6 +3,8 @@ package com.ruoyi.programManagement.service; import com.ruoyi.programManagement.domain.BAdministrativeDivision; import com.ruoyi.programManagement.entity.request.BAdministrativeDistrictRequest; import com.ruoyi.programManagement.entity.request.BAdministrativeTreeRequest; +import com.ruoyi.programManagement.entity.request.BPlanEnterPriseTreeRequest; +import com.ruoyi.programManagement.entity.request.BPlanEnterPrisetDistrictRequest; import java.util.List; @@ -76,4 +78,22 @@ public interface IBAdministrativeDivisionService { */ List selectBycountyList(); + + /** + * 行政区划区划树结构 + * + * @return list + */ + List selectByEnterPrisecountyList(); + + + + /** + * 行政区划乡镇树结构 + * + * @return list + */ + List selectByEnterPriseList(); + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/IBStandardizationService.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/IBStandardizationService.java new file mode 100644 index 0000000..40d4101 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/IBStandardizationService.java @@ -0,0 +1,62 @@ +package com.ruoyi.programManagement.service; + +import com.ruoyi.programManagement.entity.BStandardization; + +import java.util.List; + + +/** + * 标准化Service接口 + * + * @author ruoyi + * @since 2023-12-18 + */ +public interface IBStandardizationService { + /** + * 查询标准化 + * + * @param id 标准化主键 + * @return 标准化 + */ + public BStandardization selectBStandardizationById(Long id); + + /** + * 查询标准化列表 + * + * @param bStandardization 标准化 + * @return 标准化集合 + */ + List selectBStandardizationList(BStandardization bStandardization); + + /** + * 新增标准化 + * + * @param bStandardization 标准化 + * @return 结果 + */ + int insertBStandardization(BStandardization bStandardization); + + /** + * 修改标准化 + * + * @param bStandardization 标准化 + * @return 结果 + */ + int updateBStandardization(BStandardization bStandardization); + + /** + * 批量删除标准化 + * + * @param ids 需要删除的标准化主键集合 + * @return 结果 + */ + int deleteBStandardizationByIds(Long[] ids); + + /** + * 删除标准化信息 + * + * @param id 标准化主键 + * @return 结果 + */ + int deleteBStandardizationById(Long id); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/ISzEnforExamineService.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/ISzEnforExamineService.java index 2e7ab08..5eed53b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/ISzEnforExamineService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/ISzEnforExamineService.java @@ -7,15 +7,14 @@ import java.util.List; /** * 现场检查记录Service接口 - * + * * @author ruoyi * @date 2023-09-26 */ -public interface ISzEnforExamineService -{ +public interface ISzEnforExamineService { /** * 查询现场检查记录 - * + * * @param ID 现场检查记录主键 * @return 现场检查记录 */ @@ -23,7 +22,7 @@ public interface ISzEnforExamineService /** * 查询现场检查记录列表 - * + * * @param szEnforExamine 现场检查记录 * @return 现场检查记录集合 */ @@ -31,7 +30,7 @@ public interface ISzEnforExamineService /** * 新增现场检查记录 - * + * * @param szEnforExamine 现场检查记录 * @return 结果 */ @@ -39,7 +38,7 @@ public interface ISzEnforExamineService /** * 修改现场检查记录 - * + * * @param szEnforExamine 现场检查记录 * @return 结果 */ @@ -47,7 +46,7 @@ public interface ISzEnforExamineService /** * 批量删除现场检查记录 - * + * * @param IDs 需要删除的现场检查记录主键集合 * @return 结果 */ @@ -55,9 +54,18 @@ public interface ISzEnforExamineService /** * 删除现场检查记录信息 - * + * * @param ID 现场检查记录主键 * @return 结果 */ public int deleteSzEnforExamineByID(String ID); + + + /** + * 根据企业id查询数据 + * + * @param enterPriseId + * @return + */ + List getByEnterPriseCode(String enterPriseId); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/BAdministrativeDivisionServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/BAdministrativeDivisionServiceImpl.java index a4ec546..4a754ba 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/BAdministrativeDivisionServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/BAdministrativeDivisionServiceImpl.java @@ -4,6 +4,8 @@ import java.util.List; import com.ruoyi.programManagement.entity.request.BAdministrativeDistrictRequest; import com.ruoyi.programManagement.entity.request.BAdministrativeTreeRequest; +import com.ruoyi.programManagement.entity.request.BPlanEnterPriseTreeRequest; +import com.ruoyi.programManagement.entity.request.BPlanEnterPrisetDistrictRequest; import org.springframework.stereotype.Service; import com.ruoyi.programManagement.mapper.BAdministrativeDivisionMapper; import com.ruoyi.programManagement.domain.BAdministrativeDivision; @@ -96,4 +98,16 @@ public class BAdministrativeDivisionServiceImpl implements IBAdministrativeDivis public List selectBycountyList() { return bAdministrativeDivisionMapper.selectBycountyList(); } + + + @Override + public List selectByEnterPrisecountyList() { + return bAdministrativeDivisionMapper.selectByEnterPrisecountyList(); + } + + + @Override + public List selectByEnterPriseList() { + return bAdministrativeDivisionMapper.selectByEnterPriseList(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/BPlanEnterpriseServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/BPlanEnterpriseServiceImpl.java index 388bdfb..2b7a440 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/BPlanEnterpriseServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/BPlanEnterpriseServiceImpl.java @@ -14,6 +14,7 @@ import com.ruoyi.programManagement.entity.response.zhifaCountResponse; import com.ruoyi.programManagement.entity.response.zhifaPlanResponse; import com.ruoyi.programManagement.mapper.BPlanEnterpriseMapper; import com.ruoyi.programManagement.service.BPlanEnterpriseService; +import io.swagger.models.auth.In; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -102,6 +103,16 @@ public class BPlanEnterpriseServiceImpl extends ServiceImpl selectBStandardizationList(BStandardization bStandardization) { + return bStandardizationMapper.selectBStandardizationList(bStandardization); + } + + /** + * 新增标准化 + * + * @param bStandardization 标准化 + * @return 结果 + */ + @Override + public int insertBStandardization(BStandardization bStandardization) { + return bStandardizationMapper.insertBStandardization(bStandardization); + } + + /** + * 修改标准化 + * + * @param bStandardization 标准化 + * @return 结果 + */ + @Override + public int updateBStandardization(BStandardization bStandardization) { + return bStandardizationMapper.updateBStandardization(bStandardization); + } + + /** + * 批量删除标准化 + * + * @param ids 需要删除的标准化主键 + * @return 结果 + */ + @Override + public int deleteBStandardizationByIds(Long[] ids) { + return bStandardizationMapper.deleteBStandardizationByIds(ids); + } + + /** + * 删除标准化信息 + * + * @param id 标准化主键 + * @return 结果 + */ + @Override + public int deleteBStandardizationById(Long id) { + return bStandardizationMapper.deleteBStandardizationById(id); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/SzEnforExamineServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/SzEnforExamineServiceImpl.java index 7bfd5a7..bfcc7db 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/SzEnforExamineServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/SzEnforExamineServiceImpl.java @@ -92,4 +92,9 @@ public class SzEnforExamineServiceImpl implements ISzEnforExamineService { return szEnforExamineMapper.deleteSzEnforExamineByID(ID); } + + @Override + public List getByEnterPriseCode(String enterPriseId) { + return szEnforExamineMapper.getByEnterPriseCode(enterPriseId); + } } diff --git a/ruoyi-system/src/main/resources/mapper/yingji/BAdministrativeDivisionMapper.xml b/ruoyi-system/src/main/resources/mapper/yingji/BAdministrativeDivisionMapper.xml index ba5a510..bfab8c9 100644 --- a/ruoyi-system/src/main/resources/mapper/yingji/BAdministrativeDivisionMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/yingji/BAdministrativeDivisionMapper.xml @@ -45,6 +45,17 @@ from b_administrative_division group by districtCode,district + + diff --git a/ruoyi-system/src/main/resources/mapper/yingji/BAdministrativeMapper.xml b/ruoyi-system/src/main/resources/mapper/yingji/BAdministrativeMapper.xml index 3bf49d4..b96770b 100644 --- a/ruoyi-system/src/main/resources/mapper/yingji/BAdministrativeMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/yingji/BAdministrativeMapper.xml @@ -87,7 +87,6 @@ e.enterprise_id, SUBSTRING( e.district, 1, 7 ) AS district, CASE - WHEN f.USC_CODE IS NOT NULL AND SUBSTRING( e.planned_year, 1, 7 ) = SUBSTRING( f.EXAMINE_START_TIME, 1, 7 ) THEN 1 ELSE 0 diff --git a/ruoyi-system/src/main/resources/mapper/yingji/BEnterpriseNewMapper.xml b/ruoyi-system/src/main/resources/mapper/yingji/BEnterpriseNewMapper.xml index 6d6abef..64d2dfa 100644 --- a/ruoyi-system/src/main/resources/mapper/yingji/BEnterpriseNewMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/yingji/BEnterpriseNewMapper.xml @@ -110,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" user_id = #{userId}, dept_id = #{deptId}, - where id = #{id} + where enterprise_id = #{enterpriseId} diff --git a/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml b/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml index 80f12ea..5c6d7af 100644 --- a/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml @@ -191,10 +191,10 @@ a.create_time, a.update_id, a.update_by, - a. update_time, + a.update_time, a.remark, a.user_id, - a. dept_id, + a.dept_id, a.district, a.planned_year, a.plan_name, @@ -202,7 +202,47 @@ a.is_point, a.enterprise_name as entprName from b_plan_enterprise a - where a.id=#{id} + where a.id = #{id} + + + diff --git a/ruoyi-system/src/main/resources/mapper/yingji/BStandardizationMapper.xml b/ruoyi-system/src/main/resources/mapper/yingji/BStandardizationMapper.xml new file mode 100644 index 0000000..eae77e3 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/yingji/BStandardizationMapper.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + select id, enterprise_name, standardized_grade from b_standardization + + + + + + + + insert into b_standardization + + enterprise_name, + standardized_grade, + + + #{enterpriseName}, + #{standardizedGrade}, + + + + + update b_standardization + + enterprise_name = #{enterpriseName}, + standardized_grade = #{standardizedGrade}, + + where id = #{id} + + + + delete from b_standardization where id = #{id} + + + + delete from b_standardization where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/yingji/SzEnforExamineMapper.xml b/ruoyi-system/src/main/resources/mapper/yingji/SzEnforExamineMapper.xml index a05426a..afff7ba 100644 --- a/ruoyi-system/src/main/resources/mapper/yingji/SzEnforExamineMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/yingji/SzEnforExamineMapper.xml @@ -1,78 +1,147 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - select dms_timestamp, ID, PLAN_EXAMINE_ID, ENTPR_NAME, USC_CODE, EXAMINE_SITE, EXAMINE_SOURCE, EXAMINE_START_TIME, EXAMINE_END_TIME, EXECUTOR_ID, EXAMINE_SITUATION, WRIT_NO, TYPE_CODE, EVIDENCE, EXECUTOR_DEPT, EXECUTOR_DEPT_CODE, EXAMINE_TYPE, THREE_SPECIAL_TYPE, ENTERPRISE_UNIT_VERSION, CREATER, CREATETIME, UPDATER, UPDATETIME, SOURCE_DATA, EXPERTS_IN_FLAG, EXPERTS_NAME from sz_enfor_examine + select dms_timestamp, + ID, + PLAN_EXAMINE_ID, + ENTPR_NAME, + USC_CODE, + EXAMINE_SITE, + EXAMINE_SOURCE, + EXAMINE_START_TIME, + EXAMINE_END_TIME, + EXECUTOR_ID, + EXAMINE_SITUATION, + WRIT_NO, + TYPE_CODE, + EVIDENCE, + EXECUTOR_DEPT, + EXECUTOR_DEPT_CODE, + EXAMINE_TYPE, + THREE_SPECIAL_TYPE, + ENTERPRISE_UNIT_VERSION, + CREATER, + CREATETIME, + UPDATER, + UPDATETIME, + SOURCE_DATA, + EXPERTS_IN_FLAG, + EXPERTS_NAME + from sz_enfor_examine - + - + + + insert into sz_enfor_examine @@ -102,7 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SOURCE_DATA, EXPERTS_IN_FLAG, EXPERTS_NAME, - + #{dmsTimestamp}, #{ID}, @@ -130,7 +199,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{sourceData}, #{expertsInFlag}, #{expertsName}, - + @@ -150,7 +219,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" TYPE_CODE = #{typeCode}, EVIDENCE = #{EVIDENCE}, EXECUTOR_DEPT = #{executorDept}, - EXECUTOR_DEPT_CODE = #{executorDeptCode}, + EXECUTOR_DEPT_CODE = #{executorDeptCode}, + EXAMINE_TYPE = #{examineType}, THREE_SPECIAL_TYPE = #{threeSpecialType}, ENTERPRISE_UNIT_VERSION = #{enterpriseUnitVersion}, @@ -166,11 +236,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from sz_enfor_examine where ID = #{ID} + delete + from sz_enfor_examine + where ID = #{ID} - delete from sz_enfor_examine where ID in + delete from sz_enfor_examine where ID in #{ID} diff --git a/ruoyi-system/src/main/resources/mapper/yingji/SzsEnterpriseInformationMapper.xml b/ruoyi-system/src/main/resources/mapper/yingji/SzsEnterpriseInformationMapper.xml index 3ec8d56..f2fc4b1 100644 --- a/ruoyi-system/src/main/resources/mapper/yingji/SzsEnterpriseInformationMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/yingji/SzsEnterpriseInformationMapper.xml @@ -1,97 +1,162 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - select jhpt_update_time, LEGAL_PERSON_CELLPHONE, INDUS_TYPE_MIDDLE, LEGAL_PERSON_TYPE, INDUS_TYPE_LAGRE, SUPERVISION_LARGE, CITY, BUSINESS_ADDRESS, COUNTY, REMARK, REPORT_HISTORY_ID, REGISTER_TIME, ENTERPRISE_ADDRESS, CREATE_BY, UPDATE_TIME, PROVINCE, SQRLXFS, SQR, TERM_END, ID, VILLAGE, UPDATE_BY, LEGAL_PERSON_POST, LEGAL_PERSON, ZJ_ECON_KIND, CORP_STATUS, CREATE_TIME, UUIT_NO, SUPERVISION_SMALL, RIGISTER_ADDRESS, RISK_REPORT, INDUS_TYPE_SMALL, IS_DELETE, BUSINESS_SCOPE, START_TIME, LEGAL_PERSON_TEL, INDUS_TYPE_CLASS, TERM_START, ENTERPRIST_SCALE, REGISTRATION_ORG, DISTRICT_CODE, SUBDISTRICT, OTHER_NAME, RIGISTER_FUND, ENTERPRISE_NAME, ORG_CODE, ABOVE_DESIGNATED, FRZJH, CREATER, UPDATER, CREATETIME, UPDATETIME, LAST_PAGE_NUMBER, FLOOR_SPACE, ABOVE_DESIGNATED_TWO, SAFETY_PRODUCTION_INVESTMENT, LAST_YEAR_OPERATING_INCOME, LAST_YEAT_ON_STREAM, MAJOR_PRODUCT, HTML_TEXT, FIXED_ASSETS from szs_enterprise_information + select jhpt_update_time, + LEGAL_PERSON_CELLPHONE, + INDUS_TYPE_MIDDLE, + LEGAL_PERSON_TYPE, + INDUS_TYPE_LAGRE, + SUPERVISION_LARGE, + CITY, + BUSINESS_ADDRESS, + COUNTY, + REMARK, + REPORT_HISTORY_ID, + REGISTER_TIME, + ENTERPRISE_ADDRESS, + CREATE_BY, + UPDATE_TIME, + PROVINCE, + SQRLXFS, + SQR, + TERM_END, + ID, + VILLAGE, + UPDATE_BY, + LEGAL_PERSON_POST, + LEGAL_PERSON, + ZJ_ECON_KIND, + CORP_STATUS, + CREATE_TIME, + UUIT_NO, + SUPERVISION_SMALL, + RIGISTER_ADDRESS, + RISK_REPORT, + INDUS_TYPE_SMALL, + IS_DELETE, + BUSINESS_SCOPE, + START_TIME, + LEGAL_PERSON_TEL, + INDUS_TYPE_CLASS, + TERM_START, + ENTERPRIST_SCALE, + REGISTRATION_ORG, + DISTRICT_CODE, + SUBDISTRICT, + OTHER_NAME, + RIGISTER_FUND, + ENTERPRISE_NAME, + ORG_CODE, + ABOVE_DESIGNATED, + FRZJH, + CREATER, + UPDATER, + CREATETIME, + UPDATETIME, + LAST_PAGE_NUMBER, + FLOOR_SPACE, + ABOVE_DESIGNATED_TWO, + SAFETY_PRODUCTION_INVESTMENT, + LAST_YEAR_OPERATING_INCOME, + LAST_YEAT_ON_STREAM, + MAJOR_PRODUCT, + HTML_TEXT, + FIXED_ASSETS + from szs_enterprise_information - SELECT - a.*, - CASE WHEN b.ent_code IS NOT NULL THEN 1 ELSE 2 END AS is_point + a.* FROM - szs_enterprise_information a - LEFT JOIN - b_key_enterprise b ON a.UUIT_NO = b.ent_code )s + szs_enterprise_information a - and s.SUPERVISION_LARGE like concat('%',#{supervisionLarge}, '%') - and s.UUIT_NO = #{uuitNo} - and s.SUBDISTRICT like concat('%',#{subdistrict}, '%') - and s.ABOVE_DESIGNATED_TWO = #{aboveDesignatedTwo} - and s.is_point=#{isPoint} - and s.enterprise_name like concat('%',#{enterpriseName}, '%') + and a.SUPERVISION_LARGE like + concat('%',#{supervisionLarge}, '%') + + and a.UUIT_NO = #{uuitNo} + and a.SUBDISTRICT like concat('%',#{subdistrict}, + '%') + + and a.ABOVE_DESIGNATED_TWO = + #{aboveDesignatedTwo} + + and a.enterprise_name like + concat('%',#{enterpriseName}, '%') + - +