Browse Source

代码修改

hxm 3 years ago
parent
commit
dadcd1f4d3

+ 47 - 10
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -3655,17 +3655,54 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            }
            }
            int i = 1;
            int i = 1;
            String n = " ";
            for (Map<String, Object> m : list) {
            for (Map<String, Object> m : list) {
                addCell(ws, i, 0, (String) m.get("pname"));
                addCell(ws, i, 1, (String) m.get("dname"));
                addCell(ws, i, 2, (String) m.get("dept"));
                addCell(ws, i, 3, (String) m.get("type"));
                addCell(ws, i, 4, (String) m.get("ctime"));
                addCell(ws, i, 5, (String) m.get("rtime"));
                addCell(ws, i, 6, (String) m.get("etime"));
                addCell(ws, i, 7, (String) m.get("des"));
                addCell(ws, i, 8, (String) m.get("pay"));
                addCell(ws, i, 9, (String) m.get("STATUS"));
                String status = m.get("STATUS").toString();
                if (status.equals("1")){
                    status = "候诊中";
                }else if (status.equals("2")){
                    status = "就诊中";
                }else if (status.equals("3")){
                    status = "结束";
                }else {
                    status = "取消";
                }
                Integer pay = (Integer) m.get("pay");
                String payy = "";
                if(pay == null){
                    payy = "";
                }
                else if (pay >= 20) {
                    payy += "是";
                }else if (pay < 20){
                    payy += "否";
                }
                Object type = m.get("type");
                if (type == null) {
                    type = " ";
                }else {
                    if(type.equals("1")) {
                        type = "在线复诊";
                    }else if (type.equals("2")) {
                        type = "协同门诊";
                    }else if (type.equals("3")) {
                        type = "专家咨询";
                    }
                }
                addCell(ws, i, 0, m.get("pname")!=null?m.get("pname").toString():n);
                addCell(ws, i, 1, m.get("dname")!=null?m.get("dname").toString():n);
                addCell(ws, i, 2, m.get("dept")!=null?m.get("dept").toString():n);
                addCell(ws, i, 3, type.toString()!=null?type.toString():n);
                addCell(ws, i, 4, m.get("ctime")!=null?m.get("ctime").toString():n);
                addCell(ws, i, 5, m.get("rtime")!=null?m.get("rtime").toString():n);
                addCell(ws, i, 6, m.get("etime")!=null?m.get("etime").toString():n);
                addCell(ws, i, 7, m.get("des")!=null?m.get("des").toString():n);
                addCell(ws, i, 8, payy.toString()!=null?payy.toString():n);
                addCell(ws, i, 9, status.toString()!=null?status.toString():n);
                i++;
                i++;
            }
            }
            wwb.write();
            wwb.write();

+ 28 - 2
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -4505,7 +4505,7 @@ public class ImService {
        }
        }
        String pushSql = "";
        String pushSql = "";
        pushSql = "SELECT\n" +
        pushSql = /*"SELECT\n" +
                "\tCASE a.patient_name\n" +
                "\tCASE a.patient_name\n" +
                "WHEN NULL THEN\n" +
                "WHEN NULL THEN\n" +
                "\t' '\n" +
                "\t' '\n" +
@ -4580,7 +4580,33 @@ public class ImService {
                "\twlyy_outpatient a\n" +
                "\twlyy_outpatient a\n" +
                "LEFT JOIN wlyy_prescription b ON a.patient_name = b.patient_name\n" +
                "LEFT JOIN wlyy_prescription b ON a.patient_name = b.patient_name\n" +
                "WHERE\n" +
                "WHERE\n" +
                "\t1 = 1";
                "\t1 = 1"*/
                "SELECT\n" +
                "a.patient_name\n" +
                "as \"pname\",\n" +
                "a.doctor_name\n" +
                "as \"dname\",\n" +
                "a.dept_name\n" +
                "as \"dept\",\n" +
                "a.outpatient_type\n" +
                "as \"type\",\n" +
                "a.create_time\n" +
                "as \"ctime\",\n" +
                "a.con_date\n" +
                "as \"rtime\",\n" +
                "a.end_time\n" +
                "as \"etime\",\n" +
                "a.description\n" +
                "as \"des\",\n" +
                "b. STATUS\n" +
                "as \"pay\",\n" +
                "a. STATUS\n" +
                "as \"STATUS\"\n" +
                "FROM\n" +
                " wlyy_outpatient a\n" +
                "LEFT JOIN wlyy_prescription b ON a.patient = b.patient_code\n" +
                "WHERE\n" +
                " 1 = 1";
        List<Map<String, Object>> mapList = hibenateUtils.createSQLQuery(pushSql);
        List<Map<String, Object>> mapList = hibenateUtils.createSQLQuery(pushSql);

+ 1 - 6
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)
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.searchRecordWrite)
    @ApiOperation(value = "咨询记录导出", notes = "咨询记录导出")
    @ApiOperation(value = "咨询记录导出", notes = "咨询记录导出")
    public Envelop searchRecordWrite(@ApiParam(name = "doctor", value = "医生id")
    public void searchRecordWrite(@ApiParam(name = "doctor", value = "医生id")
                                         @RequestParam(value = "doctor",required = false) String doctor,
                                         @RequestParam(value = "doctor",required = false) String doctor,
                                     @ApiParam(name = "title", value = "咨询标题关键字")
                                     @ApiParam(name = "title", value = "咨询标题关键字")
                                         @RequestParam(value = "title",required = false) String title,
                                         @RequestParam(value = "title",required = false) String title,
@ -851,7 +851,6 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                     @ApiParam(name = "end_time", value = "结束时间 YYYY-MM-DD HH:MM:SS")
                                     @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 {
            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();
            List<Map<String, Object>> list = expressages.getDetailModelList();
            response.setContentType("octets/stream");
            response.setContentType("octets/stream");
@ -859,10 +858,6 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            OutputStream os = response.getOutputStream();
            OutputStream os = response.getOutputStream();
            prescriptionService.searchRecordWrite(os, list);
            prescriptionService.searchRecordWrite(os, list);
            return success(expressages);
        } catch (Exception e) {
            return failedException(e);
        }
    }
    }