Compare commits
245 Commits
V1.2
...
50a2ef9e00
| Author | SHA1 | Date | |
|---|---|---|---|
| 50a2ef9e00 | |||
| 065f7052c6 | |||
| e23d42404d | |||
| 4120d4e001 | |||
| 1bd2089047 | |||
| 6d9ff7dc10 | |||
| ae7ca984f8 | |||
| 69b7a4d865 | |||
| 864bf55025 | |||
| 249ef5f87e | |||
|
|
df3fb6c66c | ||
|
|
10ec9f4c1b | ||
| 0b98763c05 | |||
|
|
3d3b21a775 | ||
|
|
4ba4f80946 | ||
|
|
ed7cb2dab5 | ||
| 50ef9e6743 | |||
| 250d7dde34 | |||
| 69f3e066db | |||
|
|
afb0c3933c | ||
|
|
45ac07e57c | ||
|
|
262ea97824 | ||
|
|
dcfa13f239 | ||
|
|
27c3c850d6 | ||
| 122a15a73d | |||
| 61749aee4d | |||
| 97a29a31c5 | |||
| c3734f921c | |||
| c561586cfa | |||
|
|
60593233bc | ||
| 992b03f9c2 | |||
| 36628342dc | |||
|
|
3783e4a872 | ||
| 584f79294b | |||
| a5884ec069 | |||
| cc2f7db754 | |||
| fcccfc1959 | |||
| c5ec91e7d3 | |||
| 6b67e25d94 | |||
| 6da3b63012 | |||
|
|
ea0f0e2294 | ||
|
|
980f0aeb9c | ||
|
|
17b40118ce | ||
|
|
d10a78e5e8 | ||
|
|
f7ad010b2a | ||
|
|
1a7ff0a686 | ||
|
|
3ad3f21362 | ||
|
|
c84fc3c236 | ||
|
|
a6561e2ca6 | ||
|
|
dfe35bb7f0 | ||
| 18c96e006f | |||
| f5db504363 | |||
| deb31c969a | |||
| e7dac9762d | |||
|
|
89862878b5 | ||
|
|
e105919dab | ||
|
|
e83fc94334 | ||
| 5bf7ab481f | |||
| afa904bd83 | |||
| a343464d8d | |||
| 4a2485e434 | |||
|
|
4e2d4d85ec | ||
| 7ddf6211ee | |||
| d44600b641 | |||
| a68c4402de | |||
| 93103f7f40 | |||
| 7202151a41 | |||
| 491d8f8930 | |||
| b886726ecc | |||
|
|
9d0dde6794 | ||
|
|
f3578b3202 | ||
|
|
0610ba7cb5 | ||
|
|
8b848f787a | ||
| a794cd0ce3 | |||
|
|
d97fd0bed1 | ||
|
|
c0e67722d9 | ||
|
|
aca7fea69f | ||
| ce9344f9ce | |||
| 991ad61655 | |||
|
|
e4ac857461 | ||
|
|
24ab98ae89 | ||
| e79ab9ac4f | |||
| b66c2027d1 | |||
| 09bf895711 | |||
|
|
825cdd58ae | ||
| 0977eb8145 | |||
|
|
73efeecfc1 | ||
| fe8fb3d321 | |||
|
|
618fb1e340 | ||
|
|
215fe8b889 | ||
|
|
3e32458b7f | ||
| a8e170ea45 | |||
| 1856ae50fd | |||
| 1711e6c115 | |||
|
|
b3f226feab | ||
| c086dc8c77 | |||
| 6762341fbd | |||
| d5f8b0f23b | |||
|
|
38233110f2 | ||
| 6ebb59bc5e | |||
| 69aefab280 | |||
| 3d3ff82e24 | |||
| 69780d204f | |||
|
|
ef52f290fe | ||
| e9d1119777 | |||
|
|
cf182f0e34 | ||
|
|
626ae1a459 | ||
| 3d6977328f | |||
| 2dcd7ba1d5 | |||
|
|
16a4d38113 | ||
| 57c98ea39d | |||
| 08f7e35042 | |||
| 43f3d1ba94 | |||
| 2e45c6c029 | |||
| 945182c6f8 | |||
|
|
f7de87860b | ||
| 67e4de0d68 | |||
|
|
602d521424 | ||
|
|
01e14ee084 | ||
|
|
4a5572de26 | ||
| 88a516d1be | |||
| 9ce967002a | |||
| fd536a035e | |||
| df84a7eefa | |||
| 2804703eaa | |||
| e14a0e3d13 | |||
| 5a99fe8234 | |||
| 3ad5c5533f | |||
|
|
9997f4f7c9 | ||
|
|
3d4e4a8119 | ||
|
|
3deac74898 | ||
| 7bbc50ef47 | |||
| 4ae6765a15 | |||
| 1292853c5d | |||
|
|
41791c9ccc | ||
|
|
0674215b53 | ||
| e42d990304 | |||
| 0dbe9a57c8 | |||
| 85ea831a1c | |||
| 7ac26cf781 | |||
| b7412648b4 | |||
|
|
97571652e5 | ||
| b5d4da97f9 | |||
|
|
e5edb6bda2 | ||
|
|
0e1ae53194 | ||
| a1efd3f91b | |||
| 3211553d0d | |||
| a57a326b83 | |||
| f77d0a2567 | |||
| 72581466aa | |||
|
|
4b3471df06 | ||
|
|
68c65ae8bd | ||
| 1b879addc7 | |||
|
|
3888859b2b | ||
|
|
f03d2e1633 | ||
| bc91eb7cdc | |||
|
|
93120e973a | ||
| c6a27f6276 | |||
| 778704c9dc | |||
| ff227b40c1 | |||
| c7d8ab5b48 | |||
| 9c27b2a134 | |||
|
|
3f919188d2 | ||
| 8942058972 | |||
|
|
6c2dbf0418 | ||
|
|
85e185bab8 | ||
|
|
88aa1517ef | ||
|
|
c05118c427 | ||
|
|
2a7f1326b9 | ||
|
|
c07255fe5b | ||
|
|
749bfc89dd | ||
| 52cc5e3aae | |||
| 642c4a0941 | |||
| 30953d5771 | |||
| 83e0c663c9 | |||
| b19337e76a | |||
| ba607346bd | |||
|
|
433c452a40 | ||
|
|
a1be7fdbfd | ||
|
|
87409d0c93 | ||
| d5c8ae8d45 | |||
| bc45e9c8c6 | |||
|
|
42992382c0 | ||
|
|
22d7eba510 | ||
| 9728c8a6dd | |||
| c951144ac6 | |||
|
|
0b179fffd6 | ||
|
|
75374ac5d3 | ||
|
|
2a83719b87 | ||
|
|
e58f2d807b | ||
|
|
b2884def17 | ||
|
|
064840dd42 | ||
| 1aa814c766 | |||
|
|
b9719a51d1 | ||
|
|
03b83aaf7c | ||
|
|
d93976483b | ||
| dd0a3a915c | |||
| 2f3994c575 | |||
| daa78e128f | |||
| 2ca594cb39 | |||
|
|
7805c26f4a | ||
|
|
b7d34537c2 | ||
| c1213fcf59 | |||
| a64edace55 | |||
| 4afe0d107c | |||
|
|
d8af11412f | ||
|
|
00816c9834 | ||
|
|
4fb7bea80a | ||
|
|
0fc72cb270 | ||
|
|
eadf521903 | ||
| f786fdbc3f | |||
| 92c4c938a3 | |||
|
|
a94a1b7b69 | ||
|
|
48755c2d9e | ||
|
|
f99f8eb560 | ||
|
|
ddc7ce2fe7 | ||
|
|
c9899c62d2 | ||
| 8b9837d7dc | |||
| 2cba41331a | |||
| 4da5ca427b | |||
| f4605b1af7 | |||
|
|
d2babdc9ed | ||
| 4d0599eac1 | |||
|
|
35d99df274 | ||
|
|
ce76b2f98d | ||
| 8fbca1a898 | |||
| d548215123 | |||
| 953d17dc8c | |||
|
|
b71a21ea5c | ||
|
|
0a20b5e34e | ||
| 388425084e | |||
| 51ee8d1b43 | |||
|
|
d29d56e712 | ||
|
|
9084ddaa98 | ||
|
|
be6d5c1ccc | ||
| 1bba9e598a | |||
| d58a5e8ab3 | |||
| e6ffb7101f | |||
|
|
48b2188cf9 | ||
|
|
8bc5d45976 | ||
| 04f6e7e960 | |||
| 8fb58bdab8 | |||
|
|
fdfe5334a1 | ||
|
|
66b99009e6 | ||
|
|
2c7456531d |
@@ -4,11 +4,11 @@
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
天天开源致⼒于打造中国应⽤管理软件开源⽣态,⾯向医疗、企业、教育三⼤⾏业信息化需求,提供优质的开源软件产品与解决⽅案。平台现已发布OpenHIS、OpenCOM、OpenEDU系列开源产品,并持续招募⽣态合作伙伴,期待共同构建开源创新的⾏业协作模式,加速⾏业的数字化进程。
|
天天开源致⼒于打造中国应⽤管理 软件开源⽣态,⾯向医疗、企业、教育三⼤⾏业信息化需求,提供优质的开源软件产品与解决⽅案。平台现已发布OpenHIS、OpenCOM、OpenEDU系列开源产品,并持续招募⽣态合作伙伴,期待共同构建开源创新的⾏业协作模式,加速⾏业的数字化进程。
|
||||||
|
|
||||||
天天开源的前⾝是新致开源,最早于2022年6⽉发布开源医疗软件平台OpenHIS.org.cn,于2023年6⽉发布开源企业软件平台OpenCOM.com.cn。2025年7⽉,新致开源品牌更新为天天开源,我们始终秉持开源、专业、协作的理念,致⼒于为医疗、教育、中⼩企业等⾏业提供优质的开源解决⽅案。
|
天天开源的前⾝是新致开源,最早于2022年6⽉发布开源医疗软件平台OpenHIS.org.cn,于2023年6⽉发布开源企业软件平台OpenCOM.com.cn。2025年7⽉,新致开源品牌更新为天天开源,我们始终秉持开源、专业、协作的理念,致⼒于为医疗、教育、中⼩企业等⾏业提供优质的开源解决⽅案。
|
||||||
|
|
||||||
了解我们:https://open.tntlinking.com/about?site=gitee
|
了解我们a:https://open.tntlinking.com/about?site=gitee
|
||||||
|
|
||||||
## 💾【部署包下载】
|
## 💾【部署包下载】
|
||||||
|
|
||||||
|
|||||||
45
openhis-server-new/com/openhis/tool/DatabaseFieldAdder.java
Normal file
45
openhis-server-new/com/openhis/tool/DatabaseFieldAdder.java
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
package com.openhis.tool;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.DriverManager;
|
||||||
|
import java.sql.Statement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Database field adder tool
|
||||||
|
*/
|
||||||
|
public class DatabaseFieldAdder {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
String url = "jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=public";
|
||||||
|
String username = "postgresql";
|
||||||
|
String password = "Jchl1528";
|
||||||
|
|
||||||
|
try (Connection conn = DriverManager.getConnection(url, username, password);
|
||||||
|
Statement stmt = conn.createStatement()) {
|
||||||
|
|
||||||
|
// Check if field exists
|
||||||
|
String checkSql = "SELECT column_name FROM information_schema.columns " +
|
||||||
|
"WHERE table_name = 'adm_healthcare_service' AND column_name = 'practitioner_id'";
|
||||||
|
|
||||||
|
boolean fieldExists = stmt.executeQuery(checkSql).next();
|
||||||
|
|
||||||
|
if (!fieldExists) {
|
||||||
|
// Add field
|
||||||
|
String addSql = "ALTER TABLE \"public\".\"adm_healthcare_service\" " +
|
||||||
|
"ADD COLUMN \"practitioner_id\" int8";
|
||||||
|
stmt.execute(addSql);
|
||||||
|
|
||||||
|
// Add comment
|
||||||
|
String commentSql = "COMMENT ON COLUMN \"public\".\"adm_healthcare_service\".\"practitioner_id\" IS 'practitioner_id'";
|
||||||
|
stmt.execute(commentSql);
|
||||||
|
|
||||||
|
System.out.println("Successfully added practitioner_id field to adm_healthcare_service table");
|
||||||
|
} else {
|
||||||
|
System.out.println("practitioner_id field already exists");
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.err.println("Error executing SQL: " + e.getMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,6 @@ 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;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户配置工具类
|
* 租户配置工具类
|
||||||
@@ -31,12 +30,7 @@ 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,11 +142,6 @@
|
|||||||
<artifactId>pinyin4j</artifactId>
|
<artifactId>pinyin4j</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.code.gson</groupId>
|
|
||||||
<artifactId>gson</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
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,93 +6,166 @@ package com.core.common.enums;
|
|||||||
* @author system
|
* @author system
|
||||||
*/
|
*/
|
||||||
public enum TenantOptionDict {
|
public enum TenantOptionDict {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 医院名称
|
* 医院名称
|
||||||
*/
|
*/
|
||||||
YB_HOSPITAL_NAME("hospitalName", "医保-医院名称", 0),
|
HOSPITAL_NAME("hospitalName", "医院名称", 0),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 医保-医疗机构等级(3101接口)
|
* 医疗机构等级
|
||||||
*/
|
*/
|
||||||
YB_MEDINS_LV("medinsLv", "医保_医疗机构等级", 1),
|
MEDINS_LV("medinsLv", "医疗机构等级", 1),
|
||||||
/**
|
/**
|
||||||
* 定点医药机构编号
|
* 定点医药机构编号
|
||||||
*/
|
*/
|
||||||
YB_FIXMEDINS_CODE("fixmedinsCode", "医保_定点医药机构编号", 2),
|
FIXMEDINS_CODE("fixmedinsCode", "定点医药机构编号", 2),
|
||||||
/**
|
/**
|
||||||
* 电子发票appid
|
* 电子发票appid
|
||||||
*/
|
*/
|
||||||
EINVOICE_APP_ID("app_id", "电子发票-appid", 3),
|
APP_ID("app_id", "电子发票appid", 3),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子发票key
|
* 电子发票key
|
||||||
*/
|
*/
|
||||||
EINVOICE_KEY("key", "电子发票-key", 4),
|
KEY("key", "电子发票key", 4),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子发票url
|
* 电子发票url
|
||||||
*/
|
*/
|
||||||
EINVOICE_URL("url", "电子发票-url", 5),
|
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),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否加密
|
* 是否加密
|
||||||
*/
|
*/
|
||||||
YB_IS_ENCRYPT("isEncrypt", "医保-是否加密", 25),
|
IS_ENCRYPT("isEncrypt", "是否加密", 25),
|
||||||
/**
|
/**
|
||||||
* 医保区划
|
* 医保区划
|
||||||
*/
|
*/
|
||||||
YB_INSUPLC_ADMDVS("insuplc_admdvs", "医保-区划", 26),
|
INSUPLC_ADMDVS("insuplc_admdvs", "医保区划", 26),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子处方appId
|
* 电子处方appId
|
||||||
*/
|
*/
|
||||||
ELE_PRE_APP_ID("pre_app_id", "电子处方-appId", 27),
|
PRE_APP_ID("pre_app_id", "电子处方appId", 27),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子处方appSecret
|
* 电子处方appSecret
|
||||||
*/
|
*/
|
||||||
ELE_PRE_APP_SECRET("pre_app_secret", "电子处方-appSecret", 28),
|
PRE_APP_SECRET("pre_app_secret", "电子处方appSecret", 28),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子处方私钥
|
* 电子处方私钥
|
||||||
*/
|
*/
|
||||||
ELE_APP_PRVKEY("APP_PRVKEY", "电子处方-私钥", 29),
|
APP_PRVKEY("APP_PRVKEY", "电子处方私钥", 29),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子处方公钥
|
* 电子处方公钥
|
||||||
*/
|
*/
|
||||||
ELE_PLAF_PUBKEY("PLAF_PUBKEY", "电子处方-公钥", 30),
|
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),
|
||||||
/**
|
/**
|
||||||
* 医院等级
|
* 医院等级
|
||||||
*/
|
*/
|
||||||
EINVOICE_HOSPITAL_LV("hospital_lv", "电子发票-医院等级", 39),
|
HOSPITAL_LV("hospital_lv", "医院等级", 39),
|
||||||
|
|
||||||
/**
|
|
||||||
* 无视LIS&PACS报错
|
|
||||||
*/
|
|
||||||
LIS_PACS_ERROR_IGNORE("lisPacsErrorIgnore", "无视LIS&PACS报错", 40),
|
|
||||||
/**
|
/**
|
||||||
* LIS接口地址
|
* LIS接口地址
|
||||||
*/
|
*/
|
||||||
@@ -120,11 +193,11 @@ public enum TenantOptionDict {
|
|||||||
/**
|
/**
|
||||||
* PACSAppSecret
|
* PACSAppSecret
|
||||||
*/
|
*/
|
||||||
INVOICE_FORWARD_URL("invoiceUrl", "电子发票-中转服务的路径", 46),
|
INVOICE_URL("invoiceUrl", "电子发票中转服务的路径", 46),
|
||||||
/**
|
/**
|
||||||
* PACSAppSecret
|
* PACSAppSecret
|
||||||
*/
|
*/
|
||||||
FORWARD_SWITCH("forwardSwitch", "电子发票-中转服务开关", 47),
|
FORWARD_SWITCH("forwardSwitch", "电子发票中转服务开关", 47),
|
||||||
/**
|
/**
|
||||||
* 食源性开关
|
* 食源性开关
|
||||||
*/
|
*/
|
||||||
@@ -156,55 +229,7 @@ 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;
|
||||||
@@ -216,18 +241,6 @@ public enum TenantOptionDict {
|
|||||||
this.sort = sort;
|
this.sort = sort;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TenantOptionDict getByCode(String code) {
|
|
||||||
if (code == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
for (TenantOptionDict val : values()) {
|
|
||||||
if (val.getCode().equals(code)) {
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode() {
|
public String getCode() {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
@@ -239,4 +252,16 @@ public enum TenantOptionDict {
|
|||||||
public Integer getSort() {
|
public Integer getSort() {
|
||||||
return sort;
|
return sort;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static TenantOptionDict getByCode(String code) {
|
||||||
|
if (code == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (TenantOptionDict val : values()) {
|
||||||
|
if (val.getCode().equals(code)) {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ public final class AgeCalculatorUtil {
|
|||||||
* 当前年龄取得(床位列表表示年龄用)
|
* 当前年龄取得(床位列表表示年龄用)
|
||||||
*/
|
*/
|
||||||
public static String getAge(Date date) {
|
public static String getAge(Date date) {
|
||||||
|
// 添加空值检查
|
||||||
|
if (date == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
// 将 Date 转换为 LocalDateTime
|
// 将 Date 转换为 LocalDateTime
|
||||||
LocalDateTime dateTime = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
LocalDateTime dateTime = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
|||||||
@@ -55,17 +55,6 @@ public class SecurityUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取用户昵称
|
|
||||||
**/
|
|
||||||
public static String getNickName() {
|
|
||||||
try {
|
|
||||||
return getLoginUser().getUser().getNickName();
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new ServiceException("获取用户昵称异常", HttpStatus.UNAUTHORIZED);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户
|
* 获取用户
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -22,10 +22,11 @@ import com.core.common.utils.StringUtils;
|
|||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
public class FilterConfig {
|
public class FilterConfig {
|
||||||
@Value("${xss.excludes}")
|
// 添加默认值,避免配置不存在时启动失败
|
||||||
|
@Value("${xss.excludes:/system/notice}")
|
||||||
private String excludes;
|
private String excludes;
|
||||||
|
|
||||||
@Value("${xss.urlPatterns}")
|
@Value("${xss.urlPatterns:/system/*,/monitor/*,/tool/*}")
|
||||||
private String urlPatterns;
|
private String urlPatterns;
|
||||||
|
|
||||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ 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;
|
||||||
|
|
||||||
@@ -46,11 +45,6 @@ public class RedisConfig extends CachingConfigurerSupport {
|
|||||||
return redisScript;
|
return redisScript;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
|
||||||
public ValueOperations<Object, Object> valueOperations(RedisTemplate<Object, Object> redisTemplate) {
|
|
||||||
return redisTemplate.opsForValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 限流脚本
|
* 限流脚本
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ public class GenController extends BaseController {
|
|||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo genList(GenTable genTable) {
|
public TableDataInfo genList(GenTable genTable) {
|
||||||
startPage();
|
startPage();
|
||||||
|
|
||||||
List<GenTable> list = genTableService.selectGenTableList(genTable);
|
List<GenTable> list = genTableService.selectGenTableList(genTable);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
@@ -251,12 +252,10 @@ public class GenController extends BaseController {
|
|||||||
InputStream is = file.getInputStream();
|
InputStream is = file.getInputStream();
|
||||||
Workbook wb = WorkbookFactory.create(is);
|
Workbook wb = WorkbookFactory.create(is);
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
// 遍历每个sheet页(每个表)
|
// 遍历每个sheet页(每个表)
|
||||||
for (int i = 0; i < wb.getNumberOfSheets(); i++) {
|
for (int i = 0; i < wb.getNumberOfSheets(); i++) {
|
||||||
sb.append("-- ----------------------------------------------------------------------------------\n");
|
sb.append("-- ----------------------------------------------------------------------------------\n");
|
||||||
Sheet st = wb.getSheetAt(i);
|
Sheet st = wb.getSheetAt(i);
|
||||||
|
|
||||||
// 从第一行读取表名表注释
|
// 从第一行读取表名表注释
|
||||||
Row row0 = st.getRow(0);// 表名
|
Row row0 = st.getRow(0);// 表名
|
||||||
String tableName = row0.getCell(4).toString();// 表名
|
String tableName = row0.getCell(4).toString();// 表名
|
||||||
|
|||||||
@@ -55,11 +55,6 @@
|
|||||||
<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>
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
|
|||||||
@Component
|
@Component
|
||||||
@ConfigurationProperties(prefix = "http")
|
@ConfigurationProperties(prefix = "http")
|
||||||
@PropertySource(value = {"classpath:http.yml"})
|
@PropertySource(value = {"classpath:http.yml"})
|
||||||
public class HttpConfig {
|
public class HttpConfig {
|
||||||
private String appId;
|
private String appId;
|
||||||
private String key;
|
private String key;
|
||||||
private String url;
|
private String url;
|
||||||
|
|||||||
@@ -1,204 +0,0 @@
|
|||||||
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);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
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();
|
||||||
|
}
|
||||||
@@ -1,594 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
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,15 +1,13 @@
|
|||||||
package com.openhis.web.adjustprice.controller;
|
package com.openhis.web.adjustprice.controller;
|
||||||
|
|
||||||
import com.core.common.core.domain.R;
|
import javax.annotation.Resource;
|
||||||
import com.core.common.enums.TenantOptionDict;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
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 javax.annotation.Resource;
|
import com.core.common.core.domain.R;
|
||||||
import java.util.List;
|
import com.openhis.web.adjustprice.appservice.ISupplyService;
|
||||||
|
import com.openhis.web.datadictionary.dto.MedicationSearchParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName ChargePriceController
|
* @ClassName ChargePriceController
|
||||||
@@ -21,163 +19,94 @@ import java.util.List;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/change/price")
|
@RequestMapping("/change/price")
|
||||||
public class ChangePriceController {
|
public class ChangePriceController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IAdjustPriceService adjustPriceService;
|
private ISupplyService supplyService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Desc: 根据关键词搜索数据
|
* Desc: 查询所有供应商集合
|
||||||
*
|
*
|
||||||
* @param
|
* @param
|
||||||
* @return com.core.common.core.domain.R<?>
|
|
||||||
* @Author raymond
|
* @Author raymond
|
||||||
* @Date 09:26 2025/10/20
|
* @Date 16:55 2025/10/15
|
||||||
**/
|
|
||||||
@PostMapping(value = "searchKeyWordDataListByMed")
|
|
||||||
public R<?> searchKeyWordDataListByMed(@RequestParam(name = "searchKey", required = false) String searchKey) {
|
|
||||||
return R.ok(this.adjustPriceService.searchKeyWordDataListByMed(searchKey));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Desc: 根据关键词搜索数据
|
|
||||||
*
|
|
||||||
* @param
|
|
||||||
* @return com.core.common.core.domain.R<?>
|
* @return com.core.common.core.domain.R<?>
|
||||||
* @Author raymond
|
|
||||||
* @Date 09:26 2025/10/20
|
|
||||||
**/
|
**/
|
||||||
@PostMapping(value = "searchKeyWordDataListByDevice")
|
@GetMapping(value = "searchAllSupply")
|
||||||
public R<?> searchKeyWordDataListByDevice(@RequestParam(name = "searchKey", required = false) String searchKey) {
|
public R<?> searchAllSupply() {
|
||||||
return R.ok(this.adjustPriceService.searchKeyWordDataListByDevice(searchKey));
|
return R.ok(this.supplyService.searchAllSupplyList());
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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
|
||||||
**/
|
|
||||||
@PostMapping(value = "submitExamineChangePriceData")
|
|
||||||
public R<?> submitExamineChangePriceData(@RequestBody List<AdjustPriceDataVo> dataVoList) {
|
|
||||||
return adjustPriceService.submitExamineChangePriceData(dataVoList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Desc: 根据货品ID 查询是否有审核中的药品数据
|
|
||||||
*
|
|
||||||
* @param itemId
|
|
||||||
* @return com.core.common.core.domain.R<?>
|
* @return com.core.common.core.domain.R<?>
|
||||||
* @Author raymond
|
|
||||||
* @Date 17:32 2025/11/3
|
|
||||||
**/
|
**/
|
||||||
@PostMapping(value = "checkMedApprovalExist")
|
@PostMapping(value = "searchMedicineListToPage")
|
||||||
public R<?> checkMedApprovalExist(@RequestParam Long itemId) {
|
public R<?> searchMedicineListToPage() {
|
||||||
return this.adjustPriceService.checkMedApprovalExist(itemId);
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Desc: 根据货品ID 查询是否有审核中的药品数据
|
* Desc:
|
||||||
*
|
*
|
||||||
* @param itemId
|
* @param medicationSearchParam
|
||||||
|
* @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 = "checkDeviceApprovalExist")
|
@PostMapping(value = "searchConsumablesListToPage")
|
||||||
public R<?> checkDeviceApprovalExist(@RequestParam Long itemId) {
|
public R<?> searchConsumablesListToPage(MedicationSearchParam medicationSearchParam,
|
||||||
return this.adjustPriceService.checkDeviceApprovalExist(itemId);
|
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Desc: 根据货品ID 查询是否有审核中的药品数据
|
* Desc:
|
||||||
*
|
*
|
||||||
* @param itemId
|
* @param medicationSearchParam
|
||||||
|
* @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 = "checkActivityApprovalExist")
|
@PostMapping(value = "searchDiagnosisListToPage")
|
||||||
public R<?> checkActivityApprovalExist(@RequestParam Long itemId) {
|
public R<?> searchDiagnosisListToPage(MedicationSearchParam medicationSearchParam,
|
||||||
return this.adjustPriceService.checkActivityApprovalExist(itemId);
|
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Desc: 根据货品ID 查询是否有审核中的药品数据
|
* Desc:
|
||||||
*
|
*
|
||||||
* @param itemId
|
* @param medicationSearchParam
|
||||||
|
* @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 = "checkHealthApprovalExist")
|
@PostMapping(value = "searchHealthCareListToPage")
|
||||||
public R<?> checkHealthApprovalExist(@RequestParam Long itemId) {
|
public R<?> searchRegisterListToPage(MedicationSearchParam medicationSearchParam,
|
||||||
return this.adjustPriceService.checkHealthApprovalExist(itemId);
|
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||||
}
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||||
|
|
||||||
/**
|
return null;
|
||||||
* 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,153 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
@@ -1,155 +0,0 @@
|
|||||||
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);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
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();
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6,9 +6,6 @@ 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;
|
||||||
@@ -49,9 +46,6 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IOrganizationLocationService organizationLocationService;
|
private IOrganizationLocationService organizationLocationService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ActivityDefinitionMapper activityDefinitionMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机构位置关系初始化
|
* 机构位置关系初始化
|
||||||
*
|
*
|
||||||
@@ -132,25 +126,6 @@ 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,6 +7,7 @@ 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;
|
||||||
@@ -14,7 +15,6 @@ 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,8 +29,6 @@ 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;
|
||||||
@@ -61,9 +59,6 @@ public class PractitionerAppServiceImpl implements IPractitionerAppService {
|
|||||||
@Resource
|
@Resource
|
||||||
ISysTenantService sysTenantService;
|
ISysTenantService sysTenantService;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private AssignSeqUtil assignSeqUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增用户及参与者
|
* 新增用户及参与者
|
||||||
*
|
*
|
||||||
@@ -113,9 +108,8 @@ 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()); // 地址
|
||||||
@@ -312,7 +306,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()); // 地址
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.openhis.web.basicmanage.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.utils.SecurityUtils;
|
||||||
|
import com.openhis.administration.domain.Invoice;
|
||||||
|
import com.openhis.administration.service.IInvoiceService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票管理控制器
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2025-02-20
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/basicmanage/invoice")
|
||||||
|
public class InvoiceController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IInvoiceService invoiceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询发票列表(带用户角色权限过滤)
|
||||||
|
*
|
||||||
|
* @param pageNo 页码
|
||||||
|
* @param pageSize 每页条数
|
||||||
|
* @param request 请求对象
|
||||||
|
* @return 发票列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/page")
|
||||||
|
public R<?> selectInvoicePage(
|
||||||
|
@RequestParam(defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest request) {
|
||||||
|
|
||||||
|
// 获取当前用户ID
|
||||||
|
Long userId = SecurityUtils.getUserId();
|
||||||
|
|
||||||
|
// 判断当前用户是否为管理员
|
||||||
|
boolean isAdmin = SecurityUtils.isAdmin(userId);
|
||||||
|
|
||||||
|
// 分页查询发票列表
|
||||||
|
Page<Invoice> page = new Page<>(pageNo, pageSize);
|
||||||
|
return R.ok(invoiceService.selectInvoicePage(page, isAdmin, userId));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package com.openhis.web.basicmanage.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.utils.SecurityUtils;
|
||||||
|
import com.openhis.administration.domain.InvoiceSegment;
|
||||||
|
import com.openhis.administration.service.IInvoiceSegmentService;
|
||||||
|
import com.openhis.web.basicmanage.domain.InvoiceSegmentDeleteRequest;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票段管理控制器
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2025-11-18
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/basicmanage/invoice-segment")
|
||||||
|
public class InvoiceSegmentController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IInvoiceSegmentService invoiceSegmentService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询发票段列表(带用户角色权限过滤)
|
||||||
|
*
|
||||||
|
* @param pageNo 页码
|
||||||
|
* @param pageSize 每页条数
|
||||||
|
* @param request 请求对象
|
||||||
|
* @return 发票段列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/page")
|
||||||
|
public R<?> selectInvoiceSegmentPage(
|
||||||
|
@RequestParam(defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(defaultValue = "100") Integer pageSize,
|
||||||
|
HttpServletRequest request) {
|
||||||
|
|
||||||
|
// 获取当前用户ID
|
||||||
|
Long userId = SecurityUtils.getUserId();
|
||||||
|
|
||||||
|
// 判断当前用户是否为管理员
|
||||||
|
boolean isAdmin = SecurityUtils.isAdmin(userId);
|
||||||
|
|
||||||
|
// 分页查询发票段列表
|
||||||
|
Page<InvoiceSegment> page = new Page<>(pageNo, pageSize);
|
||||||
|
return R.ok(invoiceSegmentService.selectInvoiceSegmentPage(page, isAdmin, userId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增发票段
|
||||||
|
*
|
||||||
|
* @param invoiceSegment 发票段信息
|
||||||
|
* @return 操作结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public R<?> addInvoiceSegment(@RequestBody InvoiceSegment invoiceSegment) {
|
||||||
|
// 设置创建人信息
|
||||||
|
invoiceSegment.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
int result = invoiceSegmentService.insertInvoiceSegment(invoiceSegment);
|
||||||
|
return result > 0 ? R.ok() : R.fail();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改发票段
|
||||||
|
*
|
||||||
|
* @param invoiceSegment 发票段信息
|
||||||
|
* @return 操作结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public R<?> updateInvoiceSegment(@RequestBody InvoiceSegment invoiceSegment) {
|
||||||
|
// 设置更新人信息
|
||||||
|
invoiceSegment.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
int result = invoiceSegmentService.updateInvoiceSegment(invoiceSegment);
|
||||||
|
return result > 0 ? R.ok() : R.fail();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除发票段
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public R<?> delete(@RequestBody InvoiceSegmentDeleteRequest request) {
|
||||||
|
int rows = invoiceSegmentService.deleteInvoiceSegmentByIds(request.getIds());
|
||||||
|
return rows > 0 ? R.ok("删除成功") : R.fail("删除失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.openhis.web.basicmanage.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票段删除请求类
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2024-06-19
|
||||||
|
*/
|
||||||
|
public class InvoiceSegmentDeleteRequest implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private Long[] ids;
|
||||||
|
|
||||||
|
public Long[] getIds() {
|
||||||
|
return ids;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIds(Long[] ids) {
|
||||||
|
this.ids = ids;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@ 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.*;
|
||||||
|
|
||||||
@@ -20,7 +21,6 @@ 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,14 +32,12 @@ 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;
|
||||||
@@ -60,8 +58,6 @@ public class HealthcareServiceController {
|
|||||||
|
|
||||||
private final YbManager ybService;
|
private final YbManager ybService;
|
||||||
|
|
||||||
private final AssignSeqUtil assignSeqUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务管理基础数据初始化
|
* 服务管理基础数据初始化
|
||||||
*/
|
*/
|
||||||
@@ -96,7 +92,6 @@ 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();
|
||||||
|
|||||||
@@ -90,6 +90,14 @@ public class HealthcareServiceDto {
|
|||||||
private Integer appointmentRequiredFlag;
|
private Integer appointmentRequiredFlag;
|
||||||
private String appointmentRequiredFlag_enumText;
|
private String appointmentRequiredFlag_enumText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出诊医生ID
|
||||||
|
*/
|
||||||
|
@Dict(dictTable = "adm_practitioner", dictCode = "id", dictText = "name")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long practitionerId;
|
||||||
|
private String practitionerId_dictText;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 费用定价ID
|
* 费用定价ID
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -82,6 +82,11 @@ public class HealthcareServiceFormData {
|
|||||||
@NotBlank(message = "预约要求不能为空")
|
@NotBlank(message = "预约要求不能为空")
|
||||||
private Integer appointmentRequiredFlag;
|
private Integer appointmentRequiredFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出诊医生ID
|
||||||
|
*/
|
||||||
|
private Long practitionerId;
|
||||||
|
|
||||||
/** 医保编码 */
|
/** 医保编码 */
|
||||||
private String ybNo;
|
private String ybNo;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.openhis.web.charge.patientcardrenewal;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者换卡控制器
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2024-01-01
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/charge/patientCardRenewal")
|
||||||
|
@Slf4j
|
||||||
|
public class PatientCardRenewalController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PatientCardRenewalService patientCardRenewalService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行患者换卡操作
|
||||||
|
*
|
||||||
|
* @param request 换卡请求参数
|
||||||
|
* @return 换卡结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/renewCard")
|
||||||
|
public R<?> renewCard(@RequestBody RenewalRequest request) {
|
||||||
|
try {
|
||||||
|
log.info("患者换卡请求: 旧卡号={}, 新卡号={}, 患者ID={}",
|
||||||
|
request.getOldCardNo(), request.getNewCardNo(), request.getPatientId());
|
||||||
|
|
||||||
|
// 执行换卡操作
|
||||||
|
boolean success = patientCardRenewalService.renewCard(request);
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
log.info("患者换卡成功: 旧卡号={} -> 新卡号={}",
|
||||||
|
request.getOldCardNo(), request.getNewCardNo());
|
||||||
|
return R.ok("换卡成功");
|
||||||
|
} else {
|
||||||
|
return R.fail("换卡失败");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("患者换卡异常: ", e);
|
||||||
|
return R.fail("换卡操作异常: " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.openhis.web.charge.patientcardrenewal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者换卡服务接口
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2024-01-01
|
||||||
|
*/
|
||||||
|
public interface PatientCardRenewalService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行患者换卡操作
|
||||||
|
*
|
||||||
|
* @param request 换卡请求参数
|
||||||
|
* @return 是否换卡成功
|
||||||
|
*/
|
||||||
|
boolean renewCard(RenewalRequest request);
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
package com.openhis.web.charge.patientcardrenewal;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
import com.openhis.administration.domain.PatientIdentifier;
|
||||||
|
import com.openhis.administration.service.IPatientIdentifierService;
|
||||||
|
import com.openhis.common.enums.IdentifierStatusEnum;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者换卡服务实现类
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2024-01-01
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class PatientCardRenewalServiceImpl implements PatientCardRenewalService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPatientIdentifierService patientIdentifierService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean renewCard(RenewalRequest request) {
|
||||||
|
log.info("执行患者换卡操作: 患者ID={}, 旧卡号={}, 新卡号={}, 原因={}",
|
||||||
|
request.getPatientId(), request.getOldCardNo(), request.getNewCardNo(), request.getReason());
|
||||||
|
|
||||||
|
// 1. 验证参数合法性
|
||||||
|
if (StringUtils.isEmpty(request.getPatientId())) {
|
||||||
|
throw new IllegalArgumentException("患者ID不能为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isEmpty(request.getNewCardNo())) {
|
||||||
|
throw new IllegalArgumentException("新卡号不能为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 检查新卡号是否已被使用
|
||||||
|
LambdaQueryWrapper<PatientIdentifier> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(PatientIdentifier::getIdentifierNo, request.getNewCardNo());
|
||||||
|
List<PatientIdentifier> existingIdentifiers = patientIdentifierService.list(queryWrapper);
|
||||||
|
if (existingIdentifiers != null && !existingIdentifiers.isEmpty()) {
|
||||||
|
throw new IllegalArgumentException("新卡号已被其他患者使用,请更换新卡号");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 直接使用患者ID作为查询条件
|
||||||
|
Long patientId = Long.parseLong(request.getPatientId());
|
||||||
|
// 4. 通过患者ID查询现有标识信息
|
||||||
|
PatientIdentifier patientIdentifier = patientIdentifierService.selectByPatientId(patientId);
|
||||||
|
|
||||||
|
if (patientIdentifier != null) {
|
||||||
|
// 5. 只更新就诊卡号这一个参数
|
||||||
|
|
||||||
|
patientIdentifier.setIdentifierNo(request.getNewCardNo());
|
||||||
|
patientIdentifierService.updateById(patientIdentifier);
|
||||||
|
log.info("患者ID={} 换卡成功,已更新就诊卡号", patientId);
|
||||||
|
} else {
|
||||||
|
throw new IllegalArgumentException("未找到患者标识信息,无法进行换卡操作");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 记录换卡日志 - 可以根据需要扩展日志记录功能
|
||||||
|
// 5. 处理相关业务系统的卡号更新 - 可以根据需要扩展
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.openhis.web.charge.patientcardrenewal;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 换卡请求参数类
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2024-01-01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RenewalRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧门诊号码
|
||||||
|
*/
|
||||||
|
private String oldCardNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新门诊号码
|
||||||
|
*/
|
||||||
|
private String newCardNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者ID
|
||||||
|
*/
|
||||||
|
private String patientId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 换卡原因
|
||||||
|
*/
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注信息
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@@ -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,20 +62,4 @@ 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,7 +126,6 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
|
|||||||
});
|
});
|
||||||
return prescriptionDtoList;
|
return prescriptionDtoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 医保转自费
|
* 医保转自费
|
||||||
*
|
*
|
||||||
@@ -168,46 +167,4 @@ 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,12 +4,15 @@
|
|||||||
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.*;
|
import java.util.ArrayList;
|
||||||
|
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;
|
||||||
@@ -52,23 +55,23 @@ import com.openhis.workflow.service.IServiceRequestService;
|
|||||||
@Service
|
@Service
|
||||||
public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppService {
|
public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppService {
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private OutpatientRefundAppMapper outpatientRefundAppMapper;
|
private OutpatientRefundAppMapper outpatientRefundAppMapper;
|
||||||
@Resource
|
@Autowired
|
||||||
private IPaymentReconciliationService paymentReconciliationService;
|
private IPaymentReconciliationService paymentReconciliationService;
|
||||||
@Resource
|
@Autowired
|
||||||
private IChargeItemService chargeItemService;
|
private IChargeItemService chargeItemService;
|
||||||
@Resource
|
@Autowired
|
||||||
private IMedicationDispenseService medicationDispenseService;
|
private IMedicationDispenseService medicationDispenseService;
|
||||||
@Resource
|
@Autowired
|
||||||
private IDeviceDispenseService deviceDispenseService;
|
private IDeviceDispenseService deviceDispenseService;
|
||||||
@Resource
|
@Autowired
|
||||||
private IServiceRequestService serviceRequestService;
|
private IServiceRequestService serviceRequestService;
|
||||||
@Resource
|
@Autowired
|
||||||
private IMedicationRequestService medicationRequestService;
|
private IMedicationRequestService medicationRequestService;
|
||||||
@Resource
|
@Autowired
|
||||||
private IDeviceRequestService deviceRequestService;
|
private IDeviceRequestService deviceRequestService;
|
||||||
@Resource
|
@Autowired
|
||||||
private AssignSeqUtil assignSeqUtil;
|
private AssignSeqUtil assignSeqUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -107,8 +110,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 = encounterPatientPaymentList.stream().map(EncounterPatientPaymentDto::getPaymentId)
|
List<Long> paymentIdList =
|
||||||
.collect(Collectors.toList());
|
encounterPatientPaymentList.stream().map(EncounterPatientPaymentDto::getId).collect(Collectors.toList());
|
||||||
if (paymentIdList.isEmpty()) {
|
if (paymentIdList.isEmpty()) {
|
||||||
return R.ok(null);
|
return R.ok(null);
|
||||||
}
|
}
|
||||||
@@ -128,7 +131,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,22 +162,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 createDto : creatChargeItemList) {
|
for (RefundItemDto creatdDto : creatChargeItemList) {
|
||||||
|
|
||||||
// 未退费用项,生成新的请求,发放,费用项
|
// 未退费用项,生成新的请求,发放,费用项
|
||||||
if (CommonConstants.TableName.MED_MEDICATION_REQUEST.equals(createDto.getServiceTable())) {
|
if (CommonConstants.TableName.MED_MEDICATION_REQUEST.equals(creatdDto.getServiceTable())) {
|
||||||
// 药品请求查询
|
// 药品请求查询
|
||||||
MedicationRequest medicationRequest = medicationRequestService.getById(createDto.getRequestId());
|
MedicationRequest medicationRequest = medicationRequestService.getById(creatdDto.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" + createDto.getPrescriptionNo())); // 处方号
|
medicationRequest.setPrescriptionNo(String.valueOf("C" + creatdDto.getPrescriptionNo())); // 处方号
|
||||||
medicationRequestService.save(medicationRequest);
|
medicationRequestService.save(medicationRequest);
|
||||||
|
|
||||||
// 药品发放查询
|
// 药品发放查询
|
||||||
MedicationDispense medicationDispense =
|
MedicationDispense medicationDispense =
|
||||||
medicationDispenseService.getById(createDto.getDispenseId());
|
medicationDispenseService.getById(creatdDto.getDispenseId());
|
||||||
// 生成新的药品发放
|
// 生成新的药品发放
|
||||||
medicationDispense.setId(null); // 药品发放id
|
medicationDispense.setId(null); // 药品发放id
|
||||||
medicationDispense
|
medicationDispense
|
||||||
@@ -183,26 +186,26 @@ public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppServi
|
|||||||
medicationDispenseService.save(medicationDispense);
|
medicationDispenseService.save(medicationDispense);
|
||||||
|
|
||||||
// 费用项查询
|
// 费用项查询
|
||||||
ChargeItem chargeItem = chargeItemService.getById(createDto.getChargeItemId());
|
ChargeItem chargeItem = chargeItemService.getById(creatdDto.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" + createDto.getPrescriptionNo())); // 处方号
|
chargeItem.setPrescriptionNo(String.valueOf("C" + creatdDto.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(createDto.getServiceTable())) {
|
} else if (CommonConstants.TableName.WOR_SERVICE_REQUEST.equals(creatdDto.getServiceTable())) {
|
||||||
// 服务请求查询
|
// 服务请求查询
|
||||||
ServiceRequest serviceRequest = serviceRequestService.getById(createDto.getRequestId());
|
ServiceRequest serviceRequest = serviceRequestService.getById(creatdDto.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(createDto.getChargeItemId());
|
ChargeItem chargeItem = chargeItemService.getById(creatdDto.getChargeItemId());
|
||||||
// 生成新的费用项
|
// 生成新的费用项
|
||||||
chargeItem.setRefundId(chargeItem.getId());// 退费id
|
chargeItem.setRefundId(chargeItem.getId());// 退费id
|
||||||
chargeItem.setId(null); // 费用项id
|
chargeItem.setId(null); // 费用项id
|
||||||
@@ -211,16 +214,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(createDto.getServiceTable())) {
|
} else if (CommonConstants.TableName.WOR_DEVICE_REQUEST.equals(creatdDto.getServiceTable())) {
|
||||||
// 耗材请求查询
|
// 耗材请求查询
|
||||||
DeviceRequest deviceRequest = deviceRequestService.getById(createDto.getRequestId());
|
DeviceRequest deviceRequest = deviceRequestService.getById(creatdDto.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(createDto.getDispenseId());
|
DeviceDispense deviceDispense = deviceDispenseService.getById(creatdDto.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
|
||||||
@@ -228,7 +231,7 @@ public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppServi
|
|||||||
deviceDispenseService.save(deviceDispense);
|
deviceDispenseService.save(deviceDispense);
|
||||||
|
|
||||||
// 费用项查询
|
// 费用项查询
|
||||||
ChargeItem chargeItem = chargeItemService.getById(createDto.getChargeItemId());
|
ChargeItem chargeItem = chargeItemService.getById(creatdDto.getChargeItemId());
|
||||||
// 生成新的费用项
|
// 生成新的费用项
|
||||||
chargeItem.setRefundId(chargeItem.getId());// 退费id
|
chargeItem.setRefundId(chargeItem.getId());// 退费id
|
||||||
chargeItem.setId(null); // 费用项id
|
chargeItem.setId(null); // 费用项id
|
||||||
@@ -369,7 +372,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(
|
||||||
|
|||||||
@@ -91,17 +91,27 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Page<PatientMetadata> getPatientMetadataBySearchKey(String searchKey, Integer pageNo, Integer pageSize) {
|
public Page<PatientMetadata> getPatientMetadataBySearchKey(String searchKey, Integer pageNo, Integer pageSize) {
|
||||||
// 构建查询条件
|
// 构建查询条件,添加phone字段支持手机号搜索
|
||||||
QueryWrapper<Patient> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey,
|
QueryWrapper<Patient> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey,
|
||||||
new HashSet<>(Arrays.asList("id_card", "name", "py_str", "wb_str")), null);
|
new HashSet<>(Arrays.asList("id_card", "name", "py_str", "wb_str", "phone")), null);
|
||||||
// 设置排序
|
// 设置排序
|
||||||
queryWrapper.orderByDesc("update_time");
|
queryWrapper.orderByDesc("update_time");
|
||||||
// 通过证件号匹配 patient
|
// 通过证件号匹配 patient
|
||||||
if (StringUtils.isNotEmpty(searchKey)) {
|
if (StringUtils.isNotEmpty(searchKey)) {
|
||||||
PatientIdentifier patientIdentifier = patientIdentifierService
|
List<PatientIdentifier> patientIdentifiers = patientIdentifierService
|
||||||
.getOne(new LambdaQueryWrapper<PatientIdentifier>().eq(PatientIdentifier::getIdentifierNo, searchKey));
|
.list(new LambdaQueryWrapper<PatientIdentifier>().eq(PatientIdentifier::getIdentifierNo, searchKey));
|
||||||
if (patientIdentifier != null) {
|
if (patientIdentifiers != null && !patientIdentifiers.isEmpty()) {
|
||||||
queryWrapper.or(q -> q.eq("id", patientIdentifier.getPatientId()));
|
// 如果有多个匹配结果,将它们全部添加到查询条件中
|
||||||
|
if (patientIdentifiers.size() == 1) {
|
||||||
|
// 单个结果时直接添加条件
|
||||||
|
queryWrapper.or(q -> q.eq("id", patientIdentifiers.get(0).getPatientId()));
|
||||||
|
} else {
|
||||||
|
// 多个结果时使用in条件
|
||||||
|
List<Long> patientIds = patientIdentifiers.stream()
|
||||||
|
.map(PatientIdentifier::getPatientId)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
queryWrapper.or(q -> q.in("id", patientIds));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 患者信息
|
// 患者信息
|
||||||
@@ -119,6 +129,13 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
|||||||
// 初复诊
|
// 初复诊
|
||||||
e.setFirstEnum_enumText(patientIdList.contains(e.getId()) ? EncounterType.FOLLOW_UP.getInfo()
|
e.setFirstEnum_enumText(patientIdList.contains(e.getId()) ? EncounterType.FOLLOW_UP.getInfo()
|
||||||
: EncounterType.INITIAL.getInfo());
|
: EncounterType.INITIAL.getInfo());
|
||||||
|
// 患者标识
|
||||||
|
List<PatientIdentifier> patientIdentifiers = patientIdentifierService
|
||||||
|
.list(new LambdaQueryWrapper<PatientIdentifier>().eq(PatientIdentifier::getPatientId, e.getId()));
|
||||||
|
if (patientIdentifiers != null && !patientIdentifiers.isEmpty()) {
|
||||||
|
// 取第一个标识号,如果需要可以根据业务需求选择其他逻辑
|
||||||
|
e.setIdentifierNo(patientIdentifiers.get(0).getIdentifierNo());
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return patientMetadataPage;
|
return patientMetadataPage;
|
||||||
@@ -261,10 +278,26 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
|||||||
new HashSet<>(Arrays.asList("patient_name", "organization_name", "practitioner_name", "healthcare_name")),
|
new HashSet<>(Arrays.asList("patient_name", "organization_name", "practitioner_name", "healthcare_name")),
|
||||||
request);
|
request);
|
||||||
|
|
||||||
|
// 手动处理 statusEnum 参数(用于过滤退号记录)
|
||||||
|
String statusEnumParam = request.getParameter("statusEnum");
|
||||||
|
if (statusEnumParam != null && !statusEnumParam.isEmpty()) {
|
||||||
|
try {
|
||||||
|
Integer statusEnum = Integer.parseInt(statusEnumParam);
|
||||||
|
if (statusEnum == -1) {
|
||||||
|
// -1 表示排除退号记录(正常挂号)
|
||||||
|
queryWrapper.ne("status_enum", 6);
|
||||||
|
} else {
|
||||||
|
// 其他值表示精确匹配
|
||||||
|
queryWrapper.eq("status_enum", statusEnum);
|
||||||
|
}
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// 忽略无效的参数值
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
IPage<CurrentDayEncounterDto> currentDayEncounter = outpatientRegistrationAppMapper.getCurrentDayEncounter(
|
IPage<CurrentDayEncounterDto> currentDayEncounter = outpatientRegistrationAppMapper.getCurrentDayEncounter(
|
||||||
new Page<>(pageNo, pageSize), EncounterClass.AMB.getValue(), EncounterStatus.IN_PROGRESS.getValue(),
|
new Page<>(pageNo, pageSize), EncounterClass.AMB.getValue(), ParticipantType.ADMITTER.getCode(),
|
||||||
ParticipantType.ADMITTER.getCode(), ParticipantType.REGISTRATION_DOCTOR.getCode(), queryWrapper,
|
queryWrapper, ChargeItemContext.REGISTER.getValue(), PaymentStatus.SUCCESS.getValue());
|
||||||
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,7 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
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;
|
||||||
@@ -28,7 +27,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class OutpatientChargeController {
|
public class OutpatientChargeController {
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IOutpatientChargeAppService outpatientChargeAppService;
|
private IOutpatientChargeAppService outpatientChargeAppService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -92,26 +91,4 @@ 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,7 +5,6 @@ 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;
|
||||||
@@ -31,7 +30,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class OutpatientRefundController {
|
public class OutpatientRefundController {
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IOutpatientRefundAppService outpatientRefundAppService;
|
private IOutpatientRefundAppService outpatientRefundAppService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -130,9 +130,40 @@ public class CurrentDayEncounterDto {
|
|||||||
* 生日
|
* 生日
|
||||||
*/
|
*/
|
||||||
private Date birthDate;
|
private Date birthDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电话
|
* 退号日期/时间
|
||||||
*/
|
*/
|
||||||
private String phone;
|
private Date returnDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退号原因
|
||||||
|
*/
|
||||||
|
private String returnReason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退号操作人
|
||||||
|
*/
|
||||||
|
private String operatorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退号操作工号(用户账号)
|
||||||
|
*/
|
||||||
|
private String operatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款金额
|
||||||
|
*/
|
||||||
|
private BigDecimal refundAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同编码(费用性质代码)
|
||||||
|
*/
|
||||||
|
private String contractNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款方式(多个支付方式用逗号分隔)
|
||||||
|
*/
|
||||||
|
private String refundMethod;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ 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;
|
||||||
@@ -28,7 +29,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 paymentId;
|
private Long id;
|
||||||
|
|
||||||
/** 就诊ID */
|
/** 就诊ID */
|
||||||
private Long encounterId;
|
private Long encounterId;
|
||||||
|
|||||||
@@ -92,17 +92,7 @@ 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;
|
||||||
|
|
||||||
@@ -119,8 +109,4 @@ 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;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,4 +56,8 @@ public class PatientMetadata {
|
|||||||
*/
|
*/
|
||||||
private String firstEnum_enumText;
|
private String firstEnum_enumText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 就诊卡号
|
||||||
|
*/
|
||||||
|
private String identifierNo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,5 +81,11 @@ public class RefundItemDto {
|
|||||||
|
|
||||||
/** 项目名 */
|
/** 项目名 */
|
||||||
private String itemName;
|
private String itemName;
|
||||||
|
|
||||||
|
/** 费用支付方式编码 */
|
||||||
|
private String medfeePaymtdCode;
|
||||||
|
|
||||||
|
/** 费用类型 */
|
||||||
|
private String feeType;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,17 +36,14 @@ public interface OutpatientRegistrationAppMapper {
|
|||||||
*
|
*
|
||||||
* @param page 分页参数
|
* @param page 分页参数
|
||||||
* @param classEnum 就诊类型
|
* @param classEnum 就诊类型
|
||||||
* @param statusEnum 门诊就诊状态 | 在诊
|
* @param participantType 参与者类型
|
||||||
* @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("statusEnum") Integer statusEnum,
|
@Param("classEnum") Integer classEnum, @Param("participantType") String participantType,
|
||||||
@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);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.openhis.web.check.appservice;
|
||||||
|
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.web.check.dto.CheckMethodDto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查方法Service接口
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2025-07-22
|
||||||
|
*/
|
||||||
|
public interface ICheckMethodAppService{
|
||||||
|
|
||||||
|
R<?> getCheckMethodList();
|
||||||
|
|
||||||
|
R<?> addCheckMethod(CheckMethodDto checkMethodDto);
|
||||||
|
|
||||||
|
R<?> updateCheckMethod(CheckMethodDto checkPartDto);
|
||||||
|
|
||||||
|
R<?> removeCheckMethod(Long code);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.openhis.web.check.appservice;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.web.check.dto.CheckPackageDto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查套餐AppService接口
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2025-11-26
|
||||||
|
*/
|
||||||
|
public interface ICheckPackageAppService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取检查套餐列表
|
||||||
|
* @return 检查套餐列表
|
||||||
|
*/
|
||||||
|
R<?> getCheckPackageList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID获取检查套餐详情
|
||||||
|
* @param id 套餐ID
|
||||||
|
* @return 套餐详情
|
||||||
|
*/
|
||||||
|
R<?> getCheckPackageById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增检查套餐
|
||||||
|
* @param checkPackageDto 套餐信息
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
R<?> addCheckPackage(CheckPackageDto checkPackageDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新检查套餐
|
||||||
|
* @param checkPackageDto 套餐信息
|
||||||
|
* @return 更新结果
|
||||||
|
*/
|
||||||
|
R<?> updateCheckPackage(CheckPackageDto checkPackageDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检查套餐
|
||||||
|
* @param id 套餐ID
|
||||||
|
* @return 删除结果
|
||||||
|
*/
|
||||||
|
R<?> deleteCheckPackage(Long id);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.openhis.web.check.appservice;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.web.check.dto.CheckPartDto;
|
||||||
|
|
||||||
|
public interface ICheckPartAppService {
|
||||||
|
R<?> getCheckPartList();
|
||||||
|
|
||||||
|
R<?> addCheckPart(CheckPartDto checkPartDto);
|
||||||
|
|
||||||
|
R<?> removeCheckPart(Long code);
|
||||||
|
|
||||||
|
R<?> updateCheckPart(CheckPartDto checkMethodDto);
|
||||||
|
}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
package com.openhis.web.check.appservice.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.check.domain.CheckMethod;
|
||||||
|
import com.openhis.check.service.ICheckMethodService;
|
||||||
|
import com.openhis.web.check.appservice.ICheckMethodAppService;
|
||||||
|
import com.openhis.web.check.dto.CheckMethodDto;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class CheckMethodAppServiceImpl implements ICheckMethodAppService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ICheckMethodService checkMethodService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> getCheckMethodList() {
|
||||||
|
List<CheckMethod> list = checkMethodService.list();
|
||||||
|
return R.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> addCheckMethod(CheckMethodDto checkMethodDto) {
|
||||||
|
//1.参数校验
|
||||||
|
if(ObjectUtil.isEmpty(checkMethodDto.getName())){
|
||||||
|
return R.fail("检查方法名称不能为空");
|
||||||
|
}
|
||||||
|
if(ObjectUtil.isEmpty(checkMethodDto.getCheckType())){
|
||||||
|
return R.fail("检查类型不能为空");
|
||||||
|
}
|
||||||
|
if(ObjectUtil.isEmpty(checkMethodDto.getCode())){
|
||||||
|
return R.fail("代码不能为空");
|
||||||
|
}
|
||||||
|
//2.判断是否有重复
|
||||||
|
LambdaQueryWrapper<CheckMethod> wrapper = new LambdaQueryWrapper<CheckMethod>()
|
||||||
|
.eq(CheckMethod::getName, checkMethodDto.getName())
|
||||||
|
.eq(CheckMethod::getCheckType, checkMethodDto.getCheckType())
|
||||||
|
.eq(CheckMethod::getCode, checkMethodDto.getCode());
|
||||||
|
if (checkMethodService.getOne(wrapper) != null){
|
||||||
|
return R.fail("检查方法已存在");
|
||||||
|
}
|
||||||
|
//3.封装实体检查方法
|
||||||
|
CheckMethod checkMethod = new CheckMethod();
|
||||||
|
checkMethod.setName(checkMethodDto.getName());
|
||||||
|
//4.保存添加
|
||||||
|
boolean save = checkMethodService.save(checkMethod);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> updateCheckMethod(CheckMethodDto checkMethodDto) {
|
||||||
|
//1.参数校验
|
||||||
|
if(ObjectUtil.isEmpty(checkMethodDto.getName())){
|
||||||
|
return R.fail("检查方法名称不能为空");
|
||||||
|
}
|
||||||
|
if(ObjectUtil.isEmpty(checkMethodDto.getCheckType())){
|
||||||
|
return R.fail("检查类型不能为空");
|
||||||
|
}
|
||||||
|
if(ObjectUtil.isEmpty(checkMethodDto.getCode())){
|
||||||
|
return R.fail("代码不能为空");
|
||||||
|
}
|
||||||
|
//2.
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> removeCheckMethod(Long code) {
|
||||||
|
if (ObjectUtil.isEmpty(code)){
|
||||||
|
return R.fail("检查方法代码不能为空");
|
||||||
|
}
|
||||||
|
LambdaQueryWrapper<CheckMethod> wrapper = new LambdaQueryWrapper<CheckMethod>().eq(CheckMethod::getCode, code);
|
||||||
|
boolean remove = checkMethodService.remove(wrapper);
|
||||||
|
return R.ok(remove);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,206 @@
|
|||||||
|
package com.openhis.web.check.appservice.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.check.domain.CheckPackage;
|
||||||
|
import com.openhis.check.domain.CheckPackageDetail;
|
||||||
|
import com.openhis.check.service.ICheckPackageDetailService;
|
||||||
|
import com.openhis.check.service.ICheckPackageService;
|
||||||
|
import com.openhis.web.check.appservice.ICheckPackageAppService;
|
||||||
|
import com.openhis.web.check.dto.CheckPackageDetailDto;
|
||||||
|
import com.openhis.web.check.dto.CheckPackageDto;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查套餐AppService实现
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2025-11-26
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class CheckPackageAppServiceImpl implements ICheckPackageAppService {
|
||||||
|
|
||||||
|
private final ICheckPackageService checkPackageService;
|
||||||
|
private final ICheckPackageDetailService checkPackageDetailService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> getCheckPackageList() {
|
||||||
|
try {
|
||||||
|
List<CheckPackage> list = checkPackageService.list();
|
||||||
|
return R.ok(list);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("获取检查套餐列表失败", e);
|
||||||
|
return R.fail("获取检查套餐列表失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> getCheckPackageById(Long id) {
|
||||||
|
try {
|
||||||
|
CheckPackage checkPackage = checkPackageService.getById(id);
|
||||||
|
if (checkPackage == null) {
|
||||||
|
return R.fail("套餐不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取套餐明细
|
||||||
|
List<CheckPackageDetail> details = checkPackageDetailService.list(
|
||||||
|
new LambdaQueryWrapper<CheckPackageDetail>()
|
||||||
|
.eq(CheckPackageDetail::getPackageId, id)
|
||||||
|
.orderByAsc(CheckPackageDetail::getOrderNum)
|
||||||
|
);
|
||||||
|
|
||||||
|
// 转换为DTO
|
||||||
|
CheckPackageDto dto = new CheckPackageDto();
|
||||||
|
BeanUtils.copyProperties(checkPackage, dto);
|
||||||
|
|
||||||
|
List<CheckPackageDetailDto> detailDtos = details.stream().map(detail -> {
|
||||||
|
CheckPackageDetailDto detailDto = new CheckPackageDetailDto();
|
||||||
|
BeanUtils.copyProperties(detail, detailDto);
|
||||||
|
return detailDto;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
dto.setItems(detailDtos);
|
||||||
|
|
||||||
|
return R.ok(dto);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("获取检查套餐详情失败", e);
|
||||||
|
return R.fail("获取检查套餐详情失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public R<?> addCheckPackage(CheckPackageDto checkPackageDto) {
|
||||||
|
try {
|
||||||
|
// 创建套餐主表数据
|
||||||
|
CheckPackage checkPackage = new CheckPackage();
|
||||||
|
BeanUtils.copyProperties(checkPackageDto, checkPackage);
|
||||||
|
|
||||||
|
// 设置套餐维护日期为当前系统日期
|
||||||
|
checkPackage.setMaintainDate(LocalDate.now());
|
||||||
|
checkPackage.setCreateTime(LocalDateTime.now());
|
||||||
|
checkPackage.setUpdateTime(LocalDateTime.now());
|
||||||
|
|
||||||
|
// 保存套餐主表
|
||||||
|
boolean saveResult = checkPackageService.save(checkPackage);
|
||||||
|
if (!saveResult) {
|
||||||
|
return R.fail("保存套餐失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存套餐明细
|
||||||
|
if (checkPackageDto.getItems() != null && !checkPackageDto.getItems().isEmpty()) {
|
||||||
|
List<CheckPackageDetail> details = new ArrayList<>();
|
||||||
|
int orderNum = 1;
|
||||||
|
for (CheckPackageDetailDto detailDto : checkPackageDto.getItems()) {
|
||||||
|
CheckPackageDetail detail = new CheckPackageDetail();
|
||||||
|
BeanUtils.copyProperties(detailDto, detail);
|
||||||
|
detail.setPackageId(checkPackage.getId());
|
||||||
|
detail.setOrderNum(orderNum++);
|
||||||
|
detail.setCreateTime(LocalDateTime.now());
|
||||||
|
detail.setUpdateTime(LocalDateTime.now());
|
||||||
|
details.add(detail);
|
||||||
|
}
|
||||||
|
checkPackageDetailService.saveBatch(details);
|
||||||
|
}
|
||||||
|
|
||||||
|
return R.ok(checkPackage.getId(), "保存成功");
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("新增检查套餐失败", e);
|
||||||
|
return R.fail("新增检查套餐失败: " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public R<?> updateCheckPackage(CheckPackageDto checkPackageDto) {
|
||||||
|
try {
|
||||||
|
// 检查套餐是否存在
|
||||||
|
CheckPackage existPackage = checkPackageService.getById(checkPackageDto.getId());
|
||||||
|
if (existPackage == null) {
|
||||||
|
return R.fail("套餐不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新套餐主表数据
|
||||||
|
CheckPackage checkPackage = new CheckPackage();
|
||||||
|
BeanUtils.copyProperties(checkPackageDto, checkPackage);
|
||||||
|
|
||||||
|
// 更新套餐维护日期为当前系统日期
|
||||||
|
checkPackage.setMaintainDate(LocalDate.now());
|
||||||
|
checkPackage.setUpdateTime(LocalDateTime.now());
|
||||||
|
|
||||||
|
boolean updateResult = checkPackageService.updateById(checkPackage);
|
||||||
|
if (!updateResult) {
|
||||||
|
return R.fail("更新套餐失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除原有明细
|
||||||
|
checkPackageDetailService.remove(
|
||||||
|
new LambdaQueryWrapper<CheckPackageDetail>()
|
||||||
|
.eq(CheckPackageDetail::getPackageId, checkPackage.getId())
|
||||||
|
);
|
||||||
|
|
||||||
|
// 保存新的套餐明细
|
||||||
|
if (checkPackageDto.getItems() != null && !checkPackageDto.getItems().isEmpty()) {
|
||||||
|
List<CheckPackageDetail> details = new ArrayList<>();
|
||||||
|
int orderNum = 1;
|
||||||
|
for (CheckPackageDetailDto detailDto : checkPackageDto.getItems()) {
|
||||||
|
CheckPackageDetail detail = new CheckPackageDetail();
|
||||||
|
BeanUtils.copyProperties(detailDto, detail);
|
||||||
|
detail.setPackageId(checkPackage.getId());
|
||||||
|
detail.setOrderNum(orderNum++);
|
||||||
|
detail.setCreateTime(LocalDateTime.now());
|
||||||
|
detail.setUpdateTime(LocalDateTime.now());
|
||||||
|
details.add(detail);
|
||||||
|
}
|
||||||
|
checkPackageDetailService.saveBatch(details);
|
||||||
|
}
|
||||||
|
|
||||||
|
return R.ok("更新成功");
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("更新检查套餐失败", e);
|
||||||
|
return R.fail("更新检查套餐失败: " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public R<?> deleteCheckPackage(Long id) {
|
||||||
|
try {
|
||||||
|
// 检查套餐是否存在
|
||||||
|
CheckPackage existPackage = checkPackageService.getById(id);
|
||||||
|
if (existPackage == null) {
|
||||||
|
return R.fail("套餐不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除套餐明细
|
||||||
|
checkPackageDetailService.remove(
|
||||||
|
new LambdaQueryWrapper<CheckPackageDetail>()
|
||||||
|
.eq(CheckPackageDetail::getPackageId, id)
|
||||||
|
);
|
||||||
|
|
||||||
|
// 删除套餐主表
|
||||||
|
boolean deleteResult = checkPackageService.removeById(id);
|
||||||
|
if (!deleteResult) {
|
||||||
|
return R.fail("删除套餐失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
return R.ok("删除成功");
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("删除检查套餐失败", e);
|
||||||
|
return R.fail("删除检查套餐失败: " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.openhis.web.check.appservice.impl;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.check.domain.CheckPart;
|
||||||
|
import com.openhis.check.service.ICheckPartService;
|
||||||
|
import com.openhis.web.check.appservice.ICheckPartAppService;
|
||||||
|
import com.openhis.web.check.dto.CheckPartDto;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class CheckPartAppServiceImpl implements ICheckPartAppService {
|
||||||
|
@Resource
|
||||||
|
private ICheckPartService checkPartService;
|
||||||
|
@Override
|
||||||
|
public R<?> getCheckPartList() {
|
||||||
|
List<CheckPart> list = checkPartService.list();
|
||||||
|
return R.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> addCheckPart(CheckPartDto checkPartDto) {
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> removeCheckPart(Long code) {
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> updateCheckPart(CheckPartDto checkPartDto) {
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.openhis.web.check.controller;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.web.check.appservice.ICheckMethodAppService;
|
||||||
|
import com.openhis.web.check.dto.CheckMethodDto;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Slf4j
|
||||||
|
@RequestMapping("/check/method")
|
||||||
|
public class CheckMethodController {
|
||||||
|
@Resource
|
||||||
|
private ICheckMethodAppService checkMethodAppService;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 获取检查方法
|
||||||
|
* @Param检查方法 此处参数注释有问题,完全是按照需求给的图来注释的
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public R<?> getCheckMethodList(){
|
||||||
|
return R.ok(checkMethodAppService.getCheckMethodList());
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 新增检查方法
|
||||||
|
* @Param
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public R<?> addCheckMethod(@RequestBody CheckMethodDto checkMethodDto){
|
||||||
|
return R.ok(checkMethodAppService.addCheckMethod(checkMethodDto));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 删除检查方法
|
||||||
|
* @Param code代码
|
||||||
|
*/
|
||||||
|
@DeleteMapping("/delete/{code}")
|
||||||
|
public R<?> deleteCheckMethod(@PathVariable Long code){
|
||||||
|
return R.ok(checkMethodAppService.removeCheckMethod(code));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 更新检查方法
|
||||||
|
* @Param
|
||||||
|
*/
|
||||||
|
@PutMapping("/update")
|
||||||
|
public R<?> updateCheckMethod(@RequestBody CheckMethodDto checkMethodDto){
|
||||||
|
return R.ok(checkMethodAppService.updateCheckMethod(checkMethodDto));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.openhis.web.check.controller;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.web.check.appservice.ICheckPartAppService;
|
||||||
|
import com.openhis.web.check.dto.CheckPartDto;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Slf4j
|
||||||
|
@RequestMapping("/check/part")
|
||||||
|
public class CheckPartController {
|
||||||
|
@Resource
|
||||||
|
private ICheckPartAppService checkPartAppService;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 获取检查部位
|
||||||
|
* @Param检查方法 此处参数注释有问题,完全是按照需求给的图来注释的
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public R<?> getCheckPartList(){
|
||||||
|
return R.ok(checkPartAppService.getCheckPartList());
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 新增检查部位
|
||||||
|
* @Param
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public R<?> addCheckPart(@RequestBody CheckPartDto checkPartDto){
|
||||||
|
return R.ok(checkPartAppService.addCheckPart(checkPartDto));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 删除检查部位
|
||||||
|
* @Param code代码
|
||||||
|
*/
|
||||||
|
@DeleteMapping("/delete/{code}")
|
||||||
|
public R<?> deleteCheckPart(@PathVariable Long code){
|
||||||
|
return R.ok(checkPartAppService.removeCheckPart(code));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 更新检查部位
|
||||||
|
* @Param
|
||||||
|
*/
|
||||||
|
@PutMapping("/update")
|
||||||
|
public R<?> updateCheckPart(@RequestBody CheckPartDto checkPartDto){
|
||||||
|
return R.ok(checkPartAppService.updateCheckPart(checkPartDto));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,186 @@
|
|||||||
|
package com.openhis.web.check.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.core.common.core.controller.BaseController;
|
||||||
|
import com.core.common.core.domain.AjaxResult;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.check.domain.CheckMethod;
|
||||||
|
import com.openhis.check.domain.CheckPackage;
|
||||||
|
import com.openhis.check.domain.CheckPart;
|
||||||
|
import com.openhis.check.domain.CheckType;
|
||||||
|
import com.openhis.check.service.ICheckMethodService;
|
||||||
|
import com.openhis.check.service.ICheckPackageService;
|
||||||
|
import com.openhis.check.service.ICheckPartService;
|
||||||
|
import com.openhis.check.service.ICheckTypeService;
|
||||||
|
import com.openhis.web.check.appservice.ICheckPackageAppService;
|
||||||
|
import com.openhis.web.check.dto.CheckPackageDto;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查类型管理Controller
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2025-07-22
|
||||||
|
* @updated 2025-11-26 - 增加套餐设置相关接口
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping({"/system/check-type", "/system"})
|
||||||
|
@Slf4j
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class CheckTypeController extends BaseController {
|
||||||
|
|
||||||
|
private final ICheckTypeService checkTypeService;
|
||||||
|
private final ICheckMethodService checkMethodService;
|
||||||
|
private final ICheckPartService checkPartService;
|
||||||
|
private final ICheckPackageService checkPackageService;
|
||||||
|
private final ICheckPackageAppService checkPackageAppService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取检查类型列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult list() {
|
||||||
|
List<CheckType> list = checkTypeService.list();
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取检查方法列表
|
||||||
|
*/
|
||||||
|
@GetMapping({"/method/list", "/check-method/list"})
|
||||||
|
public AjaxResult methodList() {
|
||||||
|
List<CheckMethod> list = checkMethodService.list();
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取检查部位列表
|
||||||
|
*/
|
||||||
|
@GetMapping({"/part/list", "/check-part/list"})
|
||||||
|
public AjaxResult partList() {
|
||||||
|
List<CheckPart> list = checkPartService.list();
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取检查套餐列表(支持分页和筛选)
|
||||||
|
*/
|
||||||
|
@GetMapping({"/package/list", "/check-package/list"})
|
||||||
|
public AjaxResult packageList(
|
||||||
|
@RequestParam(required = false) Integer pageNo,
|
||||||
|
@RequestParam(required = false) Integer pageSize,
|
||||||
|
@RequestParam(required = false) String organization,
|
||||||
|
@RequestParam(required = false) String packageName,
|
||||||
|
@RequestParam(required = false) String packageLevel,
|
||||||
|
@RequestParam(required = false) String packageType,
|
||||||
|
@RequestParam(required = false) String department,
|
||||||
|
@RequestParam(required = false) String user,
|
||||||
|
@RequestParam(required = false) String startDate,
|
||||||
|
@RequestParam(required = false) String endDate) {
|
||||||
|
|
||||||
|
LambdaQueryWrapper<CheckPackage> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
|
// 添加筛选条件
|
||||||
|
if (organization != null && !organization.isEmpty()) {
|
||||||
|
wrapper.eq(CheckPackage::getOrganization, organization);
|
||||||
|
}
|
||||||
|
if (packageName != null && !packageName.isEmpty()) {
|
||||||
|
wrapper.like(CheckPackage::getPackageName, packageName);
|
||||||
|
}
|
||||||
|
if (packageLevel != null && !packageLevel.isEmpty()) {
|
||||||
|
wrapper.eq(CheckPackage::getPackageLevel, packageLevel);
|
||||||
|
}
|
||||||
|
if (packageType != null && !packageType.isEmpty()) {
|
||||||
|
wrapper.eq(CheckPackage::getPackageType, packageType);
|
||||||
|
}
|
||||||
|
if (department != null && !department.isEmpty()) {
|
||||||
|
wrapper.like(CheckPackage::getDepartment, department);
|
||||||
|
}
|
||||||
|
if (user != null && !user.isEmpty()) {
|
||||||
|
wrapper.like(CheckPackage::getUser, user);
|
||||||
|
}
|
||||||
|
if (startDate != null && !startDate.isEmpty()) {
|
||||||
|
wrapper.ge(CheckPackage::getMaintainDate, LocalDate.parse(startDate));
|
||||||
|
}
|
||||||
|
if (endDate != null && !endDate.isEmpty()) {
|
||||||
|
wrapper.le(CheckPackage::getMaintainDate, LocalDate.parse(endDate));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 按更新时间倒序排列
|
||||||
|
wrapper.orderByDesc(CheckPackage::getUpdateTime);
|
||||||
|
|
||||||
|
// 如果需要分页
|
||||||
|
if (pageNo != null && pageSize != null) {
|
||||||
|
com.baomidou.mybatisplus.extension.plugins.pagination.Page<CheckPackage> page =
|
||||||
|
new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(pageNo, pageSize);
|
||||||
|
com.baomidou.mybatisplus.extension.plugins.pagination.Page<CheckPackage> result =
|
||||||
|
checkPackageService.page(page, wrapper);
|
||||||
|
return AjaxResult.success(result);
|
||||||
|
} else {
|
||||||
|
List<CheckPackage> list = checkPackageService.list(wrapper);
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增检查类型
|
||||||
|
*/
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody CheckType checkType) {
|
||||||
|
return toAjax(checkTypeService.save(checkType));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改检查类型
|
||||||
|
*/
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody CheckType checkType) {
|
||||||
|
return toAjax(checkTypeService.updateById(checkType));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检查类型
|
||||||
|
*/
|
||||||
|
@DeleteMapping("/{checkTypeId}")
|
||||||
|
public AjaxResult remove(@PathVariable Long checkTypeId) {
|
||||||
|
return toAjax(checkTypeService.removeById(checkTypeId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID获取检查套餐详情
|
||||||
|
*/
|
||||||
|
@GetMapping({"/package/{id}", "/check-package/{id}"})
|
||||||
|
public R<?> getCheckPackageById(@PathVariable Long id) {
|
||||||
|
return checkPackageAppService.getCheckPackageById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增检查套餐
|
||||||
|
*/
|
||||||
|
@PostMapping({"/package", "/check-package"})
|
||||||
|
public R<?> addCheckPackage(@Valid @RequestBody CheckPackageDto checkPackageDto) {
|
||||||
|
return checkPackageAppService.addCheckPackage(checkPackageDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新检查套餐
|
||||||
|
*/
|
||||||
|
@PutMapping({"/package", "/check-package"})
|
||||||
|
public R<?> updateCheckPackage(@Valid @RequestBody CheckPackageDto checkPackageDto) {
|
||||||
|
return checkPackageAppService.updateCheckPackage(checkPackageDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检查套餐
|
||||||
|
*/
|
||||||
|
@DeleteMapping({"/package/{id}", "/check-package/{id}"})
|
||||||
|
public R<?> deleteCheckPackage(@PathVariable Long id) {
|
||||||
|
return checkPackageAppService.deleteCheckPackage(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.openhis.web.check.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class CheckMethodDto {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查方法ID
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/* 检查类型 */
|
||||||
|
private String checkType;
|
||||||
|
|
||||||
|
/* 方法代码 */
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/* 方法名称 */
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/* 套餐名称 */
|
||||||
|
private String packageName;
|
||||||
|
|
||||||
|
/* 曝光次数 */
|
||||||
|
private Integer exposureNum;
|
||||||
|
|
||||||
|
/* 序号 */
|
||||||
|
private Integer orderNum;
|
||||||
|
|
||||||
|
/* 备注 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.openhis.web.check.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查套餐明细DTO
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2025-11-26
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class CheckPackageDetailDto {
|
||||||
|
|
||||||
|
/** 套餐明细ID */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 套餐ID */
|
||||||
|
private Long packageId;
|
||||||
|
|
||||||
|
/** 项目编号 */
|
||||||
|
private String itemCode;
|
||||||
|
|
||||||
|
/** 项目名称/规格 */
|
||||||
|
@NotBlank(message = "项目名称不能为空")
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
/** 检查项目ID(诊疗项目ID) */
|
||||||
|
private Long checkItemId;
|
||||||
|
|
||||||
|
/** 剂量 */
|
||||||
|
private String dose;
|
||||||
|
|
||||||
|
/** 途径 */
|
||||||
|
private String method;
|
||||||
|
|
||||||
|
/** 频次 */
|
||||||
|
private String frequency;
|
||||||
|
|
||||||
|
/** 天数 */
|
||||||
|
private String days;
|
||||||
|
|
||||||
|
/** 数量 */
|
||||||
|
@NotNull(message = "数量不能为空")
|
||||||
|
private Integer quantity;
|
||||||
|
|
||||||
|
/** 单价 */
|
||||||
|
@NotNull(message = "单价不能为空")
|
||||||
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
|
/** 金额 */
|
||||||
|
private BigDecimal amount;
|
||||||
|
|
||||||
|
/** 服务费 */
|
||||||
|
private BigDecimal serviceCharge;
|
||||||
|
|
||||||
|
/** 总金额 */
|
||||||
|
private BigDecimal total;
|
||||||
|
|
||||||
|
/** 产地 */
|
||||||
|
private String origin;
|
||||||
|
|
||||||
|
/** 序号 */
|
||||||
|
private Integer orderNum;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
package com.openhis.web.check.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查套餐DTO
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2025-11-26
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class CheckPackageDto {
|
||||||
|
|
||||||
|
/** 检查套餐ID */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 套餐名称 */
|
||||||
|
@NotBlank(message = "套餐名称不能为空")
|
||||||
|
private String packageName;
|
||||||
|
|
||||||
|
/** 套餐编码 */
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/** 套餐类别 */
|
||||||
|
@NotBlank(message = "套餐类别不能为空")
|
||||||
|
private String packageType;
|
||||||
|
|
||||||
|
/** 套餐级别 */
|
||||||
|
@NotBlank(message = "套餐级别不能为空")
|
||||||
|
private String packageLevel;
|
||||||
|
|
||||||
|
/** 适用科室 */
|
||||||
|
private String department;
|
||||||
|
|
||||||
|
/** 适用用户 */
|
||||||
|
private String user;
|
||||||
|
|
||||||
|
/** 卫生机构 */
|
||||||
|
private String organization;
|
||||||
|
|
||||||
|
/** 套餐金额 */
|
||||||
|
private BigDecimal packagePrice;
|
||||||
|
|
||||||
|
/** 折扣 */
|
||||||
|
private BigDecimal discount;
|
||||||
|
|
||||||
|
/** 制单人 */
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/** 是否停用 */
|
||||||
|
private Integer isDisabled;
|
||||||
|
|
||||||
|
/** 显示套餐名 */
|
||||||
|
private Integer showPackageName;
|
||||||
|
|
||||||
|
/** 生成服务费 */
|
||||||
|
private Integer generateServiceFee;
|
||||||
|
|
||||||
|
/** 套餐价格启用状态 */
|
||||||
|
private Integer packagePriceEnabled;
|
||||||
|
|
||||||
|
/** 服务费 */
|
||||||
|
private BigDecimal serviceFee;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/** 描述 */
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/** 套餐维护日期 */
|
||||||
|
private LocalDate createDate;
|
||||||
|
|
||||||
|
/** 套餐明细列表 */
|
||||||
|
@NotNull(message = "套餐明细不能为空")
|
||||||
|
private List<CheckPackageDetailDto> items;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package com.openhis.web.check.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class CheckPartDto {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package com.openhis.web.check.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface CheckMethodAppMapper{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.openhis.web.check.mapper;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface CheckPartAppMapper {
|
||||||
|
}
|
||||||
@@ -29,7 +29,7 @@ public interface ICommonService {
|
|||||||
/**
|
/**
|
||||||
* 药房列表(库房用)
|
* 药房列表(库房用)
|
||||||
*
|
*
|
||||||
* @return 药房列表
|
* @return 药房列表1
|
||||||
*/
|
*/
|
||||||
List<LocationDto> getInventoryPharmacyList();
|
List<LocationDto> getInventoryPharmacyList();
|
||||||
|
|
||||||
@@ -166,26 +166,4 @@ 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();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,13 +21,11 @@ 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;
|
||||||
@@ -66,14 +64,11 @@ public class CommonServiceImpl implements ICommonService {
|
|||||||
private IOrganizationService organizationService;
|
private IOrganizationService organizationService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IInventoryItemService inventoryItemService;
|
private IInventoryItemService iInventoryItemService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ContractMapper contractMapper;
|
private ContractMapper contractMapper;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ISupplierService supplierService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取药房列表
|
* 获取药房列表
|
||||||
*
|
*
|
||||||
@@ -283,10 +278,11 @@ public class CommonServiceImpl implements ICommonService {
|
|||||||
|
|
||||||
// 医保编码和生产厂家校验
|
// 医保编码和生产厂家校验
|
||||||
for (LocationInventoryDto dto : locationInventoryDtoList) {
|
for (LocationInventoryDto dto : locationInventoryDtoList) {
|
||||||
if (StringUtils.isNotEmpty(dto.getYbNo()) && StringUtils.isEmpty(dto.getManufacturerText())) {
|
if (StringUtils.isNotEmpty(dto.getYbNo()) && StringUtils.isEmpty(dto.getManufacturer())) {
|
||||||
return R.fail("生产厂家不能为空,请到药品目录维护");
|
return R.fail("生产厂家不能为空,请到药品目录维护");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return R.ok(locationInventoryDtoList);
|
return R.ok(locationInventoryDtoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -322,7 +318,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 = inventoryItemService.getOne(
|
InventoryItem inventoryItem = iInventoryItemService.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();
|
||||||
@@ -495,37 +491,4 @@ 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,6 +7,8 @@ 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;
|
||||||
@@ -89,7 +91,7 @@ public class CommonAppController {
|
|||||||
/**
|
/**
|
||||||
* 病区列表
|
* 病区列表
|
||||||
*
|
*
|
||||||
* @return 病区列表
|
* @return 病区列表
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/ward-list")
|
@GetMapping(value = "/ward-list")
|
||||||
public R<?> getWardList(@RequestParam(value = "orgId", required = false) Long orgId) {
|
public R<?> getWardList(@RequestParam(value = "orgId", required = false) Long orgId) {
|
||||||
@@ -103,7 +105,7 @@ public class CommonAppController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping(value = "/department-list")
|
@GetMapping(value = "/department-list")
|
||||||
public R<?> getDepartmentList() {
|
public R<?> getDepartmentList() {
|
||||||
return commonService.getDepartmentList();
|
return commonService.getDepartmentList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -219,38 +221,7 @@ 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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 manufacturerText;
|
private String manufacturer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目对应表名
|
* 项目对应表名
|
||||||
|
|||||||
@@ -75,6 +75,6 @@ public class LocationInventoryDto {
|
|||||||
private String ybNo;
|
private String ybNo;
|
||||||
|
|
||||||
/** 生产厂家 */
|
/** 生产厂家 */
|
||||||
private String manufacturerText;
|
private String manufacturer;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,13 +26,24 @@ 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;
|
||||||
@@ -40,4 +51,10 @@ 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,20 +88,4 @@ 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);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
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,12 +95,4 @@ public interface IDeviceManageAppService {
|
|||||||
* @param response 响应
|
* @param response 响应
|
||||||
*/
|
*/
|
||||||
void importTemplate(HttpServletResponse response);
|
void importTemplate(HttpServletResponse response);
|
||||||
|
|
||||||
/**
|
|
||||||
* 校验耗材是否可以编辑
|
|
||||||
*
|
|
||||||
* @param deviceId 耗材ID
|
|
||||||
* @return 校验结果
|
|
||||||
*/
|
|
||||||
R<?> validateDeviceEdit(Long deviceId);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,12 +92,4 @@ public interface IDiagTreatMAppService {
|
|||||||
* @param response 响应
|
* @param response 响应
|
||||||
*/
|
*/
|
||||||
void importTemplate(HttpServletResponse response);
|
void importTemplate(HttpServletResponse response);
|
||||||
|
|
||||||
/**
|
|
||||||
* 校验诊疗项目是否可以编辑
|
|
||||||
*
|
|
||||||
* @param activityId 诊疗ID
|
|
||||||
* @return 校验结果
|
|
||||||
*/
|
|
||||||
R<?> validateActivityEdit(Long activityId);
|
|
||||||
}
|
}
|
||||||
@@ -97,12 +97,4 @@ public interface IMedicationManageAppService {
|
|||||||
* @param response 响应
|
* @param response 响应
|
||||||
*/
|
*/
|
||||||
void importTemplate(HttpServletResponse response);
|
void importTemplate(HttpServletResponse response);
|
||||||
|
|
||||||
/**
|
|
||||||
* 校验药品是否可以编辑
|
|
||||||
*
|
|
||||||
* @param medicationId 药品ID
|
|
||||||
* @return 校验结果
|
|
||||||
*/
|
|
||||||
R<?> validateMedicationEdit(Long medicationId);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ 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;
|
||||||
@@ -49,8 +50,6 @@ 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;
|
||||||
|
|
||||||
@@ -63,41 +62,38 @@ import com.openhis.yb.service.YbManager;
|
|||||||
@Service
|
@Service
|
||||||
public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private ISupplyRequestService supplyRequestService;
|
private ISupplyRequestService supplyRequestService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IDeviceDefinitionService deviceDefinitionService;
|
private IDeviceDefinitionService deviceDefinitionService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IChargeItemDefinitionService chargeItemDefinitionService;
|
private IChargeItemDefinitionService chargeItemDefinitionService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private ILocationService locationService;
|
private ILocationService locationService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private DeviceManageMapper deviceManageMapper;
|
private DeviceManageMapper deviceManageMapper;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private ISysDictTypeService sysDictTypeService;
|
private ISysDictTypeService sysDictTypeService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IItemDefinitionService itemDefinitionServic;
|
private IItemDefinitionService itemDefinitionServic;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private ISupplierService supplierService;
|
private ISupplierService supplierService;
|
||||||
|
|
||||||
@Resource
|
@Autowired(required = false)
|
||||||
private AssignSeqUtil assignSeqUtil;
|
private AssignSeqUtil assignSeqUtil;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private YbManager ybService;
|
private YbManager ybService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IOperationRecordService operationRecordService;
|
private IOperationRecordService iOperationRecordService;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private IDeviceRequestService deviceRequestService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 器材目录初始化
|
* 器材目录初始化
|
||||||
@@ -203,6 +199,11 @@ 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);
|
||||||
// 拼音码
|
// 拼音码
|
||||||
@@ -229,7 +230,7 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
.setInstanceId(deviceDefinition.getId()).setPrice(deviceManageDto.getRetailPrice())
|
.setInstanceId(deviceDefinition.getId()).setPrice(deviceManageDto.getRetailPrice())
|
||||||
.setChargeName(deviceManageDto.getName());;
|
.setChargeName(deviceManageDto.getName());;
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
operationRecordService.addEntityOperationRecord(DbOpType.UPDATE.getCode(),
|
iOperationRecordService.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);
|
||||||
@@ -260,10 +261,12 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -275,7 +278,9 @@ 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();
|
||||||
@@ -284,7 +289,7 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
DeviceDefinitionList.add(deviceDefinition);
|
DeviceDefinitionList.add(deviceDefinition);
|
||||||
}
|
}
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
operationRecordService.addIdsOperationRecord(DbOpType.STOP.getCode(),
|
iOperationRecordService.addIdsOperationRecord(DbOpType.STOP.getCode(),
|
||||||
CommonConstants.TableName.ADM_DEVICE_DEFINITION, ids);
|
CommonConstants.TableName.ADM_DEVICE_DEFINITION, ids);
|
||||||
|
|
||||||
// 更新器材信息
|
// 更新器材信息
|
||||||
@@ -301,7 +306,9 @@ 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();
|
||||||
@@ -310,7 +317,7 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
DeviceDefinitionList.add(DeviceDefinition);
|
DeviceDefinitionList.add(DeviceDefinition);
|
||||||
}
|
}
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
operationRecordService.addIdsOperationRecord(DbOpType.START.getCode(),
|
iOperationRecordService.addIdsOperationRecord(DbOpType.START.getCode(),
|
||||||
CommonConstants.TableName.ADM_DEVICE_DEFINITION, ids);
|
CommonConstants.TableName.ADM_DEVICE_DEFINITION, ids);
|
||||||
|
|
||||||
// 更新器材信息
|
// 更新器材信息
|
||||||
@@ -326,8 +333,10 @@ 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);
|
||||||
@@ -335,8 +344,10 @@ 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); // 医保开关
|
||||||
@@ -348,7 +359,7 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
operationRecordService.addEntityOperationRecord(DbOpType.INSERT.getCode(),
|
iOperationRecordService.addEntityOperationRecord(DbOpType.INSERT.getCode(),
|
||||||
CommonConstants.TableName.ADM_DEVICE_DEFINITION, deviceDefinition);
|
CommonConstants.TableName.ADM_DEVICE_DEFINITION, deviceDefinition);
|
||||||
|
|
||||||
ItemUpFromDirectoryDto itemUpFromDirectoryDto = new ItemUpFromDirectoryDto();
|
ItemUpFromDirectoryDto itemUpFromDirectoryDto = new ItemUpFromDirectoryDto();
|
||||||
@@ -363,6 +374,7 @@ 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));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -418,30 +430,6 @@ 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,6 +13,7 @@ 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;
|
||||||
|
|
||||||
@@ -37,14 +38,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.domain.ServiceRequest;
|
import com.openhis.workflow.mapper.ActivityDefinitionMapper;
|
||||||
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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -56,26 +57,34 @@ import com.openhis.yb.service.YbManager;
|
|||||||
@Service
|
@Service
|
||||||
public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IActivityDefinitionService activityDefinitionService;
|
private IActivityDefinitionService activityDefinitionService;
|
||||||
@Resource
|
@Autowired
|
||||||
private IChargeItemDefinitionService chargeItemDefinitionService;
|
private IChargeItemDefinitionService chargeItemDefinitionService;
|
||||||
@Resource
|
@Autowired
|
||||||
private IOrganizationService organizationService;
|
private ActivityDefinitionMapper activityDefinitionMapper;
|
||||||
|
@Autowired
|
||||||
|
private IOrganizationService iOrganizationService;
|
||||||
|
@Autowired
|
||||||
|
private ISysDictTypeService iSysDictTypeService;
|
||||||
@Resource
|
@Resource
|
||||||
private ActivityDefinitionManageMapper activityDefinitionManageMapper;
|
private ActivityDefinitionManageMapper activityDefinitionManageMapper;
|
||||||
@Resource
|
@Autowired
|
||||||
private IItemDefinitionService itemDefinitionService;
|
private IItemDefinitionService itemDefinitionServic;
|
||||||
@Resource
|
@Autowired
|
||||||
private ISysDictTypeService sysDictTypeService;
|
private ISysDictTypeService sysDictTypeService;
|
||||||
@Resource
|
|
||||||
private AssignSeqUtil assignSeqUtil;
|
@Autowired
|
||||||
@Resource
|
private ICommonService commonService;
|
||||||
private YbManager ybService;
|
|
||||||
@Resource
|
@Autowired(required = false)
|
||||||
private IOperationRecordService operationRecordService;
|
AssignSeqUtil assignSeqUtil;
|
||||||
@Resource
|
|
||||||
private IServiceRequestService serviceRequestService;
|
@Autowired
|
||||||
|
YbManager ybService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
IOperationRecordService iOperationRecordService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 诊疗目录初期查询
|
* 诊疗目录初期查询
|
||||||
@@ -93,7 +102,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 = organizationService.list(queryWrapper);
|
List<Organization> organizations = iOrganizationService.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());
|
||||||
@@ -250,16 +259,16 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
|||||||
.setInstanceId(diagnosisTreatmentUpDto.getId()).setPrice(diagnosisTreatmentUpDto.getRetailPrice())
|
.setInstanceId(diagnosisTreatmentUpDto.getId()).setPrice(diagnosisTreatmentUpDto.getRetailPrice())
|
||||||
.setChargeName(diagnosisTreatmentUpDto.getName());
|
.setChargeName(diagnosisTreatmentUpDto.getName());
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
operationRecordService.addEntityOperationRecord(DbOpType.UPDATE.getCode(),
|
iOperationRecordService.addEntityOperationRecord(DbOpType.UPDATE.getCode(),
|
||||||
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, activityDefinition);
|
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, activityDefinition);
|
||||||
|
|
||||||
// 更新价格表
|
// 更新价格表
|
||||||
boolean upItemDef = itemDefinitionService.updateItem(chargeItemDefinition);
|
boolean upItemDef = itemDefinitionServic.updateItem(chargeItemDefinition);
|
||||||
// 更新子表,修改零售价,条件:单位
|
// 更新子表,修改零售价,条件:单位
|
||||||
boolean upItemDetail1 = itemDefinitionService.updateItemDetail(chargeItemDefinition,
|
boolean upItemDetail1 = itemDefinitionServic.updateItemDetail(chargeItemDefinition,
|
||||||
diagnosisTreatmentUpDto.getRetailPrice(), ConditionCode.UNIT.getCode());
|
diagnosisTreatmentUpDto.getRetailPrice(), ConditionCode.UNIT.getCode());
|
||||||
// 更新子表,修改最高零售价,条件:限制
|
// 更新子表,修改最高零售价,条件:限制
|
||||||
boolean upItemDetail2 = itemDefinitionService.updateItemDetail(chargeItemDefinition,
|
boolean upItemDetail2 = itemDefinitionServic.updateItemDetail(chargeItemDefinition,
|
||||||
diagnosisTreatmentUpDto.getMaximumRetailPrice(), ConditionCode.LIMIT.getCode());
|
diagnosisTreatmentUpDto.getMaximumRetailPrice(), ConditionCode.LIMIT.getCode());
|
||||||
|
|
||||||
// 更新价格表
|
// 更新价格表
|
||||||
@@ -290,7 +299,7 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
|||||||
ActivityDefinitionList.add(ActivityDefinition);
|
ActivityDefinitionList.add(ActivityDefinition);
|
||||||
}
|
}
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
operationRecordService.addIdsOperationRecord(DbOpType.STOP.getCode(),
|
iOperationRecordService.addIdsOperationRecord(DbOpType.STOP.getCode(),
|
||||||
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, ids);
|
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, ids);
|
||||||
// 更新诊疗信息
|
// 更新诊疗信息
|
||||||
return activityDefinitionService.updateBatchById(ActivityDefinitionList)
|
return activityDefinitionService.updateBatchById(ActivityDefinitionList)
|
||||||
@@ -318,7 +327,7 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
|||||||
ActivityDefinitionList.add(ActivityDefinition);
|
ActivityDefinitionList.add(ActivityDefinition);
|
||||||
}
|
}
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
operationRecordService.addIdsOperationRecord(DbOpType.START.getCode(),
|
iOperationRecordService.addIdsOperationRecord(DbOpType.START.getCode(),
|
||||||
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, ids);
|
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, ids);
|
||||||
// 更新诊疗信息
|
// 更新诊疗信息
|
||||||
return activityDefinitionService.updateBatchById(ActivityDefinitionList)
|
return activityDefinitionService.updateBatchById(ActivityDefinitionList)
|
||||||
@@ -365,7 +374,7 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
operationRecordService.addEntityOperationRecord(DbOpType.INSERT.getCode(),
|
iOperationRecordService.addEntityOperationRecord(DbOpType.INSERT.getCode(),
|
||||||
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, activityDefinition);
|
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, activityDefinition);
|
||||||
|
|
||||||
ItemUpFromDirectoryDto itemUpFromDirectoryDto = new ItemUpFromDirectoryDto();
|
ItemUpFromDirectoryDto itemUpFromDirectoryDto = new ItemUpFromDirectoryDto();
|
||||||
@@ -377,7 +386,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 itemDefinitionService.addItem(itemUpFromDirectoryDto)
|
return itemDefinitionServic.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));
|
||||||
|
|
||||||
@@ -433,25 +442,6 @@ 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();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入信息校验
|
* 导入信息校验
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,118 +0,0 @@
|
|||||||
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,8 +4,7 @@ import java.math.BigDecimal;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
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;
|
||||||
@@ -13,6 +12,7 @@ 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,14 +30,15 @@ import com.openhis.web.datadictionary.dto.ItemUpFromDirectoryDto;
|
|||||||
@Service
|
@Service
|
||||||
public class ItemDefinitionServiceImpl implements IItemDefinitionService {
|
public class ItemDefinitionServiceImpl implements IItemDefinitionService {
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IChargeItemDefinitionService chargeItemDefinitionService;
|
IChargeItemDefinitionService chargeItemDefinitionService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IChargeItemDefDetailService chargeItemDefDetailService;
|
IChargeItemDefDetailService chargeItemDefDetailService;
|
||||||
|
@Autowired
|
||||||
@Resource
|
ChargeItemDefinitionMapper chargeItemDefinitionMapper;
|
||||||
private ChargeItemDefinitionMapper chargeItemDefinitionMapper;
|
@Autowired
|
||||||
|
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,9 +44,8 @@ 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.IMedicationRequestService;
|
import com.openhis.medication.service.IMedicationDispenseService;
|
||||||
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;
|
||||||
@@ -65,44 +64,43 @@ import com.openhis.yb.service.YbManager;
|
|||||||
@Service
|
@Service
|
||||||
public class MedicationManageAppServiceImpl implements IMedicationManageAppService {
|
public class MedicationManageAppServiceImpl implements IMedicationManageAppService {
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IMedicationService medicationService;
|
private IMedicationService medicationService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IMedicationDefinitionService medicationDefinitionService;
|
private IMedicationDefinitionService medicationDefinitionService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IChargeItemDefinitionService chargeItemDefinitionService;
|
private IChargeItemDefinitionService chargeItemDefinitionService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private ILocationService locationService;
|
private ILocationService locationService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private MedicationManageSearchMapper medicationManageSearchMapper;
|
private MedicationManageSearchMapper medicationManageSearchMapper;
|
||||||
|
@Autowired
|
||||||
@Resource
|
|
||||||
private ISupplierService supplierService;
|
private ISupplierService supplierService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private ISysDictTypeService sysDictTypeService;
|
private ISysDictTypeService sysDictTypeService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IItemDefinitionService itemDefinitionServic;
|
private IItemDefinitionService itemDefinitionServic;
|
||||||
|
|
||||||
@Resource
|
@Autowired(required = false)
|
||||||
private AssignSeqUtil assignSeqUtil;
|
private AssignSeqUtil assignSeqUtil;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private YbManager ybService;
|
private YbManager ybService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IOperationRecordService operationRecordService;
|
private IOperationRecordService iOperationRecordService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private ISupplyRequestService supplyRequestService;
|
private ISupplyRequestService supplyRequestService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IMedicationRequestService medicationRequestService;
|
private IMedicationDispenseService medicationDispenseService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药品目录初始化
|
* 药品目录初始化
|
||||||
@@ -249,6 +247,11 @@ 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层定义构造方法的入参
|
||||||
|
|
||||||
@@ -291,7 +294,7 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
operationRecordService.addEntityOperationRecord(DbOpType.UPDATE.getCode(),
|
iOperationRecordService.addEntityOperationRecord(DbOpType.UPDATE.getCode(),
|
||||||
CommonConstants.TableName.MED_MEDICATION_DEFINITION, medication);
|
CommonConstants.TableName.MED_MEDICATION_DEFINITION, medication);
|
||||||
// Todo:封装一个价格初始话的方法给app层调用
|
// Todo:封装一个价格初始话的方法给app层调用
|
||||||
// 更新价格表
|
// 更新价格表
|
||||||
@@ -352,7 +355,7 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
|||||||
|
|
||||||
// TODO:别用三元,日志在业务代码以后记录
|
// TODO:别用三元,日志在业务代码以后记录
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
operationRecordService.addIdsOperationRecord(DbOpType.STOP.getCode(),
|
iOperationRecordService.addIdsOperationRecord(DbOpType.STOP.getCode(),
|
||||||
CommonConstants.TableName.MED_MEDICATION_DEFINITION, ids);
|
CommonConstants.TableName.MED_MEDICATION_DEFINITION, ids);
|
||||||
// 更新药品信息
|
// 更新药品信息
|
||||||
return medicationService.updateBatchById(medicationList)
|
return medicationService.updateBatchById(medicationList)
|
||||||
@@ -378,7 +381,7 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
|||||||
medicationList.add(medication);
|
medicationList.add(medication);
|
||||||
}
|
}
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
operationRecordService.addIdsOperationRecord(DbOpType.START.getCode(),
|
iOperationRecordService.addIdsOperationRecord(DbOpType.START.getCode(),
|
||||||
CommonConstants.TableName.MED_MEDICATION_DEFINITION, ids);
|
CommonConstants.TableName.MED_MEDICATION_DEFINITION, ids);
|
||||||
// 更新药品信息
|
// 更新药品信息
|
||||||
return medicationService.updateBatchById(medicationList)
|
return medicationService.updateBatchById(medicationList)
|
||||||
@@ -421,7 +424,7 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 插入操作记录
|
// 插入操作记录
|
||||||
operationRecordService.addEntityOperationRecord(DbOpType.INSERT.getCode(),
|
iOperationRecordService.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);
|
||||||
@@ -512,31 +515,6 @@ 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();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入信息校验
|
* 导入信息校验
|
||||||
*
|
*
|
||||||
@@ -564,9 +542,6 @@ 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("药品单位必填");
|
||||||
}
|
}
|
||||||
@@ -732,7 +707,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<>();
|
||||||
@@ -796,8 +771,7 @@ 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(importDto.getPharmacologyCategoryCode())
|
.setPharmacologyCategoryCode("1").setSkinTestFlag(CommonUtil.tryParseInt(importDto.getSkinTestFlag()))
|
||||||
.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,16 +2,17 @@ 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;
|
||||||
|
|
||||||
@@ -30,7 +31,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class DeviceManageController {
|
public class DeviceManageController {
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IDeviceManageAppService deviceManageAppService;
|
private IDeviceManageAppService deviceManageAppService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -68,6 +69,7 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,6 +81,7 @@ 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);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -116,6 +119,28 @@ 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;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入器材目录
|
* 导入器材目录
|
||||||
*
|
*
|
||||||
@@ -136,15 +161,4 @@ 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,16 +2,17 @@ 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;
|
||||||
|
|
||||||
@@ -30,7 +31,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class DiagnosisTreatmentController {
|
public class DiagnosisTreatmentController {
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IDiagTreatMAppService diagTreatMAppService;
|
private IDiagTreatMAppService diagTreatMAppService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -106,7 +107,7 @@ public class DiagnosisTreatmentController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增诊疗目录
|
* 新增外来诊疗目录
|
||||||
*
|
*
|
||||||
* @param diagnosisTreatmentUpDto 诊疗目录
|
* @param diagnosisTreatmentUpDto 诊疗目录
|
||||||
* @return
|
* @return
|
||||||
@@ -116,6 +117,28 @@ 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;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入诊疗目录
|
* 导入诊疗目录
|
||||||
*
|
*
|
||||||
@@ -136,15 +159,4 @@ 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,72 +0,0 @@
|
|||||||
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 {
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IMedicationManageAppService medicationManageAppService;
|
private IMedicationManageAppService medicationManageAppService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -117,6 +117,17 @@ 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;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药品目录导出
|
* 药品目录导出
|
||||||
*
|
*
|
||||||
@@ -155,15 +166,4 @@ 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 Thanking
|
* @author GuoRui
|
||||||
* @date 2025-09-24
|
* @date 2025-09-24
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import lombok.experimental.Accessors;
|
|||||||
/**
|
/**
|
||||||
* 诊疗目录导入Dto
|
* 诊疗目录导入Dto
|
||||||
*
|
*
|
||||||
* @author Thanking
|
* @author GuoRui
|
||||||
* @date 2025-09-29
|
* @date 2025-09-29
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|||||||
@@ -19,6 +19,4 @@ public class DiseaseManageSelParam {
|
|||||||
private Integer sourceEnum;
|
private Integer sourceEnum;
|
||||||
/** 状态 */
|
/** 状态 */
|
||||||
private Integer statusEnum;
|
private Integer statusEnum;
|
||||||
/** 类型 */
|
|
||||||
private String typeCode;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
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 Thanking
|
* @author GuoRui
|
||||||
* @date 2025-08-18
|
* @date 2025-08-18
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@@ -42,10 +42,6 @@ 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,9 +289,4 @@ public class MedicationManageDto {
|
|||||||
/** 处方标志 */
|
/** 处方标志 */
|
||||||
private Integer rxFlag;
|
private Integer rxFlag;
|
||||||
|
|
||||||
/**
|
|
||||||
* 用药说明
|
|
||||||
*/
|
|
||||||
private String dosageInstruction;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -258,9 +258,4 @@ public class MedicationManageUpDto {
|
|||||||
/** 处方标志 */
|
/** 处方标志 */
|
||||||
private Integer rxFlag;
|
private Integer rxFlag;
|
||||||
|
|
||||||
/**
|
|
||||||
* 用药说明
|
|
||||||
*/
|
|
||||||
private String dosageInstruction;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
package com.openhis.web.datadictionary.mapper;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
@Repository
|
|
||||||
public interface ICDCodeMapper {
|
|
||||||
}
|
|
||||||
@@ -2,16 +2,25 @@ package com.openhis.web.departmentmanage.appservice.impl;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import com.openhis.web.departmentmanage.mapper.DepartmentIssuanceOrderMapper;
|
||||||
|
import com.openhis.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto;
|
||||||
|
import com.openhis.web.pharmacyDispensarymanage.dto.PharmacyDispensaryInitDto;
|
||||||
|
import com.openhis.web.pharmacyDispensarymanage.mapper.PharmacyDispensaryDispensingOrderMapper;
|
||||||
|
import com.openhis.workflow.domain.SupplyDelivery;
|
||||||
|
import com.openhis.workflow.service.ISupplyDeliveryService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
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.AssignSeqUtil;
|
||||||
|
import com.core.common.utils.MessageUtils;
|
||||||
import com.openhis.common.constant.CommonConstants;
|
import com.openhis.common.constant.CommonConstants;
|
||||||
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
import com.openhis.common.enums.*;
|
import com.openhis.common.enums.*;
|
||||||
import com.openhis.common.utils.EnumUtils;
|
import com.openhis.common.utils.EnumUtils;
|
||||||
import com.openhis.web.departmentmanage.appservice.IDepartmentCommonService;
|
import com.openhis.web.departmentmanage.appservice.IDepartmentCommonService;
|
||||||
@@ -19,10 +28,8 @@ import com.openhis.web.departmentmanage.appservice.IDepartmentIssuanceOrderServi
|
|||||||
import com.openhis.web.departmentmanage.dto.DepartmentDetailDto;
|
import com.openhis.web.departmentmanage.dto.DepartmentDetailDto;
|
||||||
import com.openhis.web.departmentmanage.dto.DepartmentInitDto;
|
import com.openhis.web.departmentmanage.dto.DepartmentInitDto;
|
||||||
import com.openhis.web.departmentmanage.mapper.DepartmentCommonMapper;
|
import com.openhis.web.departmentmanage.mapper.DepartmentCommonMapper;
|
||||||
import com.openhis.web.departmentmanage.mapper.DepartmentIssuanceOrderMapper;
|
import com.openhis.web.inventorymanage.dto.ProductStocktakingInitDto;
|
||||||
import com.openhis.workflow.domain.SupplyDelivery;
|
|
||||||
import com.openhis.workflow.domain.SupplyRequest;
|
import com.openhis.workflow.domain.SupplyRequest;
|
||||||
import com.openhis.workflow.service.ISupplyDeliveryService;
|
|
||||||
import com.openhis.workflow.service.ISupplyRequestService;
|
import com.openhis.workflow.service.ISupplyRequestService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -48,7 +55,6 @@ public class DepartmentIssuanceOrderServiceImpl implements IDepartmentIssuanceOr
|
|||||||
private DepartmentCommonMapper departmentCommonMapper;
|
private DepartmentCommonMapper departmentCommonMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private DepartmentIssuanceOrderMapper departmentIssuanceOrderMapper;
|
private DepartmentIssuanceOrderMapper departmentIssuanceOrderMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化
|
* 初始化
|
||||||
*
|
*
|
||||||
@@ -61,15 +67,15 @@ public class DepartmentIssuanceOrderServiceImpl implements IDepartmentIssuanceOr
|
|||||||
|
|
||||||
// 单据分类
|
// 单据分类
|
||||||
List<DepartmentInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
|
List<DepartmentInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
|
||||||
// supplyCategoryOption
|
supplyCategoryOption
|
||||||
// .add(new DepartmentInitDto.IntegerOption(SupplyCategory.OUTPATIENT_PATIENT_DISPENSING.getValue(),
|
.add(new DepartmentInitDto.IntegerOption(SupplyCategory.OUTPATIENT_PATIENT_DISPENSING.getValue(),
|
||||||
// SupplyCategory.OUTPATIENT_PATIENT_DISPENSING.getInfo()));
|
SupplyCategory.OUTPATIENT_PATIENT_DISPENSING.getInfo()));
|
||||||
// supplyCategoryOption
|
supplyCategoryOption
|
||||||
// .add(new DepartmentInitDto.IntegerOption(SupplyCategory.INPATIENT_PATIENT_DISPENSING.getValue(),
|
.add(new DepartmentInitDto.IntegerOption(SupplyCategory.INPATIENT_PATIENT_DISPENSING.getValue(),
|
||||||
// SupplyCategory.INPATIENT_PATIENT_DISPENSING.getInfo()));
|
SupplyCategory.INPATIENT_PATIENT_DISPENSING.getInfo()));
|
||||||
// supplyCategoryOption.add(
|
supplyCategoryOption.add(
|
||||||
// new DepartmentInitDto.IntegerOption(SupplyCategory.INPATIENT_PATIENT_SUMMARY_DISPENSING.getValue(),
|
new DepartmentInitDto.IntegerOption(SupplyCategory.INPATIENT_PATIENT_SUMMARY_DISPENSING.getValue(),
|
||||||
// SupplyCategory.INPATIENT_PATIENT_SUMMARY_DISPENSING.getInfo()));
|
SupplyCategory.INPATIENT_PATIENT_SUMMARY_DISPENSING.getInfo()));
|
||||||
|
|
||||||
issuanceOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);
|
issuanceOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);
|
||||||
|
|
||||||
@@ -137,8 +143,9 @@ public class DepartmentIssuanceOrderServiceImpl implements IDepartmentIssuanceOr
|
|||||||
.setStatusEnum(SupplyStatus.AGREE.getValue()).setCategoryEnum(item.getCategoryEnum())
|
.setStatusEnum(SupplyStatus.AGREE.getValue()).setCategoryEnum(item.getCategoryEnum())
|
||||||
.setItemTable(CommonConstants.TableName.ADM_DEVICE_DEFINITION).setItemId(item.getItemId())
|
.setItemTable(CommonConstants.TableName.ADM_DEVICE_DEFINITION).setItemId(item.getItemId())
|
||||||
.setUnitCode(item.getUnitCode()).setItemQuantity(item.getItemQuantity())
|
.setUnitCode(item.getUnitCode()).setItemQuantity(item.getItemQuantity())
|
||||||
.setLotNumber(item.getLotNumber()).setSourceTypeEnum(LocationForm.CABINET.getValue())
|
.setLotNumber(item.getLotNumber())
|
||||||
.setSourceLocationId(item.getSourceLocationId()).setPurposeTypeEnum(LocationForm.DEPARTMENT.getValue())
|
.setSourceTypeEnum(LocationForm.CABINET.getValue()).setSourceLocationId(item.getSourceLocationId())
|
||||||
|
.setPurposeTypeEnum(LocationForm.DEPARTMENT.getValue())
|
||||||
.setPurposeLocationId(item.getPurposeLocationId()).setApplicantId(item.getApplicantId())
|
.setPurposeLocationId(item.getPurposeLocationId()).setApplicantId(item.getApplicantId())
|
||||||
.setApplyTime(item.getApplyTime()).setApproverId(item.getApproverId())
|
.setApplyTime(item.getApplyTime()).setApproverId(item.getApproverId())
|
||||||
.setApprovalTime(item.getApprovalTime());
|
.setApprovalTime(item.getApprovalTime());
|
||||||
@@ -149,9 +156,9 @@ public class DepartmentIssuanceOrderServiceImpl implements IDepartmentIssuanceOr
|
|||||||
.setItemTable(supplyRequest.getItemTable()).setItemId(supplyRequest.getItemId())
|
.setItemTable(supplyRequest.getItemTable()).setItemId(supplyRequest.getItemId())
|
||||||
.setBasedOnTable(CommonConstants.TableName.WOR_DEVICE_DISPENSE).setBasedOnIds(item.getDispenseIds())
|
.setBasedOnTable(CommonConstants.TableName.WOR_DEVICE_DISPENSE).setBasedOnIds(item.getDispenseIds())
|
||||||
.setUnitCode(supplyRequest.getUnitCode()).setQuantity(supplyRequest.getItemQuantity())
|
.setUnitCode(supplyRequest.getUnitCode()).setQuantity(supplyRequest.getItemQuantity())
|
||||||
.setLotNumber(supplyRequest.getLotNumber()).setPractitionerId(supplyRequest.getApplicantId())
|
.setLotNumber(supplyRequest.getLotNumber())
|
||||||
.setOccurrenceTime(supplyRequest.getApprovalTime()).setReceiverId(supplyRequest.getPurposeLocationId())
|
.setPractitionerId(supplyRequest.getApplicantId()).setOccurrenceTime(supplyRequest.getApprovalTime())
|
||||||
.setReceiveTime(supplyRequest.getApprovalTime());
|
.setReceiverId(supplyRequest.getPurposeLocationId()).setReceiveTime(supplyRequest.getApprovalTime());
|
||||||
|
|
||||||
supplyDeliveryList.add(supplyDelivery);
|
supplyDeliveryList.add(supplyDelivery);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,16 +59,16 @@ public class DepartmentProfitLossOrderServiceImpl implements IDepartmentProfitLo
|
|||||||
|
|
||||||
// 单据分类
|
// 单据分类
|
||||||
List<DepartmentInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
|
List<DepartmentInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
|
||||||
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.GENERAL_PROFIT_AND_LOSS.getValue(),
|
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.GENERAL_PROFIT_AND_LOSS.getValue(),
|
||||||
// SupplyCategory.GENERAL_PROFIT_AND_LOSS.getInfo()));
|
SupplyCategory.GENERAL_PROFIT_AND_LOSS.getInfo()));
|
||||||
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.STOCKTAKING_PROFIT_AND_LOSS.getValue(),
|
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.STOCKTAKING_PROFIT_AND_LOSS.getValue(),
|
||||||
// SupplyCategory.STOCKTAKING_PROFIT_AND_LOSS.getInfo()));
|
SupplyCategory.STOCKTAKING_PROFIT_AND_LOSS.getInfo()));
|
||||||
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.STANDBY_RESCUE_MEDICINES.getValue(),
|
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.STANDBY_RESCUE_MEDICINES.getValue(),
|
||||||
// SupplyCategory.STANDBY_RESCUE_MEDICINES.getInfo()));
|
SupplyCategory.STANDBY_RESCUE_MEDICINES.getInfo()));
|
||||||
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.DAMAGED_EXPIRED_MEDICINES.getValue(),
|
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.DAMAGED_EXPIRED_MEDICINES.getValue(),
|
||||||
// SupplyCategory.DAMAGED_EXPIRED_MEDICINES.getInfo()));
|
SupplyCategory.DAMAGED_EXPIRED_MEDICINES.getInfo()));
|
||||||
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.DONATED_MEDICINES.getValue(),
|
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.DONATED_MEDICINES.getValue(),
|
||||||
// SupplyCategory.DONATED_MEDICINES.getInfo()));
|
SupplyCategory.DONATED_MEDICINES.getInfo()));
|
||||||
|
|
||||||
purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);
|
purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);
|
||||||
|
|
||||||
|
|||||||
@@ -58,10 +58,10 @@ public class DepartmentRequisitionOrderServiceImpl implements IDepartmentRequisi
|
|||||||
|
|
||||||
// 单据分类
|
// 单据分类
|
||||||
List<DepartmentInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
|
List<DepartmentInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
|
||||||
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(),
|
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(),
|
||||||
// SupplyCategory.NORMAL.getInfo()));
|
SupplyCategory.NORMAL.getInfo()));
|
||||||
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.PURCHASE_APPLICATION.getValue(),
|
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.PURCHASE_APPLICATION.getValue(),
|
||||||
// SupplyCategory.PURCHASE_APPLICATION.getInfo()));
|
SupplyCategory.PURCHASE_APPLICATION.getInfo()));
|
||||||
|
|
||||||
requisitionOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);
|
requisitionOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user