From 5e91e0f25ab5d3321ca692cd7761d371c1e89de4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E5=AE=9D=E9=BE=99?= Date: Fri, 3 Jul 2026 18:47:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../constant/enums/ModelTemplateTypeEnum.java | 2 + ...ndMonitorMajorIndustryTrendController.java | 104 +++++++ .../ModelDemandMonitorMajorIndustryTrend.java | 48 +++ ...odelDemandMonitorMajorIndustryTrendVo.java | 29 ++ ...DemandMonitorMajorIndustryTrendMapper.java | 64 ++++ ...emandMonitorMajorIndustryTrendService.java | 84 ++++++ .../service/impl/ModelCommonServiceImpl.java | 7 + ...DemandMonitorIndustryTrendServiceImpl.java | 10 +- ...dMonitorMajorIndustryTrendServiceImpl.java | 274 ++++++++++++++++++ ...lDemandMonitorMajorIndustryTrendMapper.xml | 78 +++++ ...态监测系统-劳动力需求重点产业需求趋势分析.xlsx | Bin 0 -> 10412 bytes sql/datadashboard/table.sql | 34 ++- 12 files changed, 731 insertions(+), 3 deletions(-) create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/controller/ModelDemandMonitorMajorIndustryTrendController.java create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/ModelDemandMonitorMajorIndustryTrend.java create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/ModelDemandMonitorMajorIndustryTrendVo.java create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ModelDemandMonitorMajorIndustryTrendMapper.java create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/ModelDemandMonitorMajorIndustryTrendService.java create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ModelDemandMonitorMajorIndustryTrendServiceImpl.java create mode 100644 ruoyi-bussiness/src/main/resources/mapper/ModelDemandMonitorMajorIndustryTrendMapper.xml create mode 100644 ruoyi-bussiness/src/main/resources/template/劳动力动态监测系统-劳动力需求重点产业需求趋势分析.xlsx diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/constant/enums/ModelTemplateTypeEnum.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/constant/enums/ModelTemplateTypeEnum.java index 778ba02..a3bc796 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/constant/enums/ModelTemplateTypeEnum.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/constant/enums/ModelTemplateTypeEnum.java @@ -36,6 +36,8 @@ public enum ModelTemplateTypeEnum { MODEL_DEMAND_MONITOR_INDUSTRY_INCREASE("劳动力动态监测系统-劳动力需求产业增加值"), MODEL_DEMAND_MONITOR_INDUSTRY_TREND("劳动力动态监测系统-劳动力需求分行业需求趋势分析"), + + MODEL_DEMAND_MONITOR_MAJOR_INDUSTRY_TREND("劳动力动态监测系统-劳动力需求重点产业需求趋势分析"), ; private final String desc; } diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/controller/ModelDemandMonitorMajorIndustryTrendController.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/controller/ModelDemandMonitorMajorIndustryTrendController.java new file mode 100644 index 0000000..a65abeb --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/controller/ModelDemandMonitorMajorIndustryTrendController.java @@ -0,0 +1,104 @@ +package com.ruoyi.cms.controller; + +import com.ruoyi.cms.domain.ModelDemandMonitorMajorIndustryTrend; +import com.ruoyi.cms.domain.vo.ModelDemandMonitorMajorIndustryTrendVo; +import com.ruoyi.cms.service.ModelDemandMonitorMajorIndustryTrendService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.Valid; + +/** + * 劳动力需求重点产业需求趋势分析 + * + * @author 马宝龙 + * @date 2026/7/3 + */ +@RestController +@RequestMapping("/model/demandMonitorMajorIndustryTrend") +@RequiredArgsConstructor +public class ModelDemandMonitorMajorIndustryTrendController extends BaseController { + + private final ModelDemandMonitorMajorIndustryTrendService modelDemandMonitorMajorIndustryTrendService; + + /** + * 创建 + * + * @param modelDemandMonitorMajorIndustryTrend 劳动力需求重点产业需求趋势分析 + * @return 创建结果 + */ + @PostMapping("/create") + public AjaxResult create(@Valid @RequestBody ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend) { + modelDemandMonitorMajorIndustryTrendService.create(modelDemandMonitorMajorIndustryTrend); + return AjaxResult.success(); + } + + /** + * 更新 + * + * @param modelDemandMonitorMajorIndustryTrend 劳动力需求重点产业需求趋势分析 + * @return 更新结果 + */ + @PutMapping("/update") + public AjaxResult update(@Valid @RequestBody ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend) { + modelDemandMonitorMajorIndustryTrendService.update(modelDemandMonitorMajorIndustryTrend); + return AjaxResult.success(); + } + + /** + * 删除 + * + * @param id ID + * @return 删除结果 + */ + @DeleteMapping("/delete") + public AjaxResult delete(@RequestParam Long id) { + modelDemandMonitorMajorIndustryTrendService.delete(id); + return AjaxResult.success(); + } + + /** + * 清空 + * + * @return 清空结果 + */ + @DeleteMapping("/clear") + public AjaxResult clear() { + modelDemandMonitorMajorIndustryTrendService.clear(); + return AjaxResult.success(); + } + + /** + * 查询详情 + * + * @param id ID + * @return 劳动力需求重点产业需求趋势分析 + */ + @GetMapping("/detail") + public AjaxResult detail(@RequestParam Long id) { + ModelDemandMonitorMajorIndustryTrend data = modelDemandMonitorMajorIndustryTrendService.detail(id); + return AjaxResult.success(data); + } + + /** + * 查询列表 + * + * @param modelDemandMonitorMajorIndustryTrend 劳动力需求重点产业需求趋势分析 + * @return 列表 + */ + @PostMapping("/list") + public AjaxResult list(@RequestBody ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend) { + ModelDemandMonitorMajorIndustryTrendVo list = + modelDemandMonitorMajorIndustryTrendService.listDemand(modelDemandMonitorMajorIndustryTrend); + return AjaxResult.success(list); + } +} \ No newline at end of file diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/ModelDemandMonitorMajorIndustryTrend.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/ModelDemandMonitorMajorIndustryTrend.java new file mode 100644 index 0000000..ee76dd9 --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/ModelDemandMonitorMajorIndustryTrend.java @@ -0,0 +1,48 @@ +package com.ruoyi.cms.domain; + +import com.ruoyi.common.annotation.Excel; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 劳动力需求重点产业需求趋势分析 + * + * @author 马宝龙 + * @date 2026/7/3 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class ModelDemandMonitorMajorIndustryTrend implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private Long id; + /** + * 年月 + */ + @Excel(name = "年月") + private String yearMonth; + /** + * 产业编号 + */ + @Excel(name = "产业编号") + private String industryCode; + /** + * 产业名称 + */ + @Excel(name = "产业名称") + private String industryName; + /** + * 需求人数 + */ + @Excel(name = "需求人数") + private Integer demandCount; +} \ No newline at end of file diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/ModelDemandMonitorMajorIndustryTrendVo.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/ModelDemandMonitorMajorIndustryTrendVo.java new file mode 100644 index 0000000..8fdf5ba --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/ModelDemandMonitorMajorIndustryTrendVo.java @@ -0,0 +1,29 @@ +package com.ruoyi.cms.domain.vo; + +import com.ruoyi.cms.domain.dto.ExcelRow; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * 劳动力需求重点产业需求趋势分析 + * + * @author 马宝龙 + * @date 2026/7/3 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class ModelDemandMonitorMajorIndustryTrendVo implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 数据列表 + */ + private List dataList; +} \ No newline at end of file diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ModelDemandMonitorMajorIndustryTrendMapper.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ModelDemandMonitorMajorIndustryTrendMapper.java new file mode 100644 index 0000000..9ef9831 --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ModelDemandMonitorMajorIndustryTrendMapper.java @@ -0,0 +1,64 @@ +package com.ruoyi.cms.mapper; + +import com.ruoyi.cms.domain.ModelDemandMonitorMajorIndustryTrend; + +import java.util.List; + +/** + * 劳动力需求重点产业需求趋势分析 + * + * @author 马宝龙 + * @date 2026/7/3 + */ +public interface ModelDemandMonitorMajorIndustryTrendMapper { + + /** + * 新增 + * + * @param modelDemandMonitorMajorIndustryTrend 劳动力需求重点产业需求趋势分析 + */ + void insert(ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend); + + /** + * 修改 + * + * @param modelDemandMonitorMajorIndustryTrend 劳动力需求重点产业需求趋势分析 + */ + void update(ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend); + + /** + * 通过ID删除 + * + * @param id ID + */ + void deleteById(Long id); + + /** + * 清空 + */ + void clear(); + + /** + * 通过ID查询 + * + * @param id ID + * @return 劳动力需求重点产业需求趋势分析 + */ + ModelDemandMonitorMajorIndustryTrend selectById(Long id); + + /** + * 查询唯一(按年月+产业编号) + * + * @param modelDemandMonitorMajorIndustryTrend 劳动力需求重点产业需求趋势分析 + * @return 劳动力需求重点产业需求趋势分析 + */ + ModelDemandMonitorMajorIndustryTrend findUnique(ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend); + + /** + * 查询列表 + * + * @param modelDemandMonitorMajorIndustryTrend 劳动力需求重点产业需求趋势分析 + * @return 列表 + */ + List list(ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend); +} \ No newline at end of file diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/ModelDemandMonitorMajorIndustryTrendService.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/ModelDemandMonitorMajorIndustryTrendService.java new file mode 100644 index 0000000..a7c575b --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/ModelDemandMonitorMajorIndustryTrendService.java @@ -0,0 +1,84 @@ +package com.ruoyi.cms.service; + +import com.ruoyi.cms.domain.ModelDemandMonitorMajorIndustryTrend; +import com.ruoyi.cms.domain.dto.ModelExportParamDto; +import com.ruoyi.cms.domain.vo.ModelDemandMonitorMajorIndustryTrendVo; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 劳动力需求重点产业需求趋势分析 + * + * @author 马宝龙 + * @date 2026/7/3 + */ +public interface ModelDemandMonitorMajorIndustryTrendService { + + /** + * 创建 + * + * @param modelDemandMonitorMajorIndustryTrend 劳动力需求重点产业需求趋势分析 + */ + void create(ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend); + + /** + * 更新 + * + * @param modelDemandMonitorMajorIndustryTrend 劳动力需求重点产业需求趋势分析 + */ + void update(ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend); + + /** + * 删除 + * + * @param id ID + */ + void delete(Long id); + + /** + * 清空 + */ + void clear(); + + /** + * 查询详情 + * + * @param id ID + * @return 劳动力需求重点产业需求趋势分析 + */ + ModelDemandMonitorMajorIndustryTrend detail(Long id); + + /** + * 查询列表 + * + * @param modelDemandMonitorMajorIndustryTrend 劳动力需求重点产业需求趋势分析 + * @return 列表 + */ + List list(ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend); + + /** + * 查询需求列表 + * + * @param modelDemandMonitorMajorIndustryTrend 劳动力需求重点产业需求趋势分析 + * @return 需求列表 + */ + ModelDemandMonitorMajorIndustryTrendVo listDemand(ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend); + + /** + * 导入数据 + * + * @param file 文件 + * @return 导入结果 + */ + String importExcel(MultipartFile file); + + /** + * 导出数据 + * + * @param response 响应体 + * @param dto 导出参数 + */ + void exportExcel(HttpServletResponse response, ModelExportParamDto dto); +} \ No newline at end of file diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ModelCommonServiceImpl.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ModelCommonServiceImpl.java index dd99fb2..e51e622 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ModelCommonServiceImpl.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ModelCommonServiceImpl.java @@ -6,6 +6,7 @@ import com.ruoyi.cms.service.ModelCommonService; import com.ruoyi.cms.service.ModelDemandMonitorEmploymentService; import com.ruoyi.cms.service.ModelDemandMonitorIndustryIncreaseService; import com.ruoyi.cms.service.ModelDemandMonitorIndustryTrendService; +import com.ruoyi.cms.service.ModelDemandMonitorMajorIndustryTrendService; import com.ruoyi.cms.service.ModelSupplyMonitorIndustryPopulationService; import com.ruoyi.cms.service.ModelSupplyMonitorLaborJoinRateService; import com.ruoyi.cms.service.ModelSupplyMonitorOccupationPopulationService; @@ -50,6 +51,7 @@ public class ModelCommonServiceImpl implements ModelCommonService { private final ModelDemandMonitorEmploymentService modelDemandMonitorEmploymentService; private final ModelDemandMonitorIndustryIncreaseService modelDemandMonitorIndustryIncreaseService; private final ModelDemandMonitorIndustryTrendService modelDemandMonitorIndustryTrendService; + private final ModelDemandMonitorMajorIndustryTrendService modelDemandMonitorMajorIndustryTrendService; @Override public void template(HttpServletResponse response, @@ -111,6 +113,8 @@ public class ModelCommonServiceImpl implements ModelCommonService { return modelDemandMonitorIndustryIncreaseService.importExcel(file); case MODEL_DEMAND_MONITOR_INDUSTRY_TREND: return modelDemandMonitorIndustryTrendService.importExcel(file); + case MODEL_DEMAND_MONITOR_MAJOR_INDUSTRY_TREND: + return modelDemandMonitorMajorIndustryTrendService.importExcel(file); default: throw new ServiceException("模板类型错误"); } @@ -153,6 +157,9 @@ public class ModelCommonServiceImpl implements ModelCommonService { case MODEL_DEMAND_MONITOR_INDUSTRY_TREND: modelDemandMonitorIndustryTrendService.exportExcel(response, dto); break; + case MODEL_DEMAND_MONITOR_MAJOR_INDUSTRY_TREND: + modelDemandMonitorMajorIndustryTrendService.exportExcel(response, dto); + break; default: throw new ServiceException("模板类型错误"); } diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ModelDemandMonitorIndustryTrendServiceImpl.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ModelDemandMonitorIndustryTrendServiceImpl.java index 8a07bb2..fe1d7ae 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ModelDemandMonitorIndustryTrendServiceImpl.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ModelDemandMonitorIndustryTrendServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.cms.service.impl; import com.ruoyi.cms.constant.enums.ModelTemplateTypeEnum; import com.ruoyi.cms.domain.ModelDemandMonitorIndustryTrend; +import com.ruoyi.cms.domain.ModelDemandMonitorMajorIndustryTrend; import com.ruoyi.cms.domain.dto.ExcelRow; import com.ruoyi.cms.domain.dto.ModelExportParamDto; import com.ruoyi.cms.domain.vo.ModelDemandMonitorIndustryTrendVo; @@ -169,6 +170,7 @@ public class ModelDemandMonitorIndustryTrendServiceImpl implements ModelDemandMo List firstRow = new ArrayList<>(); firstRow.add("年月"); + firstRow.add("总需求人数"); for (String industryCode : industryCodeList) { firstRow.add(industryName.get(industryCode)); } @@ -181,11 +183,15 @@ public class ModelDemandMonitorIndustryTrendServiceImpl implements ModelDemandMo for (ModelDemandMonitorIndustryTrend trend : trends) { trendMap.put(trend.getIndustryCode(), trend); } + int totalDemandCount = 0; for (String industryCode : industryCodeList) { - rows.add(Optional.ofNullable(trendMap.get(industryCode)) + Integer demandCount = Optional.ofNullable(trendMap.get(industryCode)) .map(ModelDemandMonitorIndustryTrend::getDemandCount) - .orElse(0).toString()); + .orElse(0); + totalDemandCount += demandCount; + rows.add(demandCount.toString()); } + rows.add(1, Integer.toString(totalDemandCount)); dataList.add(new ExcelRow(rows.toArray(new String[0]))); } vo.setDataList(dataList); diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ModelDemandMonitorMajorIndustryTrendServiceImpl.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ModelDemandMonitorMajorIndustryTrendServiceImpl.java new file mode 100644 index 0000000..314ef18 --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ModelDemandMonitorMajorIndustryTrendServiceImpl.java @@ -0,0 +1,274 @@ +package com.ruoyi.cms.service.impl; + +import com.ruoyi.cms.constant.enums.ModelTemplateTypeEnum; +import com.ruoyi.cms.domain.ModelDemandMonitorMajorIndustryTrend; +import com.ruoyi.cms.domain.dto.ExcelRow; +import com.ruoyi.cms.domain.dto.ModelExportParamDto; +import com.ruoyi.cms.domain.vo.ModelDemandMonitorMajorIndustryTrendVo; +import com.ruoyi.cms.mapper.ModelDemandMonitorMajorIndustryTrendMapper; +import com.ruoyi.cms.service.ModelDemandMonitorMajorIndustryTrendService; +import com.ruoyi.cms.util.document.ExcelUtil; +import com.ruoyi.cms.util.document.MultiSheetExcelUtil; +import com.ruoyi.common.exception.ServiceException; +import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.common.utils.bean.BeanValidators; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Validator; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; + +/** + * 劳动力需求重点产业需求趋势分析 + * + * @author 马宝龙 + * @date 2026/7/3 + */ +@Slf4j +@Service +@Validated +@RequiredArgsConstructor +public class ModelDemandMonitorMajorIndustryTrendServiceImpl implements ModelDemandMonitorMajorIndustryTrendService { + + private final ModelDemandMonitorMajorIndustryTrendMapper modelDemandMonitorMajorIndustryTrendMapper; + private final Validator validator; + + @Override + public void create(ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend) { + + check(modelDemandMonitorMajorIndustryTrend); + + // 查询唯一(按年月+产业编号) + Optional optional = findUnique(modelDemandMonitorMajorIndustryTrend); + if (optional.isPresent()) { + // 更新 + ModelDemandMonitorMajorIndustryTrend exists = optional.get(); + modelDemandMonitorMajorIndustryTrend.setId(exists.getId()); + modelDemandMonitorMajorIndustryTrendMapper.update(modelDemandMonitorMajorIndustryTrend); + } else { + // 新增 + modelDemandMonitorMajorIndustryTrendMapper.insert(modelDemandMonitorMajorIndustryTrend); + } + } + + /** + * 检查 + * + * @param modelDemandMonitorMajorIndustryTrend 劳动力需求重点产业需求趋势分析 + */ + void check(ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend) { + if (StringUtils.isBlank(modelDemandMonitorMajorIndustryTrend.getYearMonth())) { + throw new ServiceException("年月不能为空"); + } + if (StringUtils.isBlank(modelDemandMonitorMajorIndustryTrend.getIndustryCode())) { + throw new ServiceException("产业编号不能为空"); + } + if (StringUtils.isBlank(modelDemandMonitorMajorIndustryTrend.getIndustryName())) { + throw new ServiceException("产业名称不能为空"); + } + if (Objects.isNull(modelDemandMonitorMajorIndustryTrend.getDemandCount())) { + throw new ServiceException("需求人数不能为空"); + } + } + + @Override + public void update(ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend) { + + check(modelDemandMonitorMajorIndustryTrend); + + if (Objects.isNull(modelDemandMonitorMajorIndustryTrend.getId())) { + throw new ServiceException("id不能为空"); + } + Optional unique = findUnique(modelDemandMonitorMajorIndustryTrend); + if (!unique.isPresent()) { + modelDemandMonitorMajorIndustryTrendMapper.update(modelDemandMonitorMajorIndustryTrend); + return; + } + ModelDemandMonitorMajorIndustryTrend exists = unique.get(); + if (!exists.getId().equals(modelDemandMonitorMajorIndustryTrend.getId())) { + throw new ServiceException("数据已存在"); + } + modelDemandMonitorMajorIndustryTrendMapper.update(modelDemandMonitorMajorIndustryTrend); + } + + @Override + public void delete(Long id) { + if (Objects.isNull(id)) { + throw new ServiceException("id不能为空"); + } + modelDemandMonitorMajorIndustryTrendMapper.deleteById(id); + } + + @Override + public void clear() { + modelDemandMonitorMajorIndustryTrendMapper.clear(); + } + + @Override + public ModelDemandMonitorMajorIndustryTrend detail(Long id) { + if (Objects.isNull(id)) { + throw new ServiceException("id不能为空"); + } + return modelDemandMonitorMajorIndustryTrendMapper.selectById(id); + } + + /** + * 查询唯一 + * + * @param modelDemandMonitorMajorIndustryTrend 劳动力需求重点产业需求趋势分析 + * @return 劳动力需求重点产业需求趋势分析 + */ + private Optional findUnique(ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend) { + ModelDemandMonitorMajorIndustryTrend unique = + modelDemandMonitorMajorIndustryTrendMapper.findUnique(modelDemandMonitorMajorIndustryTrend); + return Optional.ofNullable(unique); + } + + @Override + public List list(ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend) { + return modelDemandMonitorMajorIndustryTrendMapper.list(modelDemandMonitorMajorIndustryTrend); + } + + @Override + public ModelDemandMonitorMajorIndustryTrendVo listDemand(ModelDemandMonitorMajorIndustryTrend modelDemandMonitorMajorIndustryTrend) { + + ModelDemandMonitorMajorIndustryTrendVo vo = ModelDemandMonitorMajorIndustryTrendVo.builder().build(); + + List list = list(modelDemandMonitorMajorIndustryTrend); + if (CollectionUtils.isEmpty(list)) { + return vo; + } + Set industryCodeSet = new HashSet<>(); + Map industryName = new HashMap<>(); + Map> map = new HashMap<>(); + for (ModelDemandMonitorMajorIndustryTrend trend : list) { + industryCodeSet.add(trend.getIndustryCode()); + industryName.put(trend.getIndustryCode(), trend.getIndustryName()); + List trendList = Optional.ofNullable(map.get(trend.getYearMonth())) + .orElse(new ArrayList<>()); + trendList.add(trend); + map.put(trend.getYearMonth(), trendList); + } + + List dataList = new ArrayList<>(); + List industryCodeList = new ArrayList<>(industryCodeSet); + Collections.sort(industryCodeList); + + List firstRow = new ArrayList<>(); + firstRow.add("年月"); + firstRow.add("总需求人数"); + for (String industryCode : industryCodeList) { + firstRow.add(industryName.get(industryCode)); + } + dataList.add(new ExcelRow(firstRow.toArray(new String[0]))); + for (Map.Entry> entry : map.entrySet()) { + List rows = new ArrayList<>(); + rows.add(entry.getKey()); + List trends = entry.getValue(); + Map trendMap = new HashMap<>(); + for (ModelDemandMonitorMajorIndustryTrend trend : trends) { + trendMap.put(trend.getIndustryCode(), trend); + } + int totalDemandCount = 0; + for (String industryCode : industryCodeList) { + Integer demandCount = Optional.ofNullable(trendMap.get(industryCode)) + .map(ModelDemandMonitorMajorIndustryTrend::getDemandCount) + .orElse(0); + totalDemandCount += demandCount; + rows.add(demandCount.toString()); + } + rows.add(1, Integer.toString(totalDemandCount)); + dataList.add(new ExcelRow(rows.toArray(new String[0]))); + } + vo.setDataList(dataList); + return vo; + } + + @Override + public String importExcel(MultipartFile file) { + try { + ExcelUtil util = + new ExcelUtil<>(ModelDemandMonitorMajorIndustryTrend.class); + List list = util.importExcel(file.getInputStream()); + + ModelDemandMonitorMajorIndustryTrend exists; + int successNum = 0; + int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + for (ModelDemandMonitorMajorIndustryTrend item : list) { + try { + check(item); + exists = modelDemandMonitorMajorIndustryTrendMapper.findUnique(item); + if (exists == null) { + BeanValidators.validateWithException(validator, item); + modelDemandMonitorMajorIndustryTrendMapper.insert(item); + successNum++; + String msg = + "
" + successNum + "、" + "年月:" + item.getYearMonth() + "产业:" + item.getIndustryName() + "数据导入成功。"; + successMsg.append(msg); + } else { + item.setId(exists.getId()); + BeanValidators.validateWithException(validator, item); + modelDemandMonitorMajorIndustryTrendMapper.update(item); + successNum++; + String msg = + "
" + successNum + "、" + "年月:" + item.getYearMonth() + "产业:" + item.getIndustryName() + "数据更新成功。"; + successMsg.append(msg); + } + } catch (Exception e) { + failureNum++; + String msg = + "
" + failureNum + "、" + "年月:" + item.getYearMonth() + "产业:" + item.getIndustryName() + "数据导入失败:"; + failureMsg.append(msg).append(e.getMessage()); + log.error(msg, e); + } + } + if (failureNum > 0) { + failureMsg.insert(0, "导入失败!共 " + failureNum + " 条数据出现问题,错误如下:"); + throw new ServiceException(failureMsg.toString()); + } else { + successMsg.insert(0, "数据已全部导入成功!共 " + successNum + " 条:"); + } + return successMsg.toString(); + } catch (Exception e) { + log.error("数据导入失败", e); + throw new ServiceException("数据导入失败"); + } + } + + @Override + public void exportExcel(HttpServletResponse response, ModelExportParamDto dto) { + try { + + ModelDemandMonitorMajorIndustryTrendVo vo = listDemand(ModelDemandMonitorMajorIndustryTrend.builder() + .yearMonth(dto.getYearMonth()) + .build()); + + MultiSheetExcelUtil multiSheetExcelUtil = new MultiSheetExcelUtil(); + ExcelUtil basicSituationExcelUtil = new com.ruoyi.cms.util.document.ExcelUtil<>(ExcelRow.class); + basicSituationExcelUtil.setDataList(vo.getDataList()); + basicSituationExcelUtil.setSheetName("重点产业需求趋势分析"); + multiSheetExcelUtil.addSheet(basicSituationExcelUtil); + multiSheetExcelUtil.setFileName(ModelTemplateTypeEnum.MODEL_DEMAND_MONITOR_MAJOR_INDUSTRY_TREND.getDesc()); + multiSheetExcelUtil.exportExcel(response); + + } catch (Exception e) { + log.error("数据导出失败", e); + throw new ServiceException("数据导出失败"); + } + } +} \ No newline at end of file diff --git a/ruoyi-bussiness/src/main/resources/mapper/ModelDemandMonitorMajorIndustryTrendMapper.xml b/ruoyi-bussiness/src/main/resources/mapper/ModelDemandMonitorMajorIndustryTrendMapper.xml new file mode 100644 index 0000000..a302b75 --- /dev/null +++ b/ruoyi-bussiness/src/main/resources/mapper/ModelDemandMonitorMajorIndustryTrendMapper.xml @@ -0,0 +1,78 @@ + + + + + + INSERT INTO model_demand_monitor_major_industry_trend (year_month, industry_code, industry_name, demand_count) + VALUES (#{yearMonth}, #{industryCode}, #{industryName}, #{demandCount}) + + + + UPDATE model_demand_monitor_major_industry_trend + SET year_month = #{yearMonth}, + industry_code = #{industryCode}, + industry_name = #{industryName}, + demand_count = #{demandCount} + WHERE id = #{id} + + + + DELETE + FROM model_demand_monitor_major_industry_trend + WHERE id = #{id} + + + + DELETE FROM model_demand_monitor_major_industry_trend + WHERE id IS NOT NULL; + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-bussiness/src/main/resources/template/劳动力动态监测系统-劳动力需求重点产业需求趋势分析.xlsx b/ruoyi-bussiness/src/main/resources/template/劳动力动态监测系统-劳动力需求重点产业需求趋势分析.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..715571a4314e951ebd7ffa77f8b92710bf7c1189 GIT binary patch literal 10412 zcmeHtWmKHY(k{W>9fA`GPH=Y%?hpodcXyZI?gS6+?!ki&4hg|M1cxAjZ%EGB+2QPa z)^~s2wQm1-Wu~Oxr@E`Ft4l!|0umnVv4zU53qIce-QYkEMz)3u4z_lVj0zw!OwbRo zKgp~f)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t(?gns59qXBSkR^iSExrxKp# zN`6bQ!TKfPuguB+{@YVQ%OFVkzmL-X93f8+(|&90`a9e2qqV19ewsV{EdUMV{6KpD z4%>h0^kW^%ul8u+55Fw@$oyAT%bz`eTG#T(`^#$I{)6{-mCMuaKdmPCEu|CYukQb= r2S0B=YYYDOQp!N%@LwSOUCPfxYXxbjpN<0qv`i#``V2wwsQrHc4#xi; literal 0 HcmV?d00001 diff --git a/sql/datadashboard/table.sql b/sql/datadashboard/table.sql index 4202363..a729b56 100644 --- a/sql/datadashboard/table.sql +++ b/sql/datadashboard/table.sql @@ -1178,4 +1178,36 @@ COMMENT ON COLUMN shz_data_dashboard.model_demand_monitor_industry_trend.demand_count IS '需求人数'; COMMENT -ON TABLE shz_data_dashboard.model_demand_monitor_industry_trend IS '劳动力需求分行业需求趋势分析'; \ No newline at end of file +ON TABLE shz_data_dashboard.model_demand_monitor_industry_trend IS '劳动力需求分行业需求趋势分析'; + +--劳动力需求重点产业需求趋势分析 +CREATE TABLE shz_data_dashboard.model_demand_monitor_major_industry_trend +( + id serial PRIMARY KEY, + year_month character varying(20) NOT NULL COLLATE pg_catalog."default", + industry_code character varying(200) NOT NULL COLLATE pg_catalog."default", + industry_name character varying(200) NOT NULL COLLATE pg_catalog."default", + demand_count integer NOT NULL +) +; + +ALTER TABLE shz_data_dashboard.model_demand_monitor_major_industry_trend + OWNER TO sysdba; + +COMMENT +ON COLUMN shz_data_dashboard.model_demand_monitor_major_industry_trend.id IS '主键'; + +COMMENT +ON COLUMN shz_data_dashboard.model_demand_monitor_major_industry_trend.year_month IS '年月'; + +COMMENT +ON COLUMN shz_data_dashboard.model_demand_monitor_major_industry_trend.industry_code IS '产业编号'; + +COMMENT +ON COLUMN shz_data_dashboard.model_demand_monitor_major_industry_trend.industry_name IS '产业名称'; + +COMMENT +ON COLUMN shz_data_dashboard.model_demand_monitor_major_industry_trend.demand_count IS '需求人数'; + +COMMENT +ON TABLE shz_data_dashboard.model_demand_monitor_industry_trend IS '劳动力需求重点产业需求趋势分析'; \ No newline at end of file