diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java index 55bcbb2c3..73d006f01 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java @@ -2,6 +2,7 @@ package com.jero.modules.project.service.impl; import cn.hutool.core.util.ZipUtil; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.aliyuncs.utils.IOUtils; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -1012,17 +1013,16 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl updateStatusBatch(Map params) { + public Result updateStatusBatch(JSONObject json) { String result = ""; //operatorType: 0:studio工程师发起清单确认 1:法规工程师/认证工程师 (提交或拒绝) - String operatorType = (String) params.get("operatorType"); - String projectLibraryId = (String) params.get("projectLibraryId");//项目id - String cut = (String) params.get("cut");//中英文切换标识 - String ids = (String) params.get("ids"); + String operatorType = json.getString("operatorType"); + String projectLibraryId = json.getString("projectLibraryId");//项目id + String cut = json.getString("cut");//中英文切换标识 if(StringUtils.isEmpty(operatorType)){ throw new JeroBootException("操作类型不能为空!"); } @@ -1030,11 +1030,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); if(StringUtils.isNotEmpty(ids)){ @@ -1098,7 +1100,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl> lawsInventoryList = (List>) params.get("lawsInventoryList"); + JSONArray lawsInventoryList = json.getJSONArray("lawsInventoryList"); if(CollectionUtils.isNotEmpty(lawsInventoryList)){ - lawsInventoryList.forEach(lawsInventory -> { - int isProjectRole = (int) lawsInventory.get("roleCode"); - String id = (String) lawsInventory.get("id"); + Map lawsInventoryMap = null; + for (Object lawsInventory : lawsInventoryList) { + lawsInventoryMap = JSONObject.parseObject(JSONObject.toJSONString(lawsInventory),Map.class); + int isProjectRole = (int) lawsInventoryMap.get("roleCode"); + String id = (String) lawsInventoryMap.get("id"); ProjectLawsInventoryEO projectLawsInventoryEO = getById(id); @@ -1184,7 +1188,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl
- + {{ $t('roleSwitching') }}
@@ -133,7 +133,7 @@
- + {{ $t('roleSwitching') }}
@@ -1206,7 +1206,7 @@ ...this.formInline } this.confirmLoading = true - getAction(this.url.updateStatusBatch, query).then((res) => { + postAction(this.url.updateStatusBatch, query).then((res) => { if (res.success) { this.$message.success(this.$t('OperationSuccessful')) this.visible = false @@ -1342,7 +1342,7 @@ projectLibraryId: _this.$route.query.id, operatorResult: num } - getAction(_this.url.updateStatusBatch, query).then((res) => { + postAction(_this.url.updateStatusBatch, query).then((res) => { if (res.success) { _this.$message.success(_this.$t('OperationSuccessful')) _this.visible = false