Compare commits
96 Commits
eaa681c9ff
...
fc6a7437a3
| Author | SHA1 | Date | |
|---|---|---|---|
| fc6a7437a3 | |||
| 999a0992e7 | |||
| 55b3dfc077 | |||
|
|
32d1673667 | ||
| 17c7cc70ed | |||
| 44be570ffa | |||
| c6f4996ba7 | |||
| 6c20b15339 | |||
| c297072b36 | |||
| 4c6886be6a | |||
| 8beb7f3d3d | |||
| 91968530b4 | |||
| 0833f82fb4 | |||
| cce71f324b | |||
| ee6efafde4 | |||
| 2051807ecf | |||
| 0a4de15599 | |||
| 25b3c26ec2 | |||
| 91d673de77 | |||
| 0bfa7183f9 | |||
| 79d451931d | |||
| ae5f1c795b | |||
| c1074fc4fb | |||
| e832b6d38e | |||
| 5043466e84 | |||
| fcaeedb543 | |||
| 8cf434a46f | |||
| bfbc061b0b | |||
| f92cd830e9 | |||
| a7a1a18445 | |||
| d1331cd4e1 | |||
| 37d08b8545 | |||
| e69f499ac0 | |||
| 3baf7161f1 | |||
| 85188651ca | |||
| d6fbfb1427 | |||
| 966847499a | |||
| 1e91171001 | |||
| 51f495f81e | |||
| 1e6a5972b9 | |||
| 515f03a5cd | |||
| b27542ba6d | |||
| 4790855079 | |||
| 72cf9c6f2d | |||
| 19ecb65183 | |||
| d85a8684a6 | |||
| 574a9267bf | |||
| 27a7396c78 | |||
| 633cf2c17f | |||
| 3188ca5752 | |||
| c79e4c2623 | |||
| f3c451d0a1 | |||
| a077bd57d4 | |||
| cf16c497bd | |||
| fd1ab239a9 | |||
| caf65e3113 | |||
| c18c21ff4c | |||
| ab6849c9eb | |||
| 6b555f2563 | |||
| 7645405c5b | |||
| 5bfadb9174 | |||
| e1b9d36153 | |||
| fdb8d6c934 | |||
| 22a1ac57b2 | |||
| 4d243815a6 | |||
| 882e8c9199 | |||
| a0c87f6335 | |||
| 538dde55f7 | |||
| f33e3c6f15 | |||
| 0794782505 | |||
| d37fa46b5f | |||
| 8fcc229ad8 | |||
| 39aa710fd3 | |||
| 49f95b40ea | |||
| eb2d7302b7 | |||
| eb26f9db34 | |||
| bd6f3ca587 | |||
| a58e02f2cb | |||
| 8c8ef13021 | |||
| d9a0a98f52 | |||
| 8c84b6eb46 | |||
| 3d797cc0e0 | |||
| df7281a2d4 | |||
| f83d7ae520 | |||
| d9c8525b94 | |||
| bcc5cbb2fb | |||
| 67a8351d70 | |||
| 391506e423 | |||
| b1117b4157 | |||
| b0eb9861b9 | |||
| b863c14f2b | |||
| 18f6a845e6 | |||
| e1385cb3e6 | |||
| c8ca56c3f5 | |||
| b149f7d687 | |||
| 19702c25e5 |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -57,4 +57,8 @@
|
|||||||
# 忽略设计书
|
# 忽略设计书
|
||||||
PostgreSQL/openHis_DB设计书.xlsx
|
PostgreSQL/openHis_DB设计书.xlsx
|
||||||
|
|
||||||
public.sql
|
public.sql
|
||||||
|
发版记录/2025-11-12/~$发版日志.docx
|
||||||
|
发版记录/2025-11-12/~$S-管理系统-调价管理.docx
|
||||||
|
发版记录/2025-11-12/发版日志.docx
|
||||||
|
.gitignore
|
||||||
|
|||||||
@@ -16,10 +16,10 @@
|
|||||||
|
|
||||||
## 📚【支持文档】
|
## 📚【支持文档】
|
||||||
|
|
||||||
技术支持资源:https://open.tntlinking.com/resource/technicalSupport?site=gitee
|
技术支持资源:https://open.tntlinking.com/resource/openProductDoc?site=gitee
|
||||||
(含演示环境、操作手册、部署手册、开发手册、常见问题等)
|
(含演示环境、操作手册、部署手册、开发手册、常见问题等)
|
||||||
|
|
||||||
产品介绍:https://open.tntlinking.com/resource/industryKnowledge?site=gitee
|
产品介绍:https://open.tntlinking.com/resource/productPresentation?site=gitee
|
||||||
|
|
||||||
操作教程:https://open.tntlinking.com/resource/operationTutorial?site=gitee
|
操作教程:https://open.tntlinking.com/resource/operationTutorial?site=gitee
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,11 @@
|
|||||||
<artifactId>spring-boot-devtools</artifactId>
|
<artifactId>spring-boot-devtools</artifactId>
|
||||||
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- lombok -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- swagger3-->
|
<!-- swagger3-->
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -66,45 +71,13 @@
|
|||||||
<groupId>com.core</groupId>
|
<groupId>com.core</groupId>
|
||||||
<artifactId>core-flowable</artifactId>
|
<artifactId>core-flowable</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- 通用工具-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.core</groupId>
|
||||||
|
<artifactId>core-common</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<!-- <build>-->
|
|
||||||
<!-- <plugins>-->
|
|
||||||
<!-- <plugin>-->
|
|
||||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
|
||||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
|
||||||
<!-- <version>2.5.15</version>-->
|
|
||||||
<!-- <configuration>-->
|
|
||||||
<!-- <fork>true</fork> <!– 如果没有该配置,devtools不会生效 –>-->
|
|
||||||
<!-- </configuration>-->
|
|
||||||
<!-- <executions>-->
|
|
||||||
<!-- <execution>-->
|
|
||||||
<!-- <goals>-->
|
|
||||||
<!-- <goal>repackage</goal>-->
|
|
||||||
<!-- </goals>-->
|
|
||||||
<!-- </execution>-->
|
|
||||||
<!-- </executions>-->
|
|
||||||
<!-- </plugin>-->
|
|
||||||
<!-- <plugin>-->
|
|
||||||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
|
||||||
<!-- <artifactId>maven-war-plugin</artifactId>-->
|
|
||||||
<!-- <version>3.1.0</version>-->
|
|
||||||
<!-- <configuration>-->
|
|
||||||
<!-- <failOnMissingWebXml>false</failOnMissingWebXml>-->
|
|
||||||
<!-- <warName>${project.artifactId}</warName>-->
|
|
||||||
<!-- </configuration>-->
|
|
||||||
<!-- </plugin>-->
|
|
||||||
<!-- <plugin>-->
|
|
||||||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
|
||||||
<!-- <artifactId>maven-compiler-plugin</artifactId>-->
|
|
||||||
<!-- <configuration>-->
|
|
||||||
<!-- <source>8</source>-->
|
|
||||||
<!-- <target>8</target>-->
|
|
||||||
<!-- </configuration>-->
|
|
||||||
<!-- </plugin>-->
|
|
||||||
<!-- </plugins>-->
|
|
||||||
<!-- <finalName>${project.artifactId}</finalName>-->
|
|
||||||
<!-- </build>-->
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -62,11 +62,12 @@ public class SysDictDataController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据字典类型查询字典数据信息
|
* 根据字典类型查询字典数据信息(支持拼音搜索)
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/type/{dictType}")
|
@GetMapping(value = "/type/{dictType}")
|
||||||
public AjaxResult dictType(@PathVariable String dictType) {
|
public AjaxResult dictType(@PathVariable String dictType,
|
||||||
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
|
@RequestParam(value = "searchKey", required = false) String searchKey) {
|
||||||
|
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType, searchKey);
|
||||||
if (StringUtils.isNull(data)) {
|
if (StringUtils.isNull(data)) {
|
||||||
data = new ArrayList<SysDictData>();
|
data = new ArrayList<SysDictData>();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.core.web.util;
|
|||||||
import com.core.common.core.domain.model.LoginUser;
|
import com.core.common.core.domain.model.LoginUser;
|
||||||
import com.core.common.enums.TenantOptionDict;
|
import com.core.common.enums.TenantOptionDict;
|
||||||
import com.core.common.utils.SecurityUtils;
|
import com.core.common.utils.SecurityUtils;
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户配置工具类
|
* 租户配置工具类
|
||||||
@@ -30,7 +31,12 @@ public class TenantOptionUtil {
|
|||||||
if (loginUser.getOptionMap() == null || loginUser.getOptionMap().isEmpty()) {
|
if (loginUser.getOptionMap() == null || loginUser.getOptionMap().isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return loginUser.getOptionMap().get(optionDict.getCode());
|
// return loginUser.getOptionMap().get(optionDict.getCode());
|
||||||
|
|
||||||
|
// TODO:2025/10/17 李永兴提出的sys_option切换TenantOption临时防止报错方案,最晚2025年11月底删除
|
||||||
|
String newValue = loginUser.getOptionMap().get(optionDict.getCode());
|
||||||
|
String oldValue = loginUser.getOptionJson().getString(optionDict.getCode());
|
||||||
|
return StringUtils.isEmpty(newValue) ? oldValue : newValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,6 +142,11 @@
|
|||||||
<artifactId>pinyin4j</artifactId>
|
<artifactId>pinyin4j</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.code.gson</groupId>
|
||||||
|
<artifactId>gson</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -53,6 +53,9 @@ public class SysDictData extends BaseEntity {
|
|||||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
/** 拼音首字母 */
|
||||||
|
private String pyStr;
|
||||||
|
|
||||||
public Long getDictCode() {
|
public Long getDictCode() {
|
||||||
return dictCode;
|
return dictCode;
|
||||||
}
|
}
|
||||||
@@ -136,13 +139,21 @@ public class SysDictData extends BaseEntity {
|
|||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPyStr() {
|
||||||
|
return pyStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPyStr(String pyStr) {
|
||||||
|
this.pyStr = pyStr;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("dictCode", getDictCode())
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("dictCode", getDictCode())
|
||||||
.append("dictSort", getDictSort()).append("dictLabel", getDictLabel()).append("dictValue", getDictValue())
|
.append("dictSort", getDictSort()).append("dictLabel", getDictLabel()).append("dictValue", getDictValue())
|
||||||
.append("dictType", getDictType()).append("cssClass", getCssClass()).append("listClass", getListClass())
|
.append("dictType", getDictType()).append("cssClass", getCssClass()).append("listClass", getListClass())
|
||||||
.append("isDefault", getIsDefault()).append("status", getStatus()).append("createBy", getCreateBy())
|
.append("isDefault", getIsDefault()).append("status", getStatus()).append("pyStr", getPyStr())
|
||||||
.append("createTime", getCreateTime()).append("updateBy", getUpdateBy())
|
.append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("updateBy", getUpdateBy())
|
||||||
.append("updateTime", getUpdateTime()).append("remark", getRemark()).toString();
|
.append("updateTime", getUpdateTime()).append("remark", getRemark()).toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.core.common.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 调价类型枚举
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 09:14 2025/10/16
|
||||||
|
* @return
|
||||||
|
**/
|
||||||
|
public enum AdjustPriceEnum {
|
||||||
|
|
||||||
|
MEDICINE(0, "药品"),
|
||||||
|
CONSUMABLES(1, "耗材"),
|
||||||
|
DIAGNOSIS(2, "诊疗"),
|
||||||
|
REGISTER(3, "挂号");
|
||||||
|
|
||||||
|
|
||||||
|
private final Integer code;
|
||||||
|
private final String info;
|
||||||
|
|
||||||
|
AdjustPriceEnum(Integer code, String info) {
|
||||||
|
this.code = code;
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInfo() {
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,166 +6,93 @@ package com.core.common.enums;
|
|||||||
* @author system
|
* @author system
|
||||||
*/
|
*/
|
||||||
public enum TenantOptionDict {
|
public enum TenantOptionDict {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 医院名称
|
* 医院名称
|
||||||
*/
|
*/
|
||||||
HOSPITAL_NAME("hospitalName", "医院名称", 0),
|
YB_HOSPITAL_NAME("hospitalName", "医保-医院名称", 0),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 医疗机构等级
|
* 医保-医疗机构等级(3101接口)
|
||||||
*/
|
*/
|
||||||
MEDINS_LV("medinsLv", "医疗机构等级", 1),
|
YB_MEDINS_LV("medinsLv", "医保_医疗机构等级", 1),
|
||||||
/**
|
/**
|
||||||
* 定点医药机构编号
|
* 定点医药机构编号
|
||||||
*/
|
*/
|
||||||
FIXMEDINS_CODE("fixmedinsCode", "定点医药机构编号", 2),
|
YB_FIXMEDINS_CODE("fixmedinsCode", "医保_定点医药机构编号", 2),
|
||||||
/**
|
/**
|
||||||
* 电子发票appid
|
* 电子发票appid
|
||||||
*/
|
*/
|
||||||
APP_ID("app_id", "电子发票appid", 3),
|
EINVOICE_APP_ID("app_id", "电子发票-appid", 3),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子发票key
|
* 电子发票key
|
||||||
*/
|
*/
|
||||||
KEY("key", "电子发票key", 4),
|
EINVOICE_KEY("key", "电子发票-key", 4),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子发票url
|
* 电子发票url
|
||||||
*/
|
*/
|
||||||
URL("url", "电子发票url", 5),
|
EINVOICE_URL("url", "电子发票-url", 5),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 医保开关
|
* 医保开关
|
||||||
*/
|
*/
|
||||||
YB_SWITCH("yb_switch", "医保开关", 6),
|
YB_SWITCH("yb_switch", "医保开关", 6),
|
||||||
/**
|
|
||||||
* 客户端私钥
|
|
||||||
*/
|
|
||||||
CLI_PRV_KEY("cliPrvKey", "客户端私钥", 7),
|
|
||||||
/**
|
|
||||||
* 客户端公钥
|
|
||||||
*/
|
|
||||||
CLI_PUB_KEY("cliPubKey", "客户端公钥", 8),
|
|
||||||
/**
|
|
||||||
* 服务端公钥
|
|
||||||
*/
|
|
||||||
SERVER_PUB_KEY("serverPubKey", "服务端公钥", 9),
|
|
||||||
/**
|
|
||||||
* 定点医药机构名称
|
|
||||||
*/
|
|
||||||
FIXMEDINS_NAME("fixmedinsName", "定点医药机构名称", 10),
|
|
||||||
/**
|
|
||||||
* 行政区划
|
|
||||||
*/
|
|
||||||
ADMVS("admvs", "行政区划", 11),
|
|
||||||
/**
|
|
||||||
* 授权范围
|
|
||||||
*/
|
|
||||||
SCOPE("scope", "授权范围", 12),
|
|
||||||
/**
|
|
||||||
* 授权类型
|
|
||||||
*/
|
|
||||||
GRANT_TYPE("grantType", "授权类型", 13),
|
|
||||||
/**
|
|
||||||
* 密码
|
|
||||||
*/
|
|
||||||
PASSWORD("password", "密码", 14),
|
|
||||||
/**
|
|
||||||
* 用户名
|
|
||||||
*/
|
|
||||||
USERNAME("username", "用户名", 15),
|
|
||||||
/**
|
|
||||||
* 客户端安全码
|
|
||||||
*/
|
|
||||||
CLIENT_SECRET("clientSecret", "客户端安全码", 16),
|
|
||||||
/**
|
|
||||||
* 客户端ID
|
|
||||||
*/
|
|
||||||
CLIENT_ID("clientId", "客户端ID", 17),
|
|
||||||
/**
|
|
||||||
* 生产环境客户端公钥
|
|
||||||
*/
|
|
||||||
PROD_CLI_PUB_KEY("prod_cliPubKey", "生产环境客户端公钥", 18),
|
|
||||||
/**
|
|
||||||
* 生产环境客户端私钥
|
|
||||||
*/
|
|
||||||
PROD_CLI_PRV_KEY("prod_cliPrvKey", "生产环境客户端私钥", 19),
|
|
||||||
/**
|
|
||||||
* 生产环境客户端ID
|
|
||||||
*/
|
|
||||||
PROD_CLIENT_ID("prod_clientId", "生产环境客户端ID", 20),
|
|
||||||
/**
|
|
||||||
* 文件路径
|
|
||||||
*/
|
|
||||||
FILE_PATH("filePath", "文件路径", 21),
|
|
||||||
/**
|
/**
|
||||||
* 电子地址
|
* 电子地址
|
||||||
*/
|
*/
|
||||||
ELE_ADDRESS("eleAddress", "电子地址", 22),
|
ELE_ADDRESS("eleAddress", "电子处方-请求地址", 22),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务地址
|
* 服务地址
|
||||||
*/
|
*/
|
||||||
ADDRESS("address", "服务地址", 23),
|
ADDRESS("address", "服务地址", 23),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 超时时间
|
* 超时时间
|
||||||
*/
|
*/
|
||||||
TIME("time", "超时时间", 24),
|
TIME("time", "超时时间", 24),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否加密
|
* 是否加密
|
||||||
*/
|
*/
|
||||||
IS_ENCRYPT("isEncrypt", "是否加密", 25),
|
YB_IS_ENCRYPT("isEncrypt", "医保-是否加密", 25),
|
||||||
/**
|
/**
|
||||||
* 医保区划
|
* 医保区划
|
||||||
*/
|
*/
|
||||||
INSUPLC_ADMDVS("insuplc_admdvs", "医保区划", 26),
|
YB_INSUPLC_ADMDVS("insuplc_admdvs", "医保-区划", 26),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子处方appId
|
* 电子处方appId
|
||||||
*/
|
*/
|
||||||
PRE_APP_ID("pre_app_id", "电子处方appId", 27),
|
ELE_PRE_APP_ID("pre_app_id", "电子处方-appId", 27),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子处方appSecret
|
* 电子处方appSecret
|
||||||
*/
|
*/
|
||||||
PRE_APP_SECRET("pre_app_secret", "电子处方appSecret", 28),
|
ELE_PRE_APP_SECRET("pre_app_secret", "电子处方-appSecret", 28),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子处方私钥
|
* 电子处方私钥
|
||||||
*/
|
*/
|
||||||
APP_PRVKEY("APP_PRVKEY", "电子处方私钥", 29),
|
ELE_APP_PRVKEY("APP_PRVKEY", "电子处方-私钥", 29),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子处方公钥
|
* 电子处方公钥
|
||||||
*/
|
*/
|
||||||
PLAF_PUBKEY("PLAF_PUBKEY", "电子处方公钥", 30),
|
ELE_PLAF_PUBKEY("PLAF_PUBKEY", "电子处方-公钥", 30),
|
||||||
/**
|
|
||||||
* 医保客户端ID
|
|
||||||
*/
|
|
||||||
YB_CLIENT_ID("ybClientId", "医保客户端ID", 31),
|
|
||||||
/**
|
|
||||||
* 医保客户端安全码
|
|
||||||
*/
|
|
||||||
YB_CLIENT_SECRET("ybClientSecret", "医保客户端安全码", 32),
|
|
||||||
/**
|
|
||||||
* 医保用户名
|
|
||||||
*/
|
|
||||||
YB_USERNAME("ybUsername", "医保用户名", 33),
|
|
||||||
/**
|
|
||||||
* 医保密码
|
|
||||||
*/
|
|
||||||
YB_PASSWORD("ybPassword", "医保密码", 34),
|
|
||||||
/**
|
|
||||||
* 医保授权类型
|
|
||||||
*/
|
|
||||||
YB_GRANT_TYPE("ybGrantType", "医保授权类型", 35),
|
|
||||||
/**
|
|
||||||
* 医保授权范围
|
|
||||||
*/
|
|
||||||
YB_SCOPE("ybScope", "医保授权范围", 36),
|
|
||||||
/**
|
|
||||||
* 医保密钥
|
|
||||||
*/
|
|
||||||
YB_CLI_PRV_KEY("ybCliPrvKey", "医保密钥", 37),
|
|
||||||
/**
|
|
||||||
* 医保服务URL
|
|
||||||
*/
|
|
||||||
YB_URL("ybUrl", "医保服务URL", 38),
|
|
||||||
/**
|
/**
|
||||||
* 医院等级
|
* 医院等级
|
||||||
*/
|
*/
|
||||||
HOSPITAL_LV("hospital_lv", "医院等级", 39),
|
EINVOICE_HOSPITAL_LV("hospital_lv", "电子发票-医院等级", 39),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无视LIS&PACS报错
|
||||||
|
*/
|
||||||
|
LIS_PACS_ERROR_IGNORE("lisPacsErrorIgnore", "无视LIS&PACS报错", 40),
|
||||||
/**
|
/**
|
||||||
* LIS接口地址
|
* LIS接口地址
|
||||||
*/
|
*/
|
||||||
@@ -193,11 +120,11 @@ public enum TenantOptionDict {
|
|||||||
/**
|
/**
|
||||||
* PACSAppSecret
|
* PACSAppSecret
|
||||||
*/
|
*/
|
||||||
INVOICE_URL("invoiceUrl", "电子发票中转服务的路径", 46),
|
INVOICE_FORWARD_URL("invoiceUrl", "电子发票-中转服务的路径", 46),
|
||||||
/**
|
/**
|
||||||
* PACSAppSecret
|
* PACSAppSecret
|
||||||
*/
|
*/
|
||||||
FORWARD_SWITCH("forwardSwitch", "电子发票中转服务开关", 47),
|
FORWARD_SWITCH("forwardSwitch", "电子发票-中转服务开关", 47),
|
||||||
/**
|
/**
|
||||||
* 食源性开关
|
* 食源性开关
|
||||||
*/
|
*/
|
||||||
@@ -229,7 +156,55 @@ public enum TenantOptionDict {
|
|||||||
/**
|
/**
|
||||||
* BPC请求URL
|
* BPC请求URL
|
||||||
*/
|
*/
|
||||||
BPC_REQUEST_URL("bpcRequestUrl", "BPC请求URL", 55);
|
BPC_REQUEST_URL("bpcRequestUrl", "BPC请求URL", 55),
|
||||||
|
/**
|
||||||
|
* 电子发票开关
|
||||||
|
*/
|
||||||
|
INVOICE_SWITCH("invoiceSwitch", "电子发票开关 (0:关闭 1:开启)", 56),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医嘱定价来源
|
||||||
|
*/
|
||||||
|
ORDER_PRICING_SOURCE("orderPricingSource", "定价来源 batchSellingPrice/retailPrice", 57),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 三方支付(签到)
|
||||||
|
*/
|
||||||
|
THREE_PART_SIGN_URL("threePartSignUrl", "三方支付GET请求", 58),
|
||||||
|
/**
|
||||||
|
* 三方支付(消费)
|
||||||
|
*/
|
||||||
|
THREE_PART_PAY_URL("threePartPayUrl", "三方支付GET请求", 59),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 三方支付(退费)
|
||||||
|
*/
|
||||||
|
THREE_PART_RETURN_URL("threePartReturnUrl", "三方支付GET请求", 60),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 三方支付(隔天退费)
|
||||||
|
*/
|
||||||
|
THREE_PART_NEXT_DAY_RETURN_URL("threePartNextDayReturnUrl", "三方支付GET请求", 61),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 三方支付路径(支付结果查询)
|
||||||
|
*/
|
||||||
|
THREE_PART_PAY_QUERY_URL("threePartPayQueryUrl", "三方支付GET请求", 62),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 三方支付路径(退费结果查询)
|
||||||
|
*/
|
||||||
|
THREE_PART_RETURN_QUERY_URL("threePartReturnQueryUrl", "三方支付GET请求", 63),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 三方支付路径(隔天退费结果查询)
|
||||||
|
*/
|
||||||
|
THREE_PART_NEXT_DAY_RETURN_QUERY_URL("threePartNextDayReturnQueryUrl", "三方支付GET请求", 64),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 三方支付参数
|
||||||
|
*/
|
||||||
|
THREE_PART_PARAM("threePartParam", "三方支付GET请求", 65);
|
||||||
|
|
||||||
private final String code;
|
private final String code;
|
||||||
private final String name;
|
private final String name;
|
||||||
@@ -241,18 +216,6 @@ public enum TenantOptionDict {
|
|||||||
this.sort = sort;
|
this.sort = sort;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getSort() {
|
|
||||||
return sort;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static TenantOptionDict getByCode(String code) {
|
public static TenantOptionDict getByCode(String code) {
|
||||||
if (code == null) {
|
if (code == null) {
|
||||||
return null;
|
return null;
|
||||||
@@ -264,4 +227,16 @@ public enum TenantOptionDict {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSort() {
|
||||||
|
return sort;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,17 @@ public class SecurityUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户昵称
|
||||||
|
**/
|
||||||
|
public static String getNickName() {
|
||||||
|
try {
|
||||||
|
return getLoginUser().getUser().getNickName();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException("获取用户昵称异常", HttpStatus.UNAUTHORIZED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户
|
* 获取用户
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import org.springframework.context.annotation.Bean;
|
|||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||||
import org.springframework.data.redis.core.RedisTemplate;
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
|
import org.springframework.data.redis.core.ValueOperations;
|
||||||
import org.springframework.data.redis.core.script.DefaultRedisScript;
|
import org.springframework.data.redis.core.script.DefaultRedisScript;
|
||||||
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||||
|
|
||||||
@@ -45,6 +46,11 @@ public class RedisConfig extends CachingConfigurerSupport {
|
|||||||
return redisScript;
|
return redisScript;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public ValueOperations<Object, Object> valueOperations(RedisTemplate<Object, Object> redisTemplate) {
|
||||||
|
return redisTemplate.opsForValue();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 限流脚本
|
* 限流脚本
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -54,6 +54,12 @@ public class UserDetailsServiceImpl implements UserDetailsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public UserDetails createLoginUser(SysUser user) {
|
public UserDetails createLoginUser(SysUser user) {
|
||||||
return new LoginUser(user.getUserId(), user.getDeptId(), user, permissionService.getMenuPermission(user));
|
LoginUser loginUser = new LoginUser(user.getUserId(), user.getDeptId(), user, permissionService.getMenuPermission(user));
|
||||||
|
// 设置所属医院ID
|
||||||
|
loginUser.setOrgId(user.getOrgId());
|
||||||
|
if (user.getOrgId() != null) {
|
||||||
|
loginUser.setHospitalId(userService.getHospitalIdByOrgId(user.getOrgId()));
|
||||||
|
}
|
||||||
|
return loginUser;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,10 @@
|
|||||||
<artifactId>core-common</artifactId>
|
<artifactId>core-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
@@ -35,6 +39,11 @@
|
|||||||
<groupId>org.postgresql</groupId>
|
<groupId>org.postgresql</groupId>
|
||||||
<artifactId>postgresql</artifactId>
|
<artifactId>postgresql</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|||||||
@@ -66,4 +66,6 @@ public class SysTenantOption implements Serializable {
|
|||||||
@TableField(fill = FieldFill.UPDATE)
|
@TableField(fill = FieldFill.UPDATE)
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,18 @@ public interface SysDictDataMapper {
|
|||||||
*/
|
*/
|
||||||
public List<SysDictData> selectDictDataByType(String dictType);
|
public List<SysDictData> selectDictDataByType(String dictType);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字典类型和搜索关键字查询字典数据(支持拼音搜索)
|
||||||
|
*
|
||||||
|
* @param dictType 字典类型
|
||||||
|
* @param searchKey 搜索关键字(支持名称和拼音首字母搜索)
|
||||||
|
* @return 字典数据集合信息
|
||||||
|
*/
|
||||||
|
public List<SysDictData> selectDictDataByTypeWithSearch(@Param("dictType") String dictType, @Param("searchKey") String searchKey);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据字典类型和字典键值查询字典数据信息
|
* 根据字典类型和字典键值查询字典数据信息
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -84,6 +84,14 @@ public interface SysMenuMapper {
|
|||||||
*/
|
*/
|
||||||
public SysMenu selectMenuById(Long menuId);
|
public SysMenu selectMenuById(Long menuId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据路径Path查询信息
|
||||||
|
*
|
||||||
|
* @param path 路径
|
||||||
|
* @return 菜单信息
|
||||||
|
*/
|
||||||
|
public SysMenu selectMenuByPath(String path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否存在菜单子节点
|
* 是否存在菜单子节点
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -34,6 +34,15 @@ public interface ISysDictTypeService {
|
|||||||
*/
|
*/
|
||||||
public List<SysDictData> selectDictDataByType(String dictType);
|
public List<SysDictData> selectDictDataByType(String dictType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字典类型和搜索关键字查询字典数据(支持拼音搜索)
|
||||||
|
*
|
||||||
|
* @param dictType 字典类型
|
||||||
|
* @param searchKey 搜索关键字(支持名称和拼音首字母搜索),可为null
|
||||||
|
* @return 字典数据集合信息
|
||||||
|
*/
|
||||||
|
public List<SysDictData> selectDictDataByType(String dictType, String searchKey);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据字典类型ID查询信息
|
* 根据字典类型ID查询信息
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import com.core.common.core.domain.entity.SysDictData;
|
import com.core.common.core.domain.entity.SysDictData;
|
||||||
import com.core.common.utils.DictUtils;
|
import com.core.common.utils.DictUtils;
|
||||||
import com.core.system.mapper.SysDictDataMapper;
|
import com.core.system.mapper.SysDictDataMapper;
|
||||||
|
import com.core.common.utils.ChineseConvertUtils;
|
||||||
import com.core.system.service.ISysDictDataService;
|
import com.core.system.service.ISysDictDataService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,6 +89,10 @@ public class SysDictDataServiceImpl implements ISysDictDataService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertDictData(SysDictData data) {
|
public int insertDictData(SysDictData data) {
|
||||||
|
// 自动计算拼音首字母
|
||||||
|
if (data.getDictLabel() != null && !data.getDictLabel().isEmpty()) {
|
||||||
|
data.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(data.getDictLabel()));
|
||||||
|
}
|
||||||
int row = dictDataMapper.insertDictData(data);
|
int row = dictDataMapper.insertDictData(data);
|
||||||
if (row > 0) {
|
if (row > 0) {
|
||||||
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
|
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
|
||||||
@@ -104,6 +109,10 @@ public class SysDictDataServiceImpl implements ISysDictDataService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateDictData(SysDictData data) {
|
public int updateDictData(SysDictData data) {
|
||||||
|
// 如果字典标签有变化,重新计算拼音首字母
|
||||||
|
if (data.getDictLabel() != null && !data.getDictLabel().isEmpty()) {
|
||||||
|
data.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(data.getDictLabel()));
|
||||||
|
}
|
||||||
int row = dictDataMapper.updateDictData(data);
|
int row = dictDataMapper.updateDictData(data);
|
||||||
if (row > 0) {
|
if (row > 0) {
|
||||||
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
|
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
|
||||||
|
|||||||
@@ -71,6 +71,24 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<SysDictData> selectDictDataByType(String dictType) {
|
public List<SysDictData> selectDictDataByType(String dictType) {
|
||||||
|
return selectDictDataByType(dictType, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字典类型和搜索关键字查询字典数据(支持拼音搜索)
|
||||||
|
*
|
||||||
|
* @param dictType 字典类型
|
||||||
|
* @param searchKey 搜索关键字(支持名称和拼音首字母搜索),可为null
|
||||||
|
* @return 字典数据集合信息
|
||||||
|
*/
|
||||||
|
public List<SysDictData> selectDictDataByType(String dictType, String searchKey) {
|
||||||
|
// 如果有搜索关键字,使用带搜索的SQL查询
|
||||||
|
if (StringUtils.isNotEmpty(searchKey) && !searchKey.trim().isEmpty()) {
|
||||||
|
String trimmedKey = searchKey.trim();
|
||||||
|
return dictDataMapper.selectDictDataByTypeWithSearch(dictType, trimmedKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 否则使用原有方法(带缓存)
|
||||||
List<SysDictData> dictDatas = DictUtils.getDictCache(dictType);
|
List<SysDictData> dictDatas = DictUtils.getDictCache(dictType);
|
||||||
if (StringUtils.isNotEmpty(dictDatas)) {
|
if (StringUtils.isNotEmpty(dictDatas)) {
|
||||||
return dictDatas;
|
return dictDatas;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.core.system.service.impl;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -266,6 +267,11 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertMenu(SysMenu menu) {
|
public int insertMenu(SysMenu menu) {
|
||||||
|
//路径Path唯一性判断
|
||||||
|
SysMenu sysMenu = menuMapper.selectMenuByPath(menu.getPath());
|
||||||
|
if (sysMenu != null){
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
return menuMapper.insertMenu(menu);
|
return menuMapper.insertMenu(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,6 +283,16 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateMenu(SysMenu menu) {
|
public int updateMenu(SysMenu menu) {
|
||||||
|
//路径Path唯一性判断
|
||||||
|
String path = menu.getPath();
|
||||||
|
if (StringUtils.isNotBlank(path)) {
|
||||||
|
SysMenu sysMenu = menuMapper.selectMenuByPath(menu.getPath());
|
||||||
|
// 先判断sysMenu是否不为null,再比较menuId
|
||||||
|
if (sysMenu != null && !menu.getMenuId().equals(sysMenu.getMenuId())) {
|
||||||
|
return -1; // 路由地址已存在
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 执行更新
|
||||||
return menuMapper.updateMenu(menu);
|
return menuMapper.updateMenu(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
<result property="listClass" column="list_class"/>
|
<result property="listClass" column="list_class"/>
|
||||||
<result property="isDefault" column="is_default"/>
|
<result property="isDefault" column="is_default"/>
|
||||||
<result property="status" column="status"/>
|
<result property="status" column="status"/>
|
||||||
|
<result property="pyStr" column="py_str"/>
|
||||||
<result property="createBy" column="create_by"/>
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="createTime" column="create_time"/>
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="updateBy" column="update_by"/>
|
<result property="updateBy" column="update_by"/>
|
||||||
@@ -30,6 +31,7 @@
|
|||||||
list_class,
|
list_class,
|
||||||
is_default,
|
is_default,
|
||||||
status,
|
status,
|
||||||
|
py_str,
|
||||||
create_by,
|
create_by,
|
||||||
create_time,
|
create_time,
|
||||||
remark
|
remark
|
||||||
@@ -56,6 +58,19 @@
|
|||||||
<include refid="selectDictDataVo"/>
|
<include refid="selectDictDataVo"/>
|
||||||
where status = '0' and dict_type = #{dictType} order by dict_sort asc
|
where status = '0' and dict_type = #{dictType} order by dict_sort asc
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectDictDataByTypeWithSearch" resultMap="SysDictDataResult">
|
||||||
|
<include refid="selectDictDataVo"/>
|
||||||
|
where status = '0'
|
||||||
|
and dict_type = #{dictType}
|
||||||
|
<if test="searchKey != null and searchKey != ''">
|
||||||
|
and (
|
||||||
|
(dict_label is not null and dict_label like concat('%', #{searchKey}, '%'))
|
||||||
|
or (py_str is not null and py_str like concat('%', #{searchKey}, '%'))
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
order by dict_sort asc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectDictLabel" resultType="String">
|
<select id="selectDictLabel" resultType="String">
|
||||||
select dict_label
|
select dict_label
|
||||||
@@ -105,6 +120,7 @@
|
|||||||
<if test="listClass != null">list_class = #{listClass},</if>
|
<if test="listClass != null">list_class = #{listClass},</if>
|
||||||
<if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if>
|
<if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if>
|
||||||
<if test="status != null">status = #{status},</if>
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="pyStr !=null">pyStr = #{pyStr}</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
update_time = now()
|
update_time = now()
|
||||||
@@ -128,6 +144,7 @@
|
|||||||
<if test="listClass != null and listClass != ''">list_class,</if>
|
<if test="listClass != null and listClass != ''">list_class,</if>
|
||||||
<if test="isDefault != null and isDefault != ''">is_default,</if>
|
<if test="isDefault != null and isDefault != ''">is_default,</if>
|
||||||
<if test="status != null">status,</if>
|
<if test="status != null">status,</if>
|
||||||
|
<if test="pyStr !=null and pyStr !=null ''" >py_str,</if>
|
||||||
<if test="remark != null and remark != ''">remark,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
create_time
|
create_time
|
||||||
@@ -140,6 +157,7 @@
|
|||||||
<if test="listClass != null and listClass != ''">#{listClass},</if>
|
<if test="listClass != null and listClass != ''">#{listClass},</if>
|
||||||
<if test="isDefault != null and isDefault != ''">#{isDefault},</if>
|
<if test="isDefault != null and isDefault != ''">#{isDefault},</if>
|
||||||
<if test="status != null">#{status},</if>
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="pyStr !=null and pyStr !=''" >{pystr},</if>
|
||||||
<if test="remark != null and remark != ''">#{remark},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
now()
|
now()
|
||||||
|
|||||||
@@ -174,6 +174,11 @@
|
|||||||
and rm.role_id = #{roleId}
|
and rm.role_id = #{roleId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMenuByPath" parameterType="String" resultMap="SysMenuResult">
|
||||||
|
<include refid="selectMenuVo"/>
|
||||||
|
where path = #{path}
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectMenuById" parameterType="Long" resultMap="SysMenuResult">
|
<select id="selectMenuById" parameterType="Long" resultMap="SysMenuResult">
|
||||||
<include refid="selectMenuVo"/>
|
<include refid="selectMenuVo"/>
|
||||||
where menu_id = #{menuId}
|
where menu_id = #{menuId}
|
||||||
|
|||||||
@@ -16,6 +16,18 @@
|
|||||||
</description>
|
</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Spring 配置 -->
|
<!-- Spring 配置 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
@@ -55,6 +67,11 @@
|
|||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- rabbitMQ -->
|
||||||
|
<!-- <dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-amqp</artifactId>
|
||||||
|
</dependency> -->
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import com.openhis.web.ybmanage.config.YbServiceConfig;
|
|||||||
/**
|
/**
|
||||||
* 启动程序
|
* 启动程序
|
||||||
*
|
*
|
||||||
* @author system
|
* @author system 1
|
||||||
*/
|
*/
|
||||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}, scanBasePackages = {"com.core", "com.openhis"})
|
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}, scanBasePackages = {"com.core", "com.openhis"})
|
||||||
@EnableConfigurationProperties(YbServiceConfig.class)
|
@EnableConfigurationProperties(YbServiceConfig.class)
|
||||||
|
|||||||
@@ -0,0 +1,204 @@
|
|||||||
|
package com.openhis.web.adjustprice.appservice;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.web.adjustprice.dto.AdjustPriceDataVo;
|
||||||
|
import com.openhis.web.adjustprice.dto.AdjustPriceManagerSearchParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 调价业务接口
|
||||||
|
*
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 08:42 2025/10/16
|
||||||
|
* @return
|
||||||
|
**/
|
||||||
|
public interface IAdjustPriceService {
|
||||||
|
/**
|
||||||
|
* Desc: 保存调价数据
|
||||||
|
*
|
||||||
|
* @param dataVoList 前端数据集合
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 08:57 2025/10/16
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
R<?> submitChangePriceData(List<AdjustPriceDataVo> dataVoList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 保存并提交审核调价数据
|
||||||
|
*
|
||||||
|
* @param dataVoList
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 16:22 2025/10/23
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
R<?> submitExamineChangePriceData(List<AdjustPriceDataVo> dataVoList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据关键词查询 药品|耗材|诊疗 集合的最后价格
|
||||||
|
*
|
||||||
|
* @param searchKey
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 09:32 2025/10/20
|
||||||
|
* @return java.util.List<?>
|
||||||
|
**/
|
||||||
|
R<?> searchKeyWordDataListByMed(String searchKey);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据关键词查询 药品|耗材|诊疗 集合的最后价格
|
||||||
|
*
|
||||||
|
* @param searchKey
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 09:32 2025/10/20
|
||||||
|
* @return java.util.List<?>
|
||||||
|
**/
|
||||||
|
R<?> searchKeyWordDataListByDevice(String searchKey);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据关键词查询 药品|耗材|诊疗 集合的最后价格
|
||||||
|
*
|
||||||
|
* @param searchKey
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 09:32 2025/10/20
|
||||||
|
* @return java.util.List<?>
|
||||||
|
**/
|
||||||
|
R<?> searchKeyWordDataListByActivity(String searchKey);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 查询提交的改价数据
|
||||||
|
*
|
||||||
|
* @param adjustPriceManagerSearchParam
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param searchKey
|
||||||
|
* @param request
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 23:39 2025/11/1
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
R<?> searchChangePriceSubmitDataToPage(AdjustPriceManagerSearchParam adjustPriceManagerSearchParam, Integer pageNo,
|
||||||
|
Integer pageSize, String searchKey, HttpServletRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据busNo 查询调价单详情 med
|
||||||
|
*
|
||||||
|
* @param busNo
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 13:15 2025/10/21
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
R<?> searchChangePriceDataByMed(String busNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据busNo 查询调价单详情 med
|
||||||
|
*
|
||||||
|
* @param busNo
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 13:15 2025/10/21
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
R<?> searchChangePriceDataByDevice(String busNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据busNo 查询调价单详情 Activity
|
||||||
|
*
|
||||||
|
* @param busNo
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 13:15 2025/10/21
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
R<?> searchChangePriceDataByActivity(String busNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据busNo 查询调价单详情 Health
|
||||||
|
*
|
||||||
|
* @param busNo
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 13:15 2025/10/21
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
R<?> searchChangePriceDataByHealth(String busNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 修改调价原因 和 价格
|
||||||
|
*
|
||||||
|
* @param busNo
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 15:21 2025/10/21
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
R<?> cancelChangePriceData(String busNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 查询有挂号信息的科室
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 16:38 2025/10/22
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
R<?> searchAllOrgData();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据科室id 加载挂号数据
|
||||||
|
*
|
||||||
|
* @param orgId
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 16:45 2025/10/22
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
R<?> searchHealthData(Long orgId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据业务单据号 进行单据提交操作
|
||||||
|
*
|
||||||
|
* @param busNo
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 09:25 2025/10/23
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
R<?> updateExamineByApproval(String busNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据药品ID 是否在审核中
|
||||||
|
*
|
||||||
|
* @param itemId
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 17:48 2025/11/3
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
R<?> checkMedApprovalExist(Long itemId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据耗材ID 是否在审核中
|
||||||
|
*
|
||||||
|
* @param itemId
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 17:48 2025/11/3
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
R<?> checkDeviceApprovalExist(Long itemId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据诊疗ID 是否在审核中
|
||||||
|
*
|
||||||
|
* @param itemId
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 17:48 2025/11/3
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
R<?> checkActivityApprovalExist(Long itemId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据挂号ID 是否在审核中
|
||||||
|
*
|
||||||
|
* @param itemId
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 17:48 2025/11/3
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
R<?> checkHealthApprovalExist(Long itemId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
package com.openhis.web.adjustprice.appservice;
|
|
||||||
|
|
||||||
import com.openhis.web.adjustprice.dto.SupplyListDto;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Desc:
|
|
||||||
* @Author raymond
|
|
||||||
* @Date 16:09 2025/10/15
|
|
||||||
* @return
|
|
||||||
**/
|
|
||||||
public interface ISupplyService {
|
|
||||||
/**
|
|
||||||
* Desc:
|
|
||||||
* @param
|
|
||||||
* @Author raymond
|
|
||||||
* @Date 17:10 2025/10/15
|
|
||||||
* @return java.util.List<com.openhis.web.paymentmanage.dto.SupplyListDto>
|
|
||||||
**/
|
|
||||||
List<SupplyListDto> searchAllSupplyList();
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,594 @@
|
|||||||
|
package com.openhis.web.adjustprice.appservice.impl;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.core.domain.entity.SysDictData;
|
||||||
|
import com.core.common.enums.AdjustPriceEnum;
|
||||||
|
import com.core.common.utils.AssignSeqUtil;
|
||||||
|
import com.core.common.utils.MessageUtils;
|
||||||
|
import com.core.common.utils.SecurityUtils;
|
||||||
|
import com.core.system.service.ISysDictDataService;
|
||||||
|
import com.openhis.administration.domain.ChangePriceRecord;
|
||||||
|
import com.openhis.administration.dto.ChangePriceDataDto;
|
||||||
|
import com.openhis.administration.dto.ChargeItemDefDetailPriceDto;
|
||||||
|
import com.openhis.administration.dto.HealthcareDto;
|
||||||
|
import com.openhis.administration.dto.OrgDataDto;
|
||||||
|
import com.openhis.administration.service.*;
|
||||||
|
import com.openhis.common.constant.CommonConstants;
|
||||||
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
|
import com.openhis.common.enums.*;
|
||||||
|
import com.openhis.common.utils.EnumUtils;
|
||||||
|
import com.openhis.common.utils.HisQueryUtils;
|
||||||
|
import com.openhis.common.utils.RedisKeys;
|
||||||
|
import com.openhis.common.utils.RedisUtil;
|
||||||
|
import com.openhis.medication.service.IMedicationService;
|
||||||
|
import com.openhis.web.adjustprice.appservice.IAdjustPriceService;
|
||||||
|
import com.openhis.web.adjustprice.dto.AdjustPriceDataVo;
|
||||||
|
import com.openhis.web.adjustprice.dto.AdjustPriceManagerSearchParam;
|
||||||
|
import com.openhis.web.adjustprice.dto.ChangePricePageDto;
|
||||||
|
import com.openhis.web.adjustprice.mapper.AdjustPriceMapper;
|
||||||
|
import com.openhis.web.inventorymanage.dto.InventorySearchParam;
|
||||||
|
import com.openhis.workflow.dto.ActivityDto;
|
||||||
|
import com.openhis.workflow.dto.AdjustPriceDto;
|
||||||
|
import com.openhis.workflow.service.IActivityDefinitionService;
|
||||||
|
import com.openhis.workflow.service.IInventoryItemService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName AdjustPriceServiceImpl
|
||||||
|
* @Description 调价业务实现
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 2025/10/15 16:10
|
||||||
|
* @Version 1.0
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class AdjustPriceServiceImpl implements IAdjustPriceService {
|
||||||
|
@Resource
|
||||||
|
private IInventoryItemService inventoryItemService;
|
||||||
|
@Resource
|
||||||
|
private IActivityDefinitionService activityDefinitionService;
|
||||||
|
@Resource
|
||||||
|
private IHealthcareServiceService healthcareServiceService;
|
||||||
|
@Resource
|
||||||
|
private IMedicationService medicationService;
|
||||||
|
@Resource
|
||||||
|
private AdjustPriceMapper adjustPriceMapper;
|
||||||
|
@Resource
|
||||||
|
private IDeviceDefinitionService deviceDefinitionService;
|
||||||
|
@Resource
|
||||||
|
private IOrganizationService organizationService;
|
||||||
|
@Resource
|
||||||
|
private IChargeItemDefinitionService chargeItemDefinitionService;
|
||||||
|
@Resource
|
||||||
|
private IChangePriceRecordService changePriceRecordService;
|
||||||
|
@Resource
|
||||||
|
private ISysDictDataService sysDictDataService;
|
||||||
|
@Resource
|
||||||
|
private AssignSeqUtil assignSeqUtil;
|
||||||
|
@Resource
|
||||||
|
private RedisUtil redisUtil;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public R<?> submitChangePriceData(List<AdjustPriceDataVo> dataVoList) {
|
||||||
|
if (dataVoList.isEmpty()) {
|
||||||
|
return R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00001, null));
|
||||||
|
}
|
||||||
|
if (dataVoList.stream()
|
||||||
|
.anyMatch(data -> this.redisUtil.hasKey(RedisKeys.getProductsKey(data.getItemId().toString())))) {
|
||||||
|
return R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||||
|
}
|
||||||
|
//获取数据中的类型
|
||||||
|
Integer categoryType = dataVoList.get(0).getCategoryType();
|
||||||
|
// 单据号
|
||||||
|
String busNo = assignSeqUtil.getSeqByDay(AssignSeqEnum.CHANGE_PRICE_BUZ.getPrefix());
|
||||||
|
// 当前人
|
||||||
|
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||||
|
// 根据表单提交的tab 进入不同的 execute
|
||||||
|
if (AdjustPriceEnum.MEDICINE.getCode().equals(categoryType)
|
||||||
|
|| AdjustPriceEnum.CONSUMABLES.getCode().equals(categoryType)) {
|
||||||
|
//如果是 药品或者是耗材 因为药品和耗材的价格取的是 charge_detail表
|
||||||
|
this.executeChangePriceForMedication(dataVoList, busNo, practitionerId, categoryType);
|
||||||
|
} else if (AdjustPriceEnum.DIAGNOSIS.getCode().equals(categoryType)) {
|
||||||
|
//如果是 如果是 诊疗, 取价格主表
|
||||||
|
this.executeChangePriceForActivity(dataVoList, busNo, practitionerId);
|
||||||
|
} else {
|
||||||
|
//如果是 如果是 挂号, 取价格主表
|
||||||
|
this.executeChangePriceForHealth(dataVoList, busNo, practitionerId);
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> submitExamineChangePriceData(List<AdjustPriceDataVo> dataVoList) {
|
||||||
|
if (dataVoList.isEmpty()) {
|
||||||
|
return R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00001, null));
|
||||||
|
}
|
||||||
|
if (dataVoList.stream()
|
||||||
|
.anyMatch(data -> this.redisUtil.hasKey(RedisKeys.getProductsKey(data.getItemId().toString())))) {
|
||||||
|
return R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||||
|
}
|
||||||
|
//获取数据中的类型
|
||||||
|
Integer categoryType = dataVoList.get(0).getCategoryType();
|
||||||
|
// 单据号
|
||||||
|
String busNo = assignSeqUtil.getSeqByDay(AssignSeqEnum.CHANGE_PRICE_BUZ.getPrefix());
|
||||||
|
// 当前人
|
||||||
|
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||||
|
// 根据表单提交的tab 进入不同的 execute
|
||||||
|
if (AdjustPriceEnum.MEDICINE.getCode().equals(categoryType)
|
||||||
|
|| AdjustPriceEnum.CONSUMABLES.getCode().equals(categoryType)) {
|
||||||
|
this.executeChangePriceForMedicationExamine(dataVoList, busNo, practitionerId, categoryType);
|
||||||
|
} else if (AdjustPriceEnum.DIAGNOSIS.getCode().equals(categoryType)) {
|
||||||
|
this.executeChangePriceForActivityExamine(dataVoList, busNo, practitionerId);
|
||||||
|
} else {
|
||||||
|
this.executeChangePriceForHealthExamine(dataVoList, busNo, practitionerId);
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> searchKeyWordDataListByMed(String searchKey) {
|
||||||
|
//如果 searchKey == null 默认返回10条,反则 查询所有
|
||||||
|
return R.ok(this.medicationService.searchMedListByKeyWord(searchKey));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> searchKeyWordDataListByDevice(String searchKey) {
|
||||||
|
//如果 searchKey == null 默认返回10条,反则 查询所有
|
||||||
|
return R.ok(this.deviceDefinitionService.searchDeviceListByKeyWord(searchKey));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> searchKeyWordDataListByActivity(String searchKey) {
|
||||||
|
//如果 searchKey == null 默认返回10条,反则 查询所有
|
||||||
|
return R.ok(this.activityDefinitionService.searchActivityListByKeyWord(searchKey));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> searchChangePriceSubmitDataToPage(AdjustPriceManagerSearchParam adjustPriceManagerSearchParam,
|
||||||
|
Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) {
|
||||||
|
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||||
|
HashSet<String> searchFields = new HashSet<>();
|
||||||
|
searchFields.add(CommonConstants.FieldName.BusNo);
|
||||||
|
// 构建查询条件
|
||||||
|
QueryWrapper<InventorySearchParam> queryWrapper =
|
||||||
|
HisQueryUtils.buildQueryWrapper(adjustPriceManagerSearchParam, searchKey, searchFields, request);
|
||||||
|
// 查询入库单据分页列表
|
||||||
|
Page<ChangePricePageDto> changePricePageDtoPage = this.adjustPriceMapper.searchChangePriceDataToPage(
|
||||||
|
new Page<>(pageNo, pageSize), queryWrapper, SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue(),
|
||||||
|
SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue(), SupplyType.REQUEST_ACTIVITY_CHANGE_PRICE.getValue(),
|
||||||
|
SupplyType.REQUEST_HEALTH_CHANGE_PRICE.getValue(), practitionerId);
|
||||||
|
changePricePageDtoPage.getRecords().forEach(e -> {
|
||||||
|
e.setStatusEnum_enumText(EnumUtils.getInfoByValue(SupplyStatus.class, e.getStatusEnum()));
|
||||||
|
e.setCategoryEnum_enumText(EnumUtils.getInfoByValue(SupplyType.class, e.getItemCategoryEnum()));
|
||||||
|
});
|
||||||
|
return R.ok(changePricePageDtoPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> searchChangePriceDataByMed(String busNo) {
|
||||||
|
// 根据 单据号 查询 药品详情
|
||||||
|
List<ChangePriceDataDto> dataList = this.changePriceRecordService.searchMedChangePriceByBusNo(busNo,
|
||||||
|
SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue(), null);
|
||||||
|
// 获取 药品的单位
|
||||||
|
for (ChangePriceDataDto changePriceDataDto : dataList) {
|
||||||
|
SysDictData sysDictData =
|
||||||
|
sysDictDataService.selectDictInfo(CommonConstants.FieldName.UnitCode, changePriceDataDto.getUnitCode());
|
||||||
|
changePriceDataDto.setLabel(sysDictData.getDictLabel());
|
||||||
|
}
|
||||||
|
return R.ok(dataList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> searchChangePriceDataByDevice(String busNo) {
|
||||||
|
//根据 单据号 耗材调价单详情
|
||||||
|
return R.ok(this.changePriceRecordService.searchDeviceChangePriceByBusNo(busNo,
|
||||||
|
SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue(), null));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> searchChangePriceDataByActivity(String busNo) {
|
||||||
|
//根据 单据号 查询 诊疗调价单详情
|
||||||
|
return R.ok(this.changePriceRecordService.searchActivityChangePriceByBusNo(busNo,
|
||||||
|
SupplyType.REQUEST_ACTIVITY_CHANGE_PRICE.getValue(), null));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> searchChangePriceDataByHealth(String busNo) {
|
||||||
|
//根据 单据号 挂号调价单详情
|
||||||
|
return R.ok(this.changePriceRecordService.searchHealthChangePriceByBusNo(busNo,
|
||||||
|
SupplyType.REQUEST_HEALTH_CHANGE_PRICE.getValue(), null));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> cancelChangePriceData(String busNo) {
|
||||||
|
//根据 单据号查询出 当前所有请求调价的数据集
|
||||||
|
List<ChangePriceRecord> changePriceRecordList =
|
||||||
|
this.changePriceRecordService.searchChangePriceDataForBusNo(busNo);
|
||||||
|
//循环数据集合,将状态修改为 无效状态
|
||||||
|
for (ChangePriceRecord data : changePriceRecordList) {
|
||||||
|
ChangePriceRecord changePriceRecord = this.changePriceRecordService.getById(data.getId());
|
||||||
|
changePriceRecord.setStatusEnum(SupplyStatus.EXPIRED_INVALIDATED.getValue());
|
||||||
|
this.changePriceRecordService.updateById(changePriceRecord);
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> searchAllOrgData() {
|
||||||
|
//查询所有科室
|
||||||
|
List<OrgDataDto> orgDataList = this.organizationService.searchOrgDataByHealth();
|
||||||
|
return R.ok(orgDataList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> searchHealthData(Long orgId) {
|
||||||
|
//根据科室ID 查询所有号源
|
||||||
|
return R.ok(this.healthcareServiceService.searchAllHeathData(orgId,PublicationStatus.ACTIVE.getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> updateExamineByApproval(String busNo) {
|
||||||
|
//根据调价单编号 查询 分组后的 数据
|
||||||
|
List<ChangePriceRecord> changePriceRecordList =
|
||||||
|
this.changePriceRecordService.searchChangePriceDataGroupByBusNo(busNo);
|
||||||
|
if (!changePriceRecordList.isEmpty()) {
|
||||||
|
// 循环将数据进行填充
|
||||||
|
for (ChangePriceRecord data : changePriceRecordList) {
|
||||||
|
//提交 审批时,查看是否有正在审核中的 货品数据 。根据 货品ID 从redis中查询
|
||||||
|
if (this.redisUtil.hasKey(RedisKeys.getProductsKey(data.getItemId().toString()))) {
|
||||||
|
return R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||||
|
}
|
||||||
|
//如果不存在,向redis中插入 药品信息 = 给当前 货品上锁 。审批通过或驳回后 释放
|
||||||
|
this.redisUtil.set(RedisKeys.getProductsKey(data.getItemId().toString()), data.getItemId());
|
||||||
|
}
|
||||||
|
//根据 busNo 修改调价单状态
|
||||||
|
this.changePriceRecordService.submitApproval(busNo);
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> checkMedApprovalExist(Long itemId) {
|
||||||
|
//添加 货品调价时,先查询 当前货品是否在 审核中,如果在,不允许改价。
|
||||||
|
return this.changePriceRecordService.searchMedChangePriceByItemId(itemId,
|
||||||
|
SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue(), SupplyStatus.APPROVAL.getValue()).isEmpty() ? R.ok()
|
||||||
|
: R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> checkDeviceApprovalExist(Long itemId) {
|
||||||
|
//添加 货品调价时,先查询 当前货品是否在 审核中,如果在,不允许改价。
|
||||||
|
return this.changePriceRecordService.searchDeviceChangePriceByItemId(itemId,
|
||||||
|
SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue(), SupplyStatus.APPROVAL.getValue()).isEmpty() ? R.ok()
|
||||||
|
: R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> checkActivityApprovalExist(Long itemId) {
|
||||||
|
//添加 货品调价时,先查询 当前货品是否在 审核中,如果在,不允许改价。
|
||||||
|
return this.changePriceRecordService.searchActivityChangePriceByItemId(itemId,
|
||||||
|
SupplyType.REQUEST_ACTIVITY_CHANGE_PRICE.getValue(), SupplyStatus.APPROVAL.getValue()).isEmpty() ? R.ok()
|
||||||
|
: R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> checkHealthApprovalExist(Long itemId) {
|
||||||
|
//添加 货品调价时,先查询 当前货品是否在 审核中,如果在,不允许改价。
|
||||||
|
return this.changePriceRecordService.searchHealthChangePriceByItemId(itemId,
|
||||||
|
SupplyType.REQUEST_HEALTH_CHANGE_PRICE.getValue(), SupplyStatus.APPROVAL.getValue()).isEmpty() ? R.ok()
|
||||||
|
: R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean executeChangePriceForMedication(List<AdjustPriceDataVo> dataVoList, String busNo,
|
||||||
|
Long practitionerId, Integer categoryType) {
|
||||||
|
// 有库存的药品或耗材集合
|
||||||
|
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||||
|
// 从map中将表单集合取出
|
||||||
|
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||||
|
//根据表单中的id数组 加载库存集合
|
||||||
|
List<AdjustPriceDto> inventoryItemList =
|
||||||
|
this.inventoryItemService.searchResultDataList(this.executeItemIds(dataVoList));
|
||||||
|
for (AdjustPriceDto data : inventoryItemList) {
|
||||||
|
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||||
|
dataVo.setTotalQuantity(data.getTotalCount());
|
||||||
|
dataVo.setItemTable(data.getItemTable());
|
||||||
|
dataVo.setItemId(data.getItemId());
|
||||||
|
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||||
|
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||||
|
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||||
|
dataVo.setUnitCode(dataVoMap.get(data.getItemId()).getUnitCode());
|
||||||
|
dataVo.setLotNumber(data.getLotNumber());
|
||||||
|
dataVo.setLocationId(data.getLocationId());
|
||||||
|
resultList.add(dataVo);
|
||||||
|
}
|
||||||
|
//填充 ChangePriceRecord 对象,返回list进行批量添加
|
||||||
|
List<ChangePriceRecord> changePriceRecords =
|
||||||
|
this.executeChangePriceData(busNo, practitionerId, resultList, SupplyStatus.PENDING_APPROVAL.getValue(),
|
||||||
|
AdjustPriceEnum.MEDICINE.getCode().equals(categoryType)
|
||||||
|
? SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue()
|
||||||
|
: SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue());
|
||||||
|
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean executeChangePriceForMedicationExamine(List<AdjustPriceDataVo> dataVoList, String busNo,
|
||||||
|
Long practitionerId, Integer categoryType) {
|
||||||
|
// 有库存的药品或耗材集合
|
||||||
|
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||||
|
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||||
|
List<AdjustPriceDto> inventoryItemList =
|
||||||
|
this.inventoryItemService.searchResultDataList(this.executeItemIds(dataVoList));
|
||||||
|
for (AdjustPriceDto data : inventoryItemList) {
|
||||||
|
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||||
|
dataVo.setTotalQuantity(data.getTotalCount());
|
||||||
|
dataVo.setItemTable(data.getItemTable());
|
||||||
|
dataVo.setItemId(data.getItemId());
|
||||||
|
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||||
|
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||||
|
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||||
|
dataVo.setUnitCode(dataVoMap.get(data.getItemId()).getUnitCode());
|
||||||
|
dataVo.setLotNumber(data.getLotNumber());
|
||||||
|
dataVo.setLocationId(data.getLocationId());
|
||||||
|
resultList.add(dataVo);
|
||||||
|
this.redisUtil.set(RedisKeys.getProductsKey(data.getItemId().toString()), data.getItemId());
|
||||||
|
}
|
||||||
|
//填充 ChangePriceRecord 对象,返回list进行批量添加
|
||||||
|
List<ChangePriceRecord> changePriceRecords =
|
||||||
|
this.executeChangePriceData(busNo, practitionerId, resultList, SupplyStatus.APPROVAL.getValue(),
|
||||||
|
AdjustPriceEnum.MEDICINE.getCode().equals(categoryType)
|
||||||
|
? SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue()
|
||||||
|
: SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue());
|
||||||
|
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean executeChangePriceForActivity(List<AdjustPriceDataVo> dataVoList, String busNo,
|
||||||
|
Long practitionerId) {
|
||||||
|
List<ActivityDto> dataDtoList =
|
||||||
|
this.activityDefinitionService.searchActivityDefinitionByIds(this.executeItemIds(dataVoList));
|
||||||
|
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||||
|
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||||
|
for (ActivityDto data : dataDtoList) {
|
||||||
|
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||||
|
dataVo.setItemTable(CommonConstants.TableName.WOR_ACTIVITY_DEFINITION);
|
||||||
|
dataVo.setName(data.getName());
|
||||||
|
dataVo.setItemId(data.getItemId());
|
||||||
|
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||||
|
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||||
|
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||||
|
dataVo.setLotNumber(dataVoMap.get(data.getItemId()).getLotNumber());
|
||||||
|
resultList.add(dataVo);
|
||||||
|
}
|
||||||
|
//填充 ChangePriceRecord 对象,返回list进行批量添加
|
||||||
|
List<ChangePriceRecord> changePriceRecords = this.executeChangePriceData(busNo, practitionerId, resultList,
|
||||||
|
SupplyStatus.PENDING_APPROVAL.getValue(), SupplyType.REQUEST_ACTIVITY_CHANGE_PRICE.getValue());
|
||||||
|
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 处理申请 诊疗改价业务申请
|
||||||
|
*
|
||||||
|
* @param dataVoList
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 11:19 2025/10/18
|
||||||
|
* @return boolean
|
||||||
|
**/
|
||||||
|
public boolean executeChangePriceForActivityExamine(List<AdjustPriceDataVo> dataVoList, String busNo,
|
||||||
|
Long practitionerId) {
|
||||||
|
List<ActivityDto> dataDtoList =
|
||||||
|
this.activityDefinitionService.searchActivityDefinitionByIds(this.executeItemIds(dataVoList));
|
||||||
|
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||||
|
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||||
|
for (ActivityDto data : dataDtoList) {
|
||||||
|
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||||
|
dataVo.setItemTable(CommonConstants.TableName.WOR_ACTIVITY_DEFINITION);
|
||||||
|
dataVo.setName(data.getName());
|
||||||
|
dataVo.setItemId(data.getItemId());
|
||||||
|
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||||
|
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||||
|
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||||
|
dataVo.setLotNumber(dataVoMap.get(data.getItemId()).getLotNumber());
|
||||||
|
resultList.add(dataVo);
|
||||||
|
this.redisUtil.set(RedisKeys.getProductsKey(data.getItemId().toString()), data.getItemId());
|
||||||
|
}
|
||||||
|
//填充 ChangePriceRecord 对象,返回list进行批量添加
|
||||||
|
List<ChangePriceRecord> changePriceRecords = this.executeChangePriceData(busNo, practitionerId, resultList,
|
||||||
|
SupplyStatus.APPROVAL.getValue(), SupplyType.REQUEST_ACTIVITY_CHANGE_PRICE.getValue());
|
||||||
|
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 处理申请 挂号改价业务
|
||||||
|
*
|
||||||
|
* @param dataVoList
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 11:20 2025/10/18
|
||||||
|
* @return boolean
|
||||||
|
**/
|
||||||
|
public boolean executeChangePriceForHealth(List<AdjustPriceDataVo> dataVoList, String busNo, Long practitionerId) {
|
||||||
|
List<HealthcareDto> dataDtoList =
|
||||||
|
this.healthcareServiceService.searchHealthByIds(this.executeItemIds(dataVoList));
|
||||||
|
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||||
|
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||||
|
for (HealthcareDto data : dataDtoList) {
|
||||||
|
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||||
|
dataVo.setItemTable(CommonConstants.TableName.ADM_HEALTHCARE_SERVICE);
|
||||||
|
dataVo.setItemId(data.getItemId());
|
||||||
|
dataVo.setName(data.getName());
|
||||||
|
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||||
|
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||||
|
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||||
|
dataVo.setLotNumber(dataVoMap.get(data.getItemId()).getLotNumber());
|
||||||
|
resultList.add(dataVo);
|
||||||
|
}
|
||||||
|
//填充 ChangePriceRecord 对象,返回list进行批量添加 supply_request表共享了 审核状态和 category 枚举
|
||||||
|
List<ChangePriceRecord> changePriceRecords = this.executeChangePriceData(busNo, practitionerId, resultList,
|
||||||
|
SupplyStatus.PENDING_APPROVAL.getValue(), SupplyType.REQUEST_HEALTH_CHANGE_PRICE.getValue());
|
||||||
|
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 处理申请 挂号改价业务
|
||||||
|
*
|
||||||
|
* @param dataVoList
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 11:20 2025/10/18
|
||||||
|
* @return boolean
|
||||||
|
**/
|
||||||
|
public boolean executeChangePriceForHealthExamine(List<AdjustPriceDataVo> dataVoList, String busNo,
|
||||||
|
Long practitionerId) {
|
||||||
|
List<HealthcareDto> dataDtoList =
|
||||||
|
this.healthcareServiceService.searchHealthByIds(this.executeItemIds(dataVoList));
|
||||||
|
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||||
|
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||||
|
for (HealthcareDto data : dataDtoList) {
|
||||||
|
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||||
|
dataVo.setItemTable(CommonConstants.TableName.ADM_HEALTHCARE_SERVICE);
|
||||||
|
dataVo.setItemId(data.getItemId());
|
||||||
|
dataVo.setName(data.getName());
|
||||||
|
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||||
|
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||||
|
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||||
|
dataVo.setLotNumber(dataVoMap.get(data.getItemId()).getLotNumber());
|
||||||
|
resultList.add(dataVo);
|
||||||
|
this.redisUtil.set(RedisKeys.getProductsKey(data.getItemId().toString()), data.getItemId());
|
||||||
|
}
|
||||||
|
//填充 ChangePriceRecord 对象,返回list进行批量添加 supply_request表共享了 审核状态和 category 枚举
|
||||||
|
List<ChangePriceRecord> changePriceRecords = this.executeChangePriceData(busNo, practitionerId, resultList,
|
||||||
|
SupplyStatus.APPROVAL.getValue(), SupplyType.REQUEST_HEALTH_CHANGE_PRICE.getValue());
|
||||||
|
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 封装对象数据
|
||||||
|
*
|
||||||
|
* @param busNo
|
||||||
|
* @param curUserId
|
||||||
|
* @param itemList
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 09:35 2025/10/18
|
||||||
|
* @return java.util.List<com.openhis.workflow.domain.ChangePriceRecord>
|
||||||
|
**/
|
||||||
|
public List<ChangePriceRecord> executeChangePriceData(String busNo, Long curUserId,
|
||||||
|
List<AdjustPriceDataVo> itemList, Integer statusEnum, Integer categoryEnum) {
|
||||||
|
List<ChangePriceRecord> srList = new LinkedList<>();
|
||||||
|
for (AdjustPriceDataVo dataVo : itemList) {
|
||||||
|
ChangePriceRecord cpr = new ChangePriceRecord();
|
||||||
|
//如果是 药品调价
|
||||||
|
if (SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue().equals(categoryEnum)) {
|
||||||
|
// 获取当前进货价
|
||||||
|
ChargeItemDefDetailPriceDto buyingPriceDto = this.chargeItemDefinitionService
|
||||||
|
.getMedPriceByParam(ConditionCode.LOT_NUMBER_COST.getCode(), dataVo.getItemId());
|
||||||
|
// 获取当前零售价
|
||||||
|
ChargeItemDefDetailPriceDto retailPriceDto = this.chargeItemDefinitionService
|
||||||
|
.getMedPriceByParam(ConditionCode.LOT_NUMBER_PRICE.getCode(), dataVo.getItemId());
|
||||||
|
if (buyingPriceDto != null || retailPriceDto != null) {
|
||||||
|
// 库存 以最小单位存储,以货品最小单位进行计算
|
||||||
|
BigDecimal partPercent =
|
||||||
|
dataVo.getTotalQuantity().divide(buyingPriceDto.getPartPercent(), 6, RoundingMode.HALF_UP);
|
||||||
|
//进货价盈负差
|
||||||
|
BigDecimal buyingDiffPrice =
|
||||||
|
dataVo.getNewBuyingPrice().subtract(buyingPriceDto.getPrice()).multiply(partPercent);
|
||||||
|
// 零售价盈负差
|
||||||
|
BigDecimal retailDiffPrice =
|
||||||
|
dataVo.getNewRetailPrice().subtract(retailPriceDto.getPrice()).multiply(partPercent);
|
||||||
|
//填充 change_price_record表数据
|
||||||
|
cpr.setNewBuyingPrice(dataVo.getNewBuyingPrice()).setNewRetailPrice(dataVo.getNewRetailPrice())
|
||||||
|
.setItemQuantity(dataVo.getTotalQuantity()).setItemId(dataVo.getItemId())
|
||||||
|
.setItemTable(dataVo.getItemTable()).setReason(dataVo.getReason()).setBusNo(busNo)
|
||||||
|
.setApplicantId(curUserId).setStatusEnum(statusEnum).setItemCategoryEnum(categoryEnum)
|
||||||
|
.setLotNumber(dataVo.getLotNumber()).setUnitCode(dataVo.getUnitCode())
|
||||||
|
.setOriginBuyingPrice(buyingPriceDto.getPrice()).setOriginRetailPrice(retailPriceDto.getPrice())
|
||||||
|
.setDifferenceBuyingPrice(buyingDiffPrice).setDifferenceRetailPrice(retailDiffPrice)
|
||||||
|
.setApplicantTime(SupplyStatus.APPROVAL.getValue().equals(statusEnum) ? new Date() : null);
|
||||||
|
srList.add(cpr);
|
||||||
|
} //如果是 耗材调价
|
||||||
|
} else if (SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue().equals(categoryEnum)) {
|
||||||
|
// 获取当前进货价
|
||||||
|
ChargeItemDefDetailPriceDto buyingPriceDto = this.chargeItemDefinitionService
|
||||||
|
.getDevicePriceByParam(ConditionCode.LOT_NUMBER_COST.getCode(), dataVo.getItemId());
|
||||||
|
// 获取当前零售价
|
||||||
|
ChargeItemDefDetailPriceDto retailPriceDto = this.chargeItemDefinitionService
|
||||||
|
.getDevicePriceByParam(ConditionCode.LOT_NUMBER_PRICE.getCode(), dataVo.getItemId());
|
||||||
|
if (buyingPriceDto != null || retailPriceDto != null) {
|
||||||
|
// 库存 以最小单位存储,以货品最小单位进行计算
|
||||||
|
BigDecimal partPercent =
|
||||||
|
dataVo.getTotalQuantity().divide(buyingPriceDto.getPartPercent(), 6, RoundingMode.HALF_UP);
|
||||||
|
//进货价盈负差
|
||||||
|
BigDecimal buyingDiffPrice =
|
||||||
|
dataVo.getNewBuyingPrice().subtract(buyingPriceDto.getPrice()).multiply(partPercent);
|
||||||
|
// 零售价盈负差
|
||||||
|
BigDecimal retailDiffPrice =
|
||||||
|
dataVo.getNewRetailPrice().subtract(retailPriceDto.getPrice()).multiply(partPercent);
|
||||||
|
//填充 change_price_record表数据
|
||||||
|
cpr.setNewBuyingPrice(dataVo.getNewBuyingPrice()).setNewRetailPrice(dataVo.getNewRetailPrice())
|
||||||
|
.setItemQuantity(dataVo.getTotalQuantity()).setItemId(dataVo.getItemId()).setLocationId(dataVo.getLocationId())
|
||||||
|
.setItemTable(dataVo.getItemTable()).setReason(dataVo.getReason()).setBusNo(busNo)
|
||||||
|
.setApplicantId(curUserId).setStatusEnum(statusEnum).setItemCategoryEnum(categoryEnum)
|
||||||
|
.setLotNumber(dataVo.getLotNumber()).setUnitCode(dataVo.getUnitCode())
|
||||||
|
.setOriginBuyingPrice(buyingPriceDto.getPrice()).setOriginRetailPrice(retailPriceDto.getPrice())
|
||||||
|
.setDifferenceBuyingPrice(buyingDiffPrice).setDifferenceRetailPrice(retailDiffPrice)
|
||||||
|
.setApplicantTime(SupplyStatus.APPROVAL.getValue().equals(statusEnum) ? new Date() : null);
|
||||||
|
srList.add(cpr);
|
||||||
|
}
|
||||||
|
} else {//如果是 诊疗或者挂号调价,诊疗和耗材 没有库存
|
||||||
|
ChargeItemDefDetailPriceDto retailPriceDto = this.chargeItemDefinitionService
|
||||||
|
.getProductPrice(PublicationStatus.ACTIVE.getValue(), dataVo.getItemId());
|
||||||
|
if (retailPriceDto != null) {
|
||||||
|
//新价格 - 原价格
|
||||||
|
BigDecimal retailDiffPrice = dataVo.getNewRetailPrice().subtract(retailPriceDto.getPrice());
|
||||||
|
//填充 change_price_record表数据
|
||||||
|
cpr.setNewBuyingPrice(dataVo.getNewBuyingPrice()).setNewRetailPrice(dataVo.getNewRetailPrice())
|
||||||
|
.setItemQuantity(dataVo.getTotalQuantity()).setItemId(dataVo.getItemId())
|
||||||
|
.setItemTable(dataVo.getItemTable()).setReason(dataVo.getReason()).setBusNo(busNo)
|
||||||
|
.setApplicantId(curUserId).setStatusEnum(statusEnum).setItemCategoryEnum(categoryEnum)
|
||||||
|
.setLotNumber(dataVo.getLotNumber()).setUnitCode(dataVo.getUnitCode())
|
||||||
|
.setOriginRetailPrice(retailPriceDto.getPrice()).setDifferenceRetailPrice(retailDiffPrice)
|
||||||
|
.setApplicantTime(SupplyStatus.APPROVAL.getValue().equals(statusEnum) ? new Date() : null);
|
||||||
|
srList.add(cpr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return srList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 封装获取药品和耗材的id数组
|
||||||
|
*
|
||||||
|
* @param dataVoList
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 08:03 2025/10/18
|
||||||
|
* @return java.util.List<java.lang.Long>
|
||||||
|
**/
|
||||||
|
public List<Long> executeItemIds(List<AdjustPriceDataVo> dataVoList) {
|
||||||
|
List<Long> itemIds = new LinkedList<>();
|
||||||
|
for (AdjustPriceDataVo data : dataVoList) {
|
||||||
|
itemIds.add(data.getItemId());
|
||||||
|
}
|
||||||
|
return itemIds;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Desc: 存储表单数据
|
||||||
|
* @param dataVoList
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 10:28 2025/11/5
|
||||||
|
* @return java.util.Map<java.lang.Long,com.openhis.web.adjustprice.dto.AdjustPriceDataVo>
|
||||||
|
**/
|
||||||
|
public Map<Long, AdjustPriceDataVo> executeMap(List<AdjustPriceDataVo> dataVoList) {
|
||||||
|
Map<Long, AdjustPriceDataVo> map = new ConcurrentHashMap<>();
|
||||||
|
for (AdjustPriceDataVo data : dataVoList) {
|
||||||
|
map.put(data.getItemId(), data);
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package com.openhis.web.adjustprice.appservice.impl;
|
|
||||||
|
|
||||||
import com.openhis.web.adjustprice.appservice.ISupplyService;
|
|
||||||
import com.openhis.web.adjustprice.dto.SupplyListDto;
|
|
||||||
import com.openhis.web.adjustprice.mapper.SupplyMapper;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName ChangePriceImpl
|
|
||||||
* @Description TODO
|
|
||||||
* @Author raymond
|
|
||||||
* @Date 2025/10/15 16:10
|
|
||||||
* @Version 1.0
|
|
||||||
**/
|
|
||||||
@Component
|
|
||||||
public class SupplyServiceImpl implements ISupplyService {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private SupplyMapper supplyMapper;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<SupplyListDto> searchAllSupplyList() {
|
|
||||||
return this.supplyMapper.searchAllSupplyList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +1,15 @@
|
|||||||
package com.openhis.web.adjustprice.controller;
|
package com.openhis.web.adjustprice.controller;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import com.core.common.core.domain.R;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import com.core.common.enums.TenantOptionDict;
|
||||||
|
import com.core.web.util.TenantOptionUtil;
|
||||||
|
import com.openhis.common.enums.OrderPricingSource;
|
||||||
|
import com.openhis.web.adjustprice.appservice.IAdjustPriceService;
|
||||||
|
import com.openhis.web.adjustprice.dto.AdjustPriceDataVo;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import com.core.common.core.domain.R;
|
import javax.annotation.Resource;
|
||||||
import com.openhis.web.adjustprice.appservice.ISupplyService;
|
import java.util.List;
|
||||||
import com.openhis.web.datadictionary.dto.MedicationSearchParam;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName ChargePriceController
|
* @ClassName ChargePriceController
|
||||||
@@ -19,94 +21,163 @@ import com.openhis.web.datadictionary.dto.MedicationSearchParam;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/change/price")
|
@RequestMapping("/change/price")
|
||||||
public class ChangePriceController {
|
public class ChangePriceController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ISupplyService supplyService;
|
private IAdjustPriceService adjustPriceService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Desc: 查询所有供应商集合
|
* Desc: 根据关键词搜索数据
|
||||||
*
|
*
|
||||||
* @param
|
* @param
|
||||||
* @Author raymond
|
|
||||||
* @Date 16:55 2025/10/15
|
|
||||||
* @return com.core.common.core.domain.R<?>
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 09:26 2025/10/20
|
||||||
**/
|
**/
|
||||||
@GetMapping(value = "searchAllSupply")
|
@PostMapping(value = "searchKeyWordDataListByMed")
|
||||||
public R<?> searchAllSupply() {
|
public R<?> searchKeyWordDataListByMed(@RequestParam(name = "searchKey", required = false) String searchKey) {
|
||||||
return R.ok(this.supplyService.searchAllSupplyList());
|
return R.ok(this.adjustPriceService.searchKeyWordDataListByMed(searchKey));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据关键词搜索数据
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 09:26 2025/10/20
|
||||||
|
**/
|
||||||
|
@PostMapping(value = "searchKeyWordDataListByDevice")
|
||||||
|
public R<?> searchKeyWordDataListByDevice(@RequestParam(name = "searchKey", required = false) String searchKey) {
|
||||||
|
return R.ok(this.adjustPriceService.searchKeyWordDataListByDevice(searchKey));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据关键词搜索数据
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 09:26 2025/10/20
|
||||||
|
**/
|
||||||
|
@PostMapping(value = "searchKeyWordDataListByActivity")
|
||||||
|
public R<?> searchKeyWordDataListByActivity(@RequestParam(name = "searchKey", required = false) String searchKey) {
|
||||||
|
return R.ok(this.adjustPriceService.searchKeyWordDataListByActivity(searchKey));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 查询所有 有挂号信息的科室
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 08:38 2025/10/22
|
||||||
|
**/
|
||||||
|
@PostMapping(value = "searchAllOrgData")
|
||||||
|
public R<?> searchAllOrgData() {
|
||||||
|
return this.adjustPriceService.searchAllOrgData();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据科室id 加载 挂号信息
|
||||||
|
*
|
||||||
|
* @param orgId
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 16:46 2025/10/22
|
||||||
|
**/
|
||||||
|
@PostMapping(value = "searchHealthData")
|
||||||
|
public R<?> searchHealthData(@RequestParam Long orgId) {
|
||||||
|
return this.adjustPriceService.searchHealthData(orgId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 保存 改价数据
|
||||||
|
*
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 08:47 2025/10/15
|
||||||
|
**/
|
||||||
|
@PostMapping(value = "commitChangePriceData")
|
||||||
|
public R<?> commitChangePriceData(@RequestBody List<AdjustPriceDataVo> dataVoList) {
|
||||||
|
return adjustPriceService.submitChangePriceData(dataVoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Desc: 根据供应商和药品名称加载要修改的药品数据
|
* Desc: 根据供应商和药品名称加载要修改的药品数据
|
||||||
*
|
*
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
* @Author raymond
|
* @Author raymond
|
||||||
* @Date 08:47 2025/10/15
|
* @Date 08:47 2025/10/15
|
||||||
* @return com.core.common.core.domain.R<?>
|
|
||||||
**/
|
**/
|
||||||
@PostMapping(value = "searchMedicineListToPage")
|
@PostMapping(value = "submitExamineChangePriceData")
|
||||||
public R<?> searchMedicineListToPage() {
|
public R<?> submitExamineChangePriceData(@RequestBody List<AdjustPriceDataVo> dataVoList) {
|
||||||
return R.ok();
|
return adjustPriceService.submitExamineChangePriceData(dataVoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Desc:
|
* Desc: 根据货品ID 查询是否有审核中的药品数据
|
||||||
*
|
*
|
||||||
* @param medicationSearchParam
|
* @param itemId
|
||||||
* @param searchKey
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param request
|
|
||||||
* @Author raymond
|
|
||||||
* @Date 13:41 2025/10/15
|
|
||||||
* @return com.core.common.core.domain.R<?>
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 17:32 2025/11/3
|
||||||
**/
|
**/
|
||||||
@PostMapping(value = "searchConsumablesListToPage")
|
@PostMapping(value = "checkMedApprovalExist")
|
||||||
public R<?> searchConsumablesListToPage(MedicationSearchParam medicationSearchParam,
|
public R<?> checkMedApprovalExist(@RequestParam Long itemId) {
|
||||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
return this.adjustPriceService.checkMedApprovalExist(itemId);
|
||||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Desc:
|
* Desc: 根据货品ID 查询是否有审核中的药品数据
|
||||||
*
|
*
|
||||||
* @param medicationSearchParam
|
* @param itemId
|
||||||
* @param searchKey
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param request
|
|
||||||
* @Author raymond
|
|
||||||
* @Date 13:41 2025/10/15
|
|
||||||
* @return com.core.common.core.domain.R<?>
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 17:32 2025/11/3
|
||||||
**/
|
**/
|
||||||
@PostMapping(value = "searchDiagnosisListToPage")
|
@PostMapping(value = "checkDeviceApprovalExist")
|
||||||
public R<?> searchDiagnosisListToPage(MedicationSearchParam medicationSearchParam,
|
public R<?> checkDeviceApprovalExist(@RequestParam Long itemId) {
|
||||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
return this.adjustPriceService.checkDeviceApprovalExist(itemId);
|
||||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Desc:
|
* Desc: 根据货品ID 查询是否有审核中的药品数据
|
||||||
*
|
*
|
||||||
* @param medicationSearchParam
|
* @param itemId
|
||||||
* @param searchKey
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param request
|
|
||||||
* @Author raymond
|
|
||||||
* @Date 13:41 2025/10/15
|
|
||||||
* @return com.core.common.core.domain.R<?>
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 17:32 2025/11/3
|
||||||
**/
|
**/
|
||||||
@PostMapping(value = "searchHealthCareListToPage")
|
@PostMapping(value = "checkActivityApprovalExist")
|
||||||
public R<?> searchRegisterListToPage(MedicationSearchParam medicationSearchParam,
|
public R<?> checkActivityApprovalExist(@RequestParam Long itemId) {
|
||||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
return this.adjustPriceService.checkActivityApprovalExist(itemId);
|
||||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
}
|
||||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
|
||||||
|
|
||||||
return null;
|
/**
|
||||||
|
* Desc: 根据货品ID 查询是否有审核中的药品数据
|
||||||
|
*
|
||||||
|
* @param itemId
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 17:32 2025/11/3
|
||||||
|
**/
|
||||||
|
@PostMapping(value = "checkHealthApprovalExist")
|
||||||
|
public R<?> checkHealthApprovalExist(@RequestParam Long itemId) {
|
||||||
|
return this.adjustPriceService.checkHealthApprovalExist(itemId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 查询调价控制开关状态接口
|
||||||
|
*
|
||||||
|
* @return true:统一零售价 , false:按批次号售卖
|
||||||
|
**/
|
||||||
|
@GetMapping(value = "getAdjustPriceSwitchState")
|
||||||
|
public R<?> getAdjustPriceSwitchState() {
|
||||||
|
// 医嘱定价来源
|
||||||
|
String orderPricingSource = TenantOptionUtil.getOptionContent(TenantOptionDict.ORDER_PRICING_SOURCE);
|
||||||
|
if (OrderPricingSource.RETAIL_PRICE.getCode().equals(orderPricingSource)) {
|
||||||
|
return R.ok(true);
|
||||||
|
}
|
||||||
|
return R.ok(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,153 @@
|
|||||||
|
package com.openhis.web.adjustprice.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
import com.openhis.web.adjustprice.appservice.IAdjustPriceService;
|
||||||
|
import com.openhis.web.adjustprice.dto.AdjustPriceDataVo;
|
||||||
|
import com.openhis.web.adjustprice.dto.AdjustPriceManagerSearchParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName ChangePriceListPageController
|
||||||
|
* @Description TODO
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 2025/10/23 15:16
|
||||||
|
* @Version 1.0
|
||||||
|
**/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/change/price/list")
|
||||||
|
public class ChangePriceDataListPageController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IAdjustPriceService adjustPriceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 查询 调价管理列表页面 分页查询当前人 提交的调价单
|
||||||
|
*
|
||||||
|
* @param adjustPriceManagerSearchParam
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param searchKey
|
||||||
|
* @param request
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 15:47 2025/10/23
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
@GetMapping(value = "getPage")
|
||||||
|
public R<?> getPage(AdjustPriceManagerSearchParam adjustPriceManagerSearchParam,
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
@RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) {
|
||||||
|
return this.adjustPriceService.searchChangePriceSubmitDataToPage(adjustPriceManagerSearchParam, pageNo,
|
||||||
|
pageSize, searchKey, request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据单据号 进行提交审核操作
|
||||||
|
*
|
||||||
|
* @param busNo
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 09:38 2025/10/23
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
@PostMapping(value = "updateStatusByApproval")
|
||||||
|
public R<?> updateStatusByApproval(@RequestParam String busNo) {
|
||||||
|
return this.adjustPriceService.updateExamineByApproval(busNo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 作废 调价单数据
|
||||||
|
*
|
||||||
|
* @param busNo
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 14:47 2025/10/21
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
@PostMapping(value = "cancelChangePriceData")
|
||||||
|
public R<?> cancelChangePriceData(@RequestParam String busNo) {
|
||||||
|
return this.adjustPriceService.cancelChangePriceData(busNo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据供应商和药品名称加载要修改的药品数据
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 08:47 2025/10/15
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
@PostMapping(value = "submitChangePriceData")
|
||||||
|
public R<?> submitChangePriceData(@RequestBody List<AdjustPriceDataVo> dataVoList) {
|
||||||
|
return adjustPriceService.submitChangePriceData(dataVoList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据 单据号 药品调价单 查询详情
|
||||||
|
*
|
||||||
|
* @param busNo
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 12:01 2025/10/21
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
@PostMapping(value = "searchChangePriceDataByMed")
|
||||||
|
public R<?> searchChangePriceDataByMed(@RequestParam String busNo) {
|
||||||
|
if (StringUtils.isEmpty(busNo)) {
|
||||||
|
return R.fail();
|
||||||
|
}
|
||||||
|
return this.adjustPriceService.searchChangePriceDataByMed(busNo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据 单据号 耗材调价单 查询详情
|
||||||
|
*
|
||||||
|
* @param busNo
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 12:01 2025/10/21
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
@PostMapping(value = "searchChangePriceDataByDevice")
|
||||||
|
public R<?> searchChangePriceDataByDevice(@RequestParam String busNo) {
|
||||||
|
if (StringUtils.isEmpty(busNo)) {
|
||||||
|
return R.fail();
|
||||||
|
}
|
||||||
|
return this.adjustPriceService.searchChangePriceDataByDevice(busNo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据 单据号 诊疗调价单 查询详情
|
||||||
|
*
|
||||||
|
* @param busNo
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 12:01 2025/10/21
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
@PostMapping(value = "searchChangePriceDataByActivity")
|
||||||
|
public R<?> searchChangePriceDataByActivity(@RequestParam String busNo) {
|
||||||
|
if (StringUtils.isEmpty(busNo)) {
|
||||||
|
return R.fail();
|
||||||
|
}
|
||||||
|
return this.adjustPriceService.searchChangePriceDataByActivity(busNo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据 单据号 挂号调价单 查询详情
|
||||||
|
*
|
||||||
|
* @param busNo
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 12:01 2025/10/21
|
||||||
|
* @return com.core.common.core.domain.R<?>
|
||||||
|
**/
|
||||||
|
@PostMapping(value = "searchChangePriceDataByHealth")
|
||||||
|
public R<?> searchChangePriceDataByHealth(@RequestParam String busNo) {
|
||||||
|
if (StringUtils.isEmpty(busNo)) {
|
||||||
|
return R.fail();
|
||||||
|
}
|
||||||
|
return this.adjustPriceService.searchChangePriceDataByHealth(busNo);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.openhis.web.adjustprice.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName AdjustPriceDataVo
|
||||||
|
* @Description TODO
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 2025/10/16 08:31
|
||||||
|
* @Version 1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class AdjustPriceDataVo {
|
||||||
|
/**
|
||||||
|
* 表ID
|
||||||
|
*/
|
||||||
|
private Long itemId;
|
||||||
|
/**
|
||||||
|
* 分类 0、药品;1、耗材;2、诊疗;3、挂号
|
||||||
|
*/
|
||||||
|
private Integer categoryType;
|
||||||
|
/**
|
||||||
|
* 改价原因
|
||||||
|
*/
|
||||||
|
private String reason;
|
||||||
|
/**
|
||||||
|
* 新进货价
|
||||||
|
*/
|
||||||
|
private BigDecimal newBuyingPrice;
|
||||||
|
/**
|
||||||
|
* 新售价
|
||||||
|
*/
|
||||||
|
private BigDecimal newRetailPrice;
|
||||||
|
/**
|
||||||
|
* 经手人
|
||||||
|
*/
|
||||||
|
private Long practitionerId;
|
||||||
|
/**
|
||||||
|
* 每个批次影响数量
|
||||||
|
*/
|
||||||
|
private BigDecimal quantity;
|
||||||
|
/**
|
||||||
|
* 总数量
|
||||||
|
*/
|
||||||
|
private BigDecimal totalQuantity;
|
||||||
|
/**
|
||||||
|
* 表名
|
||||||
|
*/
|
||||||
|
private String itemTable;
|
||||||
|
/**
|
||||||
|
* 单据号
|
||||||
|
*/
|
||||||
|
private String busNo;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 批次号
|
||||||
|
*/
|
||||||
|
private String lotNumber;
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
private String unitCode;
|
||||||
|
/**
|
||||||
|
* 位置
|
||||||
|
*/
|
||||||
|
private Long locationId;
|
||||||
|
|
||||||
|
private BigDecimal finalTotalQuantity;
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.openhis.web.adjustprice.dto;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName AdjustPriceManagerSearchParam
|
||||||
|
* @Description 改价管理 查询条件
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 2025/10/24 16:23
|
||||||
|
* @Version 1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class AdjustPriceManagerSearchParam {
|
||||||
|
|
||||||
|
/** 审核状态 */
|
||||||
|
private Integer statusEnum;
|
||||||
|
|
||||||
|
/** 单据类型 */
|
||||||
|
private Integer itemCategoryEnum;
|
||||||
|
/**
|
||||||
|
* 单据时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date applicantTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
package com.openhis.web.adjustprice.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName ChangePricePageDto
|
||||||
|
* @Description TODO
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 2025/10/31 17:35
|
||||||
|
* @Version 1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class ChangePriceDataDto {
|
||||||
|
|
||||||
|
/** 批次号 */
|
||||||
|
private String originLotNumber;
|
||||||
|
|
||||||
|
/** 改价申请人id */
|
||||||
|
private Long applicantId;
|
||||||
|
|
||||||
|
/** 目标枚举 药品、耗材、诊疗、挂号 */
|
||||||
|
private Integer itemCategoryEnum;
|
||||||
|
private String itemCategoryEnum_Text;
|
||||||
|
|
||||||
|
/** 药品ID、耗材ID、诊疗ID、挂号ID */
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long itemId;
|
||||||
|
/**
|
||||||
|
* 获取名称
|
||||||
|
*/
|
||||||
|
private String itemName;
|
||||||
|
/** 原进货价 */
|
||||||
|
private BigDecimal originBuyingPrice;
|
||||||
|
|
||||||
|
/** 原零售价价格 */
|
||||||
|
private BigDecimal originRetailPrice;
|
||||||
|
|
||||||
|
/** 当前品库存量 */
|
||||||
|
private BigDecimal itemQuantity;
|
||||||
|
|
||||||
|
/** 当前业务批次号 */
|
||||||
|
private String busNo;
|
||||||
|
|
||||||
|
/** 改价申请时间 */
|
||||||
|
private Date applicantTime;
|
||||||
|
|
||||||
|
/** 新进货价 */
|
||||||
|
private BigDecimal newBuyingPrice;
|
||||||
|
|
||||||
|
/** 新零售价 */
|
||||||
|
private BigDecimal newRetailPrice;
|
||||||
|
|
||||||
|
/** 物品计量单位 */
|
||||||
|
private String unitCode;
|
||||||
|
|
||||||
|
/** 审批状态 */
|
||||||
|
private Integer statusEnum;
|
||||||
|
private Integer statusEnum_Text;
|
||||||
|
|
||||||
|
/** 批次号 */
|
||||||
|
private String lotNumber;
|
||||||
|
|
||||||
|
/** 条件理由 */
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
/** 零售价盈负差*/
|
||||||
|
private BigDecimal differenceRetailPrice;
|
||||||
|
/**进货价盈负差*/
|
||||||
|
private BigDecimal differenceBuyingPrice;
|
||||||
|
/**
|
||||||
|
* 科室名称
|
||||||
|
*/
|
||||||
|
private String orgName;
|
||||||
|
/**
|
||||||
|
* 价格主表ID
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long chargeId;
|
||||||
|
/**
|
||||||
|
* 调价表ID
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long changePriceRecordId;
|
||||||
|
|
||||||
|
private String label;
|
||||||
|
/**
|
||||||
|
* 规格
|
||||||
|
*/
|
||||||
|
private String totalVolume;
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package com.openhis.web.adjustprice.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName ChangePricePageDto
|
||||||
|
* @Description 改价业务分页dto
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 2025/11/1 22:53
|
||||||
|
* @Version 1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class ChangePricePageDto {
|
||||||
|
|
||||||
|
/** 单据号 */
|
||||||
|
private String busNo;
|
||||||
|
|
||||||
|
/** 状态 */
|
||||||
|
private Integer statusEnum;
|
||||||
|
private String statusEnum_enumText;
|
||||||
|
|
||||||
|
/** 审批人 */
|
||||||
|
@Dict(dictCode = "id", dictText = "name", dictTable = "adm_practitioner")
|
||||||
|
private Long approverId;
|
||||||
|
private String approverId_dictText;
|
||||||
|
|
||||||
|
/** 审批时间 */
|
||||||
|
private Date approvalTime;
|
||||||
|
|
||||||
|
/** 申请人 */
|
||||||
|
@Dict(dictCode = "id", dictText = "name", dictTable = "adm_practitioner")
|
||||||
|
private Long applicantId;
|
||||||
|
private String applicantId_dictText;
|
||||||
|
|
||||||
|
/** 申请时间 */
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date applicantTime;
|
||||||
|
|
||||||
|
/** 制单日期 */
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 24、药品
|
||||||
|
*/
|
||||||
|
private Integer itemCategoryEnum;
|
||||||
|
private String categoryEnum_enumText;
|
||||||
|
|
||||||
|
private BigDecimal originRetailPrice;
|
||||||
|
private BigDecimal originBuyingPrice;
|
||||||
|
private BigDecimal newBuyingPrice;
|
||||||
|
private BigDecimal newRetailPrice;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
package com.openhis.web.adjustprice.dto;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName SupplyListDto
|
|
||||||
* @Description TODO
|
|
||||||
* @Author raymond
|
|
||||||
* @Date 2025/10/15 16:56
|
|
||||||
* @Version 1.0
|
|
||||||
**/
|
|
||||||
@Data
|
|
||||||
public class SupplyListDto {
|
|
||||||
/**
|
|
||||||
* 供应商ID
|
|
||||||
*/
|
|
||||||
private Long supplyId;
|
|
||||||
/**
|
|
||||||
* 供应商名称
|
|
||||||
*/
|
|
||||||
private String supplyName;
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,155 @@
|
|||||||
|
package com.openhis.web.adjustprice.mapper;
|
||||||
|
|
||||||
|
import com.openhis.web.adjustprice.dto.ChangePriceDataDto;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.openhis.web.adjustprice.dto.ChangePricePageDto;
|
||||||
|
import com.openhis.web.inventorymanage.dto.InventorySearchParam;
|
||||||
|
import com.openhis.web.inventorymanage.dto.ReceiptPageDto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc:
|
||||||
|
*
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 14:37 2025/10/15
|
||||||
|
* @return
|
||||||
|
**/
|
||||||
|
@Component
|
||||||
|
public interface AdjustPriceMapper {
|
||||||
|
/**
|
||||||
|
* Desc: 查询单据审批分页列表
|
||||||
|
*
|
||||||
|
* @param page
|
||||||
|
* @param queryWrapper
|
||||||
|
* @param medTypeEnum
|
||||||
|
* @param deviceTypeEnum
|
||||||
|
* @param activityTypeEnum
|
||||||
|
* @param healthTypeEnum
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 16:01 2025/10/24
|
||||||
|
* @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.openhis.web.inventorymanage.dto.ReceiptPageDto>
|
||||||
|
**/
|
||||||
|
Page<ReceiptPageDto> selectInventoryReceiptPage(@Param("page") Page<ReceiptPageDto> page,
|
||||||
|
@Param(Constants.WRAPPER) QueryWrapper<InventorySearchParam> queryWrapper,
|
||||||
|
@Param("medTypeEnum") Integer medTypeEnum, @Param("deviceTypeEnum") Integer deviceTypeEnum,
|
||||||
|
@Param("activityTypeEnum") Integer activityTypeEnum, @Param("healthTypeEnum") Integer healthTypeEnum);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据当前人 ID 查询提交的调价申请记录
|
||||||
|
*
|
||||||
|
* @param page
|
||||||
|
* @param queryWrapper
|
||||||
|
* @param medCategory
|
||||||
|
* @param deviceCategory
|
||||||
|
* @param activityCategory
|
||||||
|
* @param healthCategory
|
||||||
|
* @param applicantId
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 00:59 2025/11/2
|
||||||
|
* @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.openhis.web.adjustprice.dto.ChangePricePageDto>
|
||||||
|
**/
|
||||||
|
Page<ChangePricePageDto> searchChangePriceDataToPage(@Param("page") Page<ReceiptPageDto> page,
|
||||||
|
@Param(Constants.WRAPPER) QueryWrapper<InventorySearchParam> queryWrapper,
|
||||||
|
@Param("medCategory") Integer medCategory, @Param("deviceCategory") Integer deviceCategory,
|
||||||
|
@Param("activityCategory") Integer activityCategory, @Param("healthCategory") Integer healthCategory,
|
||||||
|
@Param("applicantId") Long applicantId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据条件 查询 药品调价单
|
||||||
|
* @param busNo
|
||||||
|
* @param categoryEnum
|
||||||
|
* @param statusEnum
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 09:46 2025/11/2
|
||||||
|
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||||
|
**/
|
||||||
|
List<ChangePriceDataDto> searchMedChangePriceByBusNo(@Param("busNo") String busNo, @Param("categoryEnum") Integer categoryEnum, @Param("statusEnum") Integer statusEnum);
|
||||||
|
/**
|
||||||
|
* Desc: 根据条件 查询 药品调价单
|
||||||
|
* @param itemId
|
||||||
|
* @param categoryEnum
|
||||||
|
* @param statusEnum
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 07:34 2025/11/4
|
||||||
|
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||||
|
**/
|
||||||
|
List<ChangePriceDataDto> searchMedChangePriceByItemId(@Param("itemId") Long itemId,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||||
|
/**
|
||||||
|
* Desc: 根据条件 查询 耗材调价单
|
||||||
|
* @param busNo
|
||||||
|
* @param categoryEnum
|
||||||
|
* @param statusEnum
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 09:46 2025/11/2
|
||||||
|
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||||
|
**/
|
||||||
|
List<ChangePriceDataDto> searchDeviceChangePriceByBusNo(@Param("busNo") String busNo,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||||
|
/**
|
||||||
|
* Desc: 根据条件 查询 耗材调价单
|
||||||
|
* @param itemId
|
||||||
|
* @param categoryEnum
|
||||||
|
* @param statusEnum
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 07:33 2025/11/4
|
||||||
|
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||||
|
**/
|
||||||
|
List<ChangePriceDataDto> searchDeviceChangePriceByItemId(@Param("itemId") Long itemId,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据条件 查询 诊疗调价单
|
||||||
|
* @param busNo
|
||||||
|
* @param categoryEnum
|
||||||
|
* @param statusEnum
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 09:46 2025/11/2
|
||||||
|
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||||
|
**/
|
||||||
|
List<ChangePriceDataDto> searchActivityChangePriceByBusNo(@Param("busNo") String busNo,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||||
|
/**
|
||||||
|
* Desc: 根据条件 查询 诊疗调价单
|
||||||
|
* @param itemId
|
||||||
|
* @param categoryEnum
|
||||||
|
* @param statusEnum
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 07:32 2025/11/4
|
||||||
|
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||||
|
**/
|
||||||
|
List<ChangePriceDataDto> searchActivityChangePriceByItemId(@Param("itemId") Long itemId,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desc: 根据条件 查询 挂号调价单
|
||||||
|
* @param busNo
|
||||||
|
* @param categoryEnum
|
||||||
|
* @param statusEnum
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 09:46 2025/11/2
|
||||||
|
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||||
|
**/
|
||||||
|
List<ChangePriceDataDto> searchHealthChangePriceByBusNo(@Param("busNo") String busNo,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||||
|
/**
|
||||||
|
* Desc: 根据条件 查询 挂号调价单
|
||||||
|
* @param itemId
|
||||||
|
* @param categoryEnum
|
||||||
|
* @param statusEnum
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 07:31 2025/11/4
|
||||||
|
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||||
|
**/
|
||||||
|
List<ChangePriceDataDto> searchHealthChangePriceByItemId(@Param("itemId") Long itemId,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||||
|
/**
|
||||||
|
* Desc: 根据条件 查询 审批单 审核中的数据
|
||||||
|
* @param busNo
|
||||||
|
* @param statusEnum
|
||||||
|
* @Author raymond
|
||||||
|
* @Date 10:36 2025/11/2
|
||||||
|
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||||
|
**/
|
||||||
|
List<ChangePriceDataDto> searchChangePriceRecordDataByBusNo(@Param("busNo") String busNo,@Param("statusEnum") Integer statusEnum);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
package com.openhis.web.adjustprice.mapper;
|
|
||||||
|
|
||||||
import com.openhis.web.adjustprice.dto.SupplyListDto;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Desc:
|
|
||||||
* @Author raymond
|
|
||||||
* @Date 14:37 2025/10/15
|
|
||||||
* @return
|
|
||||||
**/
|
|
||||||
@Component
|
|
||||||
public interface SupplyMapper {
|
|
||||||
/**
|
|
||||||
* Desc:
|
|
||||||
* @param
|
|
||||||
* @Author raymond
|
|
||||||
* @Date 17:10 2025/10/15
|
|
||||||
* @return java.util.List<com.openhis.web.paymentmanage.dto.SupplyListDto>
|
|
||||||
**/
|
|
||||||
List<SupplyListDto> searchAllSupplyList();
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.openhis.web.appointmentmanage.appservice;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.appointmentmanage.domain.ClinicRoom;
|
||||||
|
|
||||||
|
public interface IClinicRoomAppService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询诊室列表
|
||||||
|
* @param pageNum 页码
|
||||||
|
* @param pageSize 每页条数
|
||||||
|
* @param orgName 卫生机构名称
|
||||||
|
* @param roomName 诊室名称
|
||||||
|
* @return 分页查询结果
|
||||||
|
*/
|
||||||
|
R<?> selectClinicRoomPage(Integer pageNum, Integer pageSize, String orgName, String roomName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询诊室详情
|
||||||
|
* @param id 诊室ID
|
||||||
|
* @return 诊室详情
|
||||||
|
*/
|
||||||
|
R<?> selectClinicRoomById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增诊室
|
||||||
|
* @param clinicRoom 诊室信息
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
R<?> insertClinicRoom(ClinicRoom clinicRoom);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新诊室
|
||||||
|
* @param clinicRoom 诊室信息
|
||||||
|
* @return 更新结果
|
||||||
|
*/
|
||||||
|
R<?> updateClinicRoom(ClinicRoom clinicRoom);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除诊室
|
||||||
|
* @param id 诊室ID
|
||||||
|
* @return 删除结果
|
||||||
|
*/
|
||||||
|
R<?> deleteClinicRoomById(Long id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.openhis.web.appointmentmanage.appservice;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.appointmentmanage.domain.DoctorSchedule;
|
||||||
|
|
||||||
|
public interface IDoctorScheduleAppService {
|
||||||
|
|
||||||
|
R<?> getDoctorScheduleList();
|
||||||
|
|
||||||
|
R<?> addDoctorSchedule(DoctorSchedule doctorSchedule);
|
||||||
|
|
||||||
|
R<?> removeDoctorSchedule(Integer doctorScheduleId);
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.openhis.web.appointmentmanage.appservice;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.web.appointmentmanage.dto.SchedulePoolDto;
|
||||||
|
|
||||||
|
public interface ISchedulePoolAppService {
|
||||||
|
R<?> addSchedulePool(SchedulePoolDto schedulePoolDto);
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package com.openhis.web.appointmentmanage.appservice;
|
||||||
|
|
||||||
|
public interface IScheduleSlotAppService {
|
||||||
|
}
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
package com.openhis.web.appointmentmanage.appservice.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.appointmentmanage.domain.ClinicRoom;
|
||||||
|
import com.openhis.appointmentmanage.service.IClinicRoomService;
|
||||||
|
import com.openhis.web.appointmentmanage.appservice.IClinicRoomAppService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ClinicRoomAppServiceImpl implements IClinicRoomAppService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IClinicRoomService clinicRoomService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> selectClinicRoomPage(Integer pageNum, Integer pageSize, String orgName, String roomName) {
|
||||||
|
// 构建查询条件
|
||||||
|
ClinicRoom clinicRoom = new ClinicRoom();
|
||||||
|
if (orgName != null && ObjectUtil.isNotEmpty(orgName)) {
|
||||||
|
clinicRoom.setOrgName(orgName);
|
||||||
|
}
|
||||||
|
if (roomName != null && ObjectUtil.isNotEmpty(roomName)) {
|
||||||
|
clinicRoom.setRoomName(roomName);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页查询
|
||||||
|
Page<ClinicRoom> page = new Page<>(pageNum, pageSize);
|
||||||
|
Page<ClinicRoom> result = clinicRoomService.selectClinicRoomPage(page, clinicRoom);
|
||||||
|
|
||||||
|
return R.ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> selectClinicRoomById(Long id) {
|
||||||
|
ClinicRoom clinicRoom = clinicRoomService.selectClinicRoomById(id);
|
||||||
|
if (clinicRoom == null) {
|
||||||
|
return R.fail(404, "诊室不存在");
|
||||||
|
}
|
||||||
|
return R.ok(clinicRoom);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> insertClinicRoom(ClinicRoom clinicRoom) {
|
||||||
|
// 数据校验
|
||||||
|
if (ObjectUtil.isEmpty(clinicRoom.getRoomName())) {
|
||||||
|
return R.fail(400, "诊室名称不能为空");
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isEmpty(clinicRoom.getDepartment())) {
|
||||||
|
return R.fail(400, "科室名称不能为空");
|
||||||
|
}
|
||||||
|
if (clinicRoom.getRoomName().length() > 50) {
|
||||||
|
return R.fail(400, "诊室名称长度不能超过50个字符");
|
||||||
|
}
|
||||||
|
if (clinicRoom.getRemarks() != null && clinicRoom.getRemarks().length() > 500) {
|
||||||
|
return R.fail(400, "备注长度不能超过500个字符");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增诊室
|
||||||
|
int result = clinicRoomService.insertClinicRoom(clinicRoom);
|
||||||
|
if (result > 0) {
|
||||||
|
return R.ok(null, "新增成功");
|
||||||
|
} else {
|
||||||
|
return R.fail("新增失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> updateClinicRoom(ClinicRoom clinicRoom) {
|
||||||
|
// 数据校验
|
||||||
|
if (ObjectUtil.isEmpty(clinicRoom.getId())) {
|
||||||
|
return R.fail(400, "诊室ID不能为空");
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isEmpty(clinicRoom.getRoomName())) {
|
||||||
|
return R.fail(400, "诊室名称不能为空");
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isEmpty(clinicRoom.getDepartment())) {
|
||||||
|
return R.fail(400, "科室名称不能为空");
|
||||||
|
}
|
||||||
|
if (clinicRoom.getRoomName().length() > 50) {
|
||||||
|
return R.fail(400, "诊室名称长度不能超过50个字符");
|
||||||
|
}
|
||||||
|
if (clinicRoom.getRemarks() != null && clinicRoom.getRemarks().length() > 500) {
|
||||||
|
return R.fail(400, "备注长度不能超过500个字符");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查诊室是否存在
|
||||||
|
ClinicRoom existingClinicRoom = clinicRoomService.selectClinicRoomById(clinicRoom.getId());
|
||||||
|
if (existingClinicRoom == null) {
|
||||||
|
return R.fail(404, "诊室不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新诊室
|
||||||
|
int result = clinicRoomService.updateClinicRoom(clinicRoom);
|
||||||
|
if (result > 0) {
|
||||||
|
return R.ok(null, "修改成功");
|
||||||
|
} else {
|
||||||
|
return R.fail("修改失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> deleteClinicRoomById(Long id) {
|
||||||
|
// 检查诊室是否存在
|
||||||
|
ClinicRoom existingClinicRoom = clinicRoomService.selectClinicRoomById(id);
|
||||||
|
if (existingClinicRoom == null) {
|
||||||
|
return R.fail(404, "诊室不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除诊室
|
||||||
|
int result = clinicRoomService.deleteClinicRoomById(id);
|
||||||
|
if (result > 0) {
|
||||||
|
return R.ok(null, "删除成功");
|
||||||
|
} else {
|
||||||
|
return R.fail("删除失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,8 +3,8 @@ package com.openhis.web.appointmentmanage.appservice.impl;
|
|||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.openhis.administration.domain.Dept;
|
import com.openhis.appointmentmanage.domain.Dept;
|
||||||
import com.openhis.administration.service.IDeptService;
|
import com.openhis.appointmentmanage.service.IDeptService;
|
||||||
import com.openhis.web.appointmentmanage.appservice.IDeptAppService;
|
import com.openhis.web.appointmentmanage.appservice.IDeptAppService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,73 @@
|
|||||||
|
package com.openhis.web.appointmentmanage.appservice.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.appointmentmanage.domain.DoctorSchedule;
|
||||||
|
import com.openhis.appointmentmanage.mapper.DoctorScheduleMapper;
|
||||||
|
import com.openhis.appointmentmanage.service.IDoctorScheduleService;
|
||||||
|
import com.openhis.web.appointmentmanage.appservice.IDoctorScheduleAppService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class DoctorScheduleAppServiceImpl implements IDoctorScheduleAppService {
|
||||||
|
@Resource
|
||||||
|
private IDoctorScheduleService doctorScheduleService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DoctorScheduleMapper doctorScheduleMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> getDoctorScheduleList() {
|
||||||
|
List<DoctorSchedule> list = doctorScheduleService.list();
|
||||||
|
return R.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> addDoctorSchedule(DoctorSchedule doctorSchedule) {
|
||||||
|
if (ObjectUtil.isEmpty(doctorSchedule)) {
|
||||||
|
return R.fail("医生排班不能为空");
|
||||||
|
}
|
||||||
|
// 创建新对象,排除id字段(数据库id列是GENERATED ALWAYS,由数据库自动生成)
|
||||||
|
DoctorSchedule newSchedule = new DoctorSchedule();
|
||||||
|
newSchedule.setWeekday(doctorSchedule.getWeekday());
|
||||||
|
newSchedule.setTimePeriod(doctorSchedule.getTimePeriod());
|
||||||
|
newSchedule.setDoctor(doctorSchedule.getDoctor());
|
||||||
|
newSchedule.setClinic(doctorSchedule.getClinic());
|
||||||
|
newSchedule.setStartTime(doctorSchedule.getStartTime());
|
||||||
|
newSchedule.setEndTime(doctorSchedule.getEndTime());
|
||||||
|
newSchedule.setLimitNumber(doctorSchedule.getLimitNumber());
|
||||||
|
// call_sign_record 字段不能为null,设置默认值为空字符串
|
||||||
|
newSchedule.setCallSignRecord(doctorSchedule.getCallSignRecord() != null ? doctorSchedule.getCallSignRecord() : "");
|
||||||
|
newSchedule.setRegisterItem(doctorSchedule.getRegisterItem() != null ? doctorSchedule.getRegisterItem() : "");
|
||||||
|
newSchedule.setRegisterFee(doctorSchedule.getRegisterFee() != null ? doctorSchedule.getRegisterFee() : 0);
|
||||||
|
newSchedule.setDiagnosisItem(doctorSchedule.getDiagnosisItem() != null ? doctorSchedule.getDiagnosisItem() : "");
|
||||||
|
newSchedule.setDiagnosisFee(doctorSchedule.getDiagnosisFee() != null ? doctorSchedule.getDiagnosisFee() : 0);
|
||||||
|
newSchedule.setIsOnline(doctorSchedule.getIsOnline() != null ? doctorSchedule.getIsOnline() : false);
|
||||||
|
newSchedule.setIsStopped(doctorSchedule.getIsStopped() != null ? doctorSchedule.getIsStopped() : false);
|
||||||
|
newSchedule.setStopReason(doctorSchedule.getStopReason() != null ? doctorSchedule.getStopReason() : "");
|
||||||
|
newSchedule.setDeptId(doctorSchedule.getDeptId());
|
||||||
|
// 不设置id字段,让数据库自动生成
|
||||||
|
// 使用自定义的insertWithoutId方法,确保INSERT语句不包含id字段
|
||||||
|
int result = doctorScheduleMapper.insertWithoutId(newSchedule);
|
||||||
|
boolean save = result > 0;
|
||||||
|
if (save) {
|
||||||
|
// 返回保存后的实体对象,包含数据库生成的ID
|
||||||
|
return R.ok(newSchedule);
|
||||||
|
} else {
|
||||||
|
return R.fail("保存失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> removeDoctorSchedule(Integer doctorScheduleId) {
|
||||||
|
if (doctorScheduleId == null && ObjectUtil.isEmpty(doctorScheduleId)) {
|
||||||
|
return R.fail("排班id不能为空");
|
||||||
|
}
|
||||||
|
boolean remove = doctorScheduleService.removeById(doctorScheduleId);
|
||||||
|
return R.ok(remove);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.openhis.web.appointmentmanage.appservice.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.appointmentmanage.domain.SchedulePool;
|
||||||
|
import com.openhis.appointmentmanage.service.ISchedulePoolService;
|
||||||
|
import com.openhis.web.appointmentmanage.appservice.ISchedulePoolAppService;
|
||||||
|
import com.openhis.web.appointmentmanage.dto.SchedulePoolDto;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class SchedulePoolAppServiceImpl implements ISchedulePoolAppService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISchedulePoolService schedulePoolService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> addSchedulePool(SchedulePoolDto schedulePoolDto) {
|
||||||
|
//1.数据检验
|
||||||
|
if(ObjectUtil.isNull(schedulePoolDto)){
|
||||||
|
return R.fail("号源不能为空");
|
||||||
|
}
|
||||||
|
//2.封装实体
|
||||||
|
SchedulePool schedulePool = new SchedulePool();
|
||||||
|
schedulePool.setHospitalId(schedulePoolDto.getHospitalId());
|
||||||
|
schedulePool.setDeptId(schedulePoolDto.getDeptId());
|
||||||
|
schedulePool.setDoctorId(schedulePoolDto.getDoctorId());
|
||||||
|
schedulePool.setDoctorName(schedulePoolDto.getDoctorName());
|
||||||
|
schedulePool.setScheduleDate(schedulePoolDto.getScheduleDate());
|
||||||
|
schedulePool.setShift(schedulePoolDto.getShift());
|
||||||
|
schedulePool.setStartTime(schedulePoolDto.getStartTime());
|
||||||
|
schedulePool.setEndTime(schedulePoolDto.getEndTime());
|
||||||
|
|
||||||
|
schedulePool.setRegType(schedulePoolDto.getRegType());
|
||||||
|
schedulePool.setFee(schedulePoolDto.getFee());
|
||||||
|
//3.保存
|
||||||
|
boolean save = schedulePoolService.save(schedulePool);
|
||||||
|
return R.ok(save);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.openhis.web.appointmentmanage.appservice.impl;
|
||||||
|
|
||||||
|
import com.openhis.web.appointmentmanage.appservice.IScheduleSlotAppService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ScheduleSlotAppServiceImpl implements IScheduleSlotAppService {
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
package com.openhis.web.appointmentmanage.controller;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.appointmentmanage.domain.ClinicRoom;
|
||||||
|
import com.openhis.web.appointmentmanage.appservice.IClinicRoomAppService;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/appoinment/clinic-room")
|
||||||
|
public class ClinicRoomController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IClinicRoomAppService clinicRoomAppService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询诊室列表
|
||||||
|
* @param pageNum 页码
|
||||||
|
* @param pageSize 每页条数
|
||||||
|
* @param orgName 卫生机构名称
|
||||||
|
* @param roomName 诊室名称
|
||||||
|
* @return 分页查询结果
|
||||||
|
*/
|
||||||
|
@GetMapping("/page")
|
||||||
|
public R<?> selectClinicRoomPage(
|
||||||
|
@RequestParam(required = true) Integer pageNum,
|
||||||
|
@RequestParam(required = true) Integer pageSize,
|
||||||
|
@RequestParam(required = false) String orgName,
|
||||||
|
@RequestParam(required = false) String roomName) {
|
||||||
|
return clinicRoomAppService.selectClinicRoomPage(pageNum, pageSize, orgName, roomName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询诊室详情
|
||||||
|
* @param id 诊室ID
|
||||||
|
* @return 诊室详情
|
||||||
|
*/
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<?> selectClinicRoomById(@PathVariable Long id) {
|
||||||
|
return clinicRoomAppService.selectClinicRoomById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增诊室
|
||||||
|
* @param clinicRoom 诊室信息
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping
|
||||||
|
public R<?> insertClinicRoom(@RequestBody ClinicRoom clinicRoom) {
|
||||||
|
return clinicRoomAppService.insertClinicRoom(clinicRoom);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新诊室
|
||||||
|
* @param clinicRoom 诊室信息
|
||||||
|
* @return 更新结果
|
||||||
|
*/
|
||||||
|
@PutMapping
|
||||||
|
public R<?> updateClinicRoom(@RequestBody ClinicRoom clinicRoom) {
|
||||||
|
return clinicRoomAppService.updateClinicRoom(clinicRoom);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除诊室
|
||||||
|
* @param id 诊室ID
|
||||||
|
* @return 删除结果
|
||||||
|
*/
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public R<?> deleteClinicRoomById(@PathVariable Long id) {
|
||||||
|
return clinicRoomAppService.deleteClinicRoomById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -31,8 +31,8 @@ public class DeptController {
|
|||||||
* */
|
* */
|
||||||
@GetMapping("/search")
|
@GetMapping("/search")
|
||||||
public R<?> searchDept(
|
public R<?> searchDept(
|
||||||
@RequestParam(required = false) Integer pageNo,
|
@RequestParam(required = false,defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(required = false) Integer pageSize,
|
@RequestParam(required = false,defaultValue = "10") Integer pageSize,
|
||||||
@RequestParam(required = false)String orgName,
|
@RequestParam(required = false)String orgName,
|
||||||
@RequestParam(required = false)String deptName
|
@RequestParam(required = false)String deptName
|
||||||
){
|
){
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.openhis.web.appointmentmanage.controller;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.appointmentmanage.domain.DoctorSchedule;
|
||||||
|
import com.openhis.web.appointmentmanage.appservice.IDoctorScheduleAppService;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/doctor-schedule")
|
||||||
|
public class DoctorScheduleController {
|
||||||
|
@Resource
|
||||||
|
private IDoctorScheduleAppService doctorScheduleAppService;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 获取医生排班List
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
@GetMapping("/list")
|
||||||
|
public R<?> getDoctorScheduleList() {
|
||||||
|
return R.ok(doctorScheduleAppService.getDoctorScheduleList());
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 新增医生排班
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
@PostMapping("/add")
|
||||||
|
public R<?> addDoctorSchedule(@RequestBody DoctorSchedule doctorSchedule) {
|
||||||
|
return R.ok(doctorScheduleAppService.addDoctorSchedule(doctorSchedule));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 删除医生排班
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
@DeleteMapping("/delete/{doctorScheduleId}")
|
||||||
|
public R<?> removeDoctorSchedule(@PathVariable Integer doctorScheduleId){
|
||||||
|
return R.ok(doctorScheduleAppService.removeDoctorSchedule(doctorScheduleId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.openhis.web.appointmentmanage.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.appointmentmanage.domain.SchedulePool;
|
||||||
|
import com.openhis.web.appointmentmanage.appservice.ISchedulePoolAppService;
|
||||||
|
import com.openhis.web.appointmentmanage.dto.SchedulePoolDto;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/schedule-pool")
|
||||||
|
public class SchedulePoolController {
|
||||||
|
@Resource
|
||||||
|
private ISchedulePoolAppService schedulePoolAppService;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 新增号源
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
public R<?> addSchedulePool(@RequestBody SchedulePoolDto schedulePoolDto) {
|
||||||
|
return R.ok(schedulePoolAppService.addSchedulePool(schedulePoolDto));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.openhis.web.appointmentmanage.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/schedule-slot")
|
||||||
|
public class ScheduleSlotController {
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
package com.openhis.web.appointmentmanage.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 号源池Dto
|
||||||
|
*
|
||||||
|
* @date 2025-12-12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SchedulePoolDto {
|
||||||
|
/** id */
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/** 业务编号 */
|
||||||
|
private String poolCode;
|
||||||
|
|
||||||
|
/** 医院ID */
|
||||||
|
private Integer hospitalId;
|
||||||
|
|
||||||
|
/** 科室ID */
|
||||||
|
private Integer deptId;
|
||||||
|
|
||||||
|
/** 医生ID */
|
||||||
|
private Integer doctorId;
|
||||||
|
|
||||||
|
/** 医生姓名 */
|
||||||
|
private String doctorName;
|
||||||
|
|
||||||
|
/** 诊室 */
|
||||||
|
private String clinicRoom;
|
||||||
|
|
||||||
|
/** 出诊日期 */
|
||||||
|
private LocalDate scheduleDate;
|
||||||
|
|
||||||
|
/** 班别 */
|
||||||
|
private String shift;
|
||||||
|
|
||||||
|
/** 开始时间 */
|
||||||
|
private LocalTime startTime;
|
||||||
|
|
||||||
|
/** 结束时间 */
|
||||||
|
private LocalTime endTime;
|
||||||
|
|
||||||
|
/** 总号量 */
|
||||||
|
private Integer totalQuota;
|
||||||
|
|
||||||
|
/** 已约 */
|
||||||
|
private Integer bookedNum;
|
||||||
|
|
||||||
|
/** 铁号数 */
|
||||||
|
private Integer lockedNum;
|
||||||
|
|
||||||
|
/** 剩余号数 */
|
||||||
|
private Integer availableNum;
|
||||||
|
|
||||||
|
/** 号别 */
|
||||||
|
private String regType;
|
||||||
|
|
||||||
|
/** 原价 (元) */
|
||||||
|
private Double fee;
|
||||||
|
|
||||||
|
/** 医保限价 (元) */
|
||||||
|
private Double insurancePrice;
|
||||||
|
|
||||||
|
/** 支持渠道 */
|
||||||
|
private String supportChannel;
|
||||||
|
|
||||||
|
/** 号源状态 */
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/** 停诊原因 */
|
||||||
|
private String stopReason;
|
||||||
|
|
||||||
|
/** 放号时间 */
|
||||||
|
private LocalDateTime releaseTime;
|
||||||
|
|
||||||
|
/** 截止预约时间 */
|
||||||
|
private LocalDateTime deadlineTime;
|
||||||
|
|
||||||
|
/** 乐观锁版本 */
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
/** 操作人ID */
|
||||||
|
private Integer opUserId;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/** 排班ID */
|
||||||
|
private Integer scheduleId;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.openhis.web.appointmentmanage.mapper;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface DoctorScheduleAppMapper {
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.openhis.web.appointmentmanage.mapper;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface SchedulePoolAppMapper {
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.openhis.web.appointmentmanage.mapper;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface ScheduleSlotAppMapper {
|
||||||
|
}
|
||||||
@@ -6,6 +6,9 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import com.openhis.common.constant.CommonConstants;
|
||||||
|
import com.openhis.common.utils.DateTimeUtils;
|
||||||
|
import com.openhis.workflow.mapper.ActivityDefinitionMapper;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -46,6 +49,9 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IOrganizationLocationService organizationLocationService;
|
private IOrganizationLocationService organizationLocationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ActivityDefinitionMapper activityDefinitionMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机构位置关系初始化
|
* 机构位置关系初始化
|
||||||
*
|
*
|
||||||
@@ -126,6 +132,25 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation
|
|||||||
OrganizationLocation orgLoc = new OrganizationLocation();
|
OrganizationLocation orgLoc = new OrganizationLocation();
|
||||||
BeanUtils.copyProperties(orgLocQueryDto, orgLoc);
|
BeanUtils.copyProperties(orgLocQueryDto, orgLoc);
|
||||||
|
|
||||||
|
Long activityDefinitionId = orgLoc.getActivityDefinitionId();
|
||||||
|
String activityName = activityDefinitionId != null ? activityDefinitionMapper.selectById(activityDefinitionId).getName() : "";
|
||||||
|
|
||||||
|
List<OrganizationLocation> organizationLocationList =
|
||||||
|
organizationLocationService.getOrgLocListByOrgIdAndActivityDefinitionId(orgLoc.getActivityDefinitionId());
|
||||||
|
organizationLocationList = (orgLoc.getId() != null)
|
||||||
|
? organizationLocationList.stream().filter(item -> !orgLoc.getId().equals(item.getId())).toList()
|
||||||
|
: organizationLocationList;
|
||||||
|
|
||||||
|
if (!organizationLocationList.isEmpty())
|
||||||
|
for (OrganizationLocation organizationLocation : organizationLocationList)
|
||||||
|
if (DateTimeUtils.isOverlap(organizationLocation.getStartTime(), organizationLocation.getEndTime(),
|
||||||
|
orgLoc.getStartTime(), orgLoc.getEndTime())) {
|
||||||
|
String organizationName =
|
||||||
|
organizationService.getById(organizationLocation.getOrganizationId()).getName();
|
||||||
|
return R.fail("当前诊疗:" + activityName + CommonConstants.Common.DASH + orgLoc.getStartTime()
|
||||||
|
+ CommonConstants.Common.DASH + orgLoc.getEndTime() + "与" + organizationName + "时间冲突");
|
||||||
|
}
|
||||||
|
|
||||||
if (orgLocQueryDto.getId() != null) {
|
if (orgLocQueryDto.getId() != null) {
|
||||||
// 更新机构位置信息
|
// 更新机构位置信息
|
||||||
organizationLocationService.updateById(orgLoc);
|
organizationLocationService.updateById(orgLoc);
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import com.openhis.common.enums.AdministrativeGender;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
@@ -15,6 +14,7 @@ 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.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.utils.AssignSeqUtil;
|
||||||
import com.core.common.utils.ChineseConvertUtils;
|
import com.core.common.utils.ChineseConvertUtils;
|
||||||
import com.core.common.utils.MessageUtils;
|
import com.core.common.utils.MessageUtils;
|
||||||
import com.core.common.utils.SecurityUtils;
|
import com.core.common.utils.SecurityUtils;
|
||||||
@@ -29,6 +29,8 @@ import com.openhis.administration.service.IPractitionerRoleService;
|
|||||||
import com.openhis.administration.service.IPractitionerService;
|
import com.openhis.administration.service.IPractitionerService;
|
||||||
import com.openhis.common.constant.PromptMsgConstant;
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
import com.openhis.common.enums.AccountStatus;
|
import com.openhis.common.enums.AccountStatus;
|
||||||
|
import com.openhis.common.enums.AdministrativeGender;
|
||||||
|
import com.openhis.common.enums.AssignSeqEnum;
|
||||||
import com.openhis.common.enums.PractitionerRoles;
|
import com.openhis.common.enums.PractitionerRoles;
|
||||||
import com.openhis.common.utils.HisQueryUtils;
|
import com.openhis.common.utils.HisQueryUtils;
|
||||||
import com.openhis.web.basedatamanage.appservice.IPractitionerAppService;
|
import com.openhis.web.basedatamanage.appservice.IPractitionerAppService;
|
||||||
@@ -59,6 +61,9 @@ public class PractitionerAppServiceImpl implements IPractitionerAppService {
|
|||||||
@Resource
|
@Resource
|
||||||
ISysTenantService sysTenantService;
|
ISysTenantService sysTenantService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private AssignSeqUtil assignSeqUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增用户及参与者
|
* 新增用户及参与者
|
||||||
*
|
*
|
||||||
@@ -108,8 +113,9 @@ public class PractitionerAppServiceImpl implements IPractitionerAppService {
|
|||||||
// 新增 adm_practitioner
|
// 新增 adm_practitioner
|
||||||
Practitioner practitioner = new Practitioner();
|
Practitioner practitioner = new Practitioner();
|
||||||
practitioner.setActiveFlag(AccountStatus.ACTIVE.getValue()); // 活动标记
|
practitioner.setActiveFlag(AccountStatus.ACTIVE.getValue()); // 活动标记
|
||||||
|
practitioner.setBusNo(assignSeqUtil.getSeq(AssignSeqEnum.PRACTITIONER_NO.getPrefix(), 8)); // 编号
|
||||||
practitioner.setName(nickName); // 姓名
|
practitioner.setName(nickName); // 姓名
|
||||||
practitioner.setGenderEnum(sex==null? AdministrativeGender.UNKNOWN.getValue() : Integer.parseInt(sex)); // 性别
|
practitioner.setGenderEnum(sex == null ? AdministrativeGender.UNKNOWN.getValue() : Integer.parseInt(sex)); // 性别
|
||||||
practitioner.setBirthDate(userAndPractitionerDto.getBirthDate()); // 出生日期
|
practitioner.setBirthDate(userAndPractitionerDto.getBirthDate()); // 出生日期
|
||||||
practitioner.setPhone(phonenumber); // 电话
|
practitioner.setPhone(phonenumber); // 电话
|
||||||
practitioner.setAddress(userAndPractitionerDto.getAddress()); // 地址
|
practitioner.setAddress(userAndPractitionerDto.getAddress()); // 地址
|
||||||
@@ -306,7 +312,7 @@ public class PractitionerAppServiceImpl implements IPractitionerAppService {
|
|||||||
Practitioner practitioner = new Practitioner();
|
Practitioner practitioner = new Practitioner();
|
||||||
practitioner.setId(practitionerId);
|
practitioner.setId(practitionerId);
|
||||||
practitioner.setName(nickName); // 姓名
|
practitioner.setName(nickName); // 姓名
|
||||||
practitioner.setGenderEnum(sex==null? AdministrativeGender.UNKNOWN.getValue() : Integer.parseInt(sex)); // 性别
|
practitioner.setGenderEnum(sex == null ? AdministrativeGender.UNKNOWN.getValue() : Integer.parseInt(sex)); // 性别
|
||||||
practitioner.setBirthDate(userAndPractitionerDto.getBirthDate()); // 出生日期
|
practitioner.setBirthDate(userAndPractitionerDto.getBirthDate()); // 出生日期
|
||||||
practitioner.setPhone(phonenumber); // 电话
|
practitioner.setPhone(phonenumber); // 电话
|
||||||
practitioner.setAddress(userAndPractitionerDto.getAddress()); // 地址
|
practitioner.setAddress(userAndPractitionerDto.getAddress()); // 地址
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import java.util.stream.Stream;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import com.openhis.yb.service.YbManager;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -21,6 +20,7 @@ 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.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.utils.AssignSeqUtil;
|
||||||
import com.core.common.utils.MessageUtils;
|
import com.core.common.utils.MessageUtils;
|
||||||
import com.core.common.utils.SecurityUtils;
|
import com.core.common.utils.SecurityUtils;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
@@ -32,12 +32,14 @@ import com.openhis.administration.service.IHealthcareServiceService;
|
|||||||
import com.openhis.common.constant.CommonConstants;
|
import com.openhis.common.constant.CommonConstants;
|
||||||
import com.openhis.common.constant.PromptMsgConstant;
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
import com.openhis.common.enums.AccountStatus;
|
import com.openhis.common.enums.AccountStatus;
|
||||||
|
import com.openhis.common.enums.AssignSeqEnum;
|
||||||
import com.openhis.common.enums.PublicationStatus;
|
import com.openhis.common.enums.PublicationStatus;
|
||||||
import com.openhis.common.enums.Whether;
|
import com.openhis.common.enums.Whether;
|
||||||
import com.openhis.common.utils.EnumUtils;
|
import com.openhis.common.utils.EnumUtils;
|
||||||
import com.openhis.common.utils.HisQueryUtils;
|
import com.openhis.common.utils.HisQueryUtils;
|
||||||
import com.openhis.web.basicservice.dto.*;
|
import com.openhis.web.basicservice.dto.*;
|
||||||
import com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper;
|
import com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper;
|
||||||
|
import com.openhis.yb.service.YbManager;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -58,6 +60,8 @@ public class HealthcareServiceController {
|
|||||||
|
|
||||||
private final YbManager ybService;
|
private final YbManager ybService;
|
||||||
|
|
||||||
|
private final AssignSeqUtil assignSeqUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务管理基础数据初始化
|
* 服务管理基础数据初始化
|
||||||
*/
|
*/
|
||||||
@@ -92,6 +96,7 @@ public class HealthcareServiceController {
|
|||||||
// 服务管理-新增
|
// 服务管理-新增
|
||||||
HealthcareService healthcareService = new HealthcareService();
|
HealthcareService healthcareService = new HealthcareService();
|
||||||
BeanUtils.copyProperties(healthcareServiceFormData, healthcareService);
|
BeanUtils.copyProperties(healthcareServiceFormData, healthcareService);
|
||||||
|
// healthcareService.setBusNo(assignSeqUtil.getSeq(AssignSeqEnum.HEALTHCARE_SERVICE_NO.getPrefix(), 8));
|
||||||
HealthcareService healthcareServiceAfterAdd = iHealthcareServiceService.addHealthcareService(healthcareService);
|
HealthcareService healthcareServiceAfterAdd = iHealthcareServiceService.addHealthcareService(healthcareService);
|
||||||
// 同时保存费用定价
|
// 同时保存费用定价
|
||||||
ChargeItemDefinition chargeItemDefinition = new ChargeItemDefinition();
|
ChargeItemDefinition chargeItemDefinition = new ChargeItemDefinition();
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.chargemanage.appservice;
|
package com.openhis.web.chargemanage.appservice;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.openhis.web.chargemanage.dto.EncounterPatientPageParam;
|
import com.openhis.web.chargemanage.dto.EncounterPatientPageParam;
|
||||||
import com.openhis.web.chargemanage.dto.EncounterPatientPrescriptionDto;
|
import com.openhis.web.chargemanage.dto.EncounterPatientPrescriptionDto;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 门诊收费 service
|
* 门诊收费 service
|
||||||
*
|
*
|
||||||
@@ -62,4 +62,20 @@ public interface IOutpatientChargeAppService {
|
|||||||
* @return 初始化信息
|
* @return 初始化信息
|
||||||
*/
|
*/
|
||||||
R<?> outpatientChargeInit();
|
R<?> outpatientChargeInit();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生医保转自费
|
||||||
|
*
|
||||||
|
* @param encounterId 就诊id
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
R<?> changeToStudentSelfPay(Long encounterId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生自费转学生医保
|
||||||
|
*
|
||||||
|
* @param encounterId 就诊id
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
R<?> changeToStudentYbPay(Long encounterId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public class InpatientChargeAppServiceImpl implements IInpatientChargeAppService
|
|||||||
encounterPatientPageParam, searchKey,
|
encounterPatientPageParam, searchKey,
|
||||||
new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientWbStr, CommonConstants.FieldName.PatientPyStr,
|
new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientWbStr, CommonConstants.FieldName.PatientPyStr,
|
||||||
CommonConstants.FieldName.PatientName, CommonConstants.FieldName.PatientBusNo,
|
CommonConstants.FieldName.PatientName, CommonConstants.FieldName.PatientBusNo,
|
||||||
CommonConstants.FieldName.EncounterBusNo, CommonConstants.FieldName.idCard)),
|
CommonConstants.FieldName.EncounterBusNo, CommonConstants.FieldName.IdCard)),
|
||||||
request);
|
request);
|
||||||
// 就诊患者分页列表
|
// 就诊患者分页列表
|
||||||
Page<EncounterPatientPageDto> encounterPatientPage = inpatientChargeAppMapper
|
Page<EncounterPatientPageDto> encounterPatientPage = inpatientChargeAppMapper
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
|
|||||||
encounterPatientPageParam, searchKey,
|
encounterPatientPageParam, searchKey,
|
||||||
new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientWbStr, CommonConstants.FieldName.PatientPyStr,
|
new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientWbStr, CommonConstants.FieldName.PatientPyStr,
|
||||||
CommonConstants.FieldName.PatientName, CommonConstants.FieldName.PatientBusNo,
|
CommonConstants.FieldName.PatientName, CommonConstants.FieldName.PatientBusNo,
|
||||||
CommonConstants.FieldName.EncounterBusNo, CommonConstants.FieldName.idCard)),
|
CommonConstants.FieldName.EncounterBusNo, CommonConstants.FieldName.IdCard)),
|
||||||
request);
|
request);
|
||||||
// 就诊患者分页列表
|
// 就诊患者分页列表
|
||||||
Page<EncounterPatientPageDto> encounterPatientPage = outpatientChargeAppMapper
|
Page<EncounterPatientPageDto> encounterPatientPage = outpatientChargeAppMapper
|
||||||
@@ -126,6 +126,7 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
|
|||||||
});
|
});
|
||||||
return prescriptionDtoList;
|
return prescriptionDtoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 医保转自费
|
* 医保转自费
|
||||||
*
|
*
|
||||||
@@ -167,4 +168,46 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
|
|||||||
}
|
}
|
||||||
return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null));
|
return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生医保转学生自费
|
||||||
|
*
|
||||||
|
* @param encounterId 就诊id
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> changeToStudentSelfPay(Long encounterId) {
|
||||||
|
// 获取就诊患者的学生自费账户id
|
||||||
|
Long accountId = accountService.getStudentSelfAccount(encounterId);
|
||||||
|
if (accountId == null) {
|
||||||
|
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Payment.M00008, new Object[] {"医保账户"}));
|
||||||
|
}
|
||||||
|
// 自费转医保
|
||||||
|
boolean result = chargeItemService.updateAccountType(encounterId, accountId);
|
||||||
|
if (!result) {
|
||||||
|
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Payment.M00009, null));
|
||||||
|
}
|
||||||
|
return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生自费转学生医保
|
||||||
|
*
|
||||||
|
* @param encounterId 就诊id
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> changeToStudentYbPay(Long encounterId) {
|
||||||
|
// 获取就诊患者的学生医保账户id
|
||||||
|
Long accountId = accountService.getStudentYbAccount(encounterId);
|
||||||
|
if (accountId == null) {
|
||||||
|
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Payment.M00008, new Object[] {"医保账户"}));
|
||||||
|
}
|
||||||
|
// 自费转医保
|
||||||
|
boolean result = chargeItemService.updateAccountType(encounterId, accountId);
|
||||||
|
if (!result) {
|
||||||
|
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Payment.M00009, null));
|
||||||
|
}
|
||||||
|
return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,15 +4,12 @@
|
|||||||
package com.openhis.web.chargemanage.appservice.impl;
|
package com.openhis.web.chargemanage.appservice.impl;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
@@ -55,23 +52,23 @@ import com.openhis.workflow.service.IServiceRequestService;
|
|||||||
@Service
|
@Service
|
||||||
public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppService {
|
public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppService {
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private OutpatientRefundAppMapper outpatientRefundAppMapper;
|
private OutpatientRefundAppMapper outpatientRefundAppMapper;
|
||||||
@Autowired
|
@Resource
|
||||||
private IPaymentReconciliationService paymentReconciliationService;
|
private IPaymentReconciliationService paymentReconciliationService;
|
||||||
@Autowired
|
@Resource
|
||||||
private IChargeItemService chargeItemService;
|
private IChargeItemService chargeItemService;
|
||||||
@Autowired
|
@Resource
|
||||||
private IMedicationDispenseService medicationDispenseService;
|
private IMedicationDispenseService medicationDispenseService;
|
||||||
@Autowired
|
@Resource
|
||||||
private IDeviceDispenseService deviceDispenseService;
|
private IDeviceDispenseService deviceDispenseService;
|
||||||
@Autowired
|
@Resource
|
||||||
private IServiceRequestService serviceRequestService;
|
private IServiceRequestService serviceRequestService;
|
||||||
@Autowired
|
@Resource
|
||||||
private IMedicationRequestService medicationRequestService;
|
private IMedicationRequestService medicationRequestService;
|
||||||
@Autowired
|
@Resource
|
||||||
private IDeviceRequestService deviceRequestService;
|
private IDeviceRequestService deviceRequestService;
|
||||||
@Autowired
|
@Resource
|
||||||
private AssignSeqUtil assignSeqUtil;
|
private AssignSeqUtil assignSeqUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -110,8 +107,8 @@ public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppServi
|
|||||||
PaymentStatus.REFUND_PART.getValue(), PaymentStatus.REFUND_ALL.getValue());
|
PaymentStatus.REFUND_PART.getValue(), PaymentStatus.REFUND_ALL.getValue());
|
||||||
|
|
||||||
// 获取付款id集合
|
// 获取付款id集合
|
||||||
List<Long> paymentIdList =
|
List<Long> paymentIdList = encounterPatientPaymentList.stream().map(EncounterPatientPaymentDto::getPaymentId)
|
||||||
encounterPatientPaymentList.stream().map(EncounterPatientPaymentDto::getId).collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (paymentIdList.isEmpty()) {
|
if (paymentIdList.isEmpty()) {
|
||||||
return R.ok(null);
|
return R.ok(null);
|
||||||
}
|
}
|
||||||
@@ -131,7 +128,7 @@ public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppServi
|
|||||||
e.setServiceStatus_enumText(EnumUtils.getInfoByValue(RequestStatus.class, e.getServiceStatus()));
|
e.setServiceStatus_enumText(EnumUtils.getInfoByValue(RequestStatus.class, e.getServiceStatus()));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
refundItemList.sort(Comparator.comparing(RefundItemDto::getPaymentId));
|
||||||
return R.ok(refundItemList);
|
return R.ok(refundItemList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,22 +159,22 @@ public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppServi
|
|||||||
CommonConstants.TableName.MED_MEDICATION_REQUEST, CommonConstants.TableName.WOR_SERVICE_REQUEST,
|
CommonConstants.TableName.MED_MEDICATION_REQUEST, CommonConstants.TableName.WOR_SERVICE_REQUEST,
|
||||||
CommonConstants.TableName.WOR_DEVICE_REQUEST, CommonConstants.Common.THREE);
|
CommonConstants.TableName.WOR_DEVICE_REQUEST, CommonConstants.Common.THREE);
|
||||||
|
|
||||||
for (RefundItemDto creatdDto : creatChargeItemList) {
|
for (RefundItemDto createDto : creatChargeItemList) {
|
||||||
|
|
||||||
// 未退费用项,生成新的请求,发放,费用项
|
// 未退费用项,生成新的请求,发放,费用项
|
||||||
if (CommonConstants.TableName.MED_MEDICATION_REQUEST.equals(creatdDto.getServiceTable())) {
|
if (CommonConstants.TableName.MED_MEDICATION_REQUEST.equals(createDto.getServiceTable())) {
|
||||||
// 药品请求查询
|
// 药品请求查询
|
||||||
MedicationRequest medicationRequest = medicationRequestService.getById(creatdDto.getRequestId());
|
MedicationRequest medicationRequest = medicationRequestService.getById(createDto.getRequestId());
|
||||||
// 生成新的药品请求
|
// 生成新的药品请求
|
||||||
medicationRequest.setId(null); // 药品请求id
|
medicationRequest.setId(null); // 药品请求id
|
||||||
medicationRequest
|
medicationRequest
|
||||||
.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.MEDICATION_RES_NO.getPrefix(), 4)); // 药品请求编码
|
.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.MEDICATION_RES_NO.getPrefix(), 4)); // 药品请求编码
|
||||||
medicationRequest.setPrescriptionNo(String.valueOf("C" + creatdDto.getPrescriptionNo())); // 处方号
|
medicationRequest.setPrescriptionNo(String.valueOf("C" + createDto.getPrescriptionNo())); // 处方号
|
||||||
medicationRequestService.save(medicationRequest);
|
medicationRequestService.save(medicationRequest);
|
||||||
|
|
||||||
// 药品发放查询
|
// 药品发放查询
|
||||||
MedicationDispense medicationDispense =
|
MedicationDispense medicationDispense =
|
||||||
medicationDispenseService.getById(creatdDto.getDispenseId());
|
medicationDispenseService.getById(createDto.getDispenseId());
|
||||||
// 生成新的药品发放
|
// 生成新的药品发放
|
||||||
medicationDispense.setId(null); // 药品发放id
|
medicationDispense.setId(null); // 药品发放id
|
||||||
medicationDispense
|
medicationDispense
|
||||||
@@ -186,26 +183,26 @@ public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppServi
|
|||||||
medicationDispenseService.save(medicationDispense);
|
medicationDispenseService.save(medicationDispense);
|
||||||
|
|
||||||
// 费用项查询
|
// 费用项查询
|
||||||
ChargeItem chargeItem = chargeItemService.getById(creatdDto.getChargeItemId());
|
ChargeItem chargeItem = chargeItemService.getById(createDto.getChargeItemId());
|
||||||
// 生成新的费用项
|
// 生成新的费用项
|
||||||
chargeItem.setRefundId(chargeItem.getId());// 退费id
|
chargeItem.setRefundId(chargeItem.getId());// 退费id
|
||||||
chargeItem.setId(null); // 费用项id
|
chargeItem.setId(null); // 费用项id
|
||||||
chargeItem.setBusNo(AssignSeqEnum.CHARGE_ITEM_NO.getPrefix().concat(medicationRequest.getBusNo())); // 编码
|
chargeItem.setBusNo(AssignSeqEnum.CHARGE_ITEM_NO.getPrefix().concat(medicationRequest.getBusNo())); // 编码
|
||||||
chargeItem.setPrescriptionNo(String.valueOf("C" + creatdDto.getPrescriptionNo())); // 处方号
|
chargeItem.setPrescriptionNo(String.valueOf("C" + createDto.getPrescriptionNo())); // 处方号
|
||||||
chargeItem.setServiceId(medicationRequest.getId()); // 医疗服务ID
|
chargeItem.setServiceId(medicationRequest.getId()); // 医疗服务ID
|
||||||
chargeItem.setStatusEnum(ChargeItemStatus.PLANNED.getValue());// 收费单状态:待收费
|
chargeItem.setStatusEnum(ChargeItemStatus.PLANNED.getValue());// 收费单状态:待收费
|
||||||
chargeItemService.save(chargeItem);
|
chargeItemService.save(chargeItem);
|
||||||
|
|
||||||
} else if (CommonConstants.TableName.WOR_SERVICE_REQUEST.equals(creatdDto.getServiceTable())) {
|
} else if (CommonConstants.TableName.WOR_SERVICE_REQUEST.equals(createDto.getServiceTable())) {
|
||||||
// 服务请求查询
|
// 服务请求查询
|
||||||
ServiceRequest serviceRequest = serviceRequestService.getById(creatdDto.getRequestId());
|
ServiceRequest serviceRequest = serviceRequestService.getById(createDto.getRequestId());
|
||||||
// 生成新的服务请求
|
// 生成新的服务请求
|
||||||
serviceRequest.setId(null); // 服务请求id
|
serviceRequest.setId(null); // 服务请求id
|
||||||
serviceRequest.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.SERVICE_RES_NO.getPrefix(), 4)); // 服务请求编码
|
serviceRequest.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.SERVICE_RES_NO.getPrefix(), 4)); // 服务请求编码
|
||||||
serviceRequestService.save(serviceRequest);
|
serviceRequestService.save(serviceRequest);
|
||||||
|
|
||||||
// 费用项查询
|
// 费用项查询
|
||||||
ChargeItem chargeItem = chargeItemService.getById(creatdDto.getChargeItemId());
|
ChargeItem chargeItem = chargeItemService.getById(createDto.getChargeItemId());
|
||||||
// 生成新的费用项
|
// 生成新的费用项
|
||||||
chargeItem.setRefundId(chargeItem.getId());// 退费id
|
chargeItem.setRefundId(chargeItem.getId());// 退费id
|
||||||
chargeItem.setId(null); // 费用项id
|
chargeItem.setId(null); // 费用项id
|
||||||
@@ -214,16 +211,16 @@ public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppServi
|
|||||||
chargeItem.setStatusEnum(ChargeItemStatus.PLANNED.getValue());// 收费单状态:待收费
|
chargeItem.setStatusEnum(ChargeItemStatus.PLANNED.getValue());// 收费单状态:待收费
|
||||||
chargeItemService.save(chargeItem);
|
chargeItemService.save(chargeItem);
|
||||||
|
|
||||||
} else if (CommonConstants.TableName.WOR_DEVICE_REQUEST.equals(creatdDto.getServiceTable())) {
|
} else if (CommonConstants.TableName.WOR_DEVICE_REQUEST.equals(createDto.getServiceTable())) {
|
||||||
// 耗材请求查询
|
// 耗材请求查询
|
||||||
DeviceRequest deviceRequest = deviceRequestService.getById(creatdDto.getRequestId());
|
DeviceRequest deviceRequest = deviceRequestService.getById(createDto.getRequestId());
|
||||||
// 生成新的耗材请求
|
// 生成新的耗材请求
|
||||||
deviceRequest.setId(null); // 耗材请求id
|
deviceRequest.setId(null); // 耗材请求id
|
||||||
deviceRequest.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.DEVICE_RES_NO.getPrefix(), 4)); // 耗材请求编码
|
deviceRequest.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.DEVICE_RES_NO.getPrefix(), 4)); // 耗材请求编码
|
||||||
deviceRequestService.save(deviceRequest);
|
deviceRequestService.save(deviceRequest);
|
||||||
|
|
||||||
// 耗材发放查询
|
// 耗材发放查询
|
||||||
DeviceDispense deviceDispense = deviceDispenseService.getById(creatdDto.getDispenseId());
|
DeviceDispense deviceDispense = deviceDispenseService.getById(createDto.getDispenseId());
|
||||||
// 生成新的耗材发放
|
// 生成新的耗材发放
|
||||||
deviceDispense.setId(null); // 耗材id
|
deviceDispense.setId(null); // 耗材id
|
||||||
deviceDispense.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.DEVICE_DIS_NO.getPrefix(), 4)); // 器材发放id
|
deviceDispense.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.DEVICE_DIS_NO.getPrefix(), 4)); // 器材发放id
|
||||||
@@ -231,7 +228,7 @@ public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppServi
|
|||||||
deviceDispenseService.save(deviceDispense);
|
deviceDispenseService.save(deviceDispense);
|
||||||
|
|
||||||
// 费用项查询
|
// 费用项查询
|
||||||
ChargeItem chargeItem = chargeItemService.getById(creatdDto.getChargeItemId());
|
ChargeItem chargeItem = chargeItemService.getById(createDto.getChargeItemId());
|
||||||
// 生成新的费用项
|
// 生成新的费用项
|
||||||
chargeItem.setRefundId(chargeItem.getId());// 退费id
|
chargeItem.setRefundId(chargeItem.getId());// 退费id
|
||||||
chargeItem.setId(null); // 费用项id
|
chargeItem.setId(null); // 费用项id
|
||||||
@@ -372,7 +369,7 @@ public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppServi
|
|||||||
encounterPatientPageParam, searchKey,
|
encounterPatientPageParam, searchKey,
|
||||||
new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientWbStr, CommonConstants.FieldName.PatientPyStr,
|
new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientWbStr, CommonConstants.FieldName.PatientPyStr,
|
||||||
CommonConstants.FieldName.PatientName, CommonConstants.FieldName.PatientBusNo,
|
CommonConstants.FieldName.PatientName, CommonConstants.FieldName.PatientBusNo,
|
||||||
CommonConstants.FieldName.EncounterBusNo, CommonConstants.FieldName.idCard)),
|
CommonConstants.FieldName.EncounterBusNo, CommonConstants.FieldName.IdCard)),
|
||||||
request);
|
request);
|
||||||
// 就诊患者分页列表
|
// 就诊患者分页列表
|
||||||
Page<EncounterPatientPageDto> encounterPatientPage = outpatientRefundAppMapper.selectBilledEncounterPatientPage(
|
Page<EncounterPatientPageDto> encounterPatientPage = outpatientRefundAppMapper.selectBilledEncounterPatientPage(
|
||||||
|
|||||||
@@ -296,8 +296,9 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
|||||||
}
|
}
|
||||||
|
|
||||||
IPage<CurrentDayEncounterDto> currentDayEncounter = outpatientRegistrationAppMapper.getCurrentDayEncounter(
|
IPage<CurrentDayEncounterDto> currentDayEncounter = outpatientRegistrationAppMapper.getCurrentDayEncounter(
|
||||||
new Page<>(pageNo, pageSize), EncounterClass.AMB.getValue(), ParticipantType.ADMITTER.getCode(),
|
new Page<>(pageNo, pageSize), EncounterClass.AMB.getValue(), EncounterStatus.IN_PROGRESS.getValue(),
|
||||||
queryWrapper, ChargeItemContext.REGISTER.getValue(), PaymentStatus.SUCCESS.getValue());
|
ParticipantType.ADMITTER.getCode(), ParticipantType.REGISTRATION_DOCTOR.getCode(), queryWrapper,
|
||||||
|
ChargeItemContext.REGISTER.getValue(), PaymentStatus.SUCCESS.getValue());
|
||||||
currentDayEncounter.getRecords().forEach(e -> {
|
currentDayEncounter.getRecords().forEach(e -> {
|
||||||
// 性别
|
// 性别
|
||||||
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.chargemanage.controller;
|
package com.openhis.web.chargemanage.controller;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -27,7 +28,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class OutpatientChargeController {
|
public class OutpatientChargeController {
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private IOutpatientChargeAppService outpatientChargeAppService;
|
private IOutpatientChargeAppService outpatientChargeAppService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -91,4 +92,26 @@ public class OutpatientChargeController {
|
|||||||
public R<?> changeToMedicalInsurance(@RequestParam Long encounterId) {
|
public R<?> changeToMedicalInsurance(@RequestParam Long encounterId) {
|
||||||
return outpatientChargeAppService.changeToMedicalInsurance(encounterId);
|
return outpatientChargeAppService.changeToMedicalInsurance(encounterId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医保转自费
|
||||||
|
*
|
||||||
|
* @param encounterId 就诊id
|
||||||
|
* @return 操作结果
|
||||||
|
*/
|
||||||
|
@PutMapping("/student-self-pay")
|
||||||
|
public R<?> changeToStudentSelfPay(@RequestParam Long encounterId) {
|
||||||
|
return outpatientChargeAppService.changeToStudentSelfPay(encounterId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自费转医保
|
||||||
|
*
|
||||||
|
* @param encounterId 就诊id
|
||||||
|
* @return 操作结果
|
||||||
|
*/
|
||||||
|
@PutMapping("/student-yb-pay")
|
||||||
|
public R<?> changeToStudentYbPay(@RequestParam Long encounterId) {
|
||||||
|
return outpatientChargeAppService.changeToStudentYbPay(encounterId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ package com.openhis.web.chargemanage.controller;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -30,7 +31,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class OutpatientRefundController {
|
public class OutpatientRefundController {
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private IOutpatientRefundAppService outpatientRefundAppService;
|
private IOutpatientRefundAppService outpatientRefundAppService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -130,6 +130,10 @@ public class CurrentDayEncounterDto {
|
|||||||
* 生日
|
* 生日
|
||||||
*/
|
*/
|
||||||
private Date birthDate;
|
private Date birthDate;
|
||||||
|
/**
|
||||||
|
* 电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退号日期/时间
|
* 退号日期/时间
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ package com.openhis.web.chargemanage.dto;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
@@ -29,7 +28,7 @@ public class EncounterPatientPaymentDto {
|
|||||||
/** ID */
|
/** ID */
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long id;
|
private Long paymentId;
|
||||||
|
|
||||||
/** 就诊ID */
|
/** 就诊ID */
|
||||||
private Long encounterId;
|
private Long encounterId;
|
||||||
|
|||||||
@@ -92,7 +92,17 @@ public class EncounterPatientPrescriptionDto {
|
|||||||
@Dict(dictCode = "med_type")
|
@Dict(dictCode = "med_type")
|
||||||
private String medTypeCode;
|
private String medTypeCode;
|
||||||
private String medTypeCode_dictText;
|
private String medTypeCode_dictText;
|
||||||
|
/** 用法 */
|
||||||
|
@Dict(dictCode = "method_code")
|
||||||
|
private String methodCode;
|
||||||
|
private String methodCode_dictText;
|
||||||
|
private String dose;
|
||||||
|
@Dict(dictCode = "unit_code")
|
||||||
|
private String doseUnitCode;
|
||||||
|
/** 单次剂量单位 */
|
||||||
|
private String doseUnitCode_dictText;
|
||||||
|
/** 频次 */
|
||||||
|
private String rateCode;
|
||||||
/** 合同编码 */
|
/** 合同编码 */
|
||||||
private String contractNo;
|
private String contractNo;
|
||||||
|
|
||||||
@@ -109,4 +119,8 @@ public class EncounterPatientPrescriptionDto {
|
|||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long serviceId;
|
private Long serviceId;
|
||||||
|
|
||||||
|
/** 付款id */
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long paymentId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,14 +36,17 @@ public interface OutpatientRegistrationAppMapper {
|
|||||||
*
|
*
|
||||||
* @param page 分页参数
|
* @param page 分页参数
|
||||||
* @param classEnum 就诊类型
|
* @param classEnum 就诊类型
|
||||||
* @param participantType 参与者类型
|
* @param statusEnum 门诊就诊状态 | 在诊
|
||||||
|
* @param participantType1 参与者类型 | 接诊医生
|
||||||
|
* @param participantType2 参与者类型 | 挂号医生
|
||||||
* @param queryWrapper 查询条件
|
* @param queryWrapper 查询条件
|
||||||
* @param register 收费项目类型:挂号
|
* @param register 收费项目类型:挂号
|
||||||
* @param paymentStatus 支付状态:成功
|
* @param paymentStatus 支付状态:成功
|
||||||
* @return 当日就诊数据
|
* @return 当日就诊数据
|
||||||
*/
|
*/
|
||||||
IPage<CurrentDayEncounterDto> getCurrentDayEncounter(@Param("page") Page<CurrentDayEncounterDto> page,
|
IPage<CurrentDayEncounterDto> getCurrentDayEncounter(@Param("page") Page<CurrentDayEncounterDto> page,
|
||||||
@Param("classEnum") Integer classEnum, @Param("participantType") String participantType,
|
@Param("classEnum") Integer classEnum, @Param("statusEnum") Integer statusEnum,
|
||||||
|
@Param("participantType1") String participantType1, @Param("participantType2") String participantType2,
|
||||||
@Param(Constants.WRAPPER) QueryWrapper<CurrentDayEncounterDto> queryWrapper,
|
@Param(Constants.WRAPPER) QueryWrapper<CurrentDayEncounterDto> queryWrapper,
|
||||||
@Param("register") Integer register, @Param("paymentStatus") Integer paymentStatus);
|
@Param("register") Integer register, @Param("paymentStatus") Integer paymentStatus);
|
||||||
|
|
||||||
|
|||||||
@@ -166,4 +166,26 @@ public interface ICommonService {
|
|||||||
* @return 医嘱打印单
|
* @return 医嘱打印单
|
||||||
*/
|
*/
|
||||||
R<?> getAdvicePrintInfo(List<Long> requestIds, String isPrescription);
|
R<?> getAdvicePrintInfo(List<Long> requestIds, String isPrescription);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询参与者签名
|
||||||
|
*
|
||||||
|
* @param practitionerId 参与者id
|
||||||
|
* @return 参与者签名
|
||||||
|
*/
|
||||||
|
R<?> getPractitionerSignature(Long practitionerId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有供应商
|
||||||
|
*
|
||||||
|
* @return 供应商
|
||||||
|
*/
|
||||||
|
R<?> getSupplierList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有诊疗项目
|
||||||
|
*
|
||||||
|
* @return 诊疗项目
|
||||||
|
*/
|
||||||
|
R<?> getActivityDefinition();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
@@ -21,11 +22,13 @@ import com.core.common.utils.StringUtils;
|
|||||||
import com.core.common.utils.bean.BeanUtils;
|
import com.core.common.utils.bean.BeanUtils;
|
||||||
import com.openhis.administration.domain.Location;
|
import com.openhis.administration.domain.Location;
|
||||||
import com.openhis.administration.domain.Organization;
|
import com.openhis.administration.domain.Organization;
|
||||||
|
import com.openhis.administration.domain.Supplier;
|
||||||
import com.openhis.administration.domain.TraceNoManage;
|
import com.openhis.administration.domain.TraceNoManage;
|
||||||
import com.openhis.administration.mapper.TraceNoManageMapper;
|
import com.openhis.administration.mapper.TraceNoManageMapper;
|
||||||
import com.openhis.administration.service.ILocationService;
|
import com.openhis.administration.service.ILocationService;
|
||||||
import com.openhis.administration.service.IOrganizationService;
|
import com.openhis.administration.service.IOrganizationService;
|
||||||
import com.openhis.administration.service.IPractitionerRoleService;
|
import com.openhis.administration.service.IPractitionerRoleService;
|
||||||
|
import com.openhis.administration.service.ISupplierService;
|
||||||
import com.openhis.common.constant.CommonConstants;
|
import com.openhis.common.constant.CommonConstants;
|
||||||
import com.openhis.common.enums.*;
|
import com.openhis.common.enums.*;
|
||||||
import com.openhis.common.utils.EnumUtils;
|
import com.openhis.common.utils.EnumUtils;
|
||||||
@@ -64,11 +67,14 @@ public class CommonServiceImpl implements ICommonService {
|
|||||||
private IOrganizationService organizationService;
|
private IOrganizationService organizationService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IInventoryItemService iInventoryItemService;
|
private IInventoryItemService inventoryItemService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ContractMapper contractMapper;
|
private ContractMapper contractMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISupplierService supplierService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取药房列表
|
* 获取药房列表
|
||||||
*
|
*
|
||||||
@@ -78,6 +84,7 @@ public class CommonServiceImpl implements ICommonService {
|
|||||||
public List<LocationDto> getPharmacyList() {
|
public List<LocationDto> getPharmacyList() {
|
||||||
|
|
||||||
List<Location> pharmacyList = locationService.getPharmacyList();
|
List<Location> pharmacyList = locationService.getPharmacyList();
|
||||||
|
|
||||||
List<LocationDto> locationDtoList = new ArrayList<>();
|
List<LocationDto> locationDtoList = new ArrayList<>();
|
||||||
LocationDto locationDto;
|
LocationDto locationDto;
|
||||||
for (Location location : pharmacyList) {
|
for (Location location : pharmacyList) {
|
||||||
@@ -85,6 +92,8 @@ public class CommonServiceImpl implements ICommonService {
|
|||||||
BeanUtils.copyProperties(location, locationDto);
|
BeanUtils.copyProperties(location, locationDto);
|
||||||
locationDtoList.add(locationDto);
|
locationDtoList.add(locationDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return locationDtoList;
|
return locationDtoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -278,11 +287,10 @@ public class CommonServiceImpl implements ICommonService {
|
|||||||
|
|
||||||
// 医保编码和生产厂家校验
|
// 医保编码和生产厂家校验
|
||||||
for (LocationInventoryDto dto : locationInventoryDtoList) {
|
for (LocationInventoryDto dto : locationInventoryDtoList) {
|
||||||
if (StringUtils.isNotEmpty(dto.getYbNo()) && StringUtils.isEmpty(dto.getManufacturer())) {
|
if (StringUtils.isNotEmpty(dto.getYbNo()) && StringUtils.isEmpty(dto.getManufacturerText())) {
|
||||||
return R.fail("生产厂家不能为空,请到药品目录维护");
|
return R.fail("生产厂家不能为空,请到药品目录维护");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return R.ok(locationInventoryDtoList);
|
return R.ok(locationInventoryDtoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,7 +326,7 @@ public class CommonServiceImpl implements ICommonService {
|
|||||||
for (String traceNo : traceNoList) {
|
for (String traceNo : traceNoList) {
|
||||||
if (traceNo != null && !StringUtils.isEmpty(traceNo)) {
|
if (traceNo != null && !StringUtils.isEmpty(traceNo)) {
|
||||||
// 数据源更改
|
// 数据源更改
|
||||||
InventoryItem inventoryItem = iInventoryItemService.getOne(
|
InventoryItem inventoryItem = inventoryItemService.getOne(
|
||||||
new LambdaQueryWrapper<InventoryItem>().like(InventoryItem::getTraceNo, traceNo).last("LIMIT 1"));
|
new LambdaQueryWrapper<InventoryItem>().like(InventoryItem::getTraceNo, traceNo).last("LIMIT 1"));
|
||||||
if (inventoryItem != null) {
|
if (inventoryItem != null) {
|
||||||
String itemId = inventoryItem.getItemId().toString();
|
String itemId = inventoryItem.getItemId().toString();
|
||||||
@@ -491,4 +499,37 @@ public class CommonServiceImpl implements ICommonService {
|
|||||||
return R.ok(advicePrintInfoDto);
|
return R.ok(advicePrintInfoDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询参与者签名
|
||||||
|
*
|
||||||
|
* @param practitionerId 参与者id
|
||||||
|
* @return 参与者签名
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> getPractitionerSignature(Long practitionerId) {
|
||||||
|
return R.ok(commonAppMapper.getPractitionerSignature(practitionerId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有供应商
|
||||||
|
*
|
||||||
|
* @return 供应商
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> getSupplierList() {
|
||||||
|
return R.ok(supplierService.list(new LambdaQueryWrapper<Supplier>().select(Supplier::getId, Supplier::getName)
|
||||||
|
.eq(Supplier::getTypeEnum, SupplierType.SUPPLIER.getValue())
|
||||||
|
.eq(Supplier::getDeleteFlag, DelFlag.NO.getCode()).eq(Supplier::getActiveFlag, Whether.YES.getValue())));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有诊疗项目
|
||||||
|
*
|
||||||
|
* @return 诊疗项目
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> getActivityDefinition() {
|
||||||
|
return R.ok(commonAppMapper.getActivityDefinition(PublicationStatus.ACTIVE.getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ import java.util.List;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import com.openhis.common.enums.Whether;
|
|
||||||
import com.openhis.web.common.dto.AdvicePrintInfoDto;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
@@ -221,7 +219,38 @@ public class CommonAppController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/advice-print")
|
@GetMapping("/advice-print")
|
||||||
public R<?> getAdvicePrintInfo(@RequestParam(value = "requestIds") List<Long> requestIds, String isPrescription) {
|
public R<?> getAdvicePrintInfo(@RequestParam(value = "requestIds") List<Long> requestIds, String isPrescription) {
|
||||||
return commonService.getAdvicePrintInfo(requestIds,isPrescription);
|
return commonService.getAdvicePrintInfo(requestIds, isPrescription);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询参与者签名
|
||||||
|
*
|
||||||
|
* @param practitionerId 参与者id
|
||||||
|
* @return 参与者签名
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/practitioner-signature")
|
||||||
|
public R<?> getPractitionerSignature(@RequestParam(value = "practitionerId") Long practitionerId) {
|
||||||
|
return commonService.getPractitionerSignature(practitionerId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有供应商
|
||||||
|
*
|
||||||
|
* @return 供应商
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/supplier")
|
||||||
|
public R<?> getSupplierList() {
|
||||||
|
return commonService.getSupplierList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有诊疗项目
|
||||||
|
*
|
||||||
|
* @return 诊疗项目
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/activity-definition")
|
||||||
|
public R<?> getActivityDefinition() {
|
||||||
|
return commonService.getActivityDefinition();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.common.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 诊疗项目dto
|
||||||
|
*
|
||||||
|
* @author zwh
|
||||||
|
* @date 2025-04-01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ActivityDefinitionDto {
|
||||||
|
|
||||||
|
/** 项目定义ID */
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long activityDefinitionId;
|
||||||
|
|
||||||
|
/** 项目名称 */
|
||||||
|
private String activityDefinitionName;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -87,7 +87,7 @@ public class InventoryItemDto {
|
|||||||
/**
|
/**
|
||||||
* 生产厂家
|
* 生产厂家
|
||||||
*/
|
*/
|
||||||
private String manufacturer;
|
private String manufacturerText;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目对应表名
|
* 项目对应表名
|
||||||
|
|||||||
@@ -75,6 +75,6 @@ public class LocationInventoryDto {
|
|||||||
private String ybNo;
|
private String ybNo;
|
||||||
|
|
||||||
/** 生产厂家 */
|
/** 生产厂家 */
|
||||||
private String manufacturer;
|
private String manufacturerText;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,24 +26,13 @@ public class PerformInfoDto {
|
|||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long requestId;
|
private Long requestId;
|
||||||
|
|
||||||
/** 住院id */
|
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
|
||||||
private Long encounterId;
|
|
||||||
|
|
||||||
/** 发放id */
|
/** 发放id */
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long dispenseId;
|
private Long dispenseId;
|
||||||
|
|
||||||
/** 执行id */
|
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
|
||||||
private Long procedureId;
|
|
||||||
|
|
||||||
/** 请求所在表 */
|
/** 请求所在表 */
|
||||||
private String requestTable;
|
private String requestTable;
|
||||||
|
|
||||||
/** 执行时间列表 */
|
|
||||||
private List<String> executeTimes;
|
|
||||||
|
|
||||||
/** 执行位置 */
|
/** 执行位置 */
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long locationId;
|
private Long locationId;
|
||||||
@@ -51,10 +40,4 @@ public class PerformInfoDto {
|
|||||||
/** 分组id */
|
/** 分组id */
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long groupId;
|
private Long groupId;
|
||||||
|
|
||||||
/** 执行开始时间 */
|
|
||||||
private Date exeStartTime;
|
|
||||||
|
|
||||||
/** 执行结束时间 */
|
|
||||||
private Date exeEndTime;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,4 +88,20 @@ public interface CommonAppMapper {
|
|||||||
* @return 处置打印信息
|
* @return 处置打印信息
|
||||||
*/
|
*/
|
||||||
AdvicePrintInfoDto selectTreatmentPrintInfo(@Param("requestIds") List<Long> requestIds);
|
AdvicePrintInfoDto selectTreatmentPrintInfo(@Param("requestIds") List<Long> requestIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询参与者签名
|
||||||
|
*
|
||||||
|
* @param practitionerId 参与者id
|
||||||
|
* @return 参与者签名
|
||||||
|
*/
|
||||||
|
String getPractitionerSignature(@Param("practitionerId") Long practitionerId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有诊疗项目
|
||||||
|
*
|
||||||
|
* @param statusEnum 启用状态
|
||||||
|
* @return 诊疗项目
|
||||||
|
*/
|
||||||
|
List<ActivityDefinitionDto> getActivityDefinition(@Param("statusEnum") Integer statusEnum);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.openhis.web.datadictionary.appservice;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.web.datadictionary.dto.ICDCodeAddDto;
|
||||||
|
import com.openhis.web.datadictionary.dto.ICDCodeUpdateDto;
|
||||||
|
|
||||||
|
public interface ICDCodeService {
|
||||||
|
/**
|
||||||
|
* 分页查询icd10编码
|
||||||
|
*
|
||||||
|
* @param searchKey
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
R<?> getICDCodePage(String searchKey, Integer pageNo, Integer pageSize);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增icd10编码
|
||||||
|
* @param icdCodeAddDto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
R<?> addICDInformation(ICDCodeAddDto icdCodeAddDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除icd10编码
|
||||||
|
* @param glNo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
R<?> deleteICDInformation(String glNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改icd10编码
|
||||||
|
* @param icdCodeUpdateDto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
R<?> saveOrUpdateICDInformation(ICDCodeUpdateDto icdCodeUpdateDto);
|
||||||
|
}
|
||||||
@@ -95,4 +95,12 @@ public interface IDeviceManageAppService {
|
|||||||
* @param response 响应
|
* @param response 响应
|
||||||
*/
|
*/
|
||||||
void importTemplate(HttpServletResponse response);
|
void importTemplate(HttpServletResponse response);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验耗材是否可以编辑
|
||||||
|
*
|
||||||
|
* @param deviceId 耗材ID
|
||||||
|
* @return 校验结果
|
||||||
|
*/
|
||||||
|
R<?> validateDeviceEdit(Long deviceId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,4 +92,12 @@ public interface IDiagTreatMAppService {
|
|||||||
* @param response 响应
|
* @param response 响应
|
||||||
*/
|
*/
|
||||||
void importTemplate(HttpServletResponse response);
|
void importTemplate(HttpServletResponse response);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验诊疗项目是否可以编辑
|
||||||
|
*
|
||||||
|
* @param activityId 诊疗ID
|
||||||
|
* @return 校验结果
|
||||||
|
*/
|
||||||
|
R<?> validateActivityEdit(Long activityId);
|
||||||
}
|
}
|
||||||
@@ -97,4 +97,12 @@ public interface IMedicationManageAppService {
|
|||||||
* @param response 响应
|
* @param response 响应
|
||||||
*/
|
*/
|
||||||
void importTemplate(HttpServletResponse response);
|
void importTemplate(HttpServletResponse response);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验药品是否可以编辑
|
||||||
|
*
|
||||||
|
* @param medicationId 药品ID
|
||||||
|
* @return 校验结果
|
||||||
|
*/
|
||||||
|
R<?> validateMedicationEdit(Long medicationId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import javax.annotation.Resource;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
@@ -50,6 +49,8 @@ import com.openhis.web.datadictionary.appservice.IDeviceManageAppService;
|
|||||||
import com.openhis.web.datadictionary.appservice.IItemDefinitionService;
|
import com.openhis.web.datadictionary.appservice.IItemDefinitionService;
|
||||||
import com.openhis.web.datadictionary.dto.*;
|
import com.openhis.web.datadictionary.dto.*;
|
||||||
import com.openhis.web.datadictionary.mapper.DeviceManageMapper;
|
import com.openhis.web.datadictionary.mapper.DeviceManageMapper;
|
||||||
|
import com.openhis.workflow.domain.DeviceRequest;
|
||||||
|
import com.openhis.workflow.service.IDeviceRequestService;
|
||||||
import com.openhis.workflow.service.ISupplyRequestService;
|
import com.openhis.workflow.service.ISupplyRequestService;
|
||||||
import com.openhis.yb.service.YbManager;
|
import com.openhis.yb.service.YbManager;
|
||||||
|
|
||||||
@@ -62,38 +63,41 @@ import com.openhis.yb.service.YbManager;
|
|||||||
@Service
|
@Service
|
||||||
public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private ISupplyRequestService supplyRequestService;
|
private ISupplyRequestService supplyRequestService;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private IDeviceDefinitionService deviceDefinitionService;
|
private IDeviceDefinitionService deviceDefinitionService;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private IChargeItemDefinitionService chargeItemDefinitionService;
|
private IChargeItemDefinitionService chargeItemDefinitionService;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private ILocationService locationService;
|
private ILocationService locationService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private DeviceManageMapper deviceManageMapper;
|
private DeviceManageMapper deviceManageMapper;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private ISysDictTypeService sysDictTypeService;
|
private ISysDictTypeService sysDictTypeService;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private IItemDefinitionService itemDefinitionServic;
|
private IItemDefinitionService itemDefinitionServic;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private ISupplierService supplierService;
|
private ISupplierService supplierService;
|
||||||
|
|
||||||
@Autowired(required = false)
|
@Resource
|
||||||
private AssignSeqUtil assignSeqUtil;
|
private AssignSeqUtil assignSeqUtil;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private YbManager ybService;
|
private YbManager ybService;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private IOperationRecordService iOperationRecordService;
|
private IOperationRecordService operationRecordService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IDeviceRequestService deviceRequestService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 器材目录初始化
|
* 器材目录初始化
|
||||||
@@ -199,11 +203,6 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> editDevice(DeviceManageUpDto deviceManageDto) {
|
public R<?> editDevice(DeviceManageUpDto deviceManageDto) {
|
||||||
// 校验是否可以编辑
|
|
||||||
boolean result = supplyRequestService.verifyAbleEdit(deviceManageDto.getId());
|
|
||||||
if (result) {
|
|
||||||
return R.fail("该耗材已经发生过业务,不可编辑");
|
|
||||||
}
|
|
||||||
DeviceDefinition deviceDefinition = new DeviceDefinition();
|
DeviceDefinition deviceDefinition = new DeviceDefinition();
|
||||||
BeanUtils.copyProperties(deviceManageDto, deviceDefinition);
|
BeanUtils.copyProperties(deviceManageDto, deviceDefinition);
|
||||||
// 拼音码
|
// 拼音码
|
||||||
@@ -230,7 +229,7 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
.setInstanceId(deviceDefinition.getId()).setPrice(deviceManageDto.getRetailPrice())
|
.setInstanceId(deviceDefinition.getId()).setPrice(deviceManageDto.getRetailPrice())
|
||||||
.setChargeName(deviceManageDto.getName());;
|
.setChargeName(deviceManageDto.getName());;
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
iOperationRecordService.addEntityOperationRecord(DbOpType.UPDATE.getCode(),
|
operationRecordService.addEntityOperationRecord(DbOpType.UPDATE.getCode(),
|
||||||
CommonConstants.TableName.ADM_DEVICE_DEFINITION, deviceDefinition);
|
CommonConstants.TableName.ADM_DEVICE_DEFINITION, deviceDefinition);
|
||||||
// 更新价格表
|
// 更新价格表
|
||||||
boolean upItemDef = itemDefinitionServic.updateItem(chargeItemDefinition);
|
boolean upItemDef = itemDefinitionServic.updateItem(chargeItemDefinition);
|
||||||
@@ -261,12 +260,10 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> getDeviceOne(@RequestParam Long id) {
|
public R<?> getDeviceOne(@RequestParam Long id) {
|
||||||
|
|
||||||
// 获取租户ID
|
// 获取租户ID
|
||||||
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||||
// 根据ID查询【器材目录】
|
// 根据ID查询【器材目录】
|
||||||
DeviceManageDto deviceManageDto = deviceManageMapper.getOne(id, tenantId);
|
DeviceManageDto deviceManageDto = deviceManageMapper.getOne(id, tenantId);
|
||||||
|
|
||||||
return R.ok(deviceManageDto);
|
return R.ok(deviceManageDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -278,9 +275,7 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> editDeviceStop(List<Long> ids) {
|
public R<?> editDeviceStop(List<Long> ids) {
|
||||||
|
|
||||||
List<DeviceDefinition> DeviceDefinitionList = new CopyOnWriteArrayList<>();
|
List<DeviceDefinition> DeviceDefinitionList = new CopyOnWriteArrayList<>();
|
||||||
|
|
||||||
// 取得更新值
|
// 取得更新值
|
||||||
for (Long detail : ids) {
|
for (Long detail : ids) {
|
||||||
DeviceDefinition deviceDefinition = new DeviceDefinition();
|
DeviceDefinition deviceDefinition = new DeviceDefinition();
|
||||||
@@ -289,7 +284,7 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
DeviceDefinitionList.add(deviceDefinition);
|
DeviceDefinitionList.add(deviceDefinition);
|
||||||
}
|
}
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
iOperationRecordService.addIdsOperationRecord(DbOpType.STOP.getCode(),
|
operationRecordService.addIdsOperationRecord(DbOpType.STOP.getCode(),
|
||||||
CommonConstants.TableName.ADM_DEVICE_DEFINITION, ids);
|
CommonConstants.TableName.ADM_DEVICE_DEFINITION, ids);
|
||||||
|
|
||||||
// 更新器材信息
|
// 更新器材信息
|
||||||
@@ -306,9 +301,7 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> editDeviceStart(List<Long> ids) {
|
public R<?> editDeviceStart(List<Long> ids) {
|
||||||
|
|
||||||
List<DeviceDefinition> DeviceDefinitionList = new CopyOnWriteArrayList<>();
|
List<DeviceDefinition> DeviceDefinitionList = new CopyOnWriteArrayList<>();
|
||||||
|
|
||||||
// 取得更新值
|
// 取得更新值
|
||||||
for (Long detail : ids) {
|
for (Long detail : ids) {
|
||||||
DeviceDefinition DeviceDefinition = new DeviceDefinition();
|
DeviceDefinition DeviceDefinition = new DeviceDefinition();
|
||||||
@@ -317,7 +310,7 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
DeviceDefinitionList.add(DeviceDefinition);
|
DeviceDefinitionList.add(DeviceDefinition);
|
||||||
}
|
}
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
iOperationRecordService.addIdsOperationRecord(DbOpType.START.getCode(),
|
operationRecordService.addIdsOperationRecord(DbOpType.START.getCode(),
|
||||||
CommonConstants.TableName.ADM_DEVICE_DEFINITION, ids);
|
CommonConstants.TableName.ADM_DEVICE_DEFINITION, ids);
|
||||||
|
|
||||||
// 更新器材信息
|
// 更新器材信息
|
||||||
@@ -333,10 +326,8 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> addDevice(@Validated @RequestBody DeviceManageUpDto deviceManageUpDto) {
|
public R<?> addDevice(@Validated @RequestBody DeviceManageUpDto deviceManageUpDto) {
|
||||||
|
|
||||||
DeviceDefinition deviceDefinition = new DeviceDefinition();
|
DeviceDefinition deviceDefinition = new DeviceDefinition();
|
||||||
BeanUtils.copyProperties(deviceManageUpDto, deviceDefinition);
|
BeanUtils.copyProperties(deviceManageUpDto, deviceDefinition);
|
||||||
|
|
||||||
// 使用10位数基础采番
|
// 使用10位数基础采番
|
||||||
String code = assignSeqUtil.getSeq(AssignSeqEnum.DEVICE_NUM.getPrefix(), 10);
|
String code = assignSeqUtil.getSeq(AssignSeqEnum.DEVICE_NUM.getPrefix(), 10);
|
||||||
deviceDefinition.setBusNo(code);
|
deviceDefinition.setBusNo(code);
|
||||||
@@ -344,10 +335,8 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
deviceDefinition.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(deviceDefinition.getName()));
|
deviceDefinition.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(deviceDefinition.getName()));
|
||||||
// 五笔码
|
// 五笔码
|
||||||
deviceDefinition.setWbStr(ChineseConvertUtils.toWBFirstLetter(deviceDefinition.getName()));
|
deviceDefinition.setWbStr(ChineseConvertUtils.toWBFirstLetter(deviceDefinition.getName()));
|
||||||
|
|
||||||
// 新增外来器材目录
|
// 新增外来器材目录
|
||||||
deviceDefinition.setStatusEnum(PublicationStatus.ACTIVE.getValue());
|
deviceDefinition.setStatusEnum(PublicationStatus.ACTIVE.getValue());
|
||||||
|
|
||||||
if (deviceDefinitionService.addDevice(deviceDefinition)) {
|
if (deviceDefinitionService.addDevice(deviceDefinition)) {
|
||||||
// 调用医保目录对照接口
|
// 调用医保目录对照接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
@@ -359,7 +348,7 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
iOperationRecordService.addEntityOperationRecord(DbOpType.INSERT.getCode(),
|
operationRecordService.addEntityOperationRecord(DbOpType.INSERT.getCode(),
|
||||||
CommonConstants.TableName.ADM_DEVICE_DEFINITION, deviceDefinition);
|
CommonConstants.TableName.ADM_DEVICE_DEFINITION, deviceDefinition);
|
||||||
|
|
||||||
ItemUpFromDirectoryDto itemUpFromDirectoryDto = new ItemUpFromDirectoryDto();
|
ItemUpFromDirectoryDto itemUpFromDirectoryDto = new ItemUpFromDirectoryDto();
|
||||||
@@ -374,7 +363,6 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"}))
|
||||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
return R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
return R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -430,6 +418,30 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
util.importTemplateExcel(response, "器材目录数据");
|
util.importTemplateExcel(response, "器材目录数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验耗材是否可以编辑
|
||||||
|
*
|
||||||
|
* @param deviceId 耗材ID
|
||||||
|
* @return 校验结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> validateDeviceEdit(Long deviceId) {
|
||||||
|
List<DeviceRequest> deviceRequestList = deviceRequestService.getDevRequestByDeviceId(deviceId);
|
||||||
|
if (!deviceRequestList.isEmpty()) {
|
||||||
|
if (deviceRequestList.stream()
|
||||||
|
.allMatch(x -> x.getStatusEnum().equals(RequestStatus.COMPLETED.getValue()))) {
|
||||||
|
return R.ok(1, "医生开过该耗材,不可编辑");
|
||||||
|
} else {
|
||||||
|
// 校验是否可以编辑
|
||||||
|
boolean result = supplyRequestService.verifyAbleEdit(deviceId);
|
||||||
|
if (result) {
|
||||||
|
return R.ok(2, "该耗材已经入库过,不可编辑");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入信息校验
|
* 导入信息校验
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import javax.annotation.Resource;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
@@ -38,14 +37,14 @@ import com.openhis.common.utils.CommonUtil;
|
|||||||
import com.openhis.common.utils.EnumUtils;
|
import com.openhis.common.utils.EnumUtils;
|
||||||
import com.openhis.common.utils.HisQueryUtils;
|
import com.openhis.common.utils.HisQueryUtils;
|
||||||
import com.openhis.sys.service.IOperationRecordService;
|
import com.openhis.sys.service.IOperationRecordService;
|
||||||
import com.openhis.web.common.appservice.ICommonService;
|
|
||||||
import com.openhis.web.datadictionary.appservice.IDiagTreatMAppService;
|
import com.openhis.web.datadictionary.appservice.IDiagTreatMAppService;
|
||||||
import com.openhis.web.datadictionary.appservice.IItemDefinitionService;
|
import com.openhis.web.datadictionary.appservice.IItemDefinitionService;
|
||||||
import com.openhis.web.datadictionary.dto.*;
|
import com.openhis.web.datadictionary.dto.*;
|
||||||
import com.openhis.web.datadictionary.mapper.ActivityDefinitionManageMapper;
|
import com.openhis.web.datadictionary.mapper.ActivityDefinitionManageMapper;
|
||||||
import com.openhis.workflow.domain.ActivityDefinition;
|
import com.openhis.workflow.domain.ActivityDefinition;
|
||||||
import com.openhis.workflow.mapper.ActivityDefinitionMapper;
|
import com.openhis.workflow.domain.ServiceRequest;
|
||||||
import com.openhis.workflow.service.IActivityDefinitionService;
|
import com.openhis.workflow.service.IActivityDefinitionService;
|
||||||
|
import com.openhis.workflow.service.IServiceRequestService;
|
||||||
import com.openhis.yb.service.YbManager;
|
import com.openhis.yb.service.YbManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57,34 +56,26 @@ import com.openhis.yb.service.YbManager;
|
|||||||
@Service
|
@Service
|
||||||
public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private IActivityDefinitionService activityDefinitionService;
|
private IActivityDefinitionService activityDefinitionService;
|
||||||
@Autowired
|
@Resource
|
||||||
private IChargeItemDefinitionService chargeItemDefinitionService;
|
private IChargeItemDefinitionService chargeItemDefinitionService;
|
||||||
@Autowired
|
@Resource
|
||||||
private ActivityDefinitionMapper activityDefinitionMapper;
|
private IOrganizationService organizationService;
|
||||||
@Autowired
|
|
||||||
private IOrganizationService iOrganizationService;
|
|
||||||
@Autowired
|
|
||||||
private ISysDictTypeService iSysDictTypeService;
|
|
||||||
@Resource
|
@Resource
|
||||||
private ActivityDefinitionManageMapper activityDefinitionManageMapper;
|
private ActivityDefinitionManageMapper activityDefinitionManageMapper;
|
||||||
@Autowired
|
@Resource
|
||||||
private IItemDefinitionService itemDefinitionServic;
|
private IItemDefinitionService itemDefinitionService;
|
||||||
@Autowired
|
@Resource
|
||||||
private ISysDictTypeService sysDictTypeService;
|
private ISysDictTypeService sysDictTypeService;
|
||||||
|
@Resource
|
||||||
@Autowired
|
private AssignSeqUtil assignSeqUtil;
|
||||||
private ICommonService commonService;
|
@Resource
|
||||||
|
private YbManager ybService;
|
||||||
@Autowired(required = false)
|
@Resource
|
||||||
AssignSeqUtil assignSeqUtil;
|
private IOperationRecordService operationRecordService;
|
||||||
|
@Resource
|
||||||
@Autowired
|
private IServiceRequestService serviceRequestService;
|
||||||
YbManager ybService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
IOperationRecordService iOperationRecordService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 诊疗目录初期查询
|
* 诊疗目录初期查询
|
||||||
@@ -102,7 +93,7 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
|||||||
// 获取执行科室
|
// 获取执行科室
|
||||||
LambdaQueryWrapper<Organization> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<Organization> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(Organization::getTypeEnum, OrganizationType.DEPARTMENT);
|
queryWrapper.eq(Organization::getTypeEnum, OrganizationType.DEPARTMENT);
|
||||||
List<Organization> organizations = iOrganizationService.list(queryWrapper);
|
List<Organization> organizations = organizationService.list(queryWrapper);
|
||||||
List<DiagnosisTreatmentInitDto.exeOrganization> exeOrganizations = organizations.stream()
|
List<DiagnosisTreatmentInitDto.exeOrganization> exeOrganizations = organizations.stream()
|
||||||
.map(exeOrg -> new DiagnosisTreatmentInitDto.exeOrganization(exeOrg.getId(), exeOrg.getName()))
|
.map(exeOrg -> new DiagnosisTreatmentInitDto.exeOrganization(exeOrg.getId(), exeOrg.getName()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
@@ -188,7 +179,7 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
|||||||
|
|
||||||
// 分页查询
|
// 分页查询
|
||||||
IPage<DiagnosisTreatmentDto> diseaseTreatmentPage =
|
IPage<DiagnosisTreatmentDto> diseaseTreatmentPage =
|
||||||
activityDefinitionManageMapper.getDiseaseTreatmentPage(new Page<>(pageNo, pageSize), queryWrapper);
|
activityDefinitionManageMapper.getDiseaseTreatmentPage(new Page<DiagnosisTreatmentDto>(pageNo, pageSize), queryWrapper);
|
||||||
|
|
||||||
diseaseTreatmentPage.getRecords().forEach(e -> {
|
diseaseTreatmentPage.getRecords().forEach(e -> {
|
||||||
// 医保标记枚举类回显赋值
|
// 医保标记枚举类回显赋值
|
||||||
@@ -259,16 +250,16 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
|||||||
.setInstanceId(diagnosisTreatmentUpDto.getId()).setPrice(diagnosisTreatmentUpDto.getRetailPrice())
|
.setInstanceId(diagnosisTreatmentUpDto.getId()).setPrice(diagnosisTreatmentUpDto.getRetailPrice())
|
||||||
.setChargeName(diagnosisTreatmentUpDto.getName());
|
.setChargeName(diagnosisTreatmentUpDto.getName());
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
iOperationRecordService.addEntityOperationRecord(DbOpType.UPDATE.getCode(),
|
operationRecordService.addEntityOperationRecord(DbOpType.UPDATE.getCode(),
|
||||||
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, activityDefinition);
|
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, activityDefinition);
|
||||||
|
|
||||||
// 更新价格表
|
// 更新价格表
|
||||||
boolean upItemDef = itemDefinitionServic.updateItem(chargeItemDefinition);
|
boolean upItemDef = itemDefinitionService.updateItem(chargeItemDefinition);
|
||||||
// 更新子表,修改零售价,条件:单位
|
// 更新子表,修改零售价,条件:单位
|
||||||
boolean upItemDetail1 = itemDefinitionServic.updateItemDetail(chargeItemDefinition,
|
boolean upItemDetail1 = itemDefinitionService.updateItemDetail(chargeItemDefinition,
|
||||||
diagnosisTreatmentUpDto.getRetailPrice(), ConditionCode.UNIT.getCode());
|
diagnosisTreatmentUpDto.getRetailPrice(), ConditionCode.UNIT.getCode());
|
||||||
// 更新子表,修改最高零售价,条件:限制
|
// 更新子表,修改最高零售价,条件:限制
|
||||||
boolean upItemDetail2 = itemDefinitionServic.updateItemDetail(chargeItemDefinition,
|
boolean upItemDetail2 = itemDefinitionService.updateItemDetail(chargeItemDefinition,
|
||||||
diagnosisTreatmentUpDto.getMaximumRetailPrice(), ConditionCode.LIMIT.getCode());
|
diagnosisTreatmentUpDto.getMaximumRetailPrice(), ConditionCode.LIMIT.getCode());
|
||||||
|
|
||||||
// 更新价格表
|
// 更新价格表
|
||||||
@@ -299,7 +290,7 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
|||||||
ActivityDefinitionList.add(ActivityDefinition);
|
ActivityDefinitionList.add(ActivityDefinition);
|
||||||
}
|
}
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
iOperationRecordService.addIdsOperationRecord(DbOpType.STOP.getCode(),
|
operationRecordService.addIdsOperationRecord(DbOpType.STOP.getCode(),
|
||||||
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, ids);
|
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, ids);
|
||||||
// 更新诊疗信息
|
// 更新诊疗信息
|
||||||
return activityDefinitionService.updateBatchById(ActivityDefinitionList)
|
return activityDefinitionService.updateBatchById(ActivityDefinitionList)
|
||||||
@@ -327,7 +318,7 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
|||||||
ActivityDefinitionList.add(ActivityDefinition);
|
ActivityDefinitionList.add(ActivityDefinition);
|
||||||
}
|
}
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
iOperationRecordService.addIdsOperationRecord(DbOpType.START.getCode(),
|
operationRecordService.addIdsOperationRecord(DbOpType.START.getCode(),
|
||||||
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, ids);
|
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, ids);
|
||||||
// 更新诊疗信息
|
// 更新诊疗信息
|
||||||
return activityDefinitionService.updateBatchById(ActivityDefinitionList)
|
return activityDefinitionService.updateBatchById(ActivityDefinitionList)
|
||||||
@@ -374,7 +365,7 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
iOperationRecordService.addEntityOperationRecord(DbOpType.INSERT.getCode(),
|
operationRecordService.addEntityOperationRecord(DbOpType.INSERT.getCode(),
|
||||||
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, activityDefinition);
|
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, activityDefinition);
|
||||||
|
|
||||||
ItemUpFromDirectoryDto itemUpFromDirectoryDto = new ItemUpFromDirectoryDto();
|
ItemUpFromDirectoryDto itemUpFromDirectoryDto = new ItemUpFromDirectoryDto();
|
||||||
@@ -386,7 +377,7 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
|||||||
.setConditionFlag(Whether.YES.getValue()).setChargeName(diagnosisTreatmentUpDto.getName())
|
.setConditionFlag(Whether.YES.getValue()).setChargeName(diagnosisTreatmentUpDto.getName())
|
||||||
.setInstanceId(activityDefinition.getId()).setPrice(diagnosisTreatmentUpDto.getRetailPrice());
|
.setInstanceId(activityDefinition.getId()).setPrice(diagnosisTreatmentUpDto.getRetailPrice());
|
||||||
|
|
||||||
return itemDefinitionServic.addItem(itemUpFromDirectoryDto)
|
return itemDefinitionService.addItem(itemUpFromDirectoryDto)
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"诊疗目录"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"诊疗目录"}))
|
||||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||||
|
|
||||||
@@ -442,6 +433,25 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
|||||||
util.importTemplateExcel(response, "诊疗目录数据");
|
util.importTemplateExcel(response, "诊疗目录数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验诊疗项目是否可以编辑
|
||||||
|
*
|
||||||
|
* @param activityId 诊疗ID
|
||||||
|
* @return 校验结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> validateActivityEdit(Long activityId) {
|
||||||
|
// 查询诊疗申请
|
||||||
|
List<ServiceRequest> serviceRequestList = serviceRequestService.getServiceRequestByActivityId(activityId);
|
||||||
|
if (!serviceRequestList.isEmpty()) {
|
||||||
|
if (serviceRequestList.stream().anyMatch(
|
||||||
|
serviceRequest -> RequestStatus.COMPLETED.getValue().equals(serviceRequest.getStatusEnum()))) {
|
||||||
|
return R.ok(1,"医生开过该诊疗项目,不可编辑");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入信息校验
|
* 导入信息校验
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -0,0 +1,118 @@
|
|||||||
|
package com.openhis.web.datadictionary.appservice.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.core.common.utils.ChineseConvertUtils;
|
||||||
|
import com.core.common.utils.MessageUtils;
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
import com.openhis.administration.domain.Account;
|
||||||
|
import com.openhis.administration.domain.Location;
|
||||||
|
import com.openhis.administration.mapper.LocationMapper;
|
||||||
|
import com.openhis.administration.service.ILocationService;
|
||||||
|
import com.openhis.clinical.domain.ConditionNoDefinition;
|
||||||
|
import com.openhis.clinical.mapper.ConditionNoDefinitionMapper;
|
||||||
|
import com.openhis.clinical.service.IConditionNoDefinitionService;
|
||||||
|
import com.openhis.common.constant.CommonConstants;
|
||||||
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
|
import com.openhis.common.enums.*;
|
||||||
|
import com.openhis.common.utils.HisPageUtils;
|
||||||
|
import com.openhis.common.utils.HisQueryUtils;
|
||||||
|
import com.openhis.web.basedatamanage.dto.LocationAddOrEditDto;
|
||||||
|
import com.openhis.web.basedatamanage.dto.LocationInfoDto;
|
||||||
|
import com.openhis.web.datadictionary.dto.DeviceManageDto;
|
||||||
|
import com.openhis.web.datadictionary.dto.ICDCodeAddDto;
|
||||||
|
import com.openhis.web.datadictionary.dto.ICDCodeDto;
|
||||||
|
import com.openhis.web.datadictionary.dto.ICDCodeUpdateDto;
|
||||||
|
import com.openhis.workflow.domain.SupplyRequest;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.web.datadictionary.appservice.ICDCodeService;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ICDCodeServiceImpl implements ICDCodeService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ConditionNoDefinitionMapper conditionNoDefinitionMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ICDCodeService icdCodeService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IConditionNoDefinitionService conditionNoDefinitionService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param searchKey
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> getICDCodePage(String searchKey, Integer pageNo, Integer pageSize) {
|
||||||
|
// 构建查询条件
|
||||||
|
QueryWrapper<ConditionNoDefinition> queryWrapper = HisQueryUtils.buildQueryWrapper(null,searchKey,
|
||||||
|
new HashSet<>(Arrays.asList("gl_no", "gl_name", "icd10_no", "icd10_name")), null);
|
||||||
|
Page<ICDCodeDto> icdCodeDtoPage =
|
||||||
|
HisPageUtils.selectPage(conditionNoDefinitionMapper, queryWrapper, pageNo, pageSize, ICDCodeDto.class);
|
||||||
|
return R.ok(icdCodeDtoPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
* @param icdCodeAddDto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> addICDInformation(ICDCodeAddDto icdCodeAddDto) {
|
||||||
|
ConditionNoDefinition conditionNoDefinition = new ConditionNoDefinition();
|
||||||
|
conditionNoDefinition.setIcd10No(icdCodeAddDto.getIcd10No());
|
||||||
|
conditionNoDefinition.setIcd10Name(icdCodeAddDto.getIcd10Name());
|
||||||
|
conditionNoDefinition.setGlNo(icdCodeAddDto.getGlNo());
|
||||||
|
conditionNoDefinition.setGlName(icdCodeAddDto.getGlName());
|
||||||
|
boolean result = conditionNoDefinitionService.save(conditionNoDefinition);
|
||||||
|
if(result){
|
||||||
|
return R.ok("ok");
|
||||||
|
}
|
||||||
|
return R.fail("no");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
* @param glNo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> deleteICDInformation(String glNo) {
|
||||||
|
boolean result =
|
||||||
|
conditionNoDefinitionService.remove(new LambdaQueryWrapper<ConditionNoDefinition>().likeRight(ConditionNoDefinition::getGlNo, glNo));
|
||||||
|
return result ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"国临编码信息删除"}))
|
||||||
|
: R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"国临编码信息删除"}));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> saveOrUpdateICDInformation(ICDCodeUpdateDto icdCodeUpdateDto) {
|
||||||
|
ConditionNoDefinition conditionNoDefinition = new ConditionNoDefinition();
|
||||||
|
conditionNoDefinition.setId(icdCodeUpdateDto.getId());
|
||||||
|
conditionNoDefinition.setIcd10No(icdCodeUpdateDto.getIcd10No());
|
||||||
|
conditionNoDefinition.setIcd10Name(icdCodeUpdateDto.getIcd10Name());
|
||||||
|
conditionNoDefinition.setGlNo(icdCodeUpdateDto.getGlNo());
|
||||||
|
conditionNoDefinition.setGlName(icdCodeUpdateDto.getGlName());
|
||||||
|
boolean result=conditionNoDefinitionService.saveOrUpdate(conditionNoDefinition);
|
||||||
|
if(result){
|
||||||
|
return R.ok("ok");
|
||||||
|
}
|
||||||
|
return R.fail("no");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,7 +4,8 @@ import java.math.BigDecimal;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
@@ -12,7 +13,6 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|||||||
import com.core.common.utils.bean.BeanUtils;
|
import com.core.common.utils.bean.BeanUtils;
|
||||||
import com.openhis.administration.domain.ChargeItemDefDetail;
|
import com.openhis.administration.domain.ChargeItemDefDetail;
|
||||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||||
import com.openhis.administration.mapper.ChargeItemDefAppMapper;
|
|
||||||
import com.openhis.administration.mapper.ChargeItemDefinitionMapper;
|
import com.openhis.administration.mapper.ChargeItemDefinitionMapper;
|
||||||
import com.openhis.administration.service.IChargeItemDefDetailService;
|
import com.openhis.administration.service.IChargeItemDefDetailService;
|
||||||
import com.openhis.administration.service.IChargeItemDefinitionService;
|
import com.openhis.administration.service.IChargeItemDefinitionService;
|
||||||
@@ -30,15 +30,14 @@ import com.openhis.web.datadictionary.dto.ItemUpFromDirectoryDto;
|
|||||||
@Service
|
@Service
|
||||||
public class ItemDefinitionServiceImpl implements IItemDefinitionService {
|
public class ItemDefinitionServiceImpl implements IItemDefinitionService {
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
IChargeItemDefinitionService chargeItemDefinitionService;
|
private IChargeItemDefinitionService chargeItemDefinitionService;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
IChargeItemDefDetailService chargeItemDefDetailService;
|
private IChargeItemDefDetailService chargeItemDefDetailService;
|
||||||
@Autowired
|
|
||||||
ChargeItemDefinitionMapper chargeItemDefinitionMapper;
|
@Resource
|
||||||
@Autowired
|
private ChargeItemDefinitionMapper chargeItemDefinitionMapper;
|
||||||
ChargeItemDefAppMapper chargeItemDefAppMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加药品/器材/诊疗的项目定价
|
* 添加药品/器材/诊疗的项目定价
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import java.util.*;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
@@ -44,8 +44,9 @@ import com.openhis.common.utils.HisQueryUtils;
|
|||||||
import com.openhis.medication.domain.Medication;
|
import com.openhis.medication.domain.Medication;
|
||||||
import com.openhis.medication.domain.MedicationDefinition;
|
import com.openhis.medication.domain.MedicationDefinition;
|
||||||
import com.openhis.medication.domain.MedicationDetail;
|
import com.openhis.medication.domain.MedicationDetail;
|
||||||
|
import com.openhis.medication.domain.MedicationRequest;
|
||||||
import com.openhis.medication.service.IMedicationDefinitionService;
|
import com.openhis.medication.service.IMedicationDefinitionService;
|
||||||
import com.openhis.medication.service.IMedicationDispenseService;
|
import com.openhis.medication.service.IMedicationRequestService;
|
||||||
import com.openhis.medication.service.IMedicationService;
|
import com.openhis.medication.service.IMedicationService;
|
||||||
import com.openhis.sys.service.IOperationRecordService;
|
import com.openhis.sys.service.IOperationRecordService;
|
||||||
import com.openhis.web.datadictionary.appservice.IItemDefinitionService;
|
import com.openhis.web.datadictionary.appservice.IItemDefinitionService;
|
||||||
@@ -64,43 +65,44 @@ import com.openhis.yb.service.YbManager;
|
|||||||
@Service
|
@Service
|
||||||
public class MedicationManageAppServiceImpl implements IMedicationManageAppService {
|
public class MedicationManageAppServiceImpl implements IMedicationManageAppService {
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private IMedicationService medicationService;
|
private IMedicationService medicationService;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private IMedicationDefinitionService medicationDefinitionService;
|
private IMedicationDefinitionService medicationDefinitionService;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private IChargeItemDefinitionService chargeItemDefinitionService;
|
private IChargeItemDefinitionService chargeItemDefinitionService;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private ILocationService locationService;
|
private ILocationService locationService;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private MedicationManageSearchMapper medicationManageSearchMapper;
|
private MedicationManageSearchMapper medicationManageSearchMapper;
|
||||||
@Autowired
|
|
||||||
|
@Resource
|
||||||
private ISupplierService supplierService;
|
private ISupplierService supplierService;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private ISysDictTypeService sysDictTypeService;
|
private ISysDictTypeService sysDictTypeService;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private IItemDefinitionService itemDefinitionServic;
|
private IItemDefinitionService itemDefinitionServic;
|
||||||
|
|
||||||
@Autowired(required = false)
|
@Resource
|
||||||
private AssignSeqUtil assignSeqUtil;
|
private AssignSeqUtil assignSeqUtil;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private YbManager ybService;
|
private YbManager ybService;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private IOperationRecordService iOperationRecordService;
|
private IOperationRecordService operationRecordService;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private ISupplyRequestService supplyRequestService;
|
private ISupplyRequestService supplyRequestService;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private IMedicationDispenseService medicationDispenseService;
|
private IMedicationRequestService medicationRequestService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药品目录初始化
|
* 药品目录初始化
|
||||||
@@ -247,11 +249,6 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> editMedication(@Validated @RequestBody MedicationManageUpDto medicationManageUpDto) {
|
public R<?> editMedication(@Validated @RequestBody MedicationManageUpDto medicationManageUpDto) {
|
||||||
// 校验是否可以编辑
|
|
||||||
boolean result = supplyRequestService.verifyAbleEdit(medicationManageUpDto.getMedicationDefId());
|
|
||||||
if (result) {
|
|
||||||
return R.fail("该药品已经发生过业务,不可编辑");
|
|
||||||
}
|
|
||||||
// Todo:用Medication和medicationDefinition的domainservice来创造新的实例,根据业务需求,使用构造函数;
|
// Todo:用Medication和medicationDefinition的domainservice来创造新的实例,根据业务需求,使用构造函数;
|
||||||
// 如果小于5哥变量,就用基本类型传递,如果大于5哥,在domain层定义构造方法的入参
|
// 如果小于5哥变量,就用基本类型传递,如果大于5哥,在domain层定义构造方法的入参
|
||||||
|
|
||||||
@@ -294,7 +291,7 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
iOperationRecordService.addEntityOperationRecord(DbOpType.UPDATE.getCode(),
|
operationRecordService.addEntityOperationRecord(DbOpType.UPDATE.getCode(),
|
||||||
CommonConstants.TableName.MED_MEDICATION_DEFINITION, medication);
|
CommonConstants.TableName.MED_MEDICATION_DEFINITION, medication);
|
||||||
// Todo:封装一个价格初始话的方法给app层调用
|
// Todo:封装一个价格初始话的方法给app层调用
|
||||||
// 更新价格表
|
// 更新价格表
|
||||||
@@ -355,7 +352,7 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
|||||||
|
|
||||||
// TODO:别用三元,日志在业务代码以后记录
|
// TODO:别用三元,日志在业务代码以后记录
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
iOperationRecordService.addIdsOperationRecord(DbOpType.STOP.getCode(),
|
operationRecordService.addIdsOperationRecord(DbOpType.STOP.getCode(),
|
||||||
CommonConstants.TableName.MED_MEDICATION_DEFINITION, ids);
|
CommonConstants.TableName.MED_MEDICATION_DEFINITION, ids);
|
||||||
// 更新药品信息
|
// 更新药品信息
|
||||||
return medicationService.updateBatchById(medicationList)
|
return medicationService.updateBatchById(medicationList)
|
||||||
@@ -381,7 +378,7 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
|||||||
medicationList.add(medication);
|
medicationList.add(medication);
|
||||||
}
|
}
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
iOperationRecordService.addIdsOperationRecord(DbOpType.START.getCode(),
|
operationRecordService.addIdsOperationRecord(DbOpType.START.getCode(),
|
||||||
CommonConstants.TableName.MED_MEDICATION_DEFINITION, ids);
|
CommonConstants.TableName.MED_MEDICATION_DEFINITION, ids);
|
||||||
// 更新药品信息
|
// 更新药品信息
|
||||||
return medicationService.updateBatchById(medicationList)
|
return medicationService.updateBatchById(medicationList)
|
||||||
@@ -424,7 +421,7 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
iOperationRecordService.addEntityOperationRecord(DbOpType.INSERT.getCode(),
|
operationRecordService.addEntityOperationRecord(DbOpType.INSERT.getCode(),
|
||||||
CommonConstants.TableName.MED_MEDICATION_DEFINITION, medicationDetail);
|
CommonConstants.TableName.MED_MEDICATION_DEFINITION, medicationDetail);
|
||||||
// 新增子表外来药品目录
|
// 新增子表外来药品目录
|
||||||
boolean insertMedicationSuccess = medicationService.addMedication(medicationDetail);
|
boolean insertMedicationSuccess = medicationService.addMedication(medicationDetail);
|
||||||
@@ -515,6 +512,31 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
|||||||
util.importTemplateExcel(response, "药品目录数据");
|
util.importTemplateExcel(response, "药品目录数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验药品是否可以编辑
|
||||||
|
*
|
||||||
|
* @param medicationId 药品ID
|
||||||
|
* @return 校验结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> validateMedicationEdit(Long medicationId) {
|
||||||
|
List<MedicationRequest> medicationRequestList =
|
||||||
|
medicationRequestService.getMedRequestByMedicationId(medicationId);
|
||||||
|
if (!medicationRequestList.isEmpty()) {
|
||||||
|
if (medicationRequestList.stream()
|
||||||
|
.allMatch(x -> x.getStatusEnum().equals(RequestStatus.COMPLETED.getValue()))) {
|
||||||
|
return R.ok(1, "医生开过该药品,不可编辑");
|
||||||
|
} else {
|
||||||
|
// 校验是否可以编辑
|
||||||
|
boolean result = supplyRequestService.verifyAbleEdit(medicationId);
|
||||||
|
if (result) {
|
||||||
|
return R.ok(2, "该药品已经入库过,不可编辑");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入信息校验
|
* 导入信息校验
|
||||||
*
|
*
|
||||||
@@ -542,6 +564,9 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
|||||||
if (StringUtils.isEmpty(importDto.getMerchandiseName())) {
|
if (StringUtils.isEmpty(importDto.getMerchandiseName())) {
|
||||||
lineValidateMsgList.add("商品名称必填");
|
lineValidateMsgList.add("商品名称必填");
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isEmpty(importDto.getPharmacologyCategoryCode())) {
|
||||||
|
lineValidateMsgList.add("药品性质必填");
|
||||||
|
}
|
||||||
if (StringUtils.isEmpty(importDto.getUnitCode())) {
|
if (StringUtils.isEmpty(importDto.getUnitCode())) {
|
||||||
lineValidateMsgList.add("药品单位必填");
|
lineValidateMsgList.add("药品单位必填");
|
||||||
}
|
}
|
||||||
@@ -707,7 +732,7 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!fieldValidateMsgList.isEmpty()) {
|
if (!fieldValidateMsgList.isEmpty()) {
|
||||||
return R.fail("导入失败!药品信息填写有误:" + String.join(" ", fieldValidateMsgList));
|
return R.fail("导入失败!药品信息填写有误:" + String.join(" ", fieldValidateMsgList) + " ■ ※如遇到模板中不存在的字段,请重新下载模板");
|
||||||
}
|
}
|
||||||
// 重复校验(文件行重复)
|
// 重复校验(文件行重复)
|
||||||
List<String> lineRepeatedValidateMsgList = new ArrayList<>();
|
List<String> lineRepeatedValidateMsgList = new ArrayList<>();
|
||||||
@@ -771,7 +796,8 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
|||||||
.setPartPercent(importDto.getPartPercent()).setDoseFrom(CommonUtil.tryParseInt(importDto.getDoseFrom()))
|
.setPartPercent(importDto.getPartPercent()).setDoseFrom(CommonUtil.tryParseInt(importDto.getDoseFrom()))
|
||||||
.setApprovalNumber(importDto.getApprovalNumber())
|
.setApprovalNumber(importDto.getApprovalNumber())
|
||||||
.setYbMatchFlag(CommonUtil.tryParseInt(importDto.getYbMatchFlag())).setYbNo(importDto.getYbNo())
|
.setYbMatchFlag(CommonUtil.tryParseInt(importDto.getYbMatchFlag())).setYbNo(importDto.getYbNo())
|
||||||
.setPharmacologyCategoryCode("1").setSkinTestFlag(CommonUtil.tryParseInt(importDto.getSkinTestFlag()))
|
.setPharmacologyCategoryCode(importDto.getPharmacologyCategoryCode())
|
||||||
|
.setSkinTestFlag(CommonUtil.tryParseInt(importDto.getSkinTestFlag()))
|
||||||
.setInjectFlag(CommonUtil.tryParseInt(importDto.getInjectFlag()))
|
.setInjectFlag(CommonUtil.tryParseInt(importDto.getInjectFlag()))
|
||||||
.setManufacturerText(importDto.getManufacturerText())
|
.setManufacturerText(importDto.getManufacturerText())
|
||||||
.setRestrictedFlag(CommonUtil.tryParseInt(importDto.getRestrictedFlag()))
|
.setRestrictedFlag(CommonUtil.tryParseInt(importDto.getRestrictedFlag()))
|
||||||
|
|||||||
@@ -2,17 +2,16 @@ package com.openhis.web.datadictionary.controller;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.openhis.web.datadictionary.appservice.IDeviceManageAppService;
|
import com.openhis.web.datadictionary.appservice.IDeviceManageAppService;
|
||||||
import com.openhis.web.datadictionary.dto.DeviceManageDto;
|
|
||||||
import com.openhis.web.datadictionary.dto.DeviceManageSelParam;
|
import com.openhis.web.datadictionary.dto.DeviceManageSelParam;
|
||||||
import com.openhis.web.datadictionary.dto.DeviceManageUpDto;
|
import com.openhis.web.datadictionary.dto.DeviceManageUpDto;
|
||||||
|
|
||||||
@@ -31,7 +30,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class DeviceManageController {
|
public class DeviceManageController {
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private IDeviceManageAppService deviceManageAppService;
|
private IDeviceManageAppService deviceManageAppService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -69,7 +68,6 @@ public class DeviceManageController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/information-one")
|
@GetMapping("/information-one")
|
||||||
public R<?> getDeviceOne(@RequestParam Long id) {
|
public R<?> getDeviceOne(@RequestParam Long id) {
|
||||||
|
|
||||||
return deviceManageAppService.getDeviceOne(id);
|
return deviceManageAppService.getDeviceOne(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,7 +79,6 @@ public class DeviceManageController {
|
|||||||
*/
|
*/
|
||||||
@PutMapping("/information")
|
@PutMapping("/information")
|
||||||
public R<?> editDevice(@RequestBody DeviceManageUpDto deviceManageDto) {
|
public R<?> editDevice(@RequestBody DeviceManageUpDto deviceManageDto) {
|
||||||
|
|
||||||
return deviceManageAppService.editDevice(deviceManageDto);
|
return deviceManageAppService.editDevice(deviceManageDto);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -119,28 +116,6 @@ public class DeviceManageController {
|
|||||||
return deviceManageAppService.addDevice(deviceManageUpDto);
|
return deviceManageAppService.addDevice(deviceManageUpDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增医保器材目录
|
|
||||||
*
|
|
||||||
* @param DeviceManageUpDto 器材目录
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/information-yb")
|
|
||||||
public R<?> addYbDevice(@RequestBody DeviceManageUpDto DeviceManageUpDto) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 器材目录导出
|
|
||||||
*
|
|
||||||
* @param DeviceManageDto 器材目录
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GetMapping("/information-export")
|
|
||||||
public R<?> exportDevice(@RequestBody DeviceManageDto DeviceManageDto) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入器材目录
|
* 导入器材目录
|
||||||
*
|
*
|
||||||
@@ -161,4 +136,15 @@ public class DeviceManageController {
|
|||||||
public void importTemplate(HttpServletResponse response) {
|
public void importTemplate(HttpServletResponse response) {
|
||||||
deviceManageAppService.importTemplate(response);
|
deviceManageAppService.importTemplate(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验耗材是否可以编辑
|
||||||
|
*
|
||||||
|
* @param deviceId 耗材ID
|
||||||
|
* @return 校验结果
|
||||||
|
*/
|
||||||
|
@GetMapping("/validate-edit")
|
||||||
|
public R<?> validateDeviceEdit(Long deviceId) {
|
||||||
|
return deviceManageAppService.validateDeviceEdit(deviceId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,17 +2,16 @@ package com.openhis.web.datadictionary.controller;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.openhis.web.datadictionary.appservice.IDiagTreatMAppService;
|
import com.openhis.web.datadictionary.appservice.IDiagTreatMAppService;
|
||||||
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentDto;
|
|
||||||
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentSelParam;
|
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentSelParam;
|
||||||
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentUpDto;
|
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentUpDto;
|
||||||
|
|
||||||
@@ -31,7 +30,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class DiagnosisTreatmentController {
|
public class DiagnosisTreatmentController {
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private IDiagTreatMAppService diagTreatMAppService;
|
private IDiagTreatMAppService diagTreatMAppService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -107,7 +106,7 @@ public class DiagnosisTreatmentController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增外来诊疗目录
|
* 新增诊疗目录
|
||||||
*
|
*
|
||||||
* @param diagnosisTreatmentUpDto 诊疗目录
|
* @param diagnosisTreatmentUpDto 诊疗目录
|
||||||
* @return
|
* @return
|
||||||
@@ -117,28 +116,6 @@ public class DiagnosisTreatmentController {
|
|||||||
return diagTreatMAppService.addDiseaseTreatment(diagnosisTreatmentUpDto);
|
return diagTreatMAppService.addDiseaseTreatment(diagnosisTreatmentUpDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增医保诊疗目录
|
|
||||||
*
|
|
||||||
* @param diagnosisTreatmentUpDto 诊疗目录
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/information-yb")
|
|
||||||
public R<?> addYbDiseaseTreatment(@RequestBody DiagnosisTreatmentUpDto diagnosisTreatmentUpDto) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 诊疗目录导出
|
|
||||||
*
|
|
||||||
* @param diagnosisTreatmentDto 诊疗目录
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GetMapping("/information-export")
|
|
||||||
public R<?> exportDiseaseTreatment(@RequestBody DiagnosisTreatmentDto diagnosisTreatmentDto) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入诊疗目录
|
* 导入诊疗目录
|
||||||
*
|
*
|
||||||
@@ -159,4 +136,15 @@ public class DiagnosisTreatmentController {
|
|||||||
public void importTemplate(HttpServletResponse response) {
|
public void importTemplate(HttpServletResponse response) {
|
||||||
diagTreatMAppService.importTemplate(response);
|
diagTreatMAppService.importTemplate(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验诊疗项目是否可以编辑
|
||||||
|
*
|
||||||
|
* @param activityId 诊疗ID
|
||||||
|
* @return 校验结果
|
||||||
|
*/
|
||||||
|
@GetMapping("/validate-edit")
|
||||||
|
public R<?> validateActivityEdit(Long activityId) {
|
||||||
|
return diagTreatMAppService.validateActivityEdit(activityId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.openhis.web.datadictionary.controller;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import com.openhis.web.basedatamanage.dto.LocationAddOrEditDto;
|
||||||
|
import com.openhis.web.datadictionary.dto.ICDCodeAddDto;
|
||||||
|
import com.openhis.web.datadictionary.dto.ICDCodeDto;
|
||||||
|
import com.openhis.web.datadictionary.dto.ICDCodeUpdateDto;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.web.datadictionary.appservice.ICDCodeService;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/base-data-manage/ICD10")
|
||||||
|
@Slf4j
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ICDCodeController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ICDCodeService iCDCodeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询icd10
|
||||||
|
* @param searchKey
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/information-page") // 前端传回来的查询条件
|
||||||
|
public R<?> getICDCodePage(@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
return iCDCodeService.getICDCodePage(searchKey, pageNo, pageSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增icd10
|
||||||
|
* @param icdCodeAddDto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/add-icd-Information")
|
||||||
|
public R<?> ICDInformation(@Validated @RequestBody ICDCodeAddDto icdCodeAddDto) {
|
||||||
|
return iCDCodeService.addICDInformation(icdCodeAddDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除icd10
|
||||||
|
* @param glNo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DeleteMapping("/delete-icd-Information")
|
||||||
|
public R<?> deleteICDInformation(@RequestParam String glNo) {
|
||||||
|
return iCDCodeService.deleteICDInformation(glNo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
* @param icdCodeUpdateDto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("/update-icd-Information")
|
||||||
|
public R<?> saveOrUpdateICDInformation(@RequestBody ICDCodeUpdateDto icdCodeUpdateDto){
|
||||||
|
return iCDCodeService.saveOrUpdateICDInformation(icdCodeUpdateDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,10 +2,10 @@ package com.openhis.web.datadictionary.controller;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
@@ -30,7 +30,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class MedicationManageController {
|
public class MedicationManageController {
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private IMedicationManageAppService medicationManageAppService;
|
private IMedicationManageAppService medicationManageAppService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -117,17 +117,6 @@ public class MedicationManageController {
|
|||||||
return medicationManageAppService.addMedication(medicationManageUpDto);
|
return medicationManageAppService.addMedication(medicationManageUpDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增医保药品目录
|
|
||||||
*
|
|
||||||
* @param medicationManageUpDto 药品目录信息
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/information-yb")
|
|
||||||
public R<?> addYbMedication(@RequestBody MedicationManageUpDto medicationManageUpDto) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药品目录导出
|
* 药品目录导出
|
||||||
*
|
*
|
||||||
@@ -166,4 +155,15 @@ public class MedicationManageController {
|
|||||||
public void importTemplate(HttpServletResponse response) {
|
public void importTemplate(HttpServletResponse response) {
|
||||||
medicationManageAppService.importTemplate(response);
|
medicationManageAppService.importTemplate(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验药品是否可以编辑
|
||||||
|
*
|
||||||
|
* @param medicationId 药品ID
|
||||||
|
* @return 校验结果
|
||||||
|
*/
|
||||||
|
@GetMapping("/validate-edit")
|
||||||
|
public R<?> validateMedicationEdit(Long medicationId) {
|
||||||
|
return medicationManageAppService.validateMedicationEdit(medicationId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import lombok.experimental.Accessors;
|
|||||||
/**
|
/**
|
||||||
* 器材目录导入Dto
|
* 器材目录导入Dto
|
||||||
*
|
*
|
||||||
* @author GuoRui
|
* @author Thanking
|
||||||
* @date 2025-09-24
|
* @date 2025-09-24
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import lombok.experimental.Accessors;
|
|||||||
/**
|
/**
|
||||||
* 诊疗目录导入Dto
|
* 诊疗目录导入Dto
|
||||||
*
|
*
|
||||||
* @author GuoRui
|
* @author Thanking
|
||||||
* @date 2025-09-29
|
* @date 2025-09-29
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|||||||
@@ -19,4 +19,6 @@ public class DiseaseManageSelParam {
|
|||||||
private Integer sourceEnum;
|
private Integer sourceEnum;
|
||||||
/** 状态 */
|
/** 状态 */
|
||||||
private Integer statusEnum;
|
private Integer statusEnum;
|
||||||
|
/** 类型 */
|
||||||
|
private String typeCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.openhis.web.datadictionary.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ICDCodeAddDto {
|
||||||
|
|
||||||
|
/** ID */
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 国临编码 */
|
||||||
|
@NotNull
|
||||||
|
private String glNo;
|
||||||
|
|
||||||
|
/** 国临name */
|
||||||
|
private String glName;
|
||||||
|
|
||||||
|
/** 医保编码 */
|
||||||
|
private String icd10No;
|
||||||
|
|
||||||
|
/** 医保name */
|
||||||
|
private String icd10Name;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.openhis.web.datadictionary.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import com.openhis.common.annotation.Dict;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ICDCodeDto {
|
||||||
|
|
||||||
|
/** ID */
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 国临编码 */
|
||||||
|
private String glNo;
|
||||||
|
|
||||||
|
/** 国临name */
|
||||||
|
private String glName;
|
||||||
|
|
||||||
|
/** 医保编码 */
|
||||||
|
private String icd10No;
|
||||||
|
|
||||||
|
/** 医保name */
|
||||||
|
private String icd10Name;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.openhis.web.datadictionary.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ICDCodeUpdateDto {
|
||||||
|
/** ID */
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 国临编码 */
|
||||||
|
@NotNull
|
||||||
|
private String glNo;
|
||||||
|
|
||||||
|
/** 国临name */
|
||||||
|
private String glName;
|
||||||
|
|
||||||
|
/** 医保编码 */
|
||||||
|
private String icd10No;
|
||||||
|
|
||||||
|
/** 医保name */
|
||||||
|
private String icd10Name;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -10,7 +10,7 @@ import lombok.experimental.Accessors;
|
|||||||
/**
|
/**
|
||||||
* 药品目录导入Dto
|
* 药品目录导入Dto
|
||||||
*
|
*
|
||||||
* @author GuoRui
|
* @author Thanking
|
||||||
* @date 2025-08-18
|
* @date 2025-08-18
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@@ -42,6 +42,10 @@ public class MedicationImportDto {
|
|||||||
@Excel(name = "商品名称", prompt = "必填")
|
@Excel(name = "商品名称", prompt = "必填")
|
||||||
private String merchandiseName;
|
private String merchandiseName;
|
||||||
|
|
||||||
|
/** 药品性质 */
|
||||||
|
@Excel(name = "药品性质", prompt = "必填", dictType = "medicine_properties", comboReadDict = true)
|
||||||
|
private String pharmacologyCategoryCode;
|
||||||
|
|
||||||
/** 药品单位 */
|
/** 药品单位 */
|
||||||
@Excel(name = "药品单位", prompt = "必填", dictType = "unit_code", comboReadDict = true)
|
@Excel(name = "药品单位", prompt = "必填", dictType = "unit_code", comboReadDict = true)
|
||||||
private String unitCode;
|
private String unitCode;
|
||||||
|
|||||||
@@ -289,4 +289,9 @@ public class MedicationManageDto {
|
|||||||
/** 处方标志 */
|
/** 处方标志 */
|
||||||
private Integer rxFlag;
|
private Integer rxFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用药说明
|
||||||
|
*/
|
||||||
|
private String dosageInstruction;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -258,4 +258,9 @@ public class MedicationManageUpDto {
|
|||||||
/** 处方标志 */
|
/** 处方标志 */
|
||||||
private Integer rxFlag;
|
private Integer rxFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用药说明
|
||||||
|
*/
|
||||||
|
private String dosageInstruction;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user