ソースを参照

feature:处方外传下载

wuyongyi 2 年 前
コミット
59ff96f2d8

+ 4 - 4
src/main/java/com/ywt/mg/domain/models/enums/PrescriptionInfoSourceEnum.java

@@ -5,11 +5,11 @@ public enum PrescriptionInfoSourceEnum {
     //    GY3Y("广州医科大学附属第三医院", 1),
 //    APP("APP", 2),
 //    TH_DOCTOR_WX("太和医生端公众号", 12),
-    GY3Y("广州医科大学附属第三医院", 1),
+    GY3Y("广州医科大学附属第三医院his系统", 1),
     PLATFORM("平台系统", 2),
-    PC("PC", 3),
-    NFYYTHFY("南方医院太和分院", 4),
-    NFYYBYFY("南方医院白云分院", 5),
+    PC("医生工作室pc端", 3),
+    TaiHeHIS("南方医院太和分院his系统", 4),
+    BaiYunHIS("南方医科大学南方医院白云分院his系统", 5),
     UNKONWN("",0);
 
 

+ 11 - 0
src/main/java/com/ywt/mg/params/prescription/QueryPrescriptionListRequest.java

@@ -84,6 +84,9 @@ public class QueryPrescriptionListRequest implements Serializable {
     @ApiModelProperty(value = "处方类型", example = "")
     private String type;
 
+    @ApiModelProperty(value = "医院ID")
+    private int hospitalId;
+
     public String getDoctorname() {
         return doctorname;
     }
@@ -276,6 +279,14 @@ public class QueryPrescriptionListRequest implements Serializable {
         this.transactionId = transactionId;
     }
 
+    public int getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(int hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+
     public String getType() {
         return type;
     }

+ 5 - 5
src/main/java/com/ywt/mg/services/PrescriptionServices.java

@@ -568,9 +568,9 @@ public class PrescriptionServices {
         customExcelItemList.add(new ExcelCollectPojo(startColumn + 5, startRows, new String[]{"诊疗卡实际支付金额", FormatUtil.intShrink100ToStr(medicalCardPay - medicalCardRefundTotal)}));
         startRows += 1;
 
-        customExcelItemList.add(new ExcelCollectPojo(startColumn + 1, startRows, new String[]{"平台POS支付", FormatUtil.intShrink100ToStr(posPay)}));
-        customExcelItemList.add(new ExcelCollectPojo(startColumn + 3, startRows, new String[]{"平台POS退款总额", FormatUtil.intShrink100ToStr(posRefundTotal)}));
-        customExcelItemList.add(new ExcelCollectPojo(startColumn + 5, startRows, new String[]{"平台POS实际支付金额", FormatUtil.intShrink100ToStr(posPay - posRefundTotal)}));
+        customExcelItemList.add(new ExcelCollectPojo(startColumn + 1, startRows, new String[]{"平台POS", FormatUtil.intShrink100ToStr(posPay)}));
+        customExcelItemList.add(new ExcelCollectPojo(startColumn + 3, startRows, new String[]{"平台POS退款总额", FormatUtil.intShrink100ToStr(posRefundTotal)}));
+        customExcelItemList.add(new ExcelCollectPojo(startColumn + 5, startRows, new String[]{"平台POS实际支付金额", FormatUtil.intShrink100ToStr(posPay - posRefundTotal)}));
         startRows += 1;
 
         customExcelItemList.add(new ExcelCollectPojo(startColumn + 1, startRows, new String[]{"医保支付", FormatUtil.intShrink100ToStr(medicalInsurancePay)}));
@@ -1174,7 +1174,7 @@ public class PrescriptionServices {
             paramList.add("%" + deptname + "%");
         }
 
-        int hospitalId = authService.getCurrentHospitalId();
+        int hospitalId = request.getHospitalId();
         if (hospitalId > 0) {
             whereSql += " and ( hospital_id = ?)";
             paramList.add(hospitalId);
@@ -1523,7 +1523,7 @@ public class PrescriptionServices {
 
 
 
-        int hospitalId = authService.getCurrentHospitalId();
+        int hospitalId = request.getHospitalId();
         if (hospitalId == ConstantDef.NFBY_HOSPITAL_ID) {
             whereSql += " and ( source = 5)";
         } else if (hospitalId == ConstantDef.TAIHE_HOSPITAL_ID) {

+ 12 - 8
src/main/java/com/ywt/mg/web/controllers/hospital/HospAdverPrescriptionController.java

@@ -1,5 +1,6 @@
 package com.ywt.mg.web.controllers.hospital;
 
+import com.ywt.mg.core.MGRight;
 import com.ywt.mg.core.utils.Checker;
 import com.ywt.mg.core.utils.serializers.JsonSerializer;
 import com.ywt.mg.domain.models.ConstantDef;
@@ -19,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 @RestController("/hosp/adverPrescription")
 @RequestMapping({"/hosp/adverPrescription"})
+@MGRight
 public class HospAdverPrescriptionController {
     private static Logger logger = LoggerFactory.getLogger(HospAdverPrescriptionController.class);
 
@@ -38,23 +40,24 @@ public class HospAdverPrescriptionController {
 
 
     @RequestMapping({"/downloadAdverPrescriptionlist"})
-    public BaseResponse downloadNatOrderList(@RequestBody QueryPrescriptionListRequest request) {
+    public BaseResponse downloadAdverPrescriptionlist(@RequestBody QueryPrescriptionListRequest request) {
         int currentAdminId = Checker.getIntegerValue(authService.getCurrentAdminId());
 //        request.setCurrentAdminId(currentAdminId);
         // 插入记录
-        int  hospital = authService.getCurrentHospitalId();
+        int hospital = authService.getCurrentHospitalId();
+        request.setHospitalId(hospital);
 //        request.setHospitalId(hospital);
 //        if(request.getHosp() > 0){
 //            hospital = authService.getCurrentHospitalId();
 //            request.setHospitalId(hospital);
 //        }
         int downloadRecordId = idGenerator.genDownloadRecordId();
-        String name = "处方列表";
-        String fileName = "处方列表";
+        String name = "处方外转";
+        String fileName = "处方外转";
         String excelSuffixFormat = ConstantDef.EXCEL_SUFFIX_FORMAT;
         String paramUrl = "/hosp/adverPrescription/downloadAdverPrescriptionlist";
         String paramJson = JsonSerializer.toJson(request);
-        downloadRecordService.getOrInsertDownloadRecord(downloadRecordId, name, fileName + excelSuffixFormat, paramUrl, paramJson);
+        downloadRecordService.getOrInsertDownloadRecordByHosp(downloadRecordId, name, fileName + excelSuffixFormat, paramUrl, paramJson);
         Thread t = new Thread() {
             @Override
             public void run() {
@@ -72,10 +75,11 @@ public class HospAdverPrescriptionController {
         int currentAdminId = Checker.getIntegerValue(authService.getCurrentAdminId());
 //        request.setCurrentAdminId(currentAdminId);
         // 插入记录
-
+        int hospital = authService.getCurrentHospitalId();
+        request.setHospitalId(hospital);
         int downloadRecordId = idGenerator.genDownloadRecordId();
-        String name = "处方列表(药品)";
-        String fileName = "处方列表(药品)";
+        String name = "处方外转(药品)";
+        String fileName = "处方外转(药品)";
         String excelSuffixFormat = ConstantDef.EXCEL_SUFFIX_FORMAT;
         String paramUrl = "hosp/adverPrescription/downloadAdverPrescriptionDrugList";
         String paramJson = JsonSerializer.toJson(request);