Explorar el Código

不查询 trans_flag_yb 为2 的信息。

xiaochan hace 3 años
padre
commit
84cbd7d693

+ 1 - 2
src/main/java/thyyxxk/webserver/dao/his/yibao/XiangMuLuRuDao.java

@@ -720,8 +720,7 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
      */
     @Select("select charge_date,charge_fee,charge_amount,charge_code_mx,detail_sn,ori_detail_sn,ABS(order_no),order_no,ledger_sn,exec_unit " +
             "from zy_detail_charge where  inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and  ledger_sn > 0 " +
-//            "and  LEN(order_no)  > 2  " +
-            "and ori_detail_sn is null and charge_amount ${ZF} 0 and charge_fee ${ZF} 0 and ledger_sn > 0 and infant_flag = #{infantFlag}")
+            "and ori_detail_sn is null and charge_amount ${ZF} 0 and charge_fee ${ZF} 0 and ledger_sn > 0 and infant_flag = #{infantFlag} and trans_flag_yb <> 2")
     List<ZyDetailCharge> getYiZhuFeiYong(@Param("inpatientNo") String inpatientNo,
                                          @Param("admissTimes") Integer admissTimes,
                                          @Param("ZF") String ZF,

+ 5 - 3
src/main/java/thyyxxk/webserver/service/yibao/XiangMuLuRuService.java

@@ -425,7 +425,8 @@ public class XiangMuLuRuService {
         );
         // 用负数拼接的 key 去查找
         for (ZyDetailCharge fuShu : getYiZhuFeiYongFuShu) {
-            String key = fuShu.getOrderNo() + DateUtil.formatDatetime(fuShu.getChargeDate()) + fuShu.getChargeCodeMx() + fuShu.getChargeAmount().negate() + fuShu.getChargeFee().negate() + fuShu.getLedgerSn();
+            String key = fuShu.getOrderNo() + DateUtil.formatDatetime(fuShu.getChargeDate()) + fuShu.getChargeCodeMx() + fuShu.getChargeAmount().negate()
+                    + fuShu.getChargeFee().negate() + fuShu.getLedgerSn();
             if (zhenShuMap.containsKey(key)) {
                 for (ZyDetailCharge zyDetailCharge : zhenShuMap.get(key)) {
                     if (zyDetailCharge.getTuiFeiFlag() == null && zyDetailCharge.getOriDetailSn() == null) {
@@ -449,14 +450,15 @@ public class XiangMuLuRuService {
             );
             // 开始二次匹配
             for (ZyDetailCharge zyDetailCharge : erCiPiPei) {
-                String key = zyDetailCharge.getExecUnit() + zyDetailCharge.getChargeCodeMx() + zyDetailCharge.getChargeAmount().negate() + zyDetailCharge.getChargeFee().negate() + zyDetailCharge.getLedgerSn();
+                String key = zyDetailCharge.getExecUnit() + zyDetailCharge.getChargeCodeMx() + zyDetailCharge.getChargeAmount().negate()
+                        + zyDetailCharge.getChargeFee().negate() + zyDetailCharge.getLedgerSn();
                 if (erCiPiPeiZhenShu.containsKey(key)) {
                     for (ZyDetailCharge detailCharge : erCiPiPeiZhenShu.get(key)) {
                         if (detailCharge.getTuiFeiFlag() == null && detailCharge.getOriDetailSn() == null) {
                             zyDetailCharge.setOriDetailSn(detailCharge.getDetailSn());
                             detailCharge.setTuiFeiFlag(1);
                             piPei.add(zyDetailCharge);
-                            log.info("第二次匹配==》流水{},匹配流水:{}", zyDetailCharge.getDetailSn(), zyDetailCharge.getOriDetailSn());
+                            log.info("第二次匹配==》流水{},匹配流水:{}", zyDetailCharge.getDetailSn(), zyDetailCharge.getOriDetailSn());
                             break;
                         }
                     }