From 631c4fdc21e9a31c0717ad8f1cdae1d2050f7a5d 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 13:15:14 +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 + ...lyMonitorIndustryPopulationController.java | 104 +++++++++ .../ModelSupplyMonitorIndustryPopulation.java | 53 +++++ ...SupplyMonitorIndustryPopulationMapper.java | 64 ++++++ ...upplyMonitorIndustryPopulationService.java | 75 +++++++ .../service/impl/ModelCommonServiceImpl.java | 7 + ...yMonitorIndustryPopulationServiceImpl.java | 204 ++++++++++++++++++ ...lSupplyMonitorIndustryPopulationMapper.xml | 82 +++++++ ...动态监测系统-劳动力供给分行业劳动力人口.xlsx | Bin 0 -> 10410 bytes sql/datadashboard/table.sql | 39 +++- 10 files changed, 629 insertions(+), 1 deletion(-) create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/controller/ModelSupplyMonitorIndustryPopulationController.java create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/ModelSupplyMonitorIndustryPopulation.java create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ModelSupplyMonitorIndustryPopulationMapper.java create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/ModelSupplyMonitorIndustryPopulationService.java create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ModelSupplyMonitorIndustryPopulationServiceImpl.java create mode 100644 ruoyi-bussiness/src/main/resources/mapper/ModelSupplyMonitorIndustryPopulationMapper.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 714265a..254d24f 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 @@ -20,6 +20,8 @@ public enum ModelTemplateTypeEnum { MODEL_SUPPLY_MONITOR_TOTAL_FERTILITY_RATE("劳动力动态监测系统-劳动力供给预测总和生育率"), MODEL_SUPPLY_MONITOR_LABOR_JOIN_RATE("劳动力动态监测系统-劳动力供给劳动参与率"), + + MODEL_SUPPLY_MONITOR_INDUSTRY_POPULATION("劳动力动态监测系统-劳动力供给分行业劳动力人口"), ; private final String desc; } diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/controller/ModelSupplyMonitorIndustryPopulationController.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/controller/ModelSupplyMonitorIndustryPopulationController.java new file mode 100644 index 0000000..3b20e90 --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/controller/ModelSupplyMonitorIndustryPopulationController.java @@ -0,0 +1,104 @@ +package com.ruoyi.cms.controller; + +import com.ruoyi.cms.domain.ModelSupplyMonitorIndustryPopulation; +import com.ruoyi.cms.service.ModelSupplyMonitorIndustryPopulationService; +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; +import java.util.List; + +/** + * 劳动力供给分行业劳动力人口 + * + * @author 马宝龙 + * @date 2026/7/3 + */ +@RestController +@RequestMapping("/model/supplyMonitorIndustryPopulation") +@RequiredArgsConstructor +public class ModelSupplyMonitorIndustryPopulationController extends BaseController { + + private final ModelSupplyMonitorIndustryPopulationService modelSupplyMonitorIndustryPopulationService; + + /** + * 创建 + * + * @param modelSupplyMonitorIndustryPopulation 劳动力供给分行业劳动力人口 + * @return 创建结果 + */ + @PostMapping("/create") + public AjaxResult create(@Valid @RequestBody ModelSupplyMonitorIndustryPopulation modelSupplyMonitorIndustryPopulation) { + modelSupplyMonitorIndustryPopulationService.create(modelSupplyMonitorIndustryPopulation); + return AjaxResult.success(); + } + + /** + * 更新 + * + * @param modelSupplyMonitorIndustryPopulation 劳动力供给分行业劳动力人口 + * @return 更新结果 + */ + @PutMapping("/update") + public AjaxResult update(@Valid @RequestBody ModelSupplyMonitorIndustryPopulation modelSupplyMonitorIndustryPopulation) { + modelSupplyMonitorIndustryPopulationService.update(modelSupplyMonitorIndustryPopulation); + return AjaxResult.success(); + } + + /** + * 删除 + * + * @param id ID + * @return 删除结果 + */ + @DeleteMapping("/delete") + public AjaxResult delete(@RequestParam Long id) { + modelSupplyMonitorIndustryPopulationService.delete(id); + return AjaxResult.success(); + } + + /** + * 清空 + * + * @return 清空结果 + */ + @DeleteMapping("/clear") + public AjaxResult clear() { + modelSupplyMonitorIndustryPopulationService.clear(); + return AjaxResult.success(); + } + + /** + * 查询详情 + * + * @param id ID + * @return 劳动力供给分行业劳动力人口 + */ + @GetMapping("/detail") + public AjaxResult detail(@RequestParam Long id) { + ModelSupplyMonitorIndustryPopulation data = modelSupplyMonitorIndustryPopulationService.detail(id); + return AjaxResult.success(data); + } + + /** + * 查询列表 + * + * @param modelSupplyMonitorIndustryPopulation 劳动力供给分行业劳动力人口 + * @return 列表 + */ + @PostMapping("/list") + public AjaxResult list(@RequestBody ModelSupplyMonitorIndustryPopulation modelSupplyMonitorIndustryPopulation) { + List list = + modelSupplyMonitorIndustryPopulationService.list(modelSupplyMonitorIndustryPopulation); + return AjaxResult.success(list); + } +} \ No newline at end of file diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/ModelSupplyMonitorIndustryPopulation.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/ModelSupplyMonitorIndustryPopulation.java new file mode 100644 index 0000000..7bd8df0 --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/ModelSupplyMonitorIndustryPopulation.java @@ -0,0 +1,53 @@ +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 ModelSupplyMonitorIndustryPopulation implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private Long id; + /** + * 年份 + */ + @Excel(name = "年份") + private Integer year; + /** + * 行业编号 + */ + @Excel(name = "行业编号") + private String industryCode; + /** + * 行业名称 + */ + @Excel(name = "行业名称") + private String industryName; + /** + * 男性人数 + */ + @Excel(name = "男性人数") + private Integer maleCount; + /** + * 女性人数 + */ + @Excel(name = "女性人数") + private Integer femaleCount; +} \ No newline at end of file diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ModelSupplyMonitorIndustryPopulationMapper.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ModelSupplyMonitorIndustryPopulationMapper.java new file mode 100644 index 0000000..8a3c515 --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ModelSupplyMonitorIndustryPopulationMapper.java @@ -0,0 +1,64 @@ +package com.ruoyi.cms.mapper; + +import com.ruoyi.cms.domain.ModelSupplyMonitorIndustryPopulation; + +import java.util.List; + +/** + * 劳动力供给分行业劳动力人口 + * + * @author 马宝龙 + * @date 2026/7/3 + */ +public interface ModelSupplyMonitorIndustryPopulationMapper { + + /** + * 新增 + * + * @param modelSupplyMonitorIndustryPopulation 劳动力供给分行业劳动力人口 + */ + void insert(ModelSupplyMonitorIndustryPopulation modelSupplyMonitorIndustryPopulation); + + /** + * 修改 + * + * @param modelSupplyMonitorIndustryPopulation 劳动力供给分行业劳动力人口 + */ + void update(ModelSupplyMonitorIndustryPopulation modelSupplyMonitorIndustryPopulation); + + /** + * 通过ID删除 + * + * @param id ID + */ + void deleteById(Long id); + + /** + * 清空 + */ + void clear(); + + /** + * 通过ID查询 + * + * @param id ID + * @return 劳动力供给分行业劳动力人口 + */ + ModelSupplyMonitorIndustryPopulation selectById(Long id); + + /** + * 查询唯一(按年份+行业编号) + * + * @param modelSupplyMonitorIndustryPopulation 劳动力供给分行业劳动力人口 + * @return 劳动力供给分行业劳动力人口 + */ + ModelSupplyMonitorIndustryPopulation findUnique(ModelSupplyMonitorIndustryPopulation modelSupplyMonitorIndustryPopulation); + + /** + * 查询列表 + * + * @param modelSupplyMonitorIndustryPopulation 劳动力供给分行业劳动力人口 + * @return 列表 + */ + List list(ModelSupplyMonitorIndustryPopulation modelSupplyMonitorIndustryPopulation); +} \ No newline at end of file diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/ModelSupplyMonitorIndustryPopulationService.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/ModelSupplyMonitorIndustryPopulationService.java new file mode 100644 index 0000000..55fceac --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/ModelSupplyMonitorIndustryPopulationService.java @@ -0,0 +1,75 @@ +package com.ruoyi.cms.service; + +import com.ruoyi.cms.domain.ModelSupplyMonitorIndustryPopulation; +import com.ruoyi.cms.domain.dto.ModelExportParamDto; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 劳动力供给分行业劳动力人口 + * + * @author 马宝龙 + * @date 2026/7/3 + */ +public interface ModelSupplyMonitorIndustryPopulationService { + + /** + * 创建 + * + * @param modelSupplyMonitorIndustryPopulation 劳动力供给分行业劳动力人口 + */ + void create(ModelSupplyMonitorIndustryPopulation modelSupplyMonitorIndustryPopulation); + + /** + * 更新 + * + * @param modelSupplyMonitorIndustryPopulation 劳动力供给分行业劳动力人口 + */ + void update(ModelSupplyMonitorIndustryPopulation modelSupplyMonitorIndustryPopulation); + + /** + * 删除 + * + * @param id ID + */ + void delete(Long id); + + /** + * 清空 + */ + void clear(); + + /** + * 查询详情 + * + * @param id ID + * @return 劳动力供给分行业劳动力人口 + */ + ModelSupplyMonitorIndustryPopulation detail(Long id); + + /** + * 查询列表 + * + * @param modelSupplyMonitorIndustryPopulation 劳动力供给分行业劳动力人口 + * @return 列表 + */ + List list(ModelSupplyMonitorIndustryPopulation modelSupplyMonitorIndustryPopulation); + + /** + * 导入数据 + * + * @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 20635db..e9208f1 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 @@ -3,6 +3,7 @@ package com.ruoyi.cms.service.impl; import com.ruoyi.cms.constant.enums.ModelTemplateTypeEnum; import com.ruoyi.cms.domain.dto.ModelExportParamDto; import com.ruoyi.cms.service.ModelCommonService; +import com.ruoyi.cms.service.ModelSupplyMonitorIndustryPopulationService; import com.ruoyi.cms.service.ModelSupplyMonitorLaborJoinRateService; import com.ruoyi.cms.service.ModelSupplyMonitorPopulationService; import com.ruoyi.cms.service.ModelSupplyMonitorTotalFertilityRateService; @@ -40,6 +41,7 @@ public class ModelCommonServiceImpl implements ModelCommonService { private final ModelSupplyMonitorPopulationService modelSupplyMonitorPopulationService; private final ModelSupplyMonitorTotalFertilityRateService modelSupplyMonitorTotalFertilityRateService; private final ModelSupplyMonitorLaborJoinRateService modelSupplyMonitorLaborJoinRateService; + private final ModelSupplyMonitorIndustryPopulationService modelSupplyMonitorIndustryPopulationService; @Override public void template(HttpServletResponse response, @@ -91,6 +93,8 @@ public class ModelCommonServiceImpl implements ModelCommonService { return modelSupplyMonitorTotalFertilityRateService.importExcel(file); case MODEL_SUPPLY_MONITOR_LABOR_JOIN_RATE: return modelSupplyMonitorLaborJoinRateService.importExcel(file); + case MODEL_SUPPLY_MONITOR_INDUSTRY_POPULATION: + return modelSupplyMonitorIndustryPopulationService.importExcel(file); default: throw new ServiceException("模板类型错误"); } @@ -115,6 +119,9 @@ public class ModelCommonServiceImpl implements ModelCommonService { case MODEL_SUPPLY_MONITOR_LABOR_JOIN_RATE: modelSupplyMonitorLaborJoinRateService.exportExcel(response, dto); break; + case MODEL_SUPPLY_MONITOR_INDUSTRY_POPULATION: + modelSupplyMonitorIndustryPopulationService.exportExcel(response, dto); + break; default: throw new ServiceException("模板类型错误"); } diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ModelSupplyMonitorIndustryPopulationServiceImpl.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ModelSupplyMonitorIndustryPopulationServiceImpl.java new file mode 100644 index 0000000..a7b6e17 --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ModelSupplyMonitorIndustryPopulationServiceImpl.java @@ -0,0 +1,204 @@ +package com.ruoyi.cms.service.impl; + +import com.ruoyi.cms.constant.enums.ModelTemplateTypeEnum; +import com.ruoyi.cms.domain.ModelSupplyMonitorIndustryPopulation; +import com.ruoyi.cms.domain.dto.ModelExportParamDto; +import com.ruoyi.cms.mapper.ModelSupplyMonitorIndustryPopulationMapper; +import com.ruoyi.cms.service.ModelSupplyMonitorIndustryPopulationService; +import com.ruoyi.common.exception.ServiceException; +import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.common.utils.bean.BeanValidators; +import com.ruoyi.common.utils.poi.ExcelUtil; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +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.List; +import java.util.Objects; +import java.util.Optional; + +/** + * 劳动力供给分行业劳动力人口 + * + * @author 马宝龙 + * @date 2026/7/3 + */ +@Slf4j +@Service +@Validated +@RequiredArgsConstructor +public class ModelSupplyMonitorIndustryPopulationServiceImpl implements ModelSupplyMonitorIndustryPopulationService { + + private final ModelSupplyMonitorIndustryPopulationMapper modelSupplyMonitorIndustryPopulationMapper; + private final Validator validator; + + @Override + public void create(ModelSupplyMonitorIndustryPopulation modelSupplyMonitorIndustryPopulation) { + + check(modelSupplyMonitorIndustryPopulation); + + // 查询唯一(按年份+行业编号) + Optional optional = findUnique(modelSupplyMonitorIndustryPopulation); + if (optional.isPresent()) { + // 更新 + ModelSupplyMonitorIndustryPopulation exists = optional.get(); + modelSupplyMonitorIndustryPopulation.setId(exists.getId()); + modelSupplyMonitorIndustryPopulationMapper.update(modelSupplyMonitorIndustryPopulation); + } else { + // 新增 + modelSupplyMonitorIndustryPopulationMapper.insert(modelSupplyMonitorIndustryPopulation); + } + } + + /** + * 检查 + * + * @param modelSupplyMonitorIndustryPopulation 劳动力供给分行业劳动力人口 + */ + void check(ModelSupplyMonitorIndustryPopulation modelSupplyMonitorIndustryPopulation) { + if (Objects.isNull(modelSupplyMonitorIndustryPopulation.getYear())) { + throw new ServiceException("年份不能为空"); + } + if (StringUtils.isBlank(modelSupplyMonitorIndustryPopulation.getIndustryCode())) { + throw new ServiceException("行业编号不能为空"); + } + if (StringUtils.isBlank(modelSupplyMonitorIndustryPopulation.getIndustryName())) { + throw new ServiceException("行业名称不能为空"); + } + if (Objects.isNull(modelSupplyMonitorIndustryPopulation.getMaleCount())) { + throw new ServiceException("男性人数不能为空"); + } + if (Objects.isNull(modelSupplyMonitorIndustryPopulation.getFemaleCount())) { + throw new ServiceException("女性人数不能为空"); + } + } + + @Override + public void update(ModelSupplyMonitorIndustryPopulation modelSupplyMonitorIndustryPopulation) { + + check(modelSupplyMonitorIndustryPopulation); + + if (Objects.isNull(modelSupplyMonitorIndustryPopulation.getId())) { + throw new ServiceException("id不能为空"); + } + Optional unique = findUnique(modelSupplyMonitorIndustryPopulation); + if (!unique.isPresent()) { + modelSupplyMonitorIndustryPopulationMapper.update(modelSupplyMonitorIndustryPopulation); + return; + } + ModelSupplyMonitorIndustryPopulation exists = unique.get(); + if (!exists.getId().equals(modelSupplyMonitorIndustryPopulation.getId())) { + throw new ServiceException("数据已存在"); + } + modelSupplyMonitorIndustryPopulationMapper.update(modelSupplyMonitorIndustryPopulation); + } + + @Override + public void delete(Long id) { + if (Objects.isNull(id)) { + throw new ServiceException("id不能为空"); + } + modelSupplyMonitorIndustryPopulationMapper.deleteById(id); + } + + @Override + public void clear() { + modelSupplyMonitorIndustryPopulationMapper.clear(); + } + + @Override + public ModelSupplyMonitorIndustryPopulation detail(Long id) { + if (Objects.isNull(id)) { + throw new ServiceException("id不能为空"); + } + return modelSupplyMonitorIndustryPopulationMapper.selectById(id); + } + + /** + * 查询唯一 + * + * @param modelSupplyMonitorIndustryPopulation 劳动力供给分行业劳动力人口 + * @return 劳动力供给分行业劳动力人口 + */ + private Optional findUnique(ModelSupplyMonitorIndustryPopulation modelSupplyMonitorIndustryPopulation) { + ModelSupplyMonitorIndustryPopulation unique = + modelSupplyMonitorIndustryPopulationMapper.findUnique(modelSupplyMonitorIndustryPopulation); + return Optional.ofNullable(unique); + } + + @Override + public List list(ModelSupplyMonitorIndustryPopulation modelSupplyMonitorIndustryPopulation) { + return modelSupplyMonitorIndustryPopulationMapper.list(modelSupplyMonitorIndustryPopulation); + } + + @Override + public String importExcel(MultipartFile file) { + try { + ExcelUtil util = new ExcelUtil<>(ModelSupplyMonitorIndustryPopulation.class); + List list = util.importExcel(file.getInputStream()); + + ModelSupplyMonitorIndustryPopulation exists; + int successNum = 0; + int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + for (ModelSupplyMonitorIndustryPopulation item : list) { + try { + check(item); + exists = modelSupplyMonitorIndustryPopulationMapper.findUnique(item); + if (exists == null) { + BeanValidators.validateWithException(validator, item); + modelSupplyMonitorIndustryPopulationMapper.insert(item); + successNum++; + String msg = + "
" + successNum + "、" + "年份:" + item.getYear() + "行业:" + item.getIndustryName() + "数据导入成功。"; + successMsg.append(msg); + } else { + item.setId(exists.getId()); + BeanValidators.validateWithException(validator, item); + modelSupplyMonitorIndustryPopulationMapper.update(item); + successNum++; + String msg = + "
" + successNum + "、" + "年份:" + item.getYear() + "行业:" + item.getIndustryName() + "数据更新成功。"; + successMsg.append(msg); + } + } catch (Exception e) { + failureNum++; + String msg = "
" + failureNum + "、" + "年份:" + item.getYear() + "行业:" + 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 { + + List list = list(ModelSupplyMonitorIndustryPopulation.builder() + .year(dto.getYear()) + .build()); + ExcelUtil util = new ExcelUtil<>(ModelSupplyMonitorIndustryPopulation.class); + util.exportExcel(response, list, ModelTemplateTypeEnum.MODEL_SUPPLY_MONITOR_INDUSTRY_POPULATION.getDesc()); + + } catch (Exception e) { + log.error("数据导出失败", e); + throw new ServiceException("数据导出失败"); + } + } +} \ No newline at end of file diff --git a/ruoyi-bussiness/src/main/resources/mapper/ModelSupplyMonitorIndustryPopulationMapper.xml b/ruoyi-bussiness/src/main/resources/mapper/ModelSupplyMonitorIndustryPopulationMapper.xml new file mode 100644 index 0000000..f197424 --- /dev/null +++ b/ruoyi-bussiness/src/main/resources/mapper/ModelSupplyMonitorIndustryPopulationMapper.xml @@ -0,0 +1,82 @@ + + + + + + INSERT INTO model_supply_monitor_industry_population (year, industry_code, industry_name, male_count, female_count) + VALUES (#{year}, #{industryCode}, #{industryName}, #{maleCount}, #{femaleCount}) + + + + UPDATE model_supply_monitor_industry_population + SET year = #{year}, + industry_code = #{industryCode}, + industry_name = #{industryName}, + male_count = #{maleCount}, + female_count = #{femaleCount} + WHERE id = #{id} + + + + DELETE + FROM model_supply_monitor_industry_population + WHERE id = #{id} + + + + DELETE FROM model_supply_monitor_industry_population + 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..e83348bbb94954ee8051daa08933d8d491e39e9b GIT binary patch literal 10410 zcmeHtWmsIx(k||g1aPWaF^f`EO>&uy9C#u!SxQwIXl^$ z{hjB#KkxJ0{;}4qH6^{?>aMP?E@e4r7$k^?7Noc$@^JrmLj?aYwlz|Au(fk!RtA&d zfL|c|BtvM0gtLK!fJlXcfWY{Z%)ri$$<5j-HF`j{odqZ0-1h*Z(v?k^o~;V^2%dYz zJNr6ek2lTu$Gc?y&&g%Y9Aj>R2-un zP&H=p5=wUKRbk9~Vl>zINm~1E_5PP7q&e7jPJ-G11UL=Ca@sGLB$)tdso=b!1Z;}# zI!mAykZOc$b?e=k|2Ab5R81AnfC$-c&0G;mCjxz-TaO3aC|^bTs+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3aBSb8u2*~LG`1KMh0Ib<(D9=w*n+4a=V$l9?2@Y3kf`3 z`p%9UdTngIDTuE%h>(|GG{Gy;VCjsF05On|y)%lOq(C4wv<|&%gd!v+8`97;Quunc z*45f6K5tq_s0)+Z?_;xCmeX%%W8DiS%mU+v+elfii@uqXO&41Y%nn(PnP z^|+&tecXedUntT4$@U)}@3EZ6xy9dduD}&a|CDKbEa7o}8;_f3p2PMtj`l$Em{K0!YEm53Ki3*#29mA8J{CwFe6~{<81` z^Iw%MfA9I@+Lj02Usl`t58mIEE|0taxN_jPlwtV4y8o{p{Jj0FBlzD-X#$VKe}V9) bl%EIG%5ty|Q4DyIz=ntc_ZgD%;pzVXYuf%Q literal 0 HcmV?d00001 diff --git a/sql/datadashboard/table.sql b/sql/datadashboard/table.sql index 51c11c9..100034d 100644 --- a/sql/datadashboard/table.sql +++ b/sql/datadashboard/table.sql @@ -959,4 +959,41 @@ COMMENT ON COLUMN shz_data_dashboard.model_supply_monitor_labor_join_rate.female_labor_join_rate IS '女性劳动参与率(%)'; COMMENT -ON TABLE shz_data_dashboard.model_supply_monitor_labor_join_rate IS '劳动力供给劳动参与率'; \ No newline at end of file +ON TABLE shz_data_dashboard.model_supply_monitor_labor_join_rate IS '劳动力供给劳动参与率'; + + +--劳动力供给分行业劳动力人口 +CREATE TABLE shz_data_dashboard.model_supply_monitor_industry_population +( + id serial PRIMARY KEY, + year integer NOT NULL, + industry_code character varying(200) NOT NULL COLLATE pg_catalog."default", + industry_name character varying(200) NOT NULL COLLATE pg_catalog."default", + male_count integer NOT NULL, + female_count integer NOT NULL +) +; + +ALTER TABLE shz_data_dashboard.model_supply_monitor_industry_population + OWNER TO sysdba; + +COMMENT +ON COLUMN shz_data_dashboard.model_supply_monitor_industry_population.id IS '主键'; + +COMMENT +ON COLUMN shz_data_dashboard.model_supply_monitor_industry_population.year IS '年份'; + +COMMENT +ON COLUMN shz_data_dashboard.model_supply_monitor_industry_population.industry_code IS '行业编号'; + +COMMENT +ON COLUMN shz_data_dashboard.model_supply_monitor_industry_population.industry_name IS '行业名称'; + +COMMENT +ON COLUMN shz_data_dashboard.model_supply_monitor_industry_population.male_count IS '男性人数'; + +COMMENT +ON COLUMN shz_data_dashboard.model_supply_monitor_industry_population.female_count IS '女性人数'; + +COMMENT +ON TABLE shz_data_dashboard.model_supply_monitor_industry_population IS '劳动力供给分行业劳动力人口'; \ No newline at end of file