From 84a979b1dfacc490b4f71a35e7cf1382d7964e1d Mon Sep 17 00:00:00 2001 From: du <1725534722@qq.com> Date: Mon, 17 Jun 2024 15:11:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BmsOutQuitProductsController.java | 123 +++++++++++++ .../entity/BmsOutQuitProducts.java | 109 ++++++++++++ .../entity/dto/BmsOutQuitProductsAddDto.java | 66 +++++++ .../dto/BmsOutQuitProductsUpdateDto.java | 25 +++ .../entity/vo/DeclarationRecordsVo.java | 14 +- .../mapper/BmsOutQuitProductsMapper.java | 40 +++++ .../IBmsDeclarationRecordsService.java | 11 -- .../service/IBmsOutQuitProductsService.java | 67 +++++++ .../impl/BmsBigStrongAwardServiceImpl.java | 8 +- .../impl/BmsBrandingAwardServiceImpl.java | 7 +- ...msCarrierConstructionAwardServiceImpl.java | 8 +- .../impl/BmsCreditManagementServiceImpl.java | 7 +- .../BmsDeclarationRecordsServiceImpl.java | 33 +--- ...BmsIndustrialInternetAwardServiceImpl.java | 7 +- .../BmsIntegrationIndustriesServiceImpl.java | 7 +- ...sLogisticsDevelopmentAwardServiceImpl.java | 12 +- ...ManufacturingServicesAwardServiceImpl.java | 7 +- .../impl/BmsOutQuitProductsServiceImpl.java | 167 ++++++++++++++++++ ...sPlatformConstructionAwardServiceImpl.java | 10 +- .../BmsProjectSettlementAwardServiceImpl.java | 7 +- .../impl/BmsSceneOpeningAwardServiceImpl.java | 7 +- .../service/impl/CommonServiceImpl.java | 26 +-- .../single/controller/ChiefController.java | 2 + .../src/main/resources/application-druid.yml | 4 +- .../declaration/BmsOutQuitProductsMapper.xml | 28 +++ 25 files changed, 693 insertions(+), 109 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsOutQuitProductsController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsOutQuitProducts.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/dto/BmsOutQuitProductsAddDto.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/dto/BmsOutQuitProductsUpdateDto.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/mapper/BmsOutQuitProductsMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/IBmsOutQuitProductsService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsOutQuitProductsServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/jjh/declaration/BmsOutQuitProductsMapper.xml diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsOutQuitProductsController.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsOutQuitProductsController.java new file mode 100644 index 0000000..e0394ba --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsOutQuitProductsController.java @@ -0,0 +1,123 @@ +package com.ruoyi.jjh.declaration.controller; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.jjh.declaration.entity.BmsBigStrongAward; +import com.ruoyi.jjh.declaration.entity.BmsOutQuitProducts; +import com.ruoyi.jjh.declaration.entity.dto.BmsBigStrongAwardAddDto; +import com.ruoyi.jjh.declaration.entity.dto.BmsBigStrongAwardUpdateDto; +import com.ruoyi.jjh.declaration.entity.dto.BmsOutQuitProductsAddDto; +import com.ruoyi.jjh.declaration.entity.dto.BmsOutQuitProductsUpdateDto; +import com.ruoyi.jjh.declaration.service.IBmsBigStrongAwardService; +import com.ruoyi.jjh.declaration.service.IBmsOutQuitProductsService; +import com.ruoyi.jjh.ent.entity.JProject; +import com.ruoyi.jjh.ent.service.JProjectService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.List; + +/** + * 2024年度淘汰落后和退出低端低效产能装备清单模板Controller + * + * @author farben + * @date 2023-08-25 + */ +@RestController +@Api(tags = "2024年度淘汰落后和退出低端低效产能装备清单") +@RequestMapping("/system/outQuitProducts") +public class BmsOutQuitProductsController extends BaseController { + + @Autowired + private IBmsOutQuitProductsService bmsOutQuitProductsService; + + @Resource + private JProjectService jProjectService; + /** + * 查询2024年度淘汰落后和退出低端低效产能装备清单列表 + */ + @ApiOperation(value = "查询列表") + @GetMapping("/list") + public TableDataInfo list(BmsOutQuitProducts bmsOutQuitProducts) { + startPage(); + List list = bmsOutQuitProductsService.selectBmsOutQuitProductsList(bmsOutQuitProducts); + return getDataTable(list); + } + + /** + * 导出2024年度淘汰落后和退出低端低效产能装备清单列表 + */ + @ApiOperation(value = "导出列表") + @Log(title = "2024年度淘汰落后和退出低端低效产能装备清单", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BmsOutQuitProducts bmsOutQuitProducts) { + List list = bmsOutQuitProductsService.selectBmsOutQuitProductsList(bmsOutQuitProducts); + ExcelUtil util = new ExcelUtil(BmsOutQuitProducts.class); + util.exportExcel(response, list, "2024年度淘汰落后和退出低端低效产能装备清单数据"); + } + + /** + * 获取2024年度淘汰落后和退出低端低效产能装备清单详细信息 + */ + @ApiOperation(value = "根据id查询详情") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(bmsOutQuitProductsService.getById(id)); + } + + /** + * 新增2024年度淘汰落后和退出低端低效产能装备清单详情 + */ + @ApiOperation(value = "新增") + @Log(title = "2024年度淘汰落后和退出低端低效产能装备清单", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BmsOutQuitProductsAddDto bmsOutQuitProductsAddDto) { + return toAjax(bmsOutQuitProductsService.insertBmsOutQuitProducts(bmsOutQuitProductsAddDto)); + } + + /** + * 修改2024年度淘汰落后和退出低端低效产能装备清单详情 + */ + @ApiOperation(value = "修改") + @Log(title = "修改2024年度淘汰落后和退出低端低效产能装备清单", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BmsOutQuitProductsUpdateDto bmsOutQuitProductsUpdateDto) { + return toAjax(bmsOutQuitProductsService.updateBmsOutQuitProducts(bmsOutQuitProductsUpdateDto)); + } + + /** + * 修改2024年度淘汰落后和退出低端低效产能装备清单(只做修改,不做逻辑) + */ + @ApiOperation(value = "只做修改,不做逻辑") + @Log(title = "修改2024年度淘汰落后和退出低端低效产能装备清单(只做修改,不做逻辑)", businessType = BusinessType.UPDATE) + @PutMapping("/update") + public AjaxResult update(@RequestBody BmsOutQuitProducts bmsOutQuitProducts) { + bmsOutQuitProductsService.updateById(bmsOutQuitProducts); + JProject jps = new JProject(); + jps.setId(bmsOutQuitProducts.getJjhProjectId()); + jps.setFileJson("{" + + '"' + "拟淘汰或退出生产工艺装备情况" + '"' + ":" + '"' + bmsOutQuitProducts.getSpecifics() + '"' + "," + + '"' + "其他相关情况说明" + '"' + ":" + '"' + bmsOutQuitProducts.getOtherSpecifics() + '"'+ + "}"); + return toAjax(jProjectService.updateById(jps)); + } + + /** + * 删除2024年度淘汰落后和退出低端低效产能装备清单详情 + */ + @ApiOperation(value = "删除2024年度淘汰落后和退出低端低效产能装备清单") + @Log(title = "删除2024年度淘汰落后和退出低端低效产能装备清单详情", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(bmsOutQuitProductsService.deleteBmsOutQuitProductsByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsOutQuitProducts.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsOutQuitProducts.java new file mode 100644 index 0000000..3e91ea0 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsOutQuitProducts.java @@ -0,0 +1,109 @@ +package com.ruoyi.jjh.declaration.entity; + +import com.alibaba.fastjson2.annotation.JSONField; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.jjh.common.entity.BaseInfoEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 2024年度淘汰落后和退出低端低效产能装备清单 bms_out_quit_products + * + * @author farben + * @date 2023-08-25 + */ +@ApiModel("2024年度淘汰落后和退出低端低效产能装备清单详情对象") +@Data +public class BmsOutQuitProducts extends BaseInfoEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @TableId(value = "id", type = IdType.AUTO) + @JSONField(serialize = false) + private Long id; + + /** + * 企业id + */ + @ApiModelProperty("企业id") + @Excel(name = "企业id") + @JSONField(serialize = false) + private Long enterpriseId; + + /** + * 主要产品 + */ + @ApiModelProperty("主要产品") + @Excel(name = "主要产品") + @JSONField(name = "主要产品") + private String mainProducts; + + /** + * 所属行业 1轻工 2纺织 3冶金 4化工 5建材 6机械加工 + */ + @ApiModelProperty("所属行业 1轻工 2纺织 3冶金 4化工 5建材 6机械加工") + @JSONField(name = "所属行业") + @Excel(name = "所属行业",readConverterExp = "1=轻工,2=纺织,3=冶金,4=化工,5=建材,6=机械加工") + private Integer industry; + + /** + * 工作联系人 + */ + @ApiModelProperty("工作联系人") + @Excel(name = "工作联系人") + @JSONField(name = "工作联系人") + private String workContact; + + + /** + * 联系电话 + */ + @ApiModelProperty("联系电话") + @Excel(name = "联系电话") + @JSONField(name = "联系电话") + private String iphone; + + /** + * 类别 1 淘汰落后生产工艺装备 2 退出低端低效生产工艺装备 + */ + @ApiModelProperty("类别 1 淘汰落后生产工艺装备 2 退出低端低效生产工艺装备") + @Excel(name = "类别",readConverterExp = "1=淘汰落后生产工艺装备,2=退出低端低效生产工艺装备") + @JSONField(name = "类别") + private Integer type; + + /** + * 拟淘汰或退出生产工艺装备情况(和类别对应) + */ + @ApiModelProperty("拟淘汰或退出生产工艺装备情况(和类别对应)") + @Excel(name = "拟淘汰或退出生产工艺装备情况") + @JSONField(serialize = false) + private String specifics; + + /** + * 其他相关情况说明 + */ + @ApiModelProperty("其他相关情况说明") + @Excel(name = "其他相关情况说明") + @JSONField(serialize = false) + private String otherSpecifics; + + + /** + * 是否删除:0,未删除;1,已删除 + */ + @ApiModelProperty("是否删除:0,未删除;1,已删除") + @JSONField(serialize = false) + @Excel(name = "是否删除:0,未删除;1,已删除") + private Long isDeleted; + + @TableField(exist=false) + @ApiModelProperty(value = "项目库Id") + private Long jjhProjectId; + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/dto/BmsOutQuitProductsAddDto.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/dto/BmsOutQuitProductsAddDto.java new file mode 100644 index 0000000..68736f6 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/dto/BmsOutQuitProductsAddDto.java @@ -0,0 +1,66 @@ +package com.ruoyi.jjh.declaration.entity.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; + +/** + * 2024年度淘汰落后和退出低端低效产能装备清单 bms_out_quit_products 新增 + * + * @author farben + * @date 2023-08-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class BmsOutQuitProductsAddDto extends BmsEnterpriseBasicInfoAddDto implements Serializable { + + /** + * 主要产品 + */ + @ApiModelProperty("主要产品") + private String mainProducts; + + /** + * 所属行业 1轻工 2纺织 3冶金 4化工 5建材 6机械加工 + */ + @ApiModelProperty("所属行业 1轻工 2纺织 3冶金 4化工 5建材 6机械加工") + private Integer industry; + + /** + * 工作联系人 + */ + @ApiModelProperty("工作联系人") + private String workContact; + + /** + * 联系电话 + */ + @ApiModelProperty("联系电话") + private String iphone; + + /** + * 类别 1 淘汰落后生产工艺装备 2 退出低端低效生产工艺装备 + */ + @ApiModelProperty("类别 1 淘汰落后生产工艺装备 2 退出低端低效生产工艺装备") + private Integer type; + + /** + * 拟淘汰或退出生产工艺装备情况(和类别对应) + */ + @ApiModelProperty("拟淘汰或退出生产工艺装备情况(和类别对应)") + private String specifics; + + /** + * 其他相关情况说明 + */ + @ApiModelProperty("其他相关情况说明") + private String otherSpecifics; + + /** + * 在线申报记录id + */ + @ApiModelProperty(value = "在线申报记录id") + private Long declarationId; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/dto/BmsOutQuitProductsUpdateDto.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/dto/BmsOutQuitProductsUpdateDto.java new file mode 100644 index 0000000..bea1baf --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/dto/BmsOutQuitProductsUpdateDto.java @@ -0,0 +1,25 @@ +package com.ruoyi.jjh.declaration.entity.dto; + +import com.ruoyi.jjh.declaration.entity.BmsOutQuitProducts; +import com.ruoyi.jjh.declaration.entity.BmsPlatformConstructionAward; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 2024年度淘汰落后和退出低端低效产能装备清单 bms_out_quit_products 修改 + * + * @author farben + * @date 2023-08-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class BmsOutQuitProductsUpdateDto extends BmsOutQuitProducts { + + @ApiModelProperty(value = "记录id") + private Long declarationRecordsId; + + + @ApiModelProperty(value = "审批状态:0=待填报,1=初审中,2=复审中,3=终审中,5=评审通过,7=复审不通过,8=初审不通过,9=终审不通过,10=初审驳回") + private Long status; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/vo/DeclarationRecordsVo.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/vo/DeclarationRecordsVo.java index ff70825..63b494f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/vo/DeclarationRecordsVo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/vo/DeclarationRecordsVo.java @@ -1,16 +1,6 @@ package com.ruoyi.jjh.declaration.entity.vo; -import com.ruoyi.jjh.declaration.entity.BmsBrandingAward; -import com.ruoyi.jjh.declaration.entity.BmsCarrierConstructionAward; -import com.ruoyi.jjh.declaration.entity.BmsCreditManagement; -import com.ruoyi.jjh.declaration.entity.BmsDeclarationRecords; -import com.ruoyi.jjh.declaration.entity.BmsEnterpriseBasicInfo; -import com.ruoyi.jjh.declaration.entity.BmsIndustrialInternetAward; -import com.ruoyi.jjh.declaration.entity.BmsIntegrationIndustries; -import com.ruoyi.jjh.declaration.entity.BmsLogisticsDevelopmentAward; -import com.ruoyi.jjh.declaration.entity.BmsManufacturingServicesAward; -import com.ruoyi.jjh.declaration.entity.BmsPlatformConstructionAward; -import com.ruoyi.jjh.declaration.entity.BmsSceneOpeningAward; +import com.ruoyi.jjh.declaration.entity.*; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -61,4 +51,6 @@ public class DeclarationRecordsVo implements Serializable { @ApiModelProperty(value = "11、两业融合奖补对象") private BmsIntegrationIndustries bmsIntegrationIndustries; + @ApiModelProperty(value = "12、2024年度淘汰落后和退出低端低效产能装备清单对象") + private BmsOutQuitProducts bmsOutQuitProducts; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/mapper/BmsOutQuitProductsMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/mapper/BmsOutQuitProductsMapper.java new file mode 100644 index 0000000..c687d4d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/mapper/BmsOutQuitProductsMapper.java @@ -0,0 +1,40 @@ +package com.ruoyi.jjh.declaration.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.jjh.declaration.entity.BmsOutQuitProducts; +import com.ruoyi.jjh.declaration.entity.BmsOutQuitProducts; + +import java.util.List; + +/** + * 2024年度淘汰落后和退出低端低效产能装备清单 Mapper接口 + * + * @author farben + * @date 2023-09-04 + */ +public interface BmsOutQuitProductsMapper extends BaseMapper { + + /** + * 查询2024年度淘汰落后和退出低端低效产能装备清单列表 + * + * @param bmsCreditManagement 信用管理奖补 + * @return 信用管理奖补集合 + */ + List selectBmsOutQuitProductsList(BmsOutQuitProducts bmsCreditManagement); + + /** + * 删除2024年度淘汰落后和退出低端低效产能装备清单 + * + * @param id 信用管理奖补主键 + * @return 结果 + */ + int deleteBmsOutQuitProductsById(Long id); + + /** + * 批量删除2024年度淘汰落后和退出低端低效产能装备清单 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deleteBmsOutQuitProductsByIds(Long[] ids); +} 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 99fb642..b80f1dd 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 @@ -90,18 +90,7 @@ public interface IBmsDeclarationRecordsService extends IService { + + /** + * 查询2024年度淘汰落后和退出低端低效产能装备清单列表 + * + * @param bmsOutQuitProducts 详情 + * @return 详情集合 + */ + List selectBmsOutQuitProductsList(BmsOutQuitProducts bmsOutQuitProducts); + + /** + * 新增2024年度淘汰落后和退出低端低效产能装备清单 + * + * @param bmsOutQuitProductsAddDto 详情 + * @return 结果 + */ + int insertBmsOutQuitProducts(BmsOutQuitProductsAddDto bmsOutQuitProductsAddDto); + + /** + * otherJson + */ + Map getAllJson(Long id); + + /** + * 修改2024年度淘汰落后和退出低端低效产能装备清单 + * + * @param bmsOutQuitProductsUpdateDto 详情 + * @return 结果 + */ + int updateBmsOutQuitProducts(BmsOutQuitProductsUpdateDto bmsOutQuitProductsUpdateDto); + + /** + * 批量删除2024年度淘汰落后和退出低端低效产能装备清单 + * + * @param ids 主键集合 + * @return 结果 + */ + int deleteBmsOutQuitProductsByIds(Long[] ids); + + /** + * 删除2024年度淘汰落后和退出低端低效产能装备清单 + * + * @param id 详情主键 + * @return 结果 + */ + int deleteBmsOutQuitProductsById(Long id); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsBigStrongAwardServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsBigStrongAwardServiceImpl.java index 1149eb3..5348512 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsBigStrongAwardServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsBigStrongAwardServiceImpl.java @@ -164,9 +164,11 @@ public class BmsBigStrongAwardServiceImpl extends ServiceImpl fundingDetailList = bmsBigStrongAwardUpdateDto.getFundingDetailList(); iBmsFundingDetailService.saveOrUpdateBatch(fundingDetailList); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsBrandingAwardServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsBrandingAwardServiceImpl.java index 1756438..43da40b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsBrandingAwardServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsBrandingAwardServiceImpl.java @@ -142,9 +142,10 @@ public class BmsBrandingAwardServiceImpl extends ServiceImpl implements IBmsOutQuitProductsService { + + @Autowired + private ICommonService iCommonService; + + @Autowired + private IBmsDeclarationRecordsService iBmsDeclarationRecordsService; + @Resource + private IBmsTemplateInfoService iBmsTemplateInfoService; + @Resource + private JProjectService jProjectService; + /** + * 查询2024年度淘汰落后和退出低端低效产能装备清单列表 + * + * @param bmsOutQuitProducts 详情 + * @return 详情集合 + */ + @Override + public List selectBmsOutQuitProductsList(BmsOutQuitProducts bmsOutQuitProducts) { + return baseMapper.selectBmsOutQuitProductsList(bmsOutQuitProducts); + } + + /** + * 新增2024年度淘汰落后和退出低端低效产能装备清单 + * + * @param bmsOutQuitProductsAddDto 详情 + * @return 结果 + */ + @Override + public int insertBmsOutQuitProducts(BmsOutQuitProductsAddDto bmsOutQuitProductsAddDto) { + Long enterpriseId = iCommonService.checkEnterprise(bmsOutQuitProductsAddDto.getCreditCode() + ,bmsOutQuitProductsAddDto.getTemplateRecordId()); + // check 申报信息 + iCommonService.checkDeclaration(bmsOutQuitProductsAddDto.getCreditCode() + ,bmsOutQuitProductsAddDto.getTemplateRecordId()); + + BmsOutQuitProducts products = new BmsOutQuitProducts(); + BeanUtil.copyProperties(bmsOutQuitProductsAddDto,products); + products.setEnterpriseId(enterpriseId); + int num = baseMapper.insert(products); + + // 新增申请记录 + BmsDeclarationRecords declarationRecords = new BmsDeclarationRecords(); + declarationRecords.setMatter("提交2024年度淘汰落后和退出低端低效产能装备清单"); + declarationRecords.setDetailId(products.getId()); + declarationRecords.setStatus(1L); + declarationRecords.setId(bmsOutQuitProductsAddDto.getDeclarationId()); + iBmsDeclarationRecordsService.updateById(declarationRecords); + + //新增项目 + declarationRecords.setJjhProjectId(jProjectService.saveProject(getAllJson(bmsOutQuitProductsAddDto.getDeclarationId()))); + iBmsDeclarationRecordsService.updateById(declarationRecords); + + // 生成审核 + iCommonService.insertAuditRecord(declarationRecords.getId(),0); + return num; + } + + @Override + public Map getAllJson(Long id) { + Map jsonMap = new HashMap<>(); + //获取该申报记录的详情 + DeclarationRecordsVo declarationRecordsVo = iBmsDeclarationRecordsService.selectBmsDeclarationRecordsById(id); + //申报的企业信息JSON + String js1= JSONObject.toJSONString(declarationRecordsVo.getBmsEnterpriseBasicInfo()); + //在线申报信息JSON + String js2 = JSONObject.toJSONString(declarationRecordsVo.getBmsDeclarationRecords()); + //提交2024年度淘汰落后和退出低端低效产能装备清单 + BmsOutQuitProducts p1 = declarationRecordsVo.getBmsOutQuitProducts(); + //提交2024年度淘汰落后和退出低端低效产能装备清单json + String js3 = JSONObject.toJSONString(p1); + jsonMap.put("credit_code",declarationRecordsVo.getBmsEnterpriseBasicInfo().getCreditCode()); + jsonMap.put("projectName",declarationRecordsVo.getBmsDeclarationRecords().getProjectName()); + jsonMap.put("year",declarationRecordsVo.getBmsDeclarationRecords().getYear()); + jsonMap.put("templateId", String.valueOf(declarationRecordsVo.getBmsDeclarationRecords().getTemplateId())); + jsonMap.put("otherJson",jProjectService.allJsonString(js1, js2, js3, "{}")); + jsonMap.put("fileJson", "{" + + '"' + "拟淘汰或退出生产工艺装备情况" + '"' + ":" + '"' + p1.getSpecifics() + '"' + "," + + '"' + "其他相关情况说明" + '"' + ":" + '"' + p1.getOtherSpecifics() + '"'+ + "}"); + jsonMap.put("declareUnit",declarationRecordsVo.getBmsEnterpriseBasicInfo().getEnterpriseName()); + jsonMap.put("jjhProjectId", String.valueOf(declarationRecordsVo.getBmsDeclarationRecords().getJjhProjectId())); + return jsonMap; + } + + @Override + public int updateBmsOutQuitProducts(BmsOutQuitProductsUpdateDto bmsOutQuitProductsUpdateDto) { + int num = 0; + try { + BmsDeclarationRecords newRecord = new BmsDeclarationRecords(); + newRecord.setId(bmsOutQuitProductsUpdateDto.getDeclarationRecordsId()); + newRecord.setStatus(bmsOutQuitProductsUpdateDto.getStatus()); + iBmsDeclarationRecordsService.updateById(newRecord); + + num = baseMapper.updateById(bmsOutQuitProductsUpdateDto); + // 申请审批 + if (bmsOutQuitProductsUpdateDto.getStatus()==1){ + Map allJson = getAllJson(bmsOutQuitProductsUpdateDto.getDeclarationRecordsId()); + //修改项目 + jProjectService.updateTheJson(allJson); + // 审批状态 + iCommonService.updateAuditRecord(bmsOutQuitProductsUpdateDto.getDeclarationRecordsId(), 0); + } + }catch (Exception e){ + e.printStackTrace(); + } + return num; + } + /** + * 批量删除2024年度淘汰落后和退出低端低效产能装备清单 + * + * @param ids 主键集合 + * @return 结果 + */ + @Override + public int deleteBmsOutQuitProductsByIds(Long[] ids) { + return baseMapper.deleteBmsOutQuitProductsByIds(ids); + } + + /** + * 删除2024年度淘汰落后和退出低端低效产能装备清单 + * + * @param id 详情主键 + * @return 结果 + */ + @Override + public int deleteBmsOutQuitProductsById(Long id) { + return baseMapper.deleteBmsOutQuitProductsById(id); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsPlatformConstructionAwardServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsPlatformConstructionAwardServiceImpl.java index b93c69f..29b3fad 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsPlatformConstructionAwardServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsPlatformConstructionAwardServiceImpl.java @@ -144,13 +144,11 @@ public class BmsPlatformConstructionAwardServiceImpl extends ServiceImpl fundingDetailList = bmsProjectSettlementAwardUpdateDto.getFundingDetailList(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsSceneOpeningAwardServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsSceneOpeningAwardServiceImpl.java index 248018a..bd8b0e8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsSceneOpeningAwardServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsSceneOpeningAwardServiceImpl.java @@ -141,9 +141,10 @@ public class BmsSceneOpeningAwardServiceImpl extends ServiceImpl + + + + + + delete + from bms_out_quit_products + where id = #{id} + + + delete from bms_out_quit_products where id in + + #{id} + + + \ No newline at end of file