Browse Source

fit: 新增12337处理结果映射

master
wxc 6 months ago
parent
commit
9323dc33df
  1. 3
      src/main/java/com/biutag/supervision/controller/system/DictController.java
  2. 7
      src/main/java/com/biutag/supervision/controller/system/HandleResultMapingController.java
  3. 6
      src/main/java/com/biutag/supervision/pojo/entity/SupDictHandleResultMaping.java
  4. 2
      src/main/java/com/biutag/supervision/pojo/param/DepartMapingQueryParam.java

3
src/main/java/com/biutag/supervision/controller/system/DictController.java

@ -32,9 +32,10 @@ public class DictController {
private final SupDictProblemSourceService dictProblemSourceService;
@GetMapping
public Result<Page<SupDictType>> page(Page<SupDictType> page, String dictName) {
public Result<Page<SupDictType>> page(Page<SupDictType> page, String dictName, String dictType) {
LambdaQueryWrapper<SupDictType> queryWrapper = new LambdaQueryWrapper<SupDictType>()
.like(StrUtil.isNotBlank(dictName), SupDictType::getDictName, dictName)
.like(StrUtil.isNotBlank(dictType), SupDictType::getDictType, dictType)
.orderByDesc(SupDictType::getUpdateTime);
return Result.success(dictTypeService.page(page, queryWrapper));
}

7
src/main/java/com/biutag/supervision/controller/system/HandleResultMapingController.java

@ -26,7 +26,9 @@ public class HandleResultMapingController {
@GetMapping
public Result<Page<SupDictHandleResultMaping>> list(DepartMapingQueryParam param) {
LambdaQueryWrapper<SupDictHandleResultMaping> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.like(StrUtil.isNotBlank(param.getExternalName()), SupDictHandleResultMaping::getExternalName, param.getExternalName())
queryWrapper
.eq(SupDictHandleResultMaping::getSource, param.getSource())
.like(StrUtil.isNotBlank(param.getExternalName()), SupDictHandleResultMaping::getExternalName, param.getExternalName())
.eq(StrUtil.isNotBlank(param.getInternalId()), SupDictHandleResultMaping::getInternalId, param.getInternalId())
.orderByDesc(SupDictHandleResultMaping::getCreateTime);
return Result.success(handleResultMapingService.page(Page.of(param.getCurrent(), param.getSize()), queryWrapper));
@ -49,8 +51,9 @@ public class HandleResultMapingController {
public Result<Void> update(@RequestBody SupDictHandleResultMaping data) {
if (handleResultMapingService.exists(new LambdaQueryWrapper<SupDictHandleResultMaping>()
.eq(SupDictHandleResultMaping::getExternalName, data.getExternalName())
.eq(SupDictHandleResultMaping::getSource, data.getSource())
.ne(SupDictHandleResultMaping::getId, data.getId()))) {
throw new RuntimeException(String.format("单位编码【%s】已存在", data.getExternalName()));
throw new RuntimeException(String.format("处理结果【%s】已存在", data.getExternalName()));
}
data.setUpdateTime(LocalDateTime.now());
handleResultMapingService.updateById(data);

6
src/main/java/com/biutag/supervision/pojo/entity/SupDictHandleResultMaping.java

@ -21,6 +21,9 @@ public class SupDictHandleResultMaping {
@TableField("external_name")
private String externalName;
// 处理结论形态
private String externalType;
//
@TableField("internal_name")
private String internalName;
@ -38,4 +41,7 @@ public class SupDictHandleResultMaping {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime updateTime;
// 来源
private String source;
}

2
src/main/java/com/biutag/supervision/pojo/param/DepartMapingQueryParam.java

@ -21,4 +21,6 @@ public class DepartMapingQueryParam extends BasePage {
// 是否已映射
private String activeMaping;
private String source;
}

Loading…
Cancel
Save