zhangtao
dongdingding 1 year ago
parent 47a6aacc65
commit 0251f076d6

@ -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<BPlanEnterPrisetDistrictRequest> list = bAdministrativeDivisionService.selectByEnterPrisecountyList();
//乡镇list
List<BPlanEnterPriseTreeRequest> listsub = bAdministrativeDivisionService.selectByEnterPriseList();
List<BPlanEnterPrisetDistrictRequest> 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<BPlanEnterPriseTreeResponse> 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<List<BPlanEnterPriseTreeResponse>> groupedList = list.stream()
// .collect(Collectors.groupingBy(BPlanEnterPriseTreeResponse::getCounty))
// .values()
// .stream()
// .collect(Collectors.toList());
// List<BPlanEnterPriseTreeResponse> cascadingSelectData = new ArrayList<>();
// for (List<BPlanEnterPriseTreeResponse> 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);
// }
//}
}

@ -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<BStandardization> list = bStandardizationService.selectBStandardizationList(bStandardization);
return getDataTable(list);
}
/**
*
*/
@ApiOperation(value = "导出标准化列表")
@PostMapping("/export")
public void export(HttpServletResponse response, BStandardization bStandardization) {
List<BStandardization> list = bStandardizationService.selectBStandardizationList(bStandardization);
ExcelUtil<BStandardization> util = new ExcelUtil<BStandardization>(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));
}
}

@ -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;
}

@ -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;
}
}

@ -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<BPlanEnterPriseTreeRequest> 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);
}
}

@ -17,4 +17,18 @@ public class BPlanEnterprisePageRequest {
@ApiModelProperty(value = "计划年份")
private String plannedYear;
/**
*
*/
@ApiModelProperty(value = "计划月份")
private String[] plannedMonth;
/**
*
*/
@ApiModelProperty(value = "区划代码")
private String code;
}

@ -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<BAdministrativeDistrictRequest> selectBycountyList();
/**
*
*
* @return list
*/
List<BPlanEnterPrisetDistrictRequest> selectByEnterPrisecountyList();
/**
*
*
* @return list
*/
List<BPlanEnterPriseTreeRequest> selectByEnterPriseList();
}

@ -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<BEnterpriseNew> {
/**
*
*
@ -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<BEnterpriseNew> wrapper);
}

@ -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<BPlanEnterprise> {
void deleteByPlanId(@Param("planId") Long planId);
List<BPlanEnterpriseZhifaResponse> getZhifa(@Param("req") checkResultRequest req);
@ -87,5 +84,23 @@ public interface BPlanEnterpriseMapper extends BaseMapper<BPlanEnterprise> {
*/
BPlanEnterprise selectById(String id);
/**
*
*
* @param req
* @return
*/
Integer getgetEnterPriseList(@Param("req") BPlanEnterprisePageRequest req);
/**
*
*
* @param req
* @return
*/
Integer getEnterPriseFinsh( @Param("req") BPlanEnterprisePageRequest req);
}

@ -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<BStandardization> 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);
}

@ -60,4 +60,15 @@ public interface SzEnforExamineMapper
* @return
*/
public int deleteSzEnforExamineByIDs(String[] IDs);
/**
* id
*
* @param enterPriseId
* @return
*/
List<SzEnforExamine> getByEnterPriseCode(String enterPriseId);
}

@ -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<SzsEnterpriseInformation> enterpriseInformationList = szsEnterpriseInformationMapper.selectSzsEnterpriseInformationList(null);
// 遍历数据并更新到b_enterprise_new表中
List<String> 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<BEnterpriseNew> 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<BEnterpriseNew> enterpriseList = bEnterpriseNewMapper.selectBEnterpriseNewList(null);
// 查询b_standardization表中的所有企业名称
List<BStandardization> 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<BStandardization> 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<SzEnforExamine> 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<BPlanEnterprise> list = bPlanEnterpriseService.selectBPlanEnterpriseList(null);
for (BPlanEnterprise a:list){
BEnterpriseNew bEnterpriseNew = new BEnterpriseNew();
List<SzEnforExamine> szEnforExamineList = szEnforExamineService.getByEnterPriseCode(a.getEnterpriseId());
for (SzEnforExamine b:szEnforExamineList) {
bEnterpriseNew.setId(a.getId());
bEnterpriseNew.setExamineEndTime(b.getExamineEndTime());
bEnterpriseNewMapper.updateBEnterpriseNew(bEnterpriseNew);
}
}
return null;
}
}

@ -89,5 +89,21 @@ public interface BPlanEnterpriseService extends IService<BPlanEnterprise> {
*/
BPlanEnterprise selectById(String id);
/**
*
* @param req
* @return
*/
Integer getgetEnterPriseList(BPlanEnterprisePageRequest req);
/**
*
* @param req
* @return
*/
Integer getEnterPriseFinsh(BPlanEnterprisePageRequest req);
}

@ -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<BAdministrativeDistrictRequest> selectBycountyList();
/**
*
*
* @return list
*/
List<BPlanEnterPrisetDistrictRequest> selectByEnterPrisecountyList();
/**
*
*
* @return list
*/
List<BPlanEnterPriseTreeRequest> selectByEnterPriseList();
}

@ -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<BStandardization> 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);
}

@ -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<SzEnforExamine> getByEnterPriseCode(String enterPriseId);
}

@ -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<BAdministrativeDistrictRequest> selectBycountyList() {
return bAdministrativeDivisionMapper.selectBycountyList();
}
@Override
public List<BPlanEnterPrisetDistrictRequest> selectByEnterPrisecountyList() {
return bAdministrativeDivisionMapper.selectByEnterPrisecountyList();
}
@Override
public List<BPlanEnterPriseTreeRequest> selectByEnterPriseList() {
return bAdministrativeDivisionMapper.selectByEnterPriseList();
}
}

@ -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<BPlanEnterpriseMappe
return bPlanEnterpriseMapper.selectById(id);
}
@Override
public Integer getgetEnterPriseList(BPlanEnterprisePageRequest req) {
return bPlanEnterpriseMapper.getgetEnterPriseList(req);
}
@Override
public Integer getEnterPriseFinsh(BPlanEnterprisePageRequest req) {
return bPlanEnterpriseMapper.getEnterPriseFinsh(req);
}
}

@ -0,0 +1,88 @@
package com.ruoyi.programManagement.service.impl;
import java.util.List;
import com.ruoyi.programManagement.entity.BStandardization;
import org.springframework.stereotype.Service;
import com.ruoyi.programManagement.mapper.BStandardizationMapper;
import com.ruoyi.programManagement.service.IBStandardizationService;
import javax.annotation.Resource;
/**
* Service
*
* @author ruoyi
* @since 2023-12-18
*/
@Service
public class BStandardizationServiceImpl implements IBStandardizationService {
@Resource
private BStandardizationMapper bStandardizationMapper;
/**
*
*
* @param id
* @return
*/
@Override
public BStandardization selectBStandardizationById(Long id) {
return bStandardizationMapper.selectBStandardizationById(id);
}
/**
*
*
* @param bStandardization
* @return
*/
@Override
public List<BStandardization> 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);
}
}

@ -92,4 +92,9 @@ public class SzEnforExamineServiceImpl implements ISzEnforExamineService
{
return szEnforExamineMapper.deleteSzEnforExamineByID(ID);
}
@Override
public List<SzEnforExamine> getByEnterPriseCode(String enterPriseId) {
return szEnforExamineMapper.getByEnterPriseCode(enterPriseId);
}
}

@ -45,6 +45,17 @@
from b_administrative_division
group by districtCode,district
</select>
<select id="selectByEnterPrisecountyList"
resultType="com.ruoyi.programManagement.entity.request.BPlanEnterPrisetDistrictRequest">
select district_code as districtCode,district
from b_administrative_division
group by districtCode,district
</select>
<select id="selectByEnterPriseList"
resultType="com.ruoyi.programManagement.entity.request.BPlanEnterPriseTreeRequest">
select county_code as countyCode, county, sort
from b_administrative_division
</select>
<insert id="insertBAdministrativeDivision" parameterType="BAdministrativeDivision" useGeneratedKeys="true"
keyProperty="id">

@ -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

@ -110,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null">user_id = #{userId},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
</trim>
where id = #{id}
where enterprise_id = #{enterpriseId}
</update>
<delete id="deleteBEnterpriseNewById" parameterType="Long">

