|
@ -407,47 +407,52 @@ public class MedOrderService {
|
|
|
**/
|
|
|
// if (StringUtils.isBlank(ylzMedicalRelationDO.getHisSerial())){
|
|
|
if (1==ylzMedicalRelationDO.getMedicalState()){
|
|
|
//费别是医保时,医保挂号流水号空则需发起门诊挂号
|
|
|
settleTmp.put("needRegister",true);
|
|
|
strinObj = JSONObject.parseObject(deviceParam.get("yb_strin").toString());
|
|
|
input = new JSONObject();
|
|
|
inputDetail = new JSONObject();
|
|
|
inputDetail.put("psn_no","");//人员编码 前端封装
|
|
|
inputDetail.put("insutype","310");//前端替换成医保返回险种类型
|
|
|
inputDetail.put("begntime",DateUtil.dateToStrLong(ylzMedicalRelationDO.getDate()));
|
|
|
if ("02".equals(mdtrt_cert_type)){
|
|
|
inputDetail.put("mdtrt_cert_no",idcard);
|
|
|
}
|
|
|
else{
|
|
|
inputDetail.put("mdtrt_cert_no",cardNo);
|
|
|
}
|
|
|
inputDetail.put("mdtrt_cert_type",mdtrt_cert_type);
|
|
|
|
|
|
inputDetail.put("ipt_otp_no",ylzMedicalRelationDO.getRelationCode());
|
|
|
inputDetail.put("atddr_no",ylzMedicalRelationDO.getAtddrNo());
|
|
|
inputDetail.put("dr_name",ylzMedicalRelationDO.getDrName());
|
|
|
inputDetail.put("dept_code",ylzMedicalRelationDO.getDeptCode());
|
|
|
inputDetail.put("dept_name",ylzMedicalRelationDO.getDeptName());
|
|
|
inputDetail.put("caty",ylzMedicalRelationDO.getCaty());
|
|
|
input.put("data",inputDetail);
|
|
|
dataDetail.put("input",input);
|
|
|
netData.put("msgid",ylzMedicalRelationDO.getVisitMsgid());//挂号发送方报文id
|
|
|
dataDetail.put("net_data",netData);
|
|
|
strinObj.put("func","fsi.terminal.register");
|
|
|
strinObj.put("data",dataDetail);
|
|
|
settleTmp.put("registerParam",strinObj.toJSONString());
|
|
|
|
|
|
logDO = new WlyyHttpLogDO();
|
|
|
logDO.setCode("fsi.terminal.register");
|
|
|
logDO.setName("药柜医保挂号请求参数");
|
|
|
logDO.setPatient(ylzMedicalRelationDO.getLogNo());
|
|
|
logDO.setRequest(strinObj.toJSONString());
|
|
|
logDO.setResponse(null);
|
|
|
logDO.setCreateTime(new Date());
|
|
|
httpLogDao.save(logDO);
|
|
|
|
|
|
if ("jwtest".equals(springProfiles)){//测试线返回模拟数据
|
|
|
settleTmp.put("registerResult","{\"data\":{\"net_data\":{\"inf_refmsgid\":\"350000202207151648010011544274\",\"refmsg_time\":\"20220715164800718\",\"respond_time\":\"20220715164801114\"},\"output\":{\"data\":{\"exp_content\":null,\"ipt_otp_no\":\"72474660\",\"mdtrt_id\":\"4208923\",\"psn_no\":\"3500000135052419940523061301\"}}},\"func\":\"fsi.terminal.register\",\"retCode\":\"0000\",\"retMsg\":\"操作成功\"}");
|
|
|
if (org.apache.commons.lang3.StringUtils.isBlank(ylzMedicalRelationDO.getVisitMsgid())){
|
|
|
//无挂号发送方报文ID 不走挂号。
|
|
|
// 无发送方报文ID【用于基线门诊挂号接口,自助机fsi.terminal.register接口】
|
|
|
}else {
|
|
|
//费别是医保时,医保挂号流水号空则需发起门诊挂号
|
|
|
settleTmp.put("needRegister",true);
|
|
|
strinObj = JSONObject.parseObject(deviceParam.get("yb_strin").toString());
|
|
|
input = new JSONObject();
|
|
|
inputDetail = new JSONObject();
|
|
|
inputDetail.put("psn_no","");//人员编码 前端封装
|
|
|
inputDetail.put("insutype","310");//前端替换成医保返回险种类型
|
|
|
inputDetail.put("begntime",DateUtil.dateToStrLong(ylzMedicalRelationDO.getDate()));
|
|
|
if ("02".equals(mdtrt_cert_type)){
|
|
|
inputDetail.put("mdtrt_cert_no",idcard);
|
|
|
}
|
|
|
else{
|
|
|
inputDetail.put("mdtrt_cert_no",cardNo);
|
|
|
}
|
|
|
inputDetail.put("mdtrt_cert_type",mdtrt_cert_type);
|
|
|
|
|
|
inputDetail.put("ipt_otp_no",ylzMedicalRelationDO.getRelationCode());
|
|
|
inputDetail.put("atddr_no",ylzMedicalRelationDO.getAtddrNo());
|
|
|
inputDetail.put("dr_name",ylzMedicalRelationDO.getDrName());
|
|
|
inputDetail.put("dept_code",ylzMedicalRelationDO.getDeptCode());
|
|
|
inputDetail.put("dept_name",ylzMedicalRelationDO.getDeptName());
|
|
|
inputDetail.put("caty",ylzMedicalRelationDO.getCaty());
|
|
|
input.put("data",inputDetail);
|
|
|
dataDetail.put("input",input);
|
|
|
netData.put("msgid",ylzMedicalRelationDO.getVisitMsgid());//挂号发送方报文id
|
|
|
dataDetail.put("net_data",netData);
|
|
|
strinObj.put("func","fsi.terminal.register");
|
|
|
strinObj.put("data",dataDetail);
|
|
|
settleTmp.put("registerParam",strinObj.toJSONString());
|
|
|
|
|
|
logDO = new WlyyHttpLogDO();
|
|
|
logDO.setCode("fsi.terminal.register");
|
|
|
logDO.setName("药柜医保挂号请求参数");
|
|
|
logDO.setPatient(ylzMedicalRelationDO.getLogNo());
|
|
|
logDO.setRequest(strinObj.toJSONString());
|
|
|
logDO.setResponse(null);
|
|
|
logDO.setCreateTime(new Date());
|
|
|
httpLogDao.save(logDO);
|
|
|
|
|
|
if ("jwtest".equals(springProfiles)){//测试线返回模拟数据
|
|
|
settleTmp.put("registerResult","{\"data\":{\"net_data\":{\"inf_refmsgid\":\"350000202207151648010011544274\",\"refmsg_time\":\"20220715164800718\",\"respond_time\":\"20220715164801114\"},\"output\":{\"data\":{\"exp_content\":null,\"ipt_otp_no\":\"72474660\",\"mdtrt_id\":\"4208923\",\"psn_no\":\"3500000135052419940523061301\"}}},\"func\":\"fsi.terminal.register\",\"retCode\":\"0000\",\"retMsg\":\"操作成功\"}");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// }
|
|
@ -1129,8 +1134,8 @@ public class MedOrderService {
|
|
|
}
|
|
|
cardNo = ylzMedicalRelationDO.getCardNo();
|
|
|
orgCode = ylzMedicalRelationDO.getOrgCode();
|
|
|
BigDecimal personCashTmp = new BigDecimal(ylzMedicalRelationDO.getPersonCash());
|
|
|
personCash.add(personCashTmp);//个人现金支付
|
|
|
BigDecimal personCashTmp = new BigDecimal(ylzMedicalRelationDO.getPersonCash());//10.35
|
|
|
personCash = personCash.add(personCashTmp);//个人现金支付
|
|
|
if (0==personCashTmp.doubleValue()){//费用为0
|
|
|
try {
|
|
|
if (!jwService.executeSickSettleMultiNew(recipe_no,equ_num)){
|