增加模板指标接口

wushunjie
杜函宇 9 months ago
parent d3c14bb713
commit 6821594506

@ -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));
// }
/**
* 线

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

@ -47,16 +47,19 @@ public interface IBmsDeclarationRecordsService extends IService<BmsDeclarationRe
public List<ApprovalDeclarationRecordsQueryVo> approvalList(ApprovalDeclarationRecordsQueryDto approvalDeclarationRecordsQueryDto);
/**
*
*/
public int updateApprovalInfo(BmsApprovalInfoUpdateDto bmsApprovalInfoUpdateDto);
/**
* 线
*
* @param bmsDeclarationRecordsAddDto 线
* @return
*/
public int insertBmsDeclarationRecords(BmsDeclarationRecordsAddDto bmsDeclarationRecordsAddDto);
// /**
// * 新增在线申报记录
// *
// * @param bmsDeclarationRecordsAddDto 在线申报记录
// * @return 结果
// */
// public int insertBmsDeclarationRecords(BmsDeclarationRecordsAddDto bmsDeclarationRecordsAddDto);
/**
* 线

@ -27,6 +27,6 @@ public interface ICommonService {
public void updateAuditRecord(Long declarationRecordId,Integer approvalType);
public int insertOpenInterfaceApplyAddDto(OpenInterfaceApplyAddDto openInterfaceApplyAddDto);
// public int insertOpenInterfaceApplyAddDto(OpenInterfaceApplyAddDto openInterfaceApplyAddDto);
}

@ -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<BmsDeclaration
@Autowired
private ICommonService iCommonService;
@Autowired
private IBmsFieldInfoService iBmsFieldInfoService;
@Resource
private IBmsTemplateRecordService iBmsTemplateRecordService;
@Autowired
private IBmsFileInfoService iBmsFileInfoService;
@Autowired
private IBmsApprovalInfoService iBmsApprovalInfoService;
@ -65,63 +59,7 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
@Autowired
private IBmsEnterpriseBasicInfoService iBmsEnterpriseBasicInfoService;
@Autowired
private IBmsOutQuitProductsService iBmsOutQuitProductsService;
/**
*
*/
@Resource
private IBmsProjectSettlementAwardService bmsProjectSettlementAwardService;
/**
*
*/
@Autowired
private IBmsBigStrongAwardService bmsBigStrongAwardService;
/**
*
*/
@Autowired
private IBmsCarrierConstructionAwardService bmsCarrierConstructionAwardService;
/**
*
*/
@Autowired
private IBmsPlatformConstructionAwardService bmsPlatformConstructionAwardService;
/**
*
*/
@Autowired
private IBmsBrandingAwardService bmsBrandingAwardService;
/**
*
*/
@Autowired
private IBmsSceneOpeningAwardService bmsSceneOpeningAwardService;
/**
*
*/
@Autowired
private IBmsCreditManagementService bmsCreditManagementService;
/**
* 5G+
*/
@Autowired
private IBmsIndustrialInternetAwardService bmsIndustrialInternetAwardService;
/**
*
*/
@Autowired
private IBmsManufacturingServicesAwardService bmsManufacturingServicesAwardService;
/**
*
*/
@Autowired
private IBmsLogisticsDevelopmentAwardService bmsLogisticsDevelopmentAwardService;
/**
*
*/
@Autowired
private IBmsIntegrationIndustriesService bmsIntegrationIndustriesService;
@Resource
private JProjectService jProjectService;
@ -196,7 +134,9 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
return baseMapper.approvalList(approvalDeclarationRecordsQueryDto);
}
/**
*
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int updateApprovalInfo(BmsApprovalInfoUpdateDto bmsApprovalInfoUpdateDto) {
@ -204,9 +144,9 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
List<BmsApprovalInfo> 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<BmsDeclaration
ba.setSort(list.size() + 1);
iBmsApprovalInfoService.save(ba);
}
int num = approval(bmsApprovalInfoUpdateDto, ba.getProcessId(),list.size() + 1);
int num = approval(bmsApprovalInfoUpdateDto, ba.getProcessId(), list.size() + 1);
return num;
}
public int approval(BmsApprovalInfoUpdateDto bmsApprovalInfoUpdateDto, Long id, Integer a) {
//获取审批之前的流程
BmsProcessInfo bmsProcessInfo = iBmsProcessInfoService.getById(id);
if(bmsApprovalInfoUpdateDto.getApprovalStatus()==1){
if (bmsApprovalInfoUpdateDto.getApprovalStatus() == 1) {
//根据审批之前的流程获取下一个流程id的详情数据
if(bmsProcessInfo.getNextProcessId()!=0){
if (bmsProcessInfo.getNextProcessId() != 0) {
BmsProcessInfo newBmsProcessInfo = iBmsProcessInfoService.getById(bmsProcessInfo.getNextProcessId());
BmsApprovalInfo ar = new BmsApprovalInfo();
ar.setProcessId(bmsProcessInfo.getNextProcessId());
@ -280,46 +220,46 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
}
/**
* 线
*
* @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<BmsFieldInfoAddDto> fieldList = bmsDeclarationRecordsAddDto.getFieldList();
List<BmsFieldInfo> 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<BmsFileInfoAddDto> fileList = bmsDeclarationRecordsAddDto.getFileList();
List<BmsFileInfo> 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<BmsFieldInfoAddDto> fieldList = bmsDeclarationRecordsAddDto.getFieldList();
// List<BmsFieldInfo> 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<BmsFileInfoAddDto> fileList = bmsDeclarationRecordsAddDto.getFileList();
// List<BmsFileInfo> 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;
// }
/**
* 线
@ -366,10 +306,12 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
for (Object o : js1) {
JSONObject parse = JSONObject.parse(o.toString());
if ("el-upload".equals(parse.get("tag"))) {
if (parse.get("defaultValue") != null) {
String[] split = parse.get("defaultValue").toString().split(",");
strList.addAll(Arrays.asList(split));
}
}
}
return strList;
}

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

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

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

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

@ -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<JDevelopmentReport> {
/**
*
*/
List<JTemplateMetricsResponse> getTemplateMetrics(String year);
}

@ -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<JDevelopmentReport> {
/**
*
*/
List<JTemplateMetricsResponse> getTemplateMetrics(String year);
}

@ -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<JDevelopmentReportMapper, JDevelopmentReport> implements JDevelopmentReportService {
/**
*
*/
@Override
public List<JTemplateMetricsResponse> getTemplateMetrics(String year) {
return baseMapper.getTemplateMetrics(year);
}
}

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

@ -34,7 +34,7 @@ spring:
# 国际化资源文件路径
basename: i18n/messages
profiles:
active: internet
active: druid
# 文件上传
servlet:
multipart:

@ -96,25 +96,7 @@
<select id="selectDeclarationRecordsToIdList"
resultType="com.ruoyi.jjh.declaration.entity.vo.BmsDeclarationRecordsQueryVo">
SELECT
a.id,
a.project_id,
a.enterprise_id,
c.LEVEL,
a.YEAR,
c.type,
a.template_record_id,
a.template_id,
c.responsibility_unit,
a.detail_id,
a.STATUS,
a.is_deleted,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.remark,
b.qymc as enterprise_name,
f.road
a.*
FROM
bms_declaration_records AS a
inner join bms_template_record f on a.template_record_id = f.id

@ -0,0 +1,78 @@
<?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.jjh.ent.mapper.JDevelopmentReportMapper">
<select id="getTemplateMetrics" resultType="com.ruoyi.jjh.ent.entity.response.JTemplateMetricsResponse">
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
<where>
<if test="years!= null and years != '' ">
project_year = #{year}
</if>
</where>
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
<where>
<if test="years!= null and years != '' ">
years = #{year}
</if>
</where>
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
<where>
<if test="years!= null and years != '' ">
project_year = #{year}
</if>
</where>
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
</select>
</mapper>

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

Loading…
Cancel
Save