|
@ -67,6 +67,7 @@ import com.yihu.utils.security.MD5;
|
|
|
import jdk.nashorn.internal.ir.IfNode;
|
|
|
import nuonuo.open.sdk.NNOpenSDK;
|
|
|
import org.apache.commons.collections.map.HashedMap;
|
|
|
import org.apache.commons.lang.time.DateUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@ -150,6 +151,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
|
|
|
private PrescriptionLogDao prescriptionLogDao;
|
|
|
|
|
|
private final static String saveUrl="http://192.168.20.55:10023/ykyy/save";
|
|
|
private final static String updateEntityUrl="http://192.168.20.55:10023/ykyy/update";
|
|
|
private final static String url="http://192.168.20.55:10023/ykyy/createSQLQuery";
|
|
|
|
|
|
|
|
@ -1300,6 +1302,10 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
HlwMzybjsDO hlwMzybjsDO = new HlwMzybjsDO();
|
|
|
PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(outpatientDO.getPatient());
|
|
|
if (patientMappingDO!=null){
|
|
|
hlwMzybjsDO.setBrid(patientMappingDO.getMappingCode());
|
|
|
}
|
|
|
hlwMzybjsDO.setInsuranceSerial(ylzMedicalRelationDO.getInsuranceSerial());
|
|
|
hlwMzybjsDO.setAccountBalance(Double.parseDouble(ylzMedicalRelationDO.getAccountBalance()));
|
|
|
hlwMzybjsDO.setBillSerial(ylzMedicalRelationDO.getBillSerial());
|
|
@ -1347,7 +1353,8 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
|
|
|
hlwMzybjsDO.setPayTime(DateUtil.dateToShortStrHh(ylzMedicalRelationDO.getPayDate()));
|
|
|
hlwMzybjsDO.setCollector(ylzMedicalRelationDO.getCollector());
|
|
|
hlwMzybjsDO.setJsrq(new Date());
|
|
|
hlwMzybjsDO.setFphm(invoiceDO.getInvoiceNo());
|
|
|
logger.info("发票流水号"+invoiceDO.getInvoiceSerialNum());
|
|
|
hlwMzybjsDO.setFphm(invoiceDO.getInvoiceSerialNum());
|
|
|
String jsonString1 = JSONObject.toJSONString(hlwMzybjsDO);
|
|
|
logger.info("医保结算============");
|
|
|
Map<String,Object> params1 = new HashedMap();
|
|
@ -1473,6 +1480,18 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 更新作废
|
|
|
* @param relationDO
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public void updateHisHlwMzybjs(YlzMedicalRelationDO relationDO) throws Exception {
|
|
|
String updatesql = "update v_hlw_mzybjs set zfpb=1,zfrq= to_date('" + DateUtil.getStringDate() + "', 'yyyy-mm-dd hh24:mi:ss')"+" where INSURANCE_SERIAL='"+relationDO.getInsuranceSerial()+"' ";
|
|
|
ykyyEntranceService.updateHisStatus(updatesql);
|
|
|
}
|
|
|
|
|
|
|
|
|
//============================电子发票=========================
|
|
|
|
|
|
|
|
@ -1550,7 +1569,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
|
|
|
String content = "";
|
|
|
JSONObject object = new JSONObject();
|
|
|
JSONObject order = new JSONObject();
|
|
|
order.put("buyerName","王云海");
|
|
|
order.put("buyerName",medicalRelationDO.getName());
|
|
|
order.put("buyerTaxNum",salertaxnum);
|
|
|
order.put("buyerTel",salertel);
|
|
|
order.put("buyerAddress",saleraddress);
|
|
@ -1560,7 +1579,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
|
|
|
order.put("salerAddress",saleraddress);
|
|
|
order.put("salerAccount",saleraccount);
|
|
|
order.put("orderNo",medicalRelationDO.getHisSettleNo());
|
|
|
order.put("invoiceDate","2022-01-13 12:30:00");//订单时间
|
|
|
order.put("invoiceDate",DateUtil.dateToStrLong(medicalRelationDO.getPayDate()));//订单时间
|
|
|
order.put("clerkId","2527");
|
|
|
order.put("clerk","互联网医院");
|
|
|
order.put("pushMode","-1");//推送方式:-1,不推送;0,邮箱;1,手机(默认);2,邮箱、手机
|
|
@ -1573,8 +1592,8 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
|
|
|
throw new Exception("发票代码为空,不能冲红");
|
|
|
}
|
|
|
order.put("invoiceType","2");//开票类型:1:蓝票;2:红票 (全电发票暂不支持红票)
|
|
|
order.put("invoiceCode","");//
|
|
|
order.put("invoiceNum","");//
|
|
|
order.put("invoiceCode",ylzMedicalRelationInvoiceDO.getInvoiceCode());//
|
|
|
order.put("invoiceNum",ylzMedicalRelationInvoiceDO.getInvoiceNo());//
|
|
|
ylzMedicalRelationInvoiceDO.setStatus(2);
|
|
|
}
|
|
|
order.put("invoiceLine","p");
|
|
@ -1697,7 +1716,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
|
|
|
ylzMedicalRelationInvoiceDO.setInvoiceNo(res.getString("invoiceNo"));
|
|
|
ylzMedicalRelationInvoiceDO.setResult(result);
|
|
|
ylzMedicalRelationInvoiceDO.setCreateTime(new Date());
|
|
|
ylzMedicailRelationInvoiceDao.save(ylzMedicalRelationInvoiceDO);
|
|
|
ylzMedicalRelationInvoiceDO = ylzMedicailRelationInvoiceDao.save(ylzMedicalRelationInvoiceDO);
|
|
|
}
|
|
|
}
|
|
|
return ylzMedicalRelationInvoiceDO;
|