Kaynağa Gözat

中山结算优化

wangzhinan 2 hafta önce
ebeveyn
işleme
3bec4b5bb9

+ 10 - 4
business/base-service/src/main/java/com/yihu/jw/healthCare/service/HealthCareService.java

@ -1935,6 +1935,9 @@ public class HealthCareService {
            String billSerial = jsonObject.getString("bill_serial");
            String personCash = jsonObject.getString("person_cash");
            String valiFlag = jsonObject.getString("vali_flag");
            String payDateStr = jsonObject.getString("pay_date");
            Date payDate = DateUtil.strToDate(payDateStr);
            Date now = DateUtil.getDateShort(new Date());
            YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByInsuranceSerial(insuranceSerial);
            if (ylzMedicalRelationDO!=null){
@ -1942,10 +1945,13 @@ public class HealthCareService {
                    throw new Exception("医保结算金额不一致!");
                }else {
                    if (valiFlag.equalsIgnoreCase("1")){
                        ylzMedicalRelationDO.setStatus(1);
                        ylzMedicalRelationDO.setBillSerial(billSerial);
                        ylzMedicalRelationDO.setPayDate(DateUtil.strToDate(jsonObject.getString("pay_date")+jsonObject.getString("pay_time")));
                        ylzMedicailRelationDao.save(ylzMedicalRelationDO);
                        if (payDate.compareTo(now)==0){
                            ylzMedicalRelationDO.setStatus(1);
                            ylzMedicalRelationDO.setBillSerial(billSerial);
                            ylzMedicalRelationDO.setPayDate(DateUtil.strToDate(jsonObject.getString("pay_date")+jsonObject.getString("pay_time")));
                            ylzMedicailRelationDao.save(ylzMedicalRelationDO);
                        }
                    }
                }
            }