@ -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}
</select>
<select id="getgetEnterPriseList" resultType="java.lang.Integer">
select count(*) from b_plan_enterprise
<where>
<if test="req.code !=null and req.code!='' ">
AND district like concat('%', #{req.code}, '%')
</if>
<if test="req.plannedYear !=null and req.plannedYear!='' ">
and planned_year =#{req.plannedYear}
</if>
<if test="req.plannedMonth != null and req.plannedMonth.length > 0">
AND planned_month IN
<foreach item="item" collection="req.plannedMonth" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="getEnterPriseFinsh" resultType="java.lang.Integer">
select count(*)
from b_plan_enterprise
<where>
<if test="req.code !=null and req.code!='' ">
AND district like concat('%', #{req.code}, '%')
</if>
<if test="req.plannedYear !=null and req.plannedYear!='' ">
and planned_year =#{req.plannedYear}
</if>
<if test="req.plannedMonth != null and req.plannedMonth.length > 0">
AND planned_month IN
<foreach item="item" collection="req.plannedMonth" open="(" separator="," close=")">
#{item}
</foreach>
</if>
and check_status = 1
</where>
</select>

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.programManagement.mapper.BStandardizationMapper">
<resultMap type="BStandardization" id="BStandardizationResult">
<result property="id" column="id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="standardizedGrade" column="standardized_grade" />
</resultMap>
<sql id="selectBStandardizationVo">
select id, enterprise_name, standardized_grade from b_standardization
</sql>
<select id="selectBStandardizationList" parameterType="BStandardization" resultMap="BStandardizationResult">
<include refid="selectBStandardizationVo"/>
<where>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="standardizedGrade != null and standardizedGrade != ''"> and standardized_grade = #{standardizedGrade}</if>
</where>
</select>
<select id="selectBStandardizationById" parameterType="Long" resultMap="BStandardizationResult">
<include refid="selectBStandardizationVo"/>
where id = #{id}
</select>
<insert id="insertBStandardization" parameterType="BStandardization" useGeneratedKeys="true" keyProperty="id">
insert into b_standardization
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseName != null">enterprise_name,</if>
<if test="standardizedGrade != null">standardized_grade,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="standardizedGrade != null">#{standardizedGrade},</if>
</trim>
</insert>
<update id="updateBStandardization" parameterType="BStandardization">
update b_standardization
<trim prefix="SET" suffixOverrides=",">
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="standardizedGrade != null">standardized_grade = #{standardizedGrade},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBStandardizationById" parameterType="Long">
delete from b_standardization where id = #{id}
</delete>
<delete id="deleteBStandardizationByIds" parameterType="String">
delete from b_standardization where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -1,78 +1,147 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.programManagement.mapper.SzEnforExamineMapper">
<resultMap type="SzEnforExamine" id="SzEnforExamineResult">
<result property="dmsTimestamp" column="dms_timestamp" />
<result property="ID" column="ID" />
<result property="planExamineId" column="PLAN_EXAMINE_ID" />
<result property="entprName" column="ENTPR_NAME" />
<result property="uscCode" column="USC_CODE" />
<result property="examineSite" column="EXAMINE_SITE" />
<result property="examineSource" column="EXAMINE_SOURCE" />
<result property="examineStartTime" column="EXAMINE_START_TIME" />
<result property="examineEndTime" column="EXAMINE_END_TIME" />
<result property="executorId" column="EXECUTOR_ID" />
<result property="examineSituation" column="EXAMINE_SITUATION" />
<result property="writNo" column="WRIT_NO" />
<result property="typeCode" column="TYPE_CODE" />
<result property="EVIDENCE" column="EVIDENCE" />
<result property="executorDept" column="EXECUTOR_DEPT" />
<result property="executorDeptCode" column="EXECUTOR_DEPT_CODE" />
<result property="examineType" column="EXAMINE_TYPE" />
<result property="threeSpecialType" column="THREE_SPECIAL_TYPE" />
<result property="enterpriseUnitVersion" column="ENTERPRISE_UNIT_VERSION" />
<result property="CREATER" column="CREATER" />
<result property="CREATETIME" column="CREATETIME" />
<result property="UPDATER" column="UPDATER" />
<result property="UPDATETIME" column="UPDATETIME" />
<result property="sourceData" column="SOURCE_DATA" />
<result property="expertsInFlag" column="EXPERTS_IN_FLAG" />
<result property="expertsName" column="EXPERTS_NAME" />
<result property="dmsTimestamp" column="dms_timestamp"/>
<result property="ID" column="ID"/>
<result property="planExamineId" column="PLAN_EXAMINE_ID"/>
<result property="entprName" column="ENTPR_NAME"/>
<result property="uscCode" column="USC_CODE"/>
<result property="examineSite" column="EXAMINE_SITE"/>
<result property="examineSource" column="EXAMINE_SOURCE"/>
<result property="examineStartTime" column="EXAMINE_START_TIME"/>
<result property="examineEndTime" column="EXAMINE_END_TIME"/>
<result property="executorId" column="EXECUTOR_ID"/>
<result property="examineSituation" column="EXAMINE_SITUATION"/>
<result property="writNo" column="WRIT_NO"/>
<result property="typeCode" column="TYPE_CODE"/>
<result property="EVIDENCE" column="EVIDENCE"/>
<result property="executorDept" column="EXECUTOR_DEPT"/>
<result property="executorDeptCode" column="EXECUTOR_DEPT_CODE"/>
<result property="examineType" column="EXAMINE_TYPE"/>
<result property="threeSpecialType" column="THREE_SPECIAL_TYPE"/>
<result property="enterpriseUnitVersion" column="ENTERPRISE_UNIT_VERSION"/>
<result property="CREATER" column="CREATER"/>
<result property="CREATETIME" column="CREATETIME"/>
<result property="UPDATER" column="UPDATER"/>
<result property="UPDATETIME" column="UPDATETIME"/>
<result property="sourceData" column="SOURCE_DATA"/>
<result property="expertsInFlag" column="EXPERTS_IN_FLAG"/>
<result property="expertsName" column="EXPERTS_NAME"/>
</resultMap>
<sql id="selectSzEnforExamineVo">
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
</sql>
<select id="selectSzEnforExamineList" parameterType="SzEnforExamine" resultMap="SzEnforExamineResult">
<include refid="selectSzEnforExamineVo"/>
<where>
<if test="dmsTimestamp != null "> and dms_timestamp = #{dmsTimestamp}</if>
<if test="planExamineId != null and planExamineId != ''"> and PLAN_EXAMINE_ID = #{planExamineId}</if>
<if test="entprName != null and entprName != ''"> and ENTPR_NAME like concat('%', #{entprName}, '%')</if>
<if test="uscCode != null and uscCode != ''"> and USC_CODE = #{uscCode}</if>
<if test="examineSite != null and examineSite != ''"> and EXAMINE_SITE = #{examineSite}</if>
<if test="examineSource != null and examineSource != ''"> and EXAMINE_SOURCE = #{examineSource}</if>
<if test="examineStartTime != null "> and EXAMINE_START_TIME = #{examineStartTime}</if>
<if test="examineEndTime != null "> and EXAMINE_END_TIME = #{examineEndTime}</if>
<if test="executorId != null and executorId != ''"> and EXECUTOR_ID = #{executorId}</if>
<if test="examineSituation != null and examineSituation != ''"> and EXAMINE_SITUATION = #{examineSituation}</if>
<if test="writNo != null and writNo != ''"> and WRIT_NO = #{writNo}</if>
<if test="typeCode != null and typeCode != ''"> and TYPE_CODE = #{typeCode}</if>
<if test="EVIDENCE != null and EVIDENCE != ''"> and EVIDENCE = #{EVIDENCE}</if>
<if test="executorDept != null and executorDept != ''"> and EXECUTOR_DEPT = #{executorDept}</if>
<if test="executorDeptCode != null and executorDeptCode != ''"> and EXECUTOR_DEPT_CODE = #{executorDeptCode}</if>
<if test="examineType != null and examineType != ''"> and EXAMINE_TYPE = #{examineType}</if>
<if test="threeSpecialType != null and threeSpecialType != ''"> and THREE_SPECIAL_TYPE = #{threeSpecialType}</if>
<if test="enterpriseUnitVersion != null and enterpriseUnitVersion != ''"> and ENTERPRISE_UNIT_VERSION = #{enterpriseUnitVersion}</if>
<if test="CREATER != null and CREATER != ''"> and CREATER = #{CREATER}</if>
<if test="CREATETIME != null "> and CREATETIME = #{CREATETIME}</if>
<if test="UPDATER != null and UPDATER != ''"> and UPDATER = #{UPDATER}</if>
<if test="UPDATETIME != null "> and UPDATETIME = #{UPDATETIME}</if>
<if test="sourceData != null and sourceData != ''"> and SOURCE_DATA = #{sourceData}</if>
<if test="expertsInFlag != null "> and EXPERTS_IN_FLAG = #{expertsInFlag}</if>
<if test="expertsName != null and expertsName != ''"> and EXPERTS_NAME like concat('%', #{expertsName}, '%')</if>
<where>
<if test="dmsTimestamp != null ">and dms_timestamp = #{dmsTimestamp}</if>
<if test="planExamineId != null and planExamineId != ''">and PLAN_EXAMINE_ID = #{planExamineId}</if>
<if test="entprName != null and entprName != ''">and ENTPR_NAME like concat('%', #{entprName}, '%')</if>
<if test="uscCode != null and uscCode != ''">and USC_CODE = #{uscCode}</if>
<if test="examineSite != null and examineSite != ''">and EXAMINE_SITE = #{examineSite}</if>
<if test="examineSource != null and examineSource != ''">and EXAMINE_SOURCE = #{examineSource}</if>
<if test="examineStartTime != null ">and EXAMINE_START_TIME = #{examineStartTime}</if>
<if test="examineEndTime != null ">and EXAMINE_END_TIME = #{examineEndTime}</if>
<if test="executorId != null and executorId != ''">and EXECUTOR_ID = #{executorId}</if>
<if test="examineSituation != null and examineSituation != ''">and EXAMINE_SITUATION =
#{examineSituation}
</if>
<if test="writNo != null and writNo != ''">and WRIT_NO = #{writNo}</if>
<if test="typeCode != null and typeCode != ''">and TYPE_CODE = #{typeCode}</if>
<if test="EVIDENCE != null and EVIDENCE != ''">and EVIDENCE = #{EVIDENCE}</if>
<if test="executorDept != null and executorDept != ''">and EXECUTOR_DEPT = #{executorDept}</if>
<if test="executorDeptCode != null and executorDeptCode != ''">and EXECUTOR_DEPT_CODE =
#{executorDeptCode}
</if>
<if test="examineType != null and examineType != ''">and EXAMINE_TYPE = #{examineType}</if>
<if test="threeSpecialType != null and threeSpecialType != ''">and THREE_SPECIAL_TYPE =
#{threeSpecialType}
</if>
<if test="enterpriseUnitVersion != null and enterpriseUnitVersion != ''">and ENTERPRISE_UNIT_VERSION =
#{enterpriseUnitVersion}
</if>
<if test="CREATER != null and CREATER != ''">and CREATER = #{CREATER}</if>
<if test="CREATETIME != null ">and CREATETIME = #{CREATETIME}</if>
<if test="UPDATER != null and UPDATER != ''">and UPDATER = #{UPDATER}</if>
<if test="UPDATETIME != null ">and UPDATETIME = #{UPDATETIME}</if>
<if test="sourceData != null and sourceData != ''">and SOURCE_DATA = #{sourceData}</if>
<if test="expertsInFlag != null ">and EXPERTS_IN_FLAG = #{expertsInFlag}</if>
<if test="expertsName != null and expertsName != ''">and EXPERTS_NAME like concat('%', #{expertsName},
'%')
</if>
</where>
</select>
<select id="selectSzEnforExamineByID" parameterType="String" resultMap="SzEnforExamineResult">
<include refid="selectSzEnforExamineVo"/>
where ID = #{ID}
</select>
<select id="getByEnterPriseCode" resultType="com.ruoyi.programManagement.entity.SzEnforExamine">
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
WHERE USC_CODE = '913205097500181704'
ORDER BY EXAMINE_END_TIME DESC
LIMIT 1;
</select>
<insert id="insertSzEnforExamine" parameterType="SzEnforExamine">
insert into sz_enfor_examine
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -102,7 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sourceData != null">SOURCE_DATA,</if>
<if test="expertsInFlag != null">EXPERTS_IN_FLAG,</if>
<if test="expertsName != null">EXPERTS_NAME,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dmsTimestamp != null">#{dmsTimestamp},</if>
<if test="ID != null">#{ID},</if>
@ -130,7 +199,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sourceData != null">#{sourceData},</if>
<if test="expertsInFlag != null">#{expertsInFlag},</if>
<if test="expertsName != null">#{expertsName},</if>
</trim>
</trim>
</insert>
<update id="updateSzEnforExamine" parameterType="SzEnforExamine">
@ -150,7 +219,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeCode != null">TYPE_CODE = #{typeCode},</if>
<if test="EVIDENCE != null">EVIDENCE = #{EVIDENCE},</if>
<if test="executorDept != null">EXECUTOR_DEPT = #{executorDept},</if>
<if test="executorDeptCode != null and executorDeptCode != ''">EXECUTOR_DEPT_CODE = #{executorDeptCode},</if>
<if test="executorDeptCode != null and executorDeptCode != ''">EXECUTOR_DEPT_CODE = #{executorDeptCode},
</if>
<if test="examineType != null">EXAMINE_TYPE = #{examineType},</if>
<if test="threeSpecialType != null">THREE_SPECIAL_TYPE = #{threeSpecialType},</if>
<if test="enterpriseUnitVersion != null">ENTERPRISE_UNIT_VERSION = #{enterpriseUnitVersion},</if>
@ -166,11 +236,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteSzEnforExamineByID" parameterType="String">
delete from sz_enfor_examine where ID = #{ID}
delete
from sz_enfor_examine
where ID = #{ID}
</delete>
<delete id="deleteSzEnforExamineByIDs" parameterType="String">
delete from sz_enfor_examine where ID in
delete from sz_enfor_examine where ID in
<foreach item="ID" collection="array" open="(" separator="," close=")">
#{ID}
</foreach>

@ -1,97 +1,162 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.programManagement.mapper.SzsEnterpriseInformationMapper">
<resultMap type="SzsEnterpriseInformation" id="SzsEnterpriseInformationResult">
<result property="jhptUpdateTime" column="jhpt_update_time" />
<result property="legalPersonCellphone" column="LEGAL_PERSON_CELLPHONE" />
<result property="indusTypeMiddle" column="INDUS_TYPE_MIDDLE" />
<result property="legalPersonType" column="LEGAL_PERSON_TYPE" />
<result property="indusTypeLagre" column="INDUS_TYPE_LAGRE" />
<result property="supervisionLarge" column="SUPERVISION_LARGE" />
<result property="CITY" column="CITY" />
<result property="businessAddress" column="BUSINESS_ADDRESS" />
<result property="COUNTY" column="COUNTY" />
<!-- <result property="REMARK" column="REMARK" />-->
<result property="reportHistoryId" column="REPORT_HISTORY_ID" />
<result property="registerTime" column="REGISTER_TIME" />
<result property="enterpriseAddress" column="ENTERPRISE_ADDRESS" />
<result property="createBy" column="CREATE_BY" />
<result property="updateTime" column="UPDATE_TIME" />
<result property="PROVINCE" column="PROVINCE" />
<result property="SQRLXFS" column="SQRLXFS" />
<result property="SQR" column="SQR" />
<result property="termEnd" column="TERM_END" />
<result property="ID" column="ID" />
<result property="VILLAGE" column="VILLAGE" />
<result property="updateBy" column="UPDATE_BY" />
<result property="legalPersonPost" column="LEGAL_PERSON_POST" />
<result property="legalPerson" column="LEGAL_PERSON" />
<result property="zjEconKind" column="ZJ_ECON_KIND" />
<result property="corpStatus" column="CORP_STATUS" />
<result property="createTime" column="CREATE_TIME" />
<result property="uuitNo" column="UUIT_NO" />
<result property="supervisionSmall" column="SUPERVISION_SMALL" />
<result property="rigisterAddress" column="RIGISTER_ADDRESS" />
<result property="riskReport" column="RISK_REPORT" />
<result property="indusTypeSmall" column="INDUS_TYPE_SMALL" />
<result property="isDelete" column="IS_DELETE" />
<result property="businessScope" column="BUSINESS_SCOPE" />
<result property="startTime" column="START_TIME" />
<result property="legalPersonTel" column="LEGAL_PERSON_TEL" />
<result property="indusTypeClass" column="INDUS_TYPE_CLASS" />
<result property="termStart" column="TERM_START" />
<result property="enterpristScale" column="ENTERPRIST_SCALE" />
<result property="registrationOrg" column="REGISTRATION_ORG" />
<result property="districtCode" column="DISTRICT_CODE" />
<result property="subdistrict" column="SUBDISTRICT" />
<result property="otherName" column="OTHER_NAME" />
<result property="rigisterFund" column="RIGISTER_FUND" />
<result property="enterpriseName" column="ENTERPRISE_NAME" />
<result property="orgCode" column="ORG_CODE" />
<result property="aboveDesignated" column="ABOVE_DESIGNATED" />
<result property="FRZJH" column="FRZJH" />
<result property="CREATER" column="CREATER" />
<result property="UPDATER" column="UPDATER" />
<!-- <result property="CREATETIME" column="CREATETIME" />-->
<!-- <result property="UPDATETIME" column="UPDATETIME" />-->
<result property="lastPageNumber" column="LAST_PAGE_NUMBER" />
<result property="floorSpace" column="FLOOR_SPACE" />
<result property="aboveDesignatedTwo" column="ABOVE_DESIGNATED_TWO" />
<result property="safetyProductionInvestment" column="SAFETY_PRODUCTION_INVESTMENT" />
<result property="lastYearOperatingIncome" column="LAST_YEAR_OPERATING_INCOME" />
<result property="lastYeatOnStream" column="LAST_YEAT_ON_STREAM" />
<result property="majorProduct" column="MAJOR_PRODUCT" />
<result property="htmlText" column="HTML_TEXT" />
<result property="fixedAssets" column="FIXED_ASSETS" />
<result property="jhptUpdateTime" column="jhpt_update_time"/>
<result property="legalPersonCellphone" column="LEGAL_PERSON_CELLPHONE"/>
<result property="indusTypeMiddle" column="INDUS_TYPE_MIDDLE"/>
<result property="legalPersonType" column="LEGAL_PERSON_TYPE"/>
<result property="indusTypeLagre" column="INDUS_TYPE_LAGRE"/>
<result property="supervisionLarge" column="SUPERVISION_LARGE"/>
<result property="CITY" column="CITY"/>
<result property="businessAddress" column="BUSINESS_ADDRESS"/>
<result property="COUNTY" column="COUNTY"/>
<!-- <result property="REMARK" column="REMARK" />-->
<result property="reportHistoryId" column="REPORT_HISTORY_ID"/>
<result property="registerTime" column="REGISTER_TIME"/>
<result property="enterpriseAddress" column="ENTERPRISE_ADDRESS"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="PROVINCE" column="PROVINCE"/>
<result property="SQRLXFS" column="SQRLXFS"/>
<result property="SQR" column="SQR"/>
<result property="termEnd" column="TERM_END"/>
<result property="ID" column="ID"/>
<result property="VILLAGE" column="VILLAGE"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="legalPersonPost" column="LEGAL_PERSON_POST"/>
<result property="legalPerson" column="LEGAL_PERSON"/>
<result property="zjEconKind" column="ZJ_ECON_KIND"/>
<result property="corpStatus" column="CORP_STATUS"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="uuitNo" column="UUIT_NO"/>
<result property="supervisionSmall" column="SUPERVISION_SMALL"/>
<result property="rigisterAddress" column="RIGISTER_ADDRESS"/>
<result property="riskReport" column="RISK_REPORT"/>
<result property="indusTypeSmall" column="INDUS_TYPE_SMALL"/>
<result property="isDelete" column="IS_DELETE"/>
<result property="businessScope" column="BUSINESS_SCOPE"/>
<result property="startTime" column="START_TIME"/>
<result property="legalPersonTel" column="LEGAL_PERSON_TEL"/>
<result property="indusTypeClass" column="INDUS_TYPE_CLASS"/>
<result property="termStart" column="TERM_START"/>
<result property="enterpristScale" column="ENTERPRIST_SCALE"/>
<result property="registrationOrg" column="REGISTRATION_ORG"/>
<result property="districtCode" column="DISTRICT_CODE"/>
<result property="subdistrict" column="SUBDISTRICT"/>
<result property="otherName" column="OTHER_NAME"/>
<result property="rigisterFund" column="RIGISTER_FUND"/>
<result property="enterpriseName" column="ENTERPRISE_NAME"/>
<result property="orgCode" column="ORG_CODE"/>
<result property="aboveDesignated" column="ABOVE_DESIGNATED"/>
<result property="FRZJH" column="FRZJH"/>
<result property="CREATER" column="CREATER"/>
<result property="UPDATER" column="UPDATER"/>
<!-- <result property="CREATETIME" column="CREATETIME" />-->
<!-- <result property="UPDATETIME" column="UPDATETIME" />-->
<result property="lastPageNumber" column="LAST_PAGE_NUMBER"/>
<result property="floorSpace" column="FLOOR_SPACE"/>
<result property="aboveDesignatedTwo" column="ABOVE_DESIGNATED_TWO"/>
<result property="safetyProductionInvestment" column="SAFETY_PRODUCTION_INVESTMENT"/>
<result property="lastYearOperatingIncome" column="LAST_YEAR_OPERATING_INCOME"/>
<result property="lastYeatOnStream" column="LAST_YEAT_ON_STREAM"/>
<result property="majorProduct" column="MAJOR_PRODUCT"/>
<result property="htmlText" column="HTML_TEXT"/>
<result property="fixedAssets" column="FIXED_ASSETS"/>
</resultMap>
<sql id="selectSzsEnterpriseInformationVo">
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
</sql>
<select id="selectSzsEnterpriseInformationList" parameterType="SzsEnterpriseInformation" resultMap="SzsEnterpriseInformationResult">
select s.* from(
<select id="selectSzsEnterpriseInformationList" parameterType="SzsEnterpriseInformation"
resultMap="SzsEnterpriseInformationResult">
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
<where>
<if test="supervisionLarge != null and supervisionLarge != ''"> and s.SUPERVISION_LARGE like concat('%',#{supervisionLarge}, '%')</if>
<if test="uuitNo != null and uuitNo != ''"> and s.UUIT_NO = #{uuitNo}</if>
<if test="subdistrict != null and subdistrict != ''"> and s.SUBDISTRICT like concat('%',#{subdistrict}, '%') </if>
<if test="aboveDesignatedTwo != null and aboveDesignatedTwo != ''"> and s.ABOVE_DESIGNATED_TWO = #{aboveDesignatedTwo}</if>
<if test="isPoint != null and isPoint != ''">and s.is_point=#{isPoint}</if>
<if test="enterpriseName != null and enterpriseName != ''">and s.enterprise_name like concat('%',#{enterpriseName}, '%')</if>
<if test="supervisionLarge != null and supervisionLarge != ''">and a.SUPERVISION_LARGE like
concat('%',#{supervisionLarge}, '%')
</if>
<if test="uuitNo != null and uuitNo != ''">and a.UUIT_NO = #{uuitNo}</if>
<if test="subdistrict != null and subdistrict != ''">and a.SUBDISTRICT like concat('%',#{subdistrict},
'%')
</if>
<if test="aboveDesignatedTwo != null and aboveDesignatedTwo != ''">and a.ABOVE_DESIGNATED_TWO =
#{aboveDesignatedTwo}
</if>
<if test="enterpriseName != null and enterpriseName != ''">and a.enterprise_name like
concat('%',#{enterpriseName}, '%')
</if>
</where>
</select>
<select id="selectSzsEnterpriseInformationByID" parameterType="String" resultMap="SzsEnterpriseInformationResult">
<include refid="selectSzsEnterpriseInformationVo"/>
where ID = #{ID}
@ -162,7 +227,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="majorProduct != null">MAJOR_PRODUCT,</if>
<if test="htmlText != null">HTML_TEXT,</if>
<if test="fixedAssets != null">FIXED_ASSETS,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jhptUpdateTime != null">#{jhptUpdateTime},</if>
<if test="legalPersonCellphone != null">#{legalPersonCellphone},</if>
@ -225,7 +290,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="majorProduct != null">#{majorProduct},</if>
<if test="htmlText != null">#{htmlText},</if>
<if test="fixedAssets != null">#{fixedAssets},</if>
</trim>
</trim>
</insert>
<update id="updateSzsEnterpriseInformation" parameterType="SzsEnterpriseInformation">
@ -287,7 +352,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="floorSpace != null">FLOOR_SPACE = #{floorSpace},</if>
<if test="aboveDesignatedTwo != null">ABOVE_DESIGNATED_TWO = #{aboveDesignatedTwo},</if>
<if test="safetyProductionInvestment != null">SAFETY_PRODUCTION_INVESTMENT = #{safetyProductionInvestment},</if>
<if test="safetyProductionInvestment != null">SAFETY_PRODUCTION_INVESTMENT =
#{safetyProductionInvestment},
</if>
<if test="lastYearOperatingIncome != null">LAST_YEAR_OPERATING_INCOME = #{lastYearOperatingIncome},</if>
<if test="lastYeatOnStream != null">LAST_YEAT_ON_STREAM = #{lastYeatOnStream},</if>
<if test="majorProduct != null">MAJOR_PRODUCT = #{majorProduct},</if>
@ -298,11 +365,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteSzsEnterpriseInformationByID" parameterType="String">
delete from szs_enterprise_information where ID = #{ID}
delete
from szs_enterprise_information
where ID = #{ID}
</delete>
<delete id="deleteSzsEnterpriseInformationByIDs" parameterType="String">
delete from szs_enterprise_information where ID in
delete from szs_enterprise_information where ID in
<foreach item="ID" collection="array" open="(" separator="," close=")">
#{ID}
</foreach>

Loading…
Cancel
Save