Merge branch 'master' of http://47.115.223.229:8888/yangjun/nursing_unit_java
This commit is contained in:
commit
452465c75b
|
|
@ -142,6 +142,8 @@ public interface CommonAPI {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<DictModel> translateDictFromTableByKeys(String table, String text, String code, String keys, String dataSource);
|
List<DictModel> translateDictFromTableByKeys(String table, String text, String code, String keys, String dataSource);
|
||||||
|
|
||||||
|
String translateDictText(String code, String trim);
|
||||||
//update-end---author:chenrui ---date:20231221 for:[issues/#5643]解决分布式下表字典跨库无法查询问题------------
|
//update-end---author:chenrui ---date:20231221 for:[issues/#5643]解决分布式下表字典跨库无法查询问题------------
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -172,4 +172,15 @@ public class DictUtils {
|
||||||
return textValue.toString();
|
return textValue.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取字典的值
|
||||||
|
* @param code 字典编码
|
||||||
|
* @param text 字典的文本
|
||||||
|
* @return 字典的值
|
||||||
|
*/
|
||||||
|
public String translateDictText(String code, String text) {
|
||||||
|
return this.commonAPI.translateDictText(code, text.trim());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
import com.nu.dto.SuppliersInfoMQDto;
|
import com.nu.dto.SuppliersInfoMQDto;
|
||||||
import com.nu.modules.configSuppliersInfo.entity.ConfigSuppliersInfo;
|
import com.nu.modules.configSuppliersInfo.entity.ConfigSuppliersInfo;
|
||||||
import com.nu.modules.configSuppliersInfo.service.IConfigSuppliersInfoService;
|
import com.nu.modules.configSuppliersInfo.service.IConfigSuppliersInfoService;
|
||||||
|
import com.nu.utils.DictUtils;
|
||||||
import com.nu.utils.RabbitMQUtil;
|
import com.nu.utils.RabbitMQUtil;
|
||||||
import io.netty.util.internal.StringUtil;
|
import io.netty.util.internal.StringUtil;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
|
@ -66,6 +67,8 @@ public class NuConfigSuppliersApplyController extends JeecgController<NuConfigSu
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RabbitMQUtil rabbitMQUtil;
|
private RabbitMQUtil rabbitMQUtil;
|
||||||
|
@Autowired
|
||||||
|
private DictUtils dictUtils;
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
|
|
@ -241,6 +244,8 @@ public class NuConfigSuppliersApplyController extends JeecgController<NuConfigSu
|
||||||
String orgCode = nuConfigSuppliersApplyService.audit(nuConfigSuppliersApply);
|
String orgCode = nuConfigSuppliersApplyService.audit(nuConfigSuppliersApply);
|
||||||
SuppliersInfoMQDto suppliersInfoMQDto = new SuppliersInfoMQDto();
|
SuppliersInfoMQDto suppliersInfoMQDto = new SuppliersInfoMQDto();
|
||||||
BeanUtils.copyProperties(nuConfigSuppliersApply, suppliersInfoMQDto);
|
BeanUtils.copyProperties(nuConfigSuppliersApply, suppliersInfoMQDto);
|
||||||
|
String text = dictUtils.translateDictText("suppliers_nature",nuConfigSuppliersApply.getSuppliersNature());
|
||||||
|
suppliersInfoMQDto.setSuppliersNature(text);
|
||||||
suppliersInfoMQDto.setSysOrgCode(orgCode);
|
suppliersInfoMQDto.setSysOrgCode(orgCode);
|
||||||
rabbitMQUtil.sendToExchange("nu.suppliers.updateAuditResult", "nu.suppliers.updateAuditResult", suppliersInfoMQDto);
|
rabbitMQUtil.sendToExchange("nu.suppliers.updateAuditResult", "nu.suppliers.updateAuditResult", suppliersInfoMQDto);
|
||||||
return Result.OK("审核成功!");
|
return Result.OK("审核成功!");
|
||||||
|
|
|
||||||
|
|
@ -216,4 +216,6 @@ public interface SysDictMapper extends BaseMapper<SysDict> {
|
||||||
int removeLogicDeleted(@Param("ids")List<String> ids);
|
int removeLogicDeleted(@Param("ids")List<String> ids);
|
||||||
|
|
||||||
int existColumn(@Param("tableName") String tableName, @Param("columnName") String columnName);
|
int existColumn(@Param("tableName") String tableName, @Param("columnName") String columnName);
|
||||||
|
|
||||||
|
String translateDictText(@Param("code") String code, @Param("text") String text);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -266,4 +266,11 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<!-- 通过字典code获取字典数据 -->
|
||||||
|
<select id="translateDictText" parameterType="String" resultType="String">
|
||||||
|
select s.item_value
|
||||||
|
from sys_dict_item s
|
||||||
|
where s.dict_id = (select id from sys_dict where dict_code = #{code})
|
||||||
|
and s.item_text = #{text}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -301,4 +301,5 @@ public interface ISysDictService extends IService<SysDict> {
|
||||||
*/
|
*/
|
||||||
boolean removeLogicDeleted(List<String> ids);
|
boolean removeLogicDeleted(List<String> ids);
|
||||||
|
|
||||||
|
String translateDictText(String code, String text);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1553,6 +1553,11 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||||
public List<DictModel> translateDictFromTableByKeys(String table, String text, String code, String keys, String dataSource) {
|
public List<DictModel> translateDictFromTableByKeys(String table, String text, String code, String keys, String dataSource) {
|
||||||
return sysDictService.queryTableDictTextByKeys(table, text, code, Arrays.asList(keys.split(",")), dataSource);
|
return sysDictService.queryTableDictTextByKeys(table, text, code, Arrays.asList(keys.split(",")), dataSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String translateDictText(String code, String text) {
|
||||||
|
return sysDictService.translateDictText(code, text);
|
||||||
|
}
|
||||||
//update-end---author:chenrui ---date:20231221 for:[issues/#5643]解决分布式下表字典跨库无法查询问题------------
|
//update-end---author:chenrui ---date:20231221 for:[issues/#5643]解决分布式下表字典跨库无法查询问题------------
|
||||||
|
|
||||||
//-------------------------------------流程节点发送模板消息-----------------------------------------------
|
//-------------------------------------流程节点发送模板消息-----------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package org.jeecg.modules.system.service.impl;
|
||||||
import cn.hutool.core.util.RandomUtil;
|
import cn.hutool.core.util.RandomUtil;
|
||||||
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
@ -897,6 +898,12 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
||||||
return line > 0;
|
return line > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String translateDictText(String code, String text) {
|
||||||
|
String rettext = baseMapper.translateDictText(code, text);
|
||||||
|
return rettext;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加字典
|
* 添加字典
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue