瀏覽代碼

异常出药

trick9191 7 年之前
父節點
當前提交
66c8fb2c43

+ 11 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java

@ -494,6 +494,7 @@ public class PrescriptionExpressageService extends BaseService {
                        " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                        " WHERE " +
                        " p.patient = '" + p.getCode() + "' " +
                        " AND py.trade_status ='1' " +
                        " AND p.`status`>=50 " +
                        " ORDER BY p.`status` ASC ";
                List<Map<String, Object>> totallist = jdbcTemplate.queryForList(sqlTotal);
@ -519,7 +520,8 @@ public class PrescriptionExpressageService extends BaseService {
                        " wlyy_prescription p " +
                        " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                        " WHERE " +
                        " p.patient = '" + p.getCode() + "' " +
                        " p.patient = '" + p.getCode() + "'" +
                        " AND py.trade_status ='1' " +
                        " AND p.`status`>=50 " +
                        " ORDER BY p.`status` ASC " +
                        " LIMIT " + start + "," + pageSize;
@ -631,7 +633,8 @@ public class PrescriptionExpressageService extends BaseService {
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " LEFT JOIN wlyy_prescription_expressage e ON p.code = e.prescription_code" +
                " WHERE" +
                " p.hospital = '"+d.getHospital()+"' ";
                " p.hospital = '"+d.getHospital()+"' " +
                " AND py.trade_status = '1' ";
        totalSql = setSQL( totalSql,keyWord,state,type,startDate,endDate,operator,flag);
        totalSql +=  " AND p.`status`>=50 ";
        List<Map<String, Object>> totallist = jdbcTemplate.queryForList(totalSql);
@ -662,7 +665,8 @@ public class PrescriptionExpressageService extends BaseService {
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " LEFT JOIN wlyy_prescription_expressage e ON p.code = e.prescription_code" +
                " WHERE" +
                " p.hospital = '"+d.getHospital()+"' ";
                " p.hospital = '"+d.getHospital()+"' " +
                " AND py.trade_status = '1' ";
        sql = setSQL( sql,keyWord,state,type,startDate,endDate,operator,flag);
        sql +=  " AND p.`status`>=50 " +
                " ORDER BY py.charge_time DESC " +
@ -744,7 +748,8 @@ public class PrescriptionExpressageService extends BaseService {
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " LEFT JOIN wlyy_prescription_expressage e ON p.code = e.prescription_code" +
                " WHERE" +
                " p.hospital = '"+d.getHospital()+"' ";
                " p.hospital = '"+d.getHospital()+"' " +
                " AND py.trade_status = '1' ";
        totalSql = setDrugSQL( totalSql,keyWord,state,type,startDate,endDate,operator,flag);
        totalSql +=  " AND p.`status`>=50 ";
        List<Map<String, Object>> totallist = jdbcTemplate.queryForList(totalSql);
@ -775,7 +780,8 @@ public class PrescriptionExpressageService extends BaseService {
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " LEFT JOIN wlyy_prescription_expressage e ON p.code = e.prescription_code" +
                " WHERE" +
                " p.hospital = '"+d.getHospital()+"' ";
                " p.hospital = '"+d.getHospital()+"' " +
                " AND py.trade_status = '1' ";
        sql = setDrugSQL( sql,keyWord,state,type,startDate,endDate,operator,flag);
        sql +=  " AND p.`status`>=50 " +
                " ORDER BY e.fetching_medicine_time DESC " +