From 682159450690afeb406b450ae6f814e23015c217 Mon Sep 17 00:00:00 2001 From: du <1725534722@qq.com> Date: Wed, 31 Jul 2024 17:49:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A8=A1=E6=9D=BF=E6=8C=87?= =?UTF-8?q?=E6=A0=87=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BmsDeclarationRecordsController.java | 18 +- .../BmsEnterpriseFillController.java | 7 +- .../IBmsDeclarationRecordsService.java | 17 +- .../declaration/service/ICommonService.java | 2 +- .../BmsDeclarationRecordsServiceImpl.java | 184 ++++++------------ .../service/impl/CommonServiceImpl.java | 119 ++++------- .../JDevelopmentReportController.java | 49 +++++ .../jjh/ent/entity/JDevelopmentReport.java | 45 +++++ .../response/JTemplateMetricsResponse.java | 33 ++++ .../ent/mapper/JDevelopmentReportMapper.java | 22 +++ .../service/JDevelopmentReportService.java | 20 ++ .../impl/JDevelopmentReportServiceImpl.java | 27 +++ .../src/main/resources/application-druid.yml | 2 +- .../main/resources/application-internet.yml | 4 +- .../src/main/resources/application.yml | 2 +- .../BmsDeclarationRecordsMapper.xml | 20 +- .../jjh/ent/JDevelopmentReportMapper.xml | 78 ++++++++ .../framework/config/SecurityConfig.java | 2 +- 18 files changed, 408 insertions(+), 243 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/controller/JDevelopmentReportController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/JDevelopmentReport.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/response/JTemplateMetricsResponse.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/mapper/JDevelopmentReportMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/JDevelopmentReportService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/impl/JDevelopmentReportServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/jjh/ent/JDevelopmentReportMapper.xml diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsDeclarationRecordsController.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsDeclarationRecordsController.java index 5ff344d..af2dbb4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsDeclarationRecordsController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsDeclarationRecordsController.java @@ -186,15 +186,15 @@ public class BmsDeclarationRecordsController extends BaseController { return success(bmsDeclarationRecordsService.selectBmsDeclarationRecordsById(id)); } - /** - * 新增在线申报记录 - */ -// @RequiresPermissions("system:declarationRecords:add") - @Log(title = "在线申报记录", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody BmsDeclarationRecordsAddDto bmsDeclarationRecordsAddDto) { - return toAjax(bmsDeclarationRecordsService.insertBmsDeclarationRecords(bmsDeclarationRecordsAddDto)); - } +// /** +// * 新增在线申报记录 +// */ +//// @RequiresPermissions("system:declarationRecords:add") +// @Log(title = "在线申报记录", businessType = BusinessType.INSERT) +// @PostMapping +// public AjaxResult add(@RequestBody BmsDeclarationRecordsAddDto bmsDeclarationRecordsAddDto) { +// return toAjax(bmsDeclarationRecordsService.insertBmsDeclarationRecords(bmsDeclarationRecordsAddDto)); +// } /** * 修改在线申报记录 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsEnterpriseFillController.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsEnterpriseFillController.java index 099bd28..30ceba1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsEnterpriseFillController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsEnterpriseFillController.java @@ -5,13 +5,14 @@ import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.jjh.declaration.entity.request.EnterpriseFileResquest; import com.ruoyi.jjh.declaration.entity.request.EnterpriseFillResquest; import com.ruoyi.jjh.declaration.service.IBmsEnterpriseFillService; -import com.ruoyi.jjh.declaration.service.IBmsFieldInfoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/IBmsDeclarationRecordsService.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/IBmsDeclarationRecordsService.java index c56ed24..b74d7a9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/IBmsDeclarationRecordsService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/IBmsDeclarationRecordsService.java @@ -47,16 +47,19 @@ public interface IBmsDeclarationRecordsService extends IService approvalList(ApprovalDeclarationRecordsQueryDto approvalDeclarationRecordsQueryDto); + /** + * 审批 + */ public int updateApprovalInfo(BmsApprovalInfoUpdateDto bmsApprovalInfoUpdateDto); - /** - * 新增在线申报记录 - * - * @param bmsDeclarationRecordsAddDto 在线申报记录 - * @return 结果 - */ - public int insertBmsDeclarationRecords(BmsDeclarationRecordsAddDto bmsDeclarationRecordsAddDto); +// /** +// * 新增在线申报记录 +// * +// * @param bmsDeclarationRecordsAddDto 在线申报记录 +// * @return 结果 +// */ +// public int insertBmsDeclarationRecords(BmsDeclarationRecordsAddDto bmsDeclarationRecordsAddDto); /** * 修改在线申报记录 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/ICommonService.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/ICommonService.java index ad7e081..8b56f99 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/ICommonService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/ICommonService.java @@ -27,6 +27,6 @@ public interface ICommonService { public void updateAuditRecord(Long declarationRecordId,Integer approvalType); - public int insertOpenInterfaceApplyAddDto(OpenInterfaceApplyAddDto openInterfaceApplyAddDto); +// public int insertOpenInterfaceApplyAddDto(OpenInterfaceApplyAddDto openInterfaceApplyAddDto); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsDeclarationRecordsServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsDeclarationRecordsServiceImpl.java index 14a4881..e490691 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsDeclarationRecordsServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsDeclarationRecordsServiceImpl.java @@ -1,39 +1,35 @@ package com.ruoyi.jjh.declaration.service.impl; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollectionUtil; import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.common.context.SecurityContextHolder; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.jjh.declaration.component.TimingRemindService; import com.ruoyi.jjh.declaration.entity.*; -import com.ruoyi.jjh.declaration.entity.dto.*; +import com.ruoyi.jjh.declaration.entity.dto.ApprovalDeclarationRecordsQueryDto; +import com.ruoyi.jjh.declaration.entity.dto.BmsApprovalInfoUpdateDto; +import com.ruoyi.jjh.declaration.entity.dto.BmsDeclarationRecordsDto; import com.ruoyi.jjh.declaration.entity.vo.ApprovalDeclarationRecordsQueryVo; import com.ruoyi.jjh.declaration.entity.vo.BmsDeclarationRecordsQueryVo; -import com.ruoyi.jjh.declaration.entity.vo.BmsMunicipalBureauReviewQueryVo; import com.ruoyi.jjh.declaration.entity.vo.DeclarationRecordsVo; import com.ruoyi.jjh.declaration.mapper.BmsDeclarationRecordsMapper; import com.ruoyi.jjh.declaration.service.*; import com.ruoyi.jjh.ent.entity.JProject; import com.ruoyi.jjh.ent.entity.JSmartDeclaration; import com.ruoyi.jjh.ent.service.JProjectService; -import io.swagger.models.auth.In; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; -import java.util.*; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Function; -import java.util.stream.Collectors; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; /** * 在线申报记录Service业务层处理 @@ -47,14 +43,12 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl list = iBmsApprovalInfoService.lambdaQuery().eq(BmsApprovalInfo::getDeclarationRecordsId, bmsApprovalInfoUpdateDto.getDeclarationRecordsId()).orderByDesc(BmsApprovalInfo::getSort).list(); BmsApprovalInfo ba = list.get(0); // 如果当前的deptId和最新一条的审批记录一样的话 - if(ba.getApprovalStatus()!=0 || !Objects.equals(ba.getApprovalDept(), SecurityUtils.getDeptId())){ + if (ba.getApprovalStatus() != 0 || !Objects.equals(ba.getApprovalDept(), SecurityUtils.getDeptId())) { throw new ServiceException("无法审批!"); - }else { + } else { ba.setId(null); ba.setApprovalById(SecurityUtils.getUserId()); ba.setApprovalStatus(bmsApprovalInfoUpdateDto.getApprovalStatus()); @@ -215,16 +155,16 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl fieldList = bmsDeclarationRecordsAddDto.getFieldList(); - List fieldInfoList = new ArrayList<>(); - if (null != fieldList && fieldList.size() > 0) { - fieldList.forEach(x -> { - BmsFieldInfo bmsFieldInfo = new BmsFieldInfo(); - BeanUtil.copyProperties(x, bmsFieldInfo); - bmsFieldInfo.setDetailId(bmsDeclarationRecords.getId()); - fieldInfoList.add(bmsFieldInfo); - }); - iBmsFieldInfoService.saveOrUpdateBatch(fieldInfoList); - } - // 批量保存文件信息 - List fileList = bmsDeclarationRecordsAddDto.getFileList(); - List fileInfoList = new ArrayList<>(); - if (null != fileList && fileList.size() > 0) { - fileList.forEach(x -> { - BmsFileInfo bmsFileInfo = new BmsFileInfo(); - BeanUtil.copyProperties(x, bmsFileInfo); - bmsFileInfo.setDetailId(bmsDeclarationRecords.getId()); - fileInfoList.add(bmsFileInfo); - }); - iBmsFileInfoService.saveOrUpdateBatch(fileInfoList); - } - return num; - } +// /** +// * 新增在线申报记录 +// * +// * @param bmsDeclarationRecordsAddDto 在线申报记录 +// * @return 结果 +// */ +// @Override +// public int insertBmsDeclarationRecords(BmsDeclarationRecordsAddDto bmsDeclarationRecordsAddDto) { +// iCommonService.checkEnterprise(bmsDeclarationRecordsAddDto.getEnterpriseId(), bmsDeclarationRecordsAddDto.getTemplateId()); +// BmsDeclarationRecords bmsDeclarationRecords = new BmsDeclarationRecords(); +// BeanUtil.copyProperties(bmsDeclarationRecordsAddDto, bmsDeclarationRecords); +// bmsDeclarationRecords.setMatter(""); +// // 新增在线申请记录 +// int num = baseMapper.insert(bmsDeclarationRecords); +// // 批量保存字段信息 +// List fieldList = bmsDeclarationRecordsAddDto.getFieldList(); +// List fieldInfoList = new ArrayList<>(); +// if (null != fieldList && fieldList.size() > 0) { +// fieldList.forEach(x -> { +// BmsFieldInfo bmsFieldInfo = new BmsFieldInfo(); +// BeanUtil.copyProperties(x, bmsFieldInfo); +// bmsFieldInfo.setDetailId(bmsDeclarationRecords.getId()); +// fieldInfoList.add(bmsFieldInfo); +// }); +// iBmsFieldInfoService.saveOrUpdateBatch(fieldInfoList); +// } +// // 批量保存文件信息 +// List fileList = bmsDeclarationRecordsAddDto.getFileList(); +// List fileInfoList = new ArrayList<>(); +// if (null != fileList && fileList.size() > 0) { +// fileList.forEach(x -> { +// BmsFileInfo bmsFileInfo = new BmsFileInfo(); +// BeanUtil.copyProperties(x, bmsFileInfo); +// bmsFileInfo.setDetailId(bmsDeclarationRecords.getId()); +// fileInfoList.add(bmsFileInfo); +// }); +// iBmsFileInfoService.saveOrUpdateBatch(fileInfoList); +// } +// return num; +// } /** * 修改在线申报记录 @@ -360,14 +300,16 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl getAllFile(String a) { + public List getAllFile(String a) { JSONArray js1 = JSONObject.parse(a).getJSONArray("fields"); List strList = new ArrayList<>(); for (Object o : js1) { JSONObject parse = JSONObject.parse(o.toString()); if ("el-upload".equals(parse.get("tag"))) { - String[] split = parse.get("defaultValue").toString().split(","); - strList.addAll(Arrays.asList(split)); + if (parse.get("defaultValue") != null) { + String[] split = parse.get("defaultValue").toString().split(","); + strList.addAll(Arrays.asList(split)); + } } } return strList; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/CommonServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/CommonServiceImpl.java index c7e45e2..e32d0b6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/CommonServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/CommonServiceImpl.java @@ -54,49 +54,12 @@ public class CommonServiceImpl implements ICommonService { @Autowired private IBmsEnterpriseDirectoryService bmsEnterpriseDirectoryService; - @Autowired - private IBmsProjectSettlementAwardService iBmsProjectSettlementAwardService; - - @Autowired - private IBmsBigStrongAwardService iBmsBigStrongAwardService; - - @Autowired - private IBmsCarrierConstructionAwardService iBmsCarrierConstructionAwardService; - - @Autowired - private IBmsPlatformConstructionAwardService iBmsPlatformConstructionAwardService; - - @Autowired - private IBmsBrandingAwardService iBmsBrandingAwardService; - - @Autowired - private IBmsSceneOpeningAwardService iBmsSceneOpeningAwardService; - - @Autowired - private IBmsCreditManagementService iBmsCreditManagementService; - - @Autowired - private IBmsIndustrialInternetAwardService iBmsIndustrialInternetAwardService; - - @Autowired - private IBmsManufacturingServicesAwardService iBmsManufacturingServicesAwardService; - - @Autowired - private IBmsLogisticsDevelopmentAwardService iBmsLogisticsDevelopmentAwardService; - - @Autowired - private IBmsIntegrationIndustriesService iBmsIntegrationIndustriesService; - - @Autowired - private IBmsFundingDetailService iBmsFundingDetailService; - @Autowired private IBmsTemplateRecordService iBmsTemplateRecordService; @Autowired private IBmsDeclarationRecordsService iBmsDeclarationRecordsService; - @Autowired - private IBmsOutQuitProductsService iBmsOutQuitProductsService; + /** * 检测企业信息 @@ -197,46 +160,46 @@ public class CommonServiceImpl implements ICommonService { - @Override - public int insertOpenInterfaceApplyAddDto(OpenInterfaceApplyAddDto openInterfaceApplyAddDto) { - int num = 0; - // 根据模板id查询对应数据 - if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 1) { - // 项目落户奖补 - num = iBmsProjectSettlementAwardService.insertBmsProjectSettlementAward(openInterfaceApplyAddDto.getBmsProjectSettlementAwardAddDto()); - } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 2) { - // 做大做强奖补 - num = iBmsBigStrongAwardService.insertBmsBigStrongAward(openInterfaceApplyAddDto.getBmsBigStrongAwardAddDto()); - } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 3) { - // 载体建设奖补 - num = iBmsCarrierConstructionAwardService.insertBmsCarrierConstructionAward(openInterfaceApplyAddDto.getBmsCarrierConstructionAwardAddDto()); - } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 4) { - // 平台建设奖补 - num = iBmsPlatformConstructionAwardService.insertBmsPlatformConstructionAward(openInterfaceApplyAddDto.getBmsPlatformConstructionAwardAddDto()); - } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 5) { - // 品牌打造奖补 - num = iBmsBrandingAwardService.insertBmsBrandingAward(openInterfaceApplyAddDto.getBmsBrandingAwardAddDto()); - } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 6) { - // 场景开放奖补 - num = iBmsSceneOpeningAwardService.insertBmsSceneOpeningAward(openInterfaceApplyAddDto.getBmsSceneOpeningAwardAddDto()); - } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 7) { - // 信用管理奖补 - num = iBmsCreditManagementService.insertBmsCreditManagement(openInterfaceApplyAddDto.getBmsCreditManagementAddDto()); - } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 8) { - // 5G+工业互联网奖补 - num = iBmsIndustrialInternetAwardService.insertBmsIndustrialInternetAward(openInterfaceApplyAddDto.getBmsIndustrialInternetAwardAddDto()); - } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 9) { - // 制造服务业有效投入奖补 - num = iBmsManufacturingServicesAwardService.insertBmsManufacturingServicesAward(openInterfaceApplyAddDto.getBmsManufacturingServicesAwardAddDto()); - } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 10) { - // 物流发展奖补 - num = iBmsLogisticsDevelopmentAwardService.insertBmsLogisticsDevelopmentAward(openInterfaceApplyAddDto.getBmsLogisticsDevelopmentAwardAddDto()); - } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 11) { - // 两业融合奖补 - num = iBmsIntegrationIndustriesService.insertBmsIntegrationIndustries(openInterfaceApplyAddDto.getBmsIntegrationIndustriesAddDto()); - } - return num; - } +// @Override +// public int insertOpenInterfaceApplyAddDto(OpenInterfaceApplyAddDto openInterfaceApplyAddDto) { +// int num = 0; +// // 根据模板id查询对应数据 +// if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 1) { +// // 项目落户奖补 +// num = iBmsProjectSettlementAwardService.insertBmsProjectSettlementAward(openInterfaceApplyAddDto.getBmsProjectSettlementAwardAddDto()); +// } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 2) { +// // 做大做强奖补 +// num = iBmsBigStrongAwardService.insertBmsBigStrongAward(openInterfaceApplyAddDto.getBmsBigStrongAwardAddDto()); +// } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 3) { +// // 载体建设奖补 +// num = iBmsCarrierConstructionAwardService.insertBmsCarrierConstructionAward(openInterfaceApplyAddDto.getBmsCarrierConstructionAwardAddDto()); +// } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 4) { +// // 平台建设奖补 +// num = iBmsPlatformConstructionAwardService.insertBmsPlatformConstructionAward(openInterfaceApplyAddDto.getBmsPlatformConstructionAwardAddDto()); +// } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 5) { +// // 品牌打造奖补 +// num = iBmsBrandingAwardService.insertBmsBrandingAward(openInterfaceApplyAddDto.getBmsBrandingAwardAddDto()); +// } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 6) { +// // 场景开放奖补 +// num = iBmsSceneOpeningAwardService.insertBmsSceneOpeningAward(openInterfaceApplyAddDto.getBmsSceneOpeningAwardAddDto()); +// } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 7) { +// // 信用管理奖补 +// num = iBmsCreditManagementService.insertBmsCreditManagement(openInterfaceApplyAddDto.getBmsCreditManagementAddDto()); +// } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 8) { +// // 5G+工业互联网奖补 +// num = iBmsIndustrialInternetAwardService.insertBmsIndustrialInternetAward(openInterfaceApplyAddDto.getBmsIndustrialInternetAwardAddDto()); +// } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 9) { +// // 制造服务业有效投入奖补 +// num = iBmsManufacturingServicesAwardService.insertBmsManufacturingServicesAward(openInterfaceApplyAddDto.getBmsManufacturingServicesAwardAddDto()); +// } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 10) { +// // 物流发展奖补 +// num = iBmsLogisticsDevelopmentAwardService.insertBmsLogisticsDevelopmentAward(openInterfaceApplyAddDto.getBmsLogisticsDevelopmentAwardAddDto()); +// } else if (openInterfaceApplyAddDto.getDeclarationTemplateType() == 11) { +// // 两业融合奖补 +// num = iBmsIntegrationIndustriesService.insertBmsIntegrationIndustries(openInterfaceApplyAddDto.getBmsIntegrationIndustriesAddDto()); +// } +// return num; +// } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/controller/JDevelopmentReportController.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/controller/JDevelopmentReportController.java new file mode 100644 index 0000000..f3d180f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/controller/JDevelopmentReportController.java @@ -0,0 +1,49 @@ +package com.ruoyi.jjh.ent.controller; + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.jjh.ent.entity.JDevelopmentReport; +import com.ruoyi.jjh.ent.entity.response.JTemplateMetricsResponse; +import com.ruoyi.jjh.ent.service.JDevelopmentReportService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +/** + * 服务业发展报告(j_template_metrics)表控制层 + * @author du + * @since 2024/7/31 15:09 + */ +@RestController +@RequestMapping("/jjh/templateMetrics") +@Api(tags = "服务业发展报告") +public class JDevelopmentReportController extends BaseController { + + + @Resource + private JDevelopmentReportService jDevelopmentReportService; + + + /** + * 新增服务业发展报告 + */ + @PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')") + @ApiOperation(value = "新增服务业发展报告", response = JDevelopmentReport.class) + @PostMapping + public AjaxResult add(@RequestBody JDevelopmentReport jDevelopmentReport) { + return toAjax(jDevelopmentReportService.save(jDevelopmentReport)); + } + + /** + * 模板指标自定义选择 + */ + @PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')") + @ApiOperation(value = "模板指标自定义选择", response = JTemplateMetricsResponse.class) + @GetMapping("/templateMetrics") + public AjaxResult getTemplateMetrics(String year) { + return success(jDevelopmentReportService.getTemplateMetrics(year)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/JDevelopmentReport.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/JDevelopmentReport.java new file mode 100644 index 0000000..60dda27 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/JDevelopmentReport.java @@ -0,0 +1,45 @@ +package com.ruoyi.jjh.ent.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.ruoyi.jjh.common.entity.BaseInfoEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 服务业发展报告(j_template_metrics)表实体类 + * @author du + * @since 2024/7/31 15:13 + */ +@Data +@ApiModel("服务业发展报告") +@TableName(value = "j_template_metrics") +public class JDevelopmentReport extends BaseInfoEntity { + + /** + * Id + */ + @TableId(value = "id", type = IdType.AUTO) + @ApiModelProperty("Id") + private Long id; + + /** + * 标题 + */ + @ApiModelProperty("标题") + private String title; + + /** + * 副标题 + */ + @ApiModelProperty("副标题") + private String subheading; + + /** + * 内容 + */ + @ApiModelProperty("内容") + private String content; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/response/JTemplateMetricsResponse.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/response/JTemplateMetricsResponse.java new file mode 100644 index 0000000..237757c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/response/JTemplateMetricsResponse.java @@ -0,0 +1,33 @@ +package com.ruoyi.jjh.ent.entity.response; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 模板指标自定义选择返回体 + * @author du + * @since 2024/7/31 15:28 + */ +@Data +@ApiModel("模板指标自定义选择返回体") +public class JTemplateMetricsResponse { + + /** + * 数据项 + */ + @ApiModelProperty("数据项") + private String dataName; + + /** + * 年份 + */ + @ApiModelProperty("年份") + private String years; + + /** + * 数值 + */ + @ApiModelProperty("数值") + private Integer count; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/mapper/JDevelopmentReportMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/mapper/JDevelopmentReportMapper.java new file mode 100644 index 0000000..ab54fb5 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/mapper/JDevelopmentReportMapper.java @@ -0,0 +1,22 @@ +package com.ruoyi.jjh.ent.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.jjh.ent.entity.JDevelopmentReport; +import com.ruoyi.jjh.ent.entity.response.JTemplateMetricsResponse; + +import java.util.List; + +/** + * 服务业发展报告(j_template_metrics)表数据库访问层 + * @author du + * @since 2024/7/26 15:36 + */ + +public interface JDevelopmentReportMapper extends BaseMapper { + + + /** + * 模板指标自定义选择 + */ + List getTemplateMetrics(String year); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/JDevelopmentReportService.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/JDevelopmentReportService.java new file mode 100644 index 0000000..cdab6bb --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/JDevelopmentReportService.java @@ -0,0 +1,20 @@ +package com.ruoyi.jjh.ent.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.jjh.ent.entity.JDevelopmentReport; +import com.ruoyi.jjh.ent.entity.response.JTemplateMetricsResponse; + +import java.util.List; + +/** + * 服务业发展报告(j_template_metrics)表业务层 + * @author du + * @since 2024/7/31 15:16 + */ +public interface JDevelopmentReportService extends IService { + + /** + * 模板指标自定义选择 + */ + List getTemplateMetrics(String year); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/impl/JDevelopmentReportServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/impl/JDevelopmentReportServiceImpl.java new file mode 100644 index 0000000..ac2a2f7 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/impl/JDevelopmentReportServiceImpl.java @@ -0,0 +1,27 @@ +package com.ruoyi.jjh.ent.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.jjh.ent.entity.JDevelopmentReport; +import com.ruoyi.jjh.ent.entity.response.JTemplateMetricsResponse; +import com.ruoyi.jjh.ent.mapper.JDevelopmentReportMapper; +import com.ruoyi.jjh.ent.service.JDevelopmentReportService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 服务业发展报告(j_template_metrics)表业务实现层 + * @author du + * @since 2024/7/31 15:19 + */ +@Service +public class JDevelopmentReportServiceImpl extends ServiceImpl implements JDevelopmentReportService { + + /** + * 模板指标自定义选择 + */ + @Override + public List getTemplateMetrics(String year) { + return baseMapper.getTemplateMetrics(year); + } +} diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 3c7226d..fb346b7 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -63,7 +63,7 @@ spring: multi-statement-allow: true #自己客户端地址 #returnUrl: http://39.101.188.84:9999/demo/JinJiHu -returnUrl: http://192.168.0.115:80 +returnUrl: http://192.168.0.111:80 #定时任务更新企业信息和联系人的开启 isTiming: false diff --git a/ruoyi-admin/src/main/resources/application-internet.yml b/ruoyi-admin/src/main/resources/application-internet.yml index 6b15118..0df3f81 100644 --- a/ruoyi-admin/src/main/resources/application-internet.yml +++ b/ruoyi-admin/src/main/resources/application-internet.yml @@ -110,8 +110,8 @@ spring: # #连接池最大阻塞等待时间(使用负值表示没有限制) max-wait: -1ms knife4j: - #true会关闭文档 - production: false + #true会关闭文档 + production: false #自己客户端地址 returnUrl: https://idp.sipac.gov.cn/bms #定时任务更新企业信息和联系人的开启 diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index c5f74bc..88d67e1 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -34,7 +34,7 @@ spring: # 国际化资源文件路径 basename: i18n/messages profiles: - active: internet + active: druid # 文件上传 servlet: multipart: diff --git a/ruoyi-admin/src/main/resources/mapper/jjh/declaration/BmsDeclarationRecordsMapper.xml b/ruoyi-admin/src/main/resources/mapper/jjh/declaration/BmsDeclarationRecordsMapper.xml index 83c85da..fa7047e 100644 --- a/ruoyi-admin/src/main/resources/mapper/jjh/declaration/BmsDeclarationRecordsMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/jjh/declaration/BmsDeclarationRecordsMapper.xml @@ -96,25 +96,7 @@ + SELECT + '服务业企业总数' as dataName, + null as years, + count(*) as count + from bms_enterprise_basic_info + UNION + SELECT + '规上企业总数' as dataName, + null as years, + sum(type = 1) as count + from bms_enterprise_basic_info + UNION + SELECT + '荣誉总数' as dataName, + project_year as years, + count(*) as count + from j_project + + + project_year = #{year} + + + UNION + SELECT + CASE services_type + WHEN '1' THEN '生产性服务业企业数' + WHEN '2' THEN '生活性服务业企业数' + WHEN '3' THEN '新兴服务业企业数' + ELSE '限上批零住餐企业数' + END as dataName, + years as years, + count(*) as count + from j_services_list + + + years = #{year} + + + GROUP BY + services_type + UNION + SELECT + a.dict_label AS dataName, + IF(#{year} is null,null,rs.project_year) AS years, + IFNULL( rs.count, 0 ) AS count + FROM + sys_dict_data a + LEFT JOIN ( + SELECT + project_big_type, + IF + ( + project_big_type = 1 + OR project_big_type = 9, + COUNT( DISTINCT credit_code ), + COUNT(*)) AS count, + project_year + FROM + j_project + + + project_year = #{year} + + + GROUP BY + project_big_type + ) AS rs ON a.dict_value = rs.project_big_type + WHERE + a.dict_type = 'project_categories' + AND a.dict_value != 11 + + diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index 9ac8d6e..b78c5d9 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -118,7 +118,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter // .antMatchers("/common/**").permitAll() .antMatchers("/system/chief").permitAll() .antMatchers("/system/singlelogin/**").permitAll() - .antMatchers("/jjh/**").permitAll() +// .antMatchers("/jjh/**").permitAll()