From fcdb5e60c746e7278a78c3945f856d15cd6e7ab0 Mon Sep 17 00:00:00 2001 From: du <1725534722@qq.com> Date: Tue, 26 Nov 2024 09:06:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A3=E5=BC=8F=E7=8E=AF=E5=A2=83=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BmsEnterpriseBasicInfoController.java | 71 ++++++------------- .../entity/BmsEnterpriseBasicInfo.java | 4 +- 2 files changed, 24 insertions(+), 51 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsEnterpriseBasicInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsEnterpriseBasicInfoController.java index d3a08af..9992db6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsEnterpriseBasicInfoController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsEnterpriseBasicInfoController.java @@ -13,6 +13,7 @@ import com.ruoyi.jjh.declaration.entity.request.EnterpriseInfoRequest; import com.ruoyi.jjh.declaration.entity.request.EnterpriseInfoWorkRequest; import com.ruoyi.jjh.declaration.service.IBmsEnterpriseBasicInfoService; import com.ruoyi.jjh.ent.entity.JHeadQuartersRevenue; +import com.ruoyi.jjh.ent.entity.JServicesList; import com.ruoyi.jjh.ent.service.JHeadQuartersRevenueService; import com.ruoyi.jjh.ent.service.JServicesListService; import io.swagger.annotations.Api; @@ -145,53 +146,25 @@ public class BmsEnterpriseBasicInfoController extends BaseController { /** * 将企业库企业更改分类 */ -// @ApiOperation(value = "将企业库企业更改分类", response = BmsEnterpriseBasicInfo.class) -// @GetMapping(value = "/changeType") -// public AjaxResult changeType() { -// List list = bmsEnterpriseBasicInfoService.list(); - //生产性服务业 -// List list1 = jServicesListService.lambdaQuery().eq(JServicesList::getServicesType, 1).list(); - //限上批零住餐 -// List list2 = jServicesListService.lambdaQuery().eq(JServicesList::getServicesType, 4).list(); -// //总部企业 -// List list3 = jHeadQuartersRevenueService.list(); -// for (BmsEnterpriseBasicInfo x : list) { -// for (JServicesList y : list1) { -// if(x.getTyshxydm().equals(y.getTyshxydm())){ -// if(x.getType()==null){ -// x.setType("5"); -// }else { -// x.setType(x.getType()+","+"5"); -// } -// bmsEnterpriseBasicInfoService.updateById(x); -// } -// } -// } -// for (BmsEnterpriseBasicInfo x : list) { -// for (JServicesList y : list2) { -// if(x.getTyshxydm().equals(y.getTyshxydm())){ -// if(x.getType()==null){ -// x.setType("6"); -// }else { -// x.setType(x.getType()+","+"6"); -// } -// bmsEnterpriseBasicInfoService.updateById(x); -// } -// } -// } -// for (BmsEnterpriseBasicInfo x : list) { -// for (JHeadQuartersRevenue y : list3) { -// if (x.getTyshxydm().equals(y.getTyshxydm())) { -// if (x.getType() == null) { -// x.setType("4"); -// } else { -// x.setType(x.getType() + "," + "4"); -// } -// bmsEnterpriseBasicInfoService.updateById(x); -// } -// } -// } -// return success(); -// } - + @ApiOperation(value = "将企业库企业更改分类", response = BmsEnterpriseBasicInfo.class) + @PreAuthorize("@ss.hasAnyRoles('admin')") + @GetMapping(value = "/changeType") + public AjaxResult changeType() { + List list = bmsEnterpriseBasicInfoService.list(); + //生活性服务业 + List list1 = jServicesListService.lambdaQuery().eq(JServicesList::getServicesType, 2).list(); + for (BmsEnterpriseBasicInfo x : list) { + for (JServicesList y : list1) { + if (x.getTyshxydm().equals(y.getTyshxydm())) { + if ("2".equals(x.getType())) { + x.setType("7"); + } else { + x.setType(x.getType() + "," + "7"); + } + bmsEnterpriseBasicInfoService.updateById(x); + } + } + } + return success(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsEnterpriseBasicInfo.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsEnterpriseBasicInfo.java index ae78899..b0f4a8c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsEnterpriseBasicInfo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsEnterpriseBasicInfo.java @@ -41,9 +41,9 @@ public class BmsEnterpriseBasicInfo extends BaseInfoEntity { /** * 分类 1.规上服务业 2其他 3规上工业 4总部企业 5生产性服务业 6限上批零住餐 */ - @ApiModelProperty("分类 1.规上服务业 2其他 3规上工业 4总部企业 5生产性服务业 6限上批零住餐") + @ApiModelProperty("分类 1.规上服务业 2其他 3规上工业 4总部企业 5生产性服务业 6限上批零住餐 7生活性服务业") @JSONField(serialize = false) - @Excel(name = "分类", readConverterExp = "1.规上服务业 2其他 3规上工业 4总部企业 5生产性服务业 6限上批零住餐") + @Excel(name = "分类", readConverterExp = "1.规上服务业 2其他 3规上工业 4总部企业 5生产性服务业 6限上批零住餐 7生活性服务业") private String type;