Browse Source

优化自费费用上传

lighter 3 years ago
parent
commit
75b500710f

+ 1 - 2
src/main/java/thyyxxk/sizyfeeoprnsystm/dao/SelfpayDao.java

@@ -5,7 +5,6 @@ import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import org.apache.ibatis.annotations.Update;
 import thyyxxk.sizyfeeoprnsystm.pojo.FeeCounteract;
-import thyyxxk.sizyfeeoprnsystm.pojo.FeeDtle;
 import thyyxxk.sizyfeeoprnsystm.pojo.selfpay.BriefLedgerFile;
 import thyyxxk.sizyfeeoprnsystm.pojo.selfpay.FmiOwnpayPatnDise;
 import thyyxxk.sizyfeeoprnsystm.pojo.selfpay.FmiOwnpayPatnFee;
@@ -83,7 +82,7 @@ public interface SelfpayDao {
                                  @Param("sn1") Integer sn1, @Param("sn2") Integer sn2);
 
     @Select("select rtrim(inpatient_no) as patNo,admiss_times as times,ledger_sn " +
-            "from zy_ledger_file where ledger_sn>0 and account_date is not null and selfpay_uploaded=0 " +
+            "from zy_ledger_file where ledger_sn>0 and account_date is not null and selfpay_uploaded in (0,2) " +
             "and isnull(responce_type,'01')='01' and account_date>='2022-01-01 00:00:00.000'")
     List<BriefLedgerFile> selectBriefLedgerFile();
 

+ 7 - 7
src/main/java/thyyxxk/sizyfeeoprnsystm/service/SelfpayService.java

@@ -34,6 +34,13 @@ public class SelfpayService {
     }
 
     public JSONObject uploadSelfpayMedfee(BriefLedgerFile ledgerFile) {
+        FmiOwnpayPatnDise dise = dao.selectPatnDise(ledgerFile.getPatNo(), ledgerFile.getTimes());
+        if (null == dise) {
+            JSONObject result = new JSONObject();
+            result.put("code", -1);
+            result.put("message", "患者诊断为空!");
+            return result;
+        }
         beforeUpload(ledgerFile);
         JSONObject input = new JSONObject();
         input.put("upType", "1");
@@ -49,13 +56,6 @@ public class SelfpayService {
         patnMdtrt.setMdtrtId(mdtrtId);
         patnMdtrt.setFixmedinsCode(SiUtil.INSTITUTION_ID);
         patnMdtrt.setFixmedinsName(SiUtil.INSTITUTION_NAME);
-        FmiOwnpayPatnDise dise = dao.selectPatnDise(ledgerFile.getPatNo(), ledgerFile.getTimes());
-        if (null == dise) {
-            JSONObject result = new JSONObject();
-            result.put("code", -1);
-            result.put("message", "患者诊断为空!");
-            return result;
-        }
         patnMdtrt.setDiseNo(dise.getDiagCode());
         patnMdtrt.setDiseName(dise.getDiagName());
         input.put("fmiOwnpayPatnMdtrtDDTO", JSONObject.parseObject(