瀏覽代碼

数据清洗逻辑

hurugang 5 年之前
父節點
當前提交
382a6e9923

+ 4 - 4
src/main/java/cn/hnthyy/thmz/common/ScheduledService.java

@@ -45,10 +45,10 @@ public class ScheduledService {
     }
 
 
-    @Scheduled(cron = "5 0 2 * * *")
-    public void scheduledFull() {
-        process();
-    }
+//    @Scheduled(cron = "5 0 2 * * *")
+//    public void scheduledFull() {
+//        process();
+//    }
 
 
 

+ 1 - 0
src/main/java/cn/hnthyy/thmz/controller/MzChargeDetailController.java

@@ -112,6 +112,7 @@ public class MzChargeDetailController {
                 }
                 pageViewVo.setPageIndex(mzChargeDetailPageDto.getPageIndex());
                 pageViewVo.setPageSize(mzChargeDetailPageDto.getPageSize());
+                mzChargeDetailService.refshOldSystemReceiptData();
                 pageViewVo.setTotal(mzChargeDetailService.countMzChargeDetail(mzChargeDetailPageDto));
                 mzChargeDetails = mzChargeDetailService.queryMzChargeDetailWithPage(mzChargeDetailPageDto);
             }

+ 6 - 0
src/main/java/cn/hnthyy/thmz/mapper/his/MzChargeDetailMapper.java

@@ -697,4 +697,10 @@ public interface MzChargeDetailMapper {
     @Select("select top 1 rtrim(warn_dept) warn_dept,rtrim(doctor_code) doctor_code,rtrim(print_flag) print_flag from mz_charge_detail where  patient_id = #{patientId} and times = #{times} and warn_dept is not null and doctor_code is not null and warn_dept<> '' and doctor_code<> '' ")
     MzChargeDetail selectWarnDeptAndDoctor(@Param("patientId") String patientId,@Param("times") Integer times);
 
+    /**
+     * 清洗老系统打印发票数据
+     * @return
+     */
+    @Update("update mz_charge_detail set confirm_flag=4  where real_no in (select abs(real_no) from mz_charge_detail where real_no <0 group by real_no)")
+    int refshOldSystemReceiptData();
 }

+ 7 - 0
src/main/java/cn/hnthyy/thmz/service/his/MzChargeDetailService.java

@@ -224,4 +224,11 @@ public interface MzChargeDetailService {
      */
     List<Map<String,Object>> queryChargeDetailByPatient(YesNoEnum hisDate,String patientId,String serialNo);
 
+
+
+    /**
+     * 清洗老系统打印发票数据
+     * @return
+     */
+    int refshOldSystemReceiptData();
 }

+ 5 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/MzChargeDetailServiceImpl.java

@@ -436,6 +436,11 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         return mzChargeDetailMapper.selectChargeDetailByPatient(patientId, serialNo);
     }
 
+    @Override
+    public int refshOldSystemReceiptData() {
+        return mzChargeDetailMapper.refshOldSystemReceiptData();
+    }
+
 
     /**
      * 更新收费状态,并入库发药记录

+ 2 - 1
src/main/resources/static/js/registration_list.js

@@ -723,7 +723,8 @@ function formatCheck() {
  */
 function queryUserInfoByCardNo() {
     var cardNo = $("#cardNo").val();
-    if (cardNo.length == 8) {
+    var index =cardNo.indexOf("-");
+    if ((index > 0 && index==cardNo.length-2) || cardNo.length == 8) {
         $("#cardNo").attr("title", cardNo);
         $.ajax({
             type: "GET",