业务端服务指令功能调整:
1)去除标准指令库、差异比对、差异指令功能 2)去除所有标准指令库概念先关操作及代码逻辑 3)任一机构均可创建任意分类标签、服务类别、服务类型、服务指令以及编辑任意字段 4)新增镜像码管理功能:未生成镜像码机构自动生成镜像码,可更新镜像码,更新后旧的镜像码将失效;可通过复制按钮快速复制镜像码 5)新增服务指令库功能:需要先输入周正确的镜像码后,可查看对应机构所有服务指令,并可“镜像”到本机构中,如果分类标签、服务类别、服务类型、服务名称汉字完全一致,则认定为同一服务指令,不会重复镜像
This commit is contained in:
parent
2bf72376f6
commit
6f29c9b830
|
|
@ -42,9 +42,15 @@
|
||||||
material.lower_limit AS "materialInfo.lowerLimit",
|
material.lower_limit AS "materialInfo.lowerLimit",
|
||||||
material.tag_type AS "materialInfo.tagType",
|
material.tag_type AS "materialInfo.tagType",
|
||||||
material.iz_ybbx AS "materialInfo.izYbbx",
|
material.iz_ybbx AS "materialInfo.izYbbx",
|
||||||
material.iz_jgyh AS "materialInfo.izJgyh"
|
material.iz_jgyh AS "materialInfo.izJgyh",
|
||||||
|
maca.category_name as "materialInfo.categoryName",
|
||||||
|
maty.type_name as "materialInfo.typeName",
|
||||||
|
mame.medication_name as "materialInfo.medicationName"
|
||||||
from nu_invoicing_thd_gwc thc
|
from nu_invoicing_thd_gwc thc
|
||||||
LEFT JOIN nu_config_material_info material ON thc.wl_id = material.id
|
LEFT JOIN nu_config_material_info material ON thc.wl_id = material.id
|
||||||
|
LEFT JOIN nu_config_material_category maca ON material.category_id = maca.id
|
||||||
|
LEFT JOIN nu_config_material_type maty ON material.type_id = maty.id
|
||||||
|
LEFT JOIN nu_config_material_medication mame on material.medication_id = mame.id
|
||||||
<where>
|
<where>
|
||||||
<if test="pkId != null and pkId != ''">
|
<if test="pkId != null and pkId != ''">
|
||||||
and thc.pk_id = #{pkId}
|
and thc.pk_id = #{pkId}
|
||||||
|
|
|
||||||
|
|
@ -79,12 +79,13 @@ public class InstructionTagController extends JeecgController<InstructionTag, II
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<String> add(@RequestBody InstructionTag instructionTag) {
|
public Result<String> add(@RequestBody InstructionTag instructionTag) {
|
||||||
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||||
instructionTag.setId(deptInfo.getString("code") + IdUtil.simpleUUID());
|
// instructionTag.setId(deptInfo.getString("code") + IdUtil.simpleUUID());
|
||||||
|
instructionTag.setId(instructionTag.getInstructionType());
|
||||||
instructionTag.setSysOrgCode(deptInfo.getString("code"));
|
instructionTag.setSysOrgCode(deptInfo.getString("code"));
|
||||||
instructionTagService.save(instructionTag);
|
instructionTagService.save(instructionTag);
|
||||||
InstructionTagMQDto instructionTagMQDto = new InstructionTagMQDto();
|
// InstructionTagMQDto instructionTagMQDto = new InstructionTagMQDto();
|
||||||
BeanUtils.copyProperties(instructionTag,instructionTagMQDto);
|
// BeanUtils.copyProperties(instructionTag,instructionTagMQDto);
|
||||||
rabbitMQUtil.sendToExchange("hldy.instructionTag.add.fanout", "", instructionTagMQDto);
|
// rabbitMQUtil.sendToExchange("hldy.instructionTag.add.fanout", "", instructionTagMQDto);
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -236,35 +236,35 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
}
|
}
|
||||||
|
|
||||||
//临时切换至管理平台
|
//临时切换至管理平台
|
||||||
DynamicDataSourceContextHolder.push("ope");
|
// DynamicDataSourceContextHolder.push("ope");
|
||||||
List<CanAddDirective> canAddList;
|
// List<CanAddDirective> canAddList;
|
||||||
try {
|
// try {
|
||||||
canAddList = canAddDirectiveService.list();
|
// canAddList = canAddDirectiveService.list();
|
||||||
} finally {
|
// } finally {
|
||||||
//恢复数据源
|
// //恢复数据源
|
||||||
DynamicDataSourceContextHolder.clear();
|
// DynamicDataSourceContextHolder.clear();
|
||||||
}
|
// }
|
||||||
boolean needSetId = true;
|
// boolean needSetId = true;
|
||||||
for (int i = 0; i < canAddList.size(); i++) {
|
// for (int i = 0; i < canAddList.size(); i++) {
|
||||||
CanAddDirective canAddDirective = canAddList.get(i);
|
// CanAddDirective canAddDirective = canAddList.get(i);
|
||||||
if (
|
// if (
|
||||||
canAddDirective.getInstructionTag().equals(configServiceDirective.getInstructionName()) &&
|
// canAddDirective.getInstructionTag().equals(configServiceDirective.getInstructionName()) &&
|
||||||
canAddDirective.getCategory().equals(configServiceDirective.getCategoryName()) &&
|
// canAddDirective.getCategory().equals(configServiceDirective.getCategoryName()) &&
|
||||||
canAddDirective.getType().equals(configServiceDirective.getTypeName()) &&
|
// canAddDirective.getType().equals(configServiceDirective.getTypeName()) &&
|
||||||
canAddDirective.getDirectiveName().equals(configServiceDirective.getDirectiveName()) &&
|
// canAddDirective.getDirectiveName().equals(configServiceDirective.getDirectiveName()) &&
|
||||||
canAddDirective.getCycleType().equals(configServiceDirective.getCycleTypeName())
|
// canAddDirective.getCycleType().equals(configServiceDirective.getCycleTypeName())
|
||||||
) {
|
// ) {
|
||||||
needSetId = false;
|
// needSetId = false;
|
||||||
configServiceDirective.setId(canAddDirective.getDirectiveId());
|
// configServiceDirective.setId(canAddDirective.getDirectiveId());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
//存储机构编码
|
//存储机构编码
|
||||||
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||||
if (needSetId) {
|
// if (needSetId) {
|
||||||
configServiceDirective.setId(deptInfo.getString("code") + IdUtil.simpleUUID());
|
configServiceDirective.setId(deptInfo.getString("code") + IdUtil.simpleUUID());
|
||||||
}
|
// }
|
||||||
configServiceDirective.setSysOrgCode(deptInfo.getString("code"));
|
configServiceDirective.setSysOrgCode(deptInfo.getString("code"));
|
||||||
//设置为“未授权”
|
//设置为“未授权”
|
||||||
configServiceDirective.setStatus("1");
|
configServiceDirective.setStatus("1");
|
||||||
|
|
@ -531,4 +531,20 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
public Result<?> updateSyncCode(@RequestParam("orgCode") String orgCode) {
|
public Result<?> updateSyncCode(@RequestParam("orgCode") String orgCode) {
|
||||||
return Result.OK(configServiceDirectiveService.updateSyncCode(orgCode));
|
return Result.OK(configServiceDirectiveService.updateSyncCode(orgCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据镜像码获取机构编码
|
||||||
|
* 存储在管理平台
|
||||||
|
*
|
||||||
|
* @param syncCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "服务指令-根据镜像码获取机构编码", notes = "服务指令-根据镜像码获取机构编码")
|
||||||
|
@GetMapping(value = "/getOrgCodeBySyncCode")
|
||||||
|
public Result<?> getOrgCodeBySyncCode(@RequestParam(value = "syncCode", required = false) String syncCode) {
|
||||||
|
if (StringUtils.isBlank(syncCode)) {
|
||||||
|
return Result.ok(null);
|
||||||
|
}
|
||||||
|
return Result.OK(configServiceDirectiveService.getOrgCodeBySyncCode(syncCode));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,14 +48,14 @@ public class ConfigServiceDirective implements Serializable {
|
||||||
*/
|
*/
|
||||||
@Excel(name = "服务类型", width = 15)
|
@Excel(name = "服务类型", width = 15)
|
||||||
@ApiModelProperty(value = "服务类型")
|
@ApiModelProperty(value = "服务类型")
|
||||||
@Dict(dicCode = "id", dictTable = "nu_config_service_type", dicText = "type_name")
|
@Dict(dicCode = "id,", dictTable = "nu_config_service_type", dicText = "type_name")
|
||||||
private java.lang.String typeId;
|
private java.lang.String typeId;
|
||||||
/**
|
/**
|
||||||
* 分类标签
|
* 分类标签
|
||||||
*/
|
*/
|
||||||
@Excel(name = "分类标签", width = 15)
|
@Excel(name = "分类标签", width = 15)
|
||||||
@ApiModelProperty(value = "分类标签")
|
@ApiModelProperty(value = "分类标签")
|
||||||
@Dict(dicCode = "id", dictTable = "nu_config_service_instruction_tag", dicText = "instruction_name")
|
@Dict(dicCode = "item_value", dictTable = "view_instruction_tag", dicText = "item_text")
|
||||||
private java.lang.String instructionTagId;
|
private java.lang.String instructionTagId;
|
||||||
/**
|
/**
|
||||||
* 服务指令名称
|
* 服务指令名称
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@
|
||||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||||
#{item.id}
|
#{item.id}
|
||||||
</foreach>
|
</foreach>
|
||||||
<if test="directive.izEnabled != null and directive.izEnabled != ''">
|
<if test="directive !=null and directive.izEnabled != null and directive.izEnabled != ''">
|
||||||
and c.iz_enabled = #{directive.izEnabled}
|
and c.iz_enabled = #{directive.izEnabled}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
|
|
||||||
|
|
@ -74,4 +74,6 @@ public interface IConfigServiceDirectiveService extends IService<ConfigServiceDi
|
||||||
String getSyncCode(String orgCode);
|
String getSyncCode(String orgCode);
|
||||||
|
|
||||||
String updateSyncCode(String orgCode);
|
String updateSyncCode(String orgCode);
|
||||||
|
|
||||||
|
String getOrgCodeBySyncCode(String syncCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.net.URLEncoder;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
@ -668,12 +669,12 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
//如果还没生成生成过 直接生成
|
//如果还没生成生成过 直接生成
|
||||||
if (StringUtils.isBlank(syncCode)) {
|
if (StringUtils.isBlank(syncCode)) {
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
String apiAddress = opeApiAddress + "/api/services/directive/generateDirectiveSyncCode?orgCode=" + orgCode + "&createBy=" + sysUser.getRealname();
|
|
||||||
try {
|
try {
|
||||||
|
String apiAddress = opeApiAddress + "/api/services/directive/generateDirectiveSyncCode?orgCode=" + orgCode + "&createBy=" + URLEncoder.encode(sysUser.getRealname(), "UTF-8");
|
||||||
String res = HttpRequestUtil.doGet(apiAddress, HttpRequestUtil.createDefaultHeaders());
|
String res = HttpRequestUtil.doGet(apiAddress, HttpRequestUtil.createDefaultHeaders());
|
||||||
JSONObject jsonResponse = JSON.parseObject(res);
|
JSONObject jsonResponse = JSON.parseObject(res);
|
||||||
JSONObject r_ = jsonResponse.getJSONObject("result");
|
JSONObject r_ = jsonResponse.getJSONObject("result");
|
||||||
syncCode = r_.getString("orgCode");
|
syncCode = r_.getString("directiveSyncCode");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
@ -692,15 +693,43 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
if (opeApiAddress.endsWith("/")) {
|
if (opeApiAddress.endsWith("/")) {
|
||||||
opeApiAddress = opeApiAddress.substring(0, opeApiAddress.length() - 1);
|
opeApiAddress = opeApiAddress.substring(0, opeApiAddress.length() - 1);
|
||||||
}
|
}
|
||||||
String apiAddress = opeApiAddress + "/api/services/directive/generateDirectiveSyncCode?orgCode=" + orgCode + "&createBy=" + sysUser.getRealname();
|
|
||||||
try {
|
try {
|
||||||
|
String apiAddress = opeApiAddress + "/api/services/directive/generateDirectiveSyncCode?orgCode=" + orgCode + "&createBy=" + URLEncoder.encode(sysUser.getRealname(), "UTF-8");
|
||||||
String res = HttpRequestUtil.doGet(apiAddress, HttpRequestUtil.createDefaultHeaders());
|
String res = HttpRequestUtil.doGet(apiAddress, HttpRequestUtil.createDefaultHeaders());
|
||||||
JSONObject jsonResponse = JSON.parseObject(res);
|
JSONObject jsonResponse = JSON.parseObject(res);
|
||||||
JSONObject r_ = jsonResponse.getJSONObject("result");
|
JSONObject r_ = jsonResponse.getJSONObject("result");
|
||||||
syncCode = r_.getString("orgCode");
|
syncCode = r_.getString("directiveSyncCode");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return syncCode;
|
return syncCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getOrgCodeBySyncCode(String syncCode) {
|
||||||
|
String orgCode = "";
|
||||||
|
|
||||||
|
JSONObject opeOpenUrl = sysConfigApi.getByKeyByDS("master", "ope_open_url");
|
||||||
|
String opeApiAddress = opeOpenUrl.getString("configValue");
|
||||||
|
if (opeApiAddress.endsWith("/")) {
|
||||||
|
opeApiAddress = opeApiAddress.substring(0, opeApiAddress.length() - 1);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
String apiAddress = opeApiAddress + "/api/services/directive/getOrgCodeBySyncCode?syncCode=" + URLEncoder.encode(syncCode.replaceAll("\\*",""), "UTF-8");
|
||||||
|
String res = HttpRequestUtil.doGet(apiAddress, HttpRequestUtil.createDefaultHeaders());
|
||||||
|
JSONObject jsonResponse = JSON.parseObject(res);
|
||||||
|
JSONObject r_ = jsonResponse.getJSONObject("result");
|
||||||
|
orgCode = r_.getString("orgCode");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||||
|
Map<String, String> result = Maps.newHashMap();
|
||||||
|
if(StringUtils.isNotBlank(orgCode) && orgCode.equals(deptInfo.getString("code"))){
|
||||||
|
return "-1";
|
||||||
|
}
|
||||||
|
|
||||||
|
return orgCode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -690,10 +690,10 @@ public class DirectiveMQListener {
|
||||||
//分类标签
|
//分类标签
|
||||||
if (dto.getInstructionList() != null) {
|
if (dto.getInstructionList() != null) {
|
||||||
//需要排除的分类标签id
|
//需要排除的分类标签id
|
||||||
List<String> existedIds = Lists.newArrayList();
|
List<String> existedTypes = Lists.newArrayList();
|
||||||
if (dto.isIzInc()) {
|
if (dto.isIzInc()) {
|
||||||
List<InstructionTag> list = instructionTagService.list();
|
List<InstructionTag> list = instructionTagService.list();
|
||||||
existedIds = list.stream().map(InstructionTag::getId).collect(Collectors.toList());
|
existedTypes = list.stream().map(InstructionTag::getInstructionType).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
//传过来的所有数据
|
//传过来的所有数据
|
||||||
List<InstructionTag> allData = BeanUtil.copyToList(dto.getInstructionList(), InstructionTag.class);
|
List<InstructionTag> allData = BeanUtil.copyToList(dto.getInstructionList(), InstructionTag.class);
|
||||||
|
|
@ -701,7 +701,7 @@ public class DirectiveMQListener {
|
||||||
//需要新增的数据
|
//需要新增的数据
|
||||||
List<InstructionTag> needAddData = Lists.newArrayList();
|
List<InstructionTag> needAddData = Lists.newArrayList();
|
||||||
for (InstructionTag instruction : allData) {
|
for (InstructionTag instruction : allData) {
|
||||||
if (!existedIds.contains(instruction.getId())) {
|
if (!existedTypes.contains(instruction.getInstructionType())) {
|
||||||
needAddData.add(instruction);
|
needAddData.add(instruction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue