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