认证清单-批量修改配置项接口开发。

This commit is contained in:
wangzhijiang
2023-03-13 09:54:10 +08:00
parent 383f6e2dd1
commit 0e6ae94f81
5 changed files with 44 additions and 0 deletions
@@ -325,3 +325,10 @@ CREATE TABLE `auth_dummy_content_change` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- 标签管理 增加认证清单-配置项数据 2023-03-13 未同步生产环境
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1635093263477002242', '认证清单-配置项', 'ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4', '认证清单-配置项', 0, 'admin', '2023-03-13 09:39:47', NULL, NULL, NULL, NULL, 1, 0, '1', 1);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1635093344389320705', '1635093263477002242', '配置1', '46c10455e29e4855bb7e5d653b11a51d', '开发环境假数据', 1, 1, 'admin', '2023-03-13 09:40:07', 'admin', '2023-03-13 09:40:46', 1, NULL, NULL, '0', 'pz1');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1635093406049783810', '1635093263477002242', '配置2', '4718f8eef0434d079b970834a2b9dd69', '开发环境假数据', 2, 1, 'admin', '2023-03-13 09:40:21', 'admin', '2023-03-13 09:40:43', 1, NULL, NULL, '0', 'Pz2');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1635093480922304513', '1635093263477002242', '配置3', 'd3dd928d93d74e07ad8fa31bffea9641', '开发环境假数据', 3, 1, 'admin', '2023-03-13 09:40:39', NULL, NULL, 1, NULL, NULL, '0', 'Pz3');
@@ -241,4 +241,11 @@ public class ProjectCertificationInventoryEOController extends JeroController<Pr
public Result<?> expediting(@RequestBody JSONObject json) { public Result<?> expediting(@RequestBody JSONObject json) {
return this.projectCertificationInventoryEOService.expediting(json); return this.projectCertificationInventoryEOService.expediting(json);
} }
@AutoLog(value = "项目库-认证清单表-批量修改配置项")
@ApiOperation(value="项目库-认证清单表-批量修改配置项", notes="项目库-认证清单表-批量修改配置项")
@PostMapping(value = "/updateConfigItemBatch")
public Result<?> updateConfigItemBatch(@RequestBody JSONObject json) {
return this.projectCertificationInventoryEOService.updateConfigItemBatch(json);
}
} }
@@ -75,6 +75,7 @@ public class ProjectCertificationInventoryEO implements Serializable {
/**配置项*/ /**配置项*/
@Excel(name = "配置项", width = 15) @Excel(name = "配置项", width = 15)
@ApiModelProperty(value = "配置项") @ApiModelProperty(value = "配置项")
@Dict(dicCode = "ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4")
private java.lang.String configItem; private java.lang.String configItem;
/**WVTA ID*/ /**WVTA ID*/
@@ -160,4 +160,11 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
Map<String,Object> getCertificationInventoryLinkHrefFeishu(String projectLibraryId,String PRN_CN,String PRN_EN); Map<String,Object> getCertificationInventoryLinkHrefFeishu(String projectLibraryId,String PRN_CN,String PRN_EN);
Map<String,Object> getStandNameAndItemName(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList); Map<String,Object> getStandNameAndItemName(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
/**
* 批量修改配置项
* @param json
* @return
*/
Result<?> updateConfigItemBatch(JSONObject json);
} }
@@ -1746,4 +1746,26 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
return result; return result;
} }
@Override
public Result<?> updateConfigItemBatch(JSONObject json) {
String ids = json.getString("ids");
if(StringUtils.isEmpty(ids)){
throw new JeroBootException("至少选择一条数据进行操作!");
}
String configItem = json.getString("configItem");
if(StringUtils.isEmpty(ids)){
throw new JeroBootException("请选择一个配置!");
}
QueryWrapper<ProjectCertificationInventoryEO> queryWrap = new QueryWrapper<>();
queryWrap.lambda().in(ProjectCertificationInventoryEO::getId,ids.split(","));
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.list(queryWrap);
projectCertificationInventoryEOList.forEach(certificationInventoryEO -> {
certificationInventoryEO.setConfigItem(configItem);
});
this.updateBatchById(projectCertificationInventoryEOList);
return Result.OK("修改配置成功!");
}
} }