医保预结算优化
This commit is contained in:
parent
1904cec8f8
commit
55bcca0dff
|
@ -0,0 +1,59 @@
|
||||||
|
package com.dpkj.modules.chs.constant;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: 萧道子
|
||||||
|
* @Date: 2025/6/18 15:57
|
||||||
|
* @Description: 医保状态记录常量类
|
||||||
|
*/
|
||||||
|
public class ChsPayStateConst {
|
||||||
|
|
||||||
|
private static Map<String, Integer> chsPayState = new HashMap<String, Integer>(1);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清除所有
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @author 萧道子 2025/6/18
|
||||||
|
*/
|
||||||
|
public static void clear() {
|
||||||
|
chsPayState.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按key删除
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @author 萧道子 2025/6/18
|
||||||
|
*/
|
||||||
|
public static void remove(String key) {
|
||||||
|
chsPayState.remove(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @author 萧道子 2025/6/18
|
||||||
|
*/
|
||||||
|
public static void put(String key, Integer val) {
|
||||||
|
chsPayState.put(key, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @author 萧道子 2025/6/18
|
||||||
|
*/
|
||||||
|
public static Integer get(String key) {
|
||||||
|
return chsPayState.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.dpkj.common.vo.Result;
|
import com.dpkj.common.vo.Result;
|
||||||
import com.dpkj.common.vo.ResultData;
|
import com.dpkj.common.vo.ResultData;
|
||||||
|
import com.dpkj.modules.chs.constant.ChsPayStateConst;
|
||||||
import com.dpkj.modules.chs.service.IHispayService;
|
import com.dpkj.modules.chs.service.IHispayService;
|
||||||
import com.dpkj.modules.chs.vo.OutpatientBeginModel;
|
import com.dpkj.modules.chs.vo.OutpatientBeginModel;
|
||||||
import com.dpkj.modules.chs.vo.OutpatientFinalModel;
|
import com.dpkj.modules.chs.vo.OutpatientFinalModel;
|
||||||
|
@ -83,6 +84,9 @@ public class HispayController {
|
||||||
@PostMapping("chsCodeAsOutpatientBegin")
|
@PostMapping("chsCodeAsOutpatientBegin")
|
||||||
public Result<?> chsCodeAsOutpatientBegin(@RequestBody @Validated OutpatientBeginModel data) {
|
public Result<?> chsCodeAsOutpatientBegin(@RequestBody @Validated OutpatientBeginModel data) {
|
||||||
try {
|
try {
|
||||||
|
// 清空状态常量
|
||||||
|
ChsPayStateConst.clear();
|
||||||
|
|
||||||
log.info("[HispayController][chsCodeAsOutpatientBegin][门诊缴费-预算-电子医保凭证] 参数:{}", data);
|
log.info("[HispayController][chsCodeAsOutpatientBegin][门诊缴费-预算-电子医保凭证] 参数:{}", data);
|
||||||
ResultData res = hispayService.chsCodeAsOutpatientBegin(data);
|
ResultData res = hispayService.chsCodeAsOutpatientBegin(data);
|
||||||
return Result.ok("成功", res);
|
return Result.ok("成功", res);
|
||||||
|
@ -114,5 +118,20 @@ public class HispayController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取医保支付状态
|
||||||
|
*
|
||||||
|
* @return com.dpkj.common.vo.Result<?>
|
||||||
|
* @author 萧道子 2025/6/18
|
||||||
|
*/
|
||||||
|
@PostMapping("getChsPayState")
|
||||||
|
public Result<?> getChsPayState(@RequestBody OutpatientBeginModel data) {
|
||||||
|
String no = data.getPrescriptionNo();
|
||||||
|
if (StrUtil.isEmpty(no)) {
|
||||||
|
return Result.error("收据号不可为空");
|
||||||
|
}
|
||||||
|
Integer num = ChsPayStateConst.get(no);
|
||||||
|
return Result.ok("成功", num);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||||
import com.dpkj.common.config.ChsConfig;
|
import com.dpkj.common.config.ChsConfig;
|
||||||
import com.dpkj.common.config.HisConfig;
|
import com.dpkj.common.config.HisConfig;
|
||||||
import com.dpkj.common.vo.ResultData;
|
import com.dpkj.common.vo.ResultData;
|
||||||
|
import com.dpkj.modules.chs.constant.ChsPayStateConst;
|
||||||
import com.dpkj.modules.chs.service.IHispayService;
|
import com.dpkj.modules.chs.service.IHispayService;
|
||||||
import com.dpkj.modules.chs.vo.OutpatientBeginModel;
|
import com.dpkj.modules.chs.vo.OutpatientBeginModel;
|
||||||
import com.dpkj.modules.chs.vo.OutpatientFinalModel;
|
import com.dpkj.modules.chs.vo.OutpatientFinalModel;
|
||||||
|
@ -227,6 +228,10 @@ public class HispayServiceImpl implements IHispayService {
|
||||||
JSONObject userInfo = readCode();
|
JSONObject userInfo = readCode();
|
||||||
String patientId = userInfo.getString("patid");
|
String patientId = userInfo.getString("patid");
|
||||||
data.setPatientId(patientId);
|
data.setPatientId(patientId);
|
||||||
|
|
||||||
|
// 更新常量状态 已读卡
|
||||||
|
ChsPayStateConst.put(data.getPrescriptionNo(), 1);
|
||||||
|
|
||||||
return outpatientBudget(data);
|
return outpatientBudget(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue