hxm 3 tahun lalu
induk
melakukan
fd47a1f78c

+ 14 - 12
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -4314,9 +4314,9 @@ public class ImService {
    }
    public MixEnvelop recordByDoctor() { //String doctor, String id,String type, Integer status,String title, String start_time, String end_time, String patient
    public MixEnvelop recordByDoctor(String doctor, String id,String type, Integer status,String title, String start_time, String end_time, String patient) { //
        String sql = "";
        /*sql = "SELECT " +
        sql = "SELECT " +
                "a.id AS \"id\"," +
                "op.pay_status AS \"payStatus\"," +
                "op.type as \"type\"," +
@ -4358,14 +4358,16 @@ public class ImService {
                " LEFT join wlyy_consult_team b on a.id = b.consult" +
                " LEFT JOIN base_patient d on op.patient = d.id " +
                " WHERE 1=1 ";
        if (status == 1) {
            sql += " and op.status = 0 and op.pay_status =1 ";
        if (status == null) {
            sql += " and op.status = 0 and op.pay_status =1 and op.pay_status =2 and op.pay_status =3";
        } else if (status == 0) {
        } else if (status == 2) {
        } else if (status == 1) {
            sql += " and op.status = 0 and op.pay_status =1 ";
        } else if (status == 2){
            sql += " and op.status = 1";
        } else {
            sql += " and op.status = " + status;
        } else if (status == 3) {
            sql += " and op.status = 2";
        }
        if (org.apache.commons.lang.StringUtils.isNotBlank(doctor)) {
@ -4429,8 +4431,8 @@ public class ImService {
            sql += " and a.id = '" + id + "'";
        }
        sql += " ORDER BY op.create_time desc ";
        List<Map<String, Object>> mapList = hibenateUtils.createSQLQuery(sql, page, pagesize);
        for (Map<String, Object> map : mapList) {
        List<Map<String, Object>> List = hibenateUtils.createSQLQuery(sql);//
        for (Map<String, Object> map : List) {
            if (map.get("patientIdcard") != null) {
                String idcard = map.get("patientIdcard").toString();
                Integer age = IdCardUtil.getAgeForIdcard(idcard);
@ -4501,9 +4503,9 @@ public class ImService {
                }
            }
        }
        return mapList;*/
        sql = "select \n" +
        String pushSql = "";
        pushSql = "select \n" +
                "IFNULL(a.patient_name,' ') AS pname,\n" +
                "IFNULL(a.doctor_name,' ') as dname,\n" +
                "IFNULL(a.dept_name,' ') as dept,\n" +
@ -4531,7 +4533,7 @@ public class ImService {
                "where 1=1;";
        List<Map<String, Object>> mapList = hibenateUtils.createSQLQuery(sql);
        List<Map<String, Object>> mapList = hibenateUtils.createSQLQuery(pushSql);
        return MixEnvelop.getSuccessListWithPage2(BaseHospitalRequestMapping.Prescription.api_success, mapList);
    }

+ 1 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -2117,7 +2117,7 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
            MixEnvelop expressages = businessOrderService.pushYktCardCharge(startTime,endTime,orderNo,yktOrderNo,patientName,idCard,medicard,status,page,pageSize, orderType, orderCategory);
            List<Map<String, Object>> list = expressages.getDetailModelList();
            response.setContentType("octets/stream");
            response.setHeader("Content-Disposition", "attachment; filename=" + new String("searchRecordWrite.xls"));
            response.setHeader("Content-Disposition", "attachment; filename=" + new String("pushYktCardCharge.xls"));
            OutputStream os = response.getOutputStream();
            prescriptionService.pushYktCardChargeWrite(os, list);

+ 5 - 5
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -834,7 +834,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.searchRecordWrite)
    @ApiOperation(value = "咨询记录导出", notes = "咨询记录导出")
    public Envelop searchRecordWrite(/*@ApiParam(name = "doctor", value = "医生id")
    public Envelop searchRecordWrite(@ApiParam(name = "doctor", value = "医生id")
                                         @RequestParam(value = "doctor",required = false) String doctor,
                                     @ApiParam(name = "title", value = "咨询标题关键字")
                                         @RequestParam(value = "title",required = false) String title,
@ -843,16 +843,16 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                     @ApiParam(name = "id", value = "咨询ID")
                                         @RequestParam(value = "id",required = false) String id,
                                     @ApiParam(name = "type", value = "咨询类型")
                                         @RequestParam(value = "type",required = true) String type,
                                         @RequestParam(value = "type",required = false) String type,
                                     @ApiParam(name = "status", value = "咨询状态:0全部,1候诊中,2就诊中,3结束")
                                         @RequestParam(value = "status",required = true) Integer status,
                                         @RequestParam(value = "status",required = false) Integer status,
                                     @ApiParam(name = "start_time", value = "开始时间 YYYY-MM-DD HH:MM:SS")
                                         @RequestParam(value = "start_time",required = false) String start_time,
                                     @ApiParam(name = "end_time", value = "结束时间 YYYY-MM-DD HH:MM:SS")
                                         @RequestParam(value = "end_time",required = false) String end_time,*/
                                         @RequestParam(value = "end_time",required = false) String end_time,
            HttpServletResponse response) throws Exception {
        try {
            MixEnvelop expressages = imService.recordByDoctor();//doctor, id, type, status, title, start_time, end_time, patient
            MixEnvelop expressages = imService.recordByDoctor(doctor, id, type, status, title, start_time, end_time, patient);//
            List<Map<String, Object>> list = expressages.getDetailModelList();
            response.setContentType("octets/stream");
            response.setHeader("Content-Disposition", "attachment; filename=" + new String("searchRecordWrite.xls"));