This commit is contained in:
2026-01-11 09:57:59 +08:00
7 changed files with 157 additions and 64 deletions

View File

@@ -663,7 +663,7 @@ public class TaskServiceImpl implements ITaskService {
String currentNodeTagId = "";
for (SpdmTaskVo spdmTaskVo : allTaskList) {
try {
currentNodeTagId = getTagProperty(spdmTaskVo, realTaskNodeTag.getValue().replace("T", "t"));
currentNodeTagId = getTagProperty(spdmTaskVo, realTaskNodeTag.getValue());
if (StringUtils.isNotBlank(currentNodeTagId) && currentNodeTagId.contains(realTaskNodeTag.getKey())) {
taskList.add(spdmTaskVo);
}
@@ -683,9 +683,9 @@ public class TaskServiceImpl implements ITaskService {
List<String> taskIdList = taskList.stream().map(SpdmTaskVo::getUuid).toList();
List<SpdmTaskMemberVo> taskMemberVoList = mapper.getMemberList(taskIdList, null);
List<String> realTaskIdList = taskMemberVoList.stream().map(SpdmTaskMemberVo::getTaskId).distinct().toList();
// List<String> realTaskIdList = taskMemberVoList.stream().map(SpdmTaskMemberVo::getTaskId).distinct().toList();
// 根据负责人信息过滤任务
taskList = taskList.stream().filter(task -> realTaskIdList.contains(task.getUuid())).toList();
// taskList = taskList.stream().filter(task -> realTaskIdList.contains(task.getUuid())).toList();
if (type == 2) {
// 所有任务

View File

@@ -5,6 +5,7 @@ import com.sdm.common.entity.resp.PageDataResp;
import com.sdm.system.model.entity.SysDeptUser;
import com.sdm.system.model.req.dept.DeptOperateReq;
import com.sdm.system.model.req.dept.DeptQueryReq;
import com.sdm.system.model.resp.SysDeptUserResp;
import com.sdm.system.service.ISysDeptUserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
@@ -24,19 +25,25 @@ public class SysDeptController {
@Operation(summary = "新增部门及负责人", description = "新增部门及负责人")
@PostMapping("/addDept")
public SdmResponse addDept(@RequestBody DeptOperateReq deptAddReq) {
return deptUserService.addDept(deptAddReq);
public SdmResponse addDept(@RequestBody DeptOperateReq deptOperateReq) {
return deptUserService.addDept(deptOperateReq);
}
@Operation(summary = "新增部门及负责人", description = "新增部门及负责人")
@Operation(summary = "编辑部门及负责人", description = "编辑部门及负责人")
@PostMapping("/editDept")
public SdmResponse editDept(@RequestBody DeptOperateReq deptAddReq) {
return deptUserService.editDept(deptAddReq);
public SdmResponse editDept(@RequestBody DeptOperateReq deptOperateReq) {
return deptUserService.editDept(deptOperateReq);
}
@Operation(summary = "删除部门及负责人", description = "删除部门及负责人")
@PostMapping("/deleteDept")
public SdmResponse deleteDept(@RequestBody DeptOperateReq deptOperateReq) {
return deptUserService.deleteDept(deptOperateReq);
}
@Operation(summary = "查询部门列表", description = "查询部门列表")
@GetMapping("/listDept")
public SdmResponse<PageDataResp<List<SysDeptUser>>> listDept(@ParameterObject DeptQueryReq req) {
public SdmResponse<PageDataResp<List<SysDeptUserResp>>> listDept(@ParameterObject DeptQueryReq req) {
return deptUserService.listDept(req);
}

View File

@@ -14,29 +14,29 @@ public interface SimulationSystemMapper {
@Insert("INSERT INTO simulation_data_dictionary(uuid,dictName,dictValue,dictOrder,valueType,aliasName,dictClass,classType,comment,tenantId,creator) VALUES (#{dict.uuid},#{dict.dictName},#{dict.dictValue},#{dict.dictOrder},#{dict.valueType},#{dict.aliasName},#{dict.dictClass},#{dict.classType},#{dict.comment},#{dict.tenantId},#{dict.creator})")
int addDataDictionary(@Param("dict") DataDictionary dict);
@Select("SELECT * FROM simulation_data_dictionary WHERE dictClass=#{dictClass} AND tenantId=#{tenantId} ORDER BY dictOrder ASC")
List<DataDictionary> queryDictionaryClassData(@Param("dictClass")String dictClass,@Param("tenantId") long tenantId);
@Select("SELECT * FROM simulation_data_dictionary WHERE dictClass=#{dictClass} ORDER BY dictOrder ASC")
List<DataDictionary> queryDictionaryClassData(@Param("dictClass")String dictClass);
@Select("SELECT * FROM simulation_data_dictionary WHERE tenantId=#{tenantId}")
List<DataDictionary> getAllDictionaryData(@Param("tenantId") long tenantId);
@Select("SELECT * FROM simulation_data_dictionary")
List<DataDictionary> getAllDictionaryData();
@Select("SELECT * FROM simulation_data_dictionary WHERE tenantId = #{tenantId} AND dictName like CONCAT('%',#{dictName},'%')")
List<DataDictionary> queryDictionaryClassByDictName(@Param("dictName") String dictName, @Param("tenantId") long tenantId);
@Select("SELECT * FROM simulation_data_dictionary WHERE dictName like CONCAT('%',#{dictName},'%')")
List<DataDictionary> queryDictionaryClassByDictName(@Param("dictName") String dictName);
@Delete("DELETE FROM simulation_data_dictionary WHERE dictClass=#{dictClass} AND tenantId=#{tenantId}")
int deleteDictionaryClassItems(@Param("dictClass")String dictClass,@Param("tenantId") long tenantId);
@Delete("DELETE FROM simulation_data_dictionary WHERE dictClass=#{dictClass}")
int deleteDictionaryClassItems(@Param("dictClass")String dictClass);
@Select("SELECT * FROM simulation_data_dictionary WHERE dictName=#{dictName} AND dictClass=#{dictClass} AND tenantId=#{tenantId} LIMIT 1")
DataDictionary queryDataDictionary(@Param("dictName")String dictName,@Param("dictClass")String dictClass,@Param("tenantId")long tenantId);
@Select("SELECT * FROM simulation_data_dictionary WHERE dictName=#{dictName} AND dictClass=#{dictClass} LIMIT 1")
DataDictionary queryDataDictionary(@Param("dictName")String dictName,@Param("dictClass")String dictClass);
@Select("SELECT * FROM simulation_data_dictionary WHERE classType=#{classType} AND dictValue=#{dictValue} AND tenantId=#{tenantId} LIMIT 1")
DataDictionary queryDataDictionaryByDictTypeAndDictName(@Param("classType")String classType,@Param("dictValue")String dictValue,@Param("tenantId")long tenantId);
@Select("SELECT * FROM simulation_data_dictionary WHERE classType=#{classType} AND dictValue=#{dictValue} LIMIT 1")
DataDictionary queryDataDictionaryByDictTypeAndDictName(@Param("classType")String classType,@Param("dictValue")String dictValue);
@Select("SELECT * FROM simulation_data_dictionary WHERE uuid=#{uuid}")
DataDictionary queryDictionaryDataDetail(@Param("uuid")String uuid);
@Select("SELECT DISTINCT (dictClass) FROM simulation_data_dictionary WHERE tenantId=#{tenantId}")
List<String> queryDictionaryClass(long tenantId);
@Select("SELECT DISTINCT (dictClass) FROM simulation_data_dictionary")
List<String> queryDictionaryClass();
@Delete("DELETE FROM simulation_data_dictionary WHERE uuid=#{uuid}")
int deleteDictionary(@Param("uuid") String uuid);
@@ -50,14 +50,14 @@ public interface SimulationSystemMapper {
@Delete("DELETE FROM simulation_dictionary_class WHERE uuid=#{uuid}")
int deleteDictionaryClass(@Param("uuid")String uuid);
@Select("SELECT * FROM simulation_dictionary_class WHERE ${condition} AND tenantId=#{tenantId} ORDER BY createTime DESC LIMIT ${pos},${size}")
List<DictionaryClass> queryAllDictionaryClass(@Param("condition")String condition,@Param("pos") int pos,@Param("size") int size,@Param("tenantId")long tenantId);
@Select("SELECT * FROM simulation_dictionary_class WHERE ${condition} ORDER BY createTime DESC LIMIT ${pos},${size}")
List<DictionaryClass> queryAllDictionaryClass(@Param("condition")String condition,@Param("pos") int pos,@Param("size") int size);
@Select("SELECT COUNT(*) FROM simulation_dictionary_class WHERE ${condition} AND tenantId=#{tenantId}")
int queryDictionaryClassTotal(@Param("condition")String condition, @Param("tenantId") long tenantId);
@Select("SELECT COUNT(*) FROM simulation_dictionary_class WHERE ${condition}")
int queryDictionaryClassTotal(@Param("condition")String condition);
@Select("SELECT * FROM simulation_dictionary_class WHERE className=#{className} AND tenantId=#{tenantId}")
DictionaryClass queryDictionaryClassByName(@Param("className")String className, @Param("tenantId") long tenantId);
@Select("SELECT * FROM simulation_dictionary_class WHERE className=#{className}")
DictionaryClass queryDictionaryClassByName(@Param("className")String className);
@Update("UPDATE simulation_dictionary_class SET comment=#{dictClass.comment},titleName=#{dictClass.titleName} ,classType=#{dictClass.classType}WHERE uuid=#{dictClass.uuid}")
int updateDictinaryClass(@Param("dictClass") DictionaryClass dictClass);
@@ -68,8 +68,8 @@ public interface SimulationSystemMapper {
@Insert("INSERT INTO system_form_configure(formName,formConfig,comment,tenantId,creator) VALUES (#{config.formName},#{config.formConfig},#{config.comment},#{config.tenantId}#{config.creator})")
int addFormConfigure(@Param("config") FormConfigure config);
@Select("SELECT * FROM system_form_configure WHERE formName=#{formName} AND tenantId=#{tenantId}")
FormConfigure queryFormConfigure(@Param("formName")String formName,@Param("tenantId")long tenantId);
@Select("SELECT * FROM system_form_configure WHERE formName=#{formName}")
FormConfigure queryFormConfigure(@Param("formName")String formName);
@Insert("UPDATE system_form_configure SET formConfig=#{config.formConfig},comment=#{config.comment} WHERE formName=#{config.formName}")
int updateFormConfigure(@Param("config") FormConfigure config);

View File

@@ -0,0 +1,40 @@
package com.sdm.system.model.resp;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sdm.common.entity.resp.system.CIDUserResp;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@Data
public class SysDeptUserResp {
@Schema(description = "主键ID")
private Integer id;
@Schema(description = "部门ID")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long deptId;
@Schema(description = "部门名称")
private String deptName;
@Schema(description = "部门负责人用户ID")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long userId;
private CIDUserResp userResp;
@Schema(description = "所属租户ID")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long tenantId;
@Schema(description = "创建人")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long creator;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
}

View File

@@ -6,15 +6,18 @@ import com.sdm.common.entity.resp.PageDataResp;
import com.sdm.system.model.entity.SysDeptUser;
import com.sdm.system.model.req.dept.DeptOperateReq;
import com.sdm.system.model.req.dept.DeptQueryReq;
import com.sdm.system.model.resp.SysDeptUserResp;
import java.util.List;
public interface ISysDeptUserService extends IService<SysDeptUser> {
SdmResponse addDept(DeptOperateReq deptAddReq);
SdmResponse addDept(DeptOperateReq deptOperateReq);
SdmResponse editDept(DeptOperateReq deptAddReq);
SdmResponse editDept(DeptOperateReq deptOperateReq);
SdmResponse<PageDataResp<List<SysDeptUser>>> listDept(DeptQueryReq req);
SdmResponse deleteDept(DeptOperateReq deptOperateReq);
SdmResponse<PageDataResp<List<SysDeptUserResp>>> listDept(DeptQueryReq req);
}

View File

@@ -1,27 +1,38 @@
package com.sdm.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.sdm.common.common.SdmResponse;
import com.sdm.common.common.ThreadLocalContext;
import com.sdm.common.entity.req.system.UserQueryReq;
import com.sdm.common.entity.resp.PageDataResp;
import com.sdm.common.entity.resp.system.CIDUserResp;
import com.sdm.common.feign.impl.system.SysUserFeignClientImpl;
import com.sdm.common.utils.CidSysUserUtil;
import com.sdm.common.utils.PageUtils;
import com.sdm.system.dao.SysDeptUserMapper;
import com.sdm.system.model.entity.SysDeptUser;
import com.sdm.system.model.req.dept.DeptOperateReq;
import com.sdm.system.model.req.dept.DeptQueryReq;
import com.sdm.system.model.resp.SysDeptUserResp;
import com.sdm.system.service.ISysDeptUserService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.*;
@Service
public class ISysDeptUserServiceImpl extends ServiceImpl<SysDeptUserMapper, SysDeptUser> implements ISysDeptUserService {
@Autowired
SysUserFeignClientImpl sysUserFeignClient;
@Override
public SdmResponse addDept(DeptOperateReq deptAddReq) {
SysDeptUser deptUser = new SysDeptUser();
@@ -50,14 +61,60 @@ public class ISysDeptUserServiceImpl extends ServiceImpl<SysDeptUserMapper, SysD
}
@Override
public SdmResponse<PageDataResp<List<SysDeptUser>>> listDept(DeptQueryReq req) {
public SdmResponse deleteDept(DeptOperateReq deptDeleteReq) {
SysDeptUser deptUser = this.getById(deptDeleteReq.getId());
if (deptUser == null) {
return SdmResponse.failed("部门不存在");
}
this.removeById(deptDeleteReq.getId());
return SdmResponse.success();
}
@Override
public SdmResponse<PageDataResp<List<SysDeptUserResp>>> listDept(DeptQueryReq req) {
PageHelper.startPage(req.getCurrent(), req.getSize());
LambdaQueryWrapper<SysDeptUser> queryWrapper = new LambdaQueryWrapper<>();
if (StringUtils.isNotEmpty(req.getDeptName())) {
queryWrapper.like(SysDeptUser::getDeptName, req.getDeptName());
}
List<SysDeptUser> sysDeptUsers = this.list(queryWrapper);
if (CollectionUtils.isEmpty(sysDeptUsers)) {
return SdmResponse.success(new PageDataResp<>());
}
PageInfo<SysDeptUser> page = new PageInfo<>(sysDeptUsers);
return PageUtils.getJsonObjectSdmResponse(sysDeptUsers, page);
long total = page.getTotal();
List<SysDeptUserResp> sysDeptUserRespList = sysDeptUsers.stream().map(i -> {
SysDeptUserResp sysDeptUserResp = new SysDeptUserResp();
BeanUtils.copyProperties(i, sysDeptUserResp);
return sysDeptUserResp;
}).toList();
setUserResp(sysDeptUserRespList);
PageInfo<SysDeptUserResp> page1 = new PageInfo<>(sysDeptUserRespList);
page1.setTotal(total);
return PageUtils.getJsonObjectSdmResponse(sysDeptUserRespList, page1);
}
private void setUserResp(List<SysDeptUserResp> list) {
// 提取去重的 userId
List<Long> userIds = list.stream()
.map(SysDeptUserResp::getUserId)
.filter(Objects::nonNull)
.distinct()
.toList();
// 远程查询用户信息
SdmResponse<List<CIDUserResp>> userListSdmRsp = sysUserFeignClient.listUserByIds(
UserQueryReq.builder().userIds(userIds).build()
);
// 批量设置 creatorName
if (userListSdmRsp.isSuccess() && org.apache.commons.collections4.CollectionUtils.isNotEmpty(userListSdmRsp.getData())) {
Map<Long, CIDUserResp> cidUserMap = CidSysUserUtil.getCidUserToMap(userListSdmRsp.getData());
list.forEach(sysDeptUserResp -> {
CIDUserResp cidUser = cidUserMap.get(sysDeptUserResp.getUserId());
sysDeptUserResp.setUserResp(cidUser);
});
}
}
}

View File

@@ -46,19 +46,17 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
*/
public SdmResponse addDataDictionary(DataDictionary dict) {
SdmResponse response = SdmResponse.success();
long tenantId = ThreadLocalContext.getTenantId();
DataDictionary dictionary = mapper.queryDataDictionary(dict.dictName, dict.dictClass, tenantId);
DataDictionary dictionary = mapper.queryDataDictionary(dict.dictName, dict.dictClass);
if (dictionary != null) {
response = SdmResponse.failed("数据字典信息已存在");
}
if (ObjectUtils.isNotEmpty(dict.classType)) {
DataDictionary dataDictionary = mapper.queryDataDictionaryByDictTypeAndDictName(dict.classType, dict.dictValue, tenantId);
DataDictionary dataDictionary = mapper.queryDataDictionaryByDictTypeAndDictName(dict.classType, dict.dictValue);
if (dataDictionary != null) {
response = SdmResponse.failed("数据字典:"+dataDictionary.dictClass+"-"+dataDictionary.aliasName+"已存在,请重新命名数据字典值");
}
}
dict.tenantId = ThreadLocalContext.getTenantId();
dict.creator = ThreadLocalContext.getUserId();
dict.uuid = generateDictionaryUuid();
if (mapper.addDataDictionary(dict) <= 0) {
@@ -75,8 +73,7 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
public SdmResponse queryDataDictioaryClasses()
{
SdmResponse response = SdmResponse.success();
long tenantId = ThreadLocalContext.getTenantId();
List<String> dictClasses = mapper.queryDictionaryClass(tenantId);
List<String> dictClasses = mapper.queryDictionaryClass();
response.setData(dictClasses);
return response;
}
@@ -104,8 +101,7 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
public SdmResponse deleteDataDictionaryClass(String className)
{
SdmResponse response = SdmResponse.success();
long tenantId = ThreadLocalContext.getTenantId();
if(mapper.deleteDictionaryClassItems(className,tenantId) <= 0)
if(mapper.deleteDictionaryClassItems(className) <= 0)
{
response = SdmResponse.failed("删除数据字典分类下所有字典信息失败");
}
@@ -119,8 +115,7 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
*/
public SdmResponse<List<DataDictionary>> queryDictionaryData(String className)
{
long tenantId = ThreadLocalContext.getTenantId();
List<DataDictionary> dictionaries = mapper.queryDictionaryClassData(className,tenantId);
List<DataDictionary> dictionaries = mapper.queryDictionaryClassData(className);
return SdmResponse.success(dictionaries);
}
@@ -129,8 +124,7 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
* @return
*/
public SdmResponse<Map<String, List<SimuDictionaryResp>> > getAllDictionaryData() {
long tenantId = ThreadLocalContext.getTenantId();
List<DataDictionary> dictionaries = mapper.getAllDictionaryData(tenantId);
List<DataDictionary> dictionaries = mapper.getAllDictionaryData();
List<SimuDictionaryResp> newDictionaries = dictionaries.stream().filter(i -> StringUtils.isNotBlank(i.dictClass)).map(i -> new SimuDictionaryResp(i.dictValue, i.dictClass, i.dictName)).collect(Collectors.toList());
Map<String, List<SimuDictionaryResp>> dictionMap = newDictionaries.stream().collect(Collectors.groupingBy(SimuDictionaryResp::getDictClass));
return SdmResponse.success(dictionMap);
@@ -146,8 +140,7 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
SdmResponse response = SdmResponse.success();
if (ObjectUtils.isNotEmpty(dict.classType)) {
long tenantId = ThreadLocalContext.getTenantId();
DataDictionary dictionary = mapper.queryDataDictionaryByDictTypeAndDictName(dict.classType, dict.dictName, tenantId);
DataDictionary dictionary = mapper.queryDataDictionaryByDictTypeAndDictName(dict.classType, dict.dictName);
if(dictionary != null){
response = SdmResponse.failed("数据字典:"+dictionary.dictClass+"-"+dictionary.aliasName+"已存在,请重新命名数据字典值");
}
@@ -168,11 +161,9 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
{
SdmResponse response = SdmResponse.success();
dictionaryCla.uuid = generateDictionaryUuid();
long tenantId = ThreadLocalContext.getTenantId();
long creator = ThreadLocalContext.getUserId();
dictionaryCla.tenantId = tenantId;
dictionaryCla.creator = creator;
if(mapper.queryDictionaryClassByName(dictionaryCla.className,tenantId) != null)
if(mapper.queryDictionaryClassByName(dictionaryCla.className) != null)
{
response = SdmResponse.failed("数据字典分类已存在");
}
@@ -189,7 +180,6 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
*/
public SdmResponse queryDictionaryDefineClass(String titleName,String className,String dictName,String dictValue,int pageNo,int size)
{
long tenantId = ThreadLocalContext.getTenantId();
SdmResponse response = SdmResponse.success();
String condition = " 1";
if(bStringNotBlank(titleName))
@@ -202,7 +192,7 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
}
if(bStringNotBlank(dictName) || bStringNotBlank(dictValue))
{
List<DataDictionary> allDictionaryData = mapper.getAllDictionaryData(tenantId);
List<DataDictionary> allDictionaryData = mapper.getAllDictionaryData();
if (bStringNotBlank(dictName)) {
allDictionaryData = allDictionaryData.stream().filter(i -> i.getDictName().contains(dictName)).collect(Collectors.toList());
}
@@ -214,9 +204,9 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
condition += " AND className IN ('" + dictClass + "')";
}
}
int count = mapper.queryDictionaryClassTotal(condition,tenantId);
int count = mapper.queryDictionaryClassTotal(condition);
int pos = (pageNo-1)*size;
List<DictionaryClass> classes = mapper.queryAllDictionaryClass(condition,pos,size,tenantId);
List<DictionaryClass> classes = mapper.queryAllDictionaryClass(condition,pos,size);
DataPageInfo pageInfo = new DataPageInfo();
pageInfo.total = count;
@@ -300,12 +290,11 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
@Transactional(rollbackFor = Exception.class)
public SdmResponse addSystemFormConfigure(FormConfigure configure) {
SdmResponse response = SdmResponse.success();
if (CollectionUtils.isNotEmpty(formConfigureService.lambdaQuery().eq(SysFormConfigure::getFormName, configure.formName).eq(SysFormConfigure::getTenantId, ThreadLocalContext.getTenantId()).list())) {
if (CollectionUtils.isNotEmpty(formConfigureService.lambdaQuery().eq(SysFormConfigure::getFormName, configure.formName).list())) {
response = SdmResponse.failed("该表单配置已存在");
} else {
SysFormConfigure sysFormConfigure = new SysFormConfigure();
BeanUtils.copyProperties(configure, sysFormConfigure);
sysFormConfigure.setTenantId(ThreadLocalContext.getTenantId());
sysFormConfigure.setCreator(ThreadLocalContext.getUserId());
if (!formConfigureService.save(sysFormConfigure)) {
response = SdmResponse.failed("添加表单配置失败");
@@ -324,7 +313,6 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
if (CollectionUtils.isNotEmpty(formConfigureService.lambdaQuery().eq(SysFormConfigure::getFormName, configure.formName).list())) {
LambdaUpdateWrapper<SysFormConfigure> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(SysFormConfigure::getFormName, configure.getFormName());
updateWrapper.eq(SysFormConfigure::getTenantId, ThreadLocalContext.getTenantId());
if (configure.getFormConfig() != null) {
updateWrapper.set(SysFormConfigure::getFormConfig, configure.getFormConfig());
}
@@ -358,8 +346,7 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
public SdmResponse queryFormConfigure(String formName)
{
SdmResponse response = SdmResponse.success();
long tenantId = ThreadLocalContext.getTenantId();
FormConfigure formConfigure = mapper.queryFormConfigure(formName,tenantId);
FormConfigure formConfigure = mapper.queryFormConfigure(formName);
if(formConfigure == null)
{
response = SdmResponse.failed("表单不存在");
@@ -378,7 +365,6 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
queryWrapper.like(SysFormConfigure::getFormName, req.formName);
}
queryWrapper.orderByDesc(SysFormConfigure::getCreateTime);
queryWrapper.eq(SysFormConfigure::getTenantId, ThreadLocalContext.getTenantId());
List<SysFormConfigure> list = formConfigureService.list(queryWrapper);
if (CollectionUtils.isEmpty(list)) {
return SdmResponse.success();