|  | @ -148,6 +148,7 @@ import java.lang.Boolean;
 | 
												
													
														
															|  | import java.lang.management.ManagementFactory;
 |  | import java.lang.management.ManagementFactory;
 | 
												
													
														
															|  | import java.math.BigDecimal;
 |  | import java.math.BigDecimal;
 | 
												
													
														
															|  | import java.net.URL;
 |  | import java.net.URL;
 | 
												
													
														
															|  | 
 |  | import java.net.URLEncoder;
 | 
												
													
														
															|  | import java.text.DecimalFormat;
 |  | import java.text.DecimalFormat;
 | 
												
													
														
															|  | import java.text.ParseException;
 |  | import java.text.ParseException;
 | 
												
													
														
															|  | import java.text.SimpleDateFormat;
 |  | import java.text.SimpleDateFormat;
 | 
												
											
												
													
														
															|  | @ -3329,6 +3330,41 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                     "JOIN wlyy_prescription_expressage e ON e.outpatient_id = o.id\n" +
 |  |                     "JOIN wlyy_prescription_expressage e ON e.outpatient_id = o.id\n" +
 | 
												
													
														
															|  |                     "WHERE\n" +
 |  |                     "WHERE\n" +
 | 
												
													
														
															|  |                     "\t1 = 1\n";//oracle
 |  |                     "\t1 = 1\n";//oracle
 | 
												
													
														
															|  | 
 |  |             if (StringUtils.isNotBlank(status)) {
 | 
												
													
														
															|  | 
 |  |                 totalSql += " AND p.status in(" + status + ") ";
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  |             if (StringUtils.isNotBlank(oneselfPickupFlg)) {
 | 
												
													
														
															|  | 
 |  |                 totalSql += " AND e.oneself_pickup_flg = " + oneselfPickupFlg+" ";
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  |             if (StringUtils.isNotBlank(nameKey)) {
 | 
												
													
														
															|  | 
 |  |                 totalSql += " AND e.name like '%" + nameKey + "%' ";
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  |             if (StringUtils.isNotBlank(patientName)) {
 | 
												
													
														
															|  | 
 |  |                 totalSql += " AND o.patient_name like '%" + patientName + "%' ";
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  |             if (StringUtils.isNotBlank(startTime)) {
 | 
												
													
														
															|  | 
 |  |                 if ("xm_ykyy_wx".equals(wxId)) {
 | 
												
													
														
															|  | 
 |  |                     if (flag){
 | 
												
													
														
															|  | 
 |  |                         totalSql += " and p.create_time >= str_to_date('" + startTime + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
 | 
												
													
														
															|  | 
 |  |                     }else {
 | 
												
													
														
															|  | 
 |  |                         totalSql += " and p.create_time >= to_date('" + startTime + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
 | 
												
													
														
															|  | 
 |  |                     }
 | 
												
													
														
															|  | 
 |  |                 } else {
 | 
												
													
														
															|  | 
 |  |                     totalSql += " AND p.create_time >='" + startTime + " 00:00:00'";
 | 
												
													
														
															|  | 
 |  |                 }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  |             if (StringUtils.isNotBlank(endTime)) {
 | 
												
													
														
															|  | 
 |  |                 if ("xm_ykyy_wx".equals(wxId)) {
 | 
												
													
														
															|  | 
 |  |                     if (flag){
 | 
												
													
														
															|  | 
 |  |                         totalSql += " and p.create_time <= str_to_date('" + endTime + " 23:59:59','YYYY-MM-DD HH24:MI:SS')";
 | 
												
													
														
															|  | 
 |  |                     }else {
 | 
												
													
														
															|  | 
 |  |                         totalSql += " and p.create_time <= to_date('" + endTime + " 23:59:59','YYYY-MM-DD HH24:MI:SS')";
 | 
												
													
														
															|  | 
 |  |                     }
 | 
												
													
														
															|  | 
 |  |                 } else {
 | 
												
													
														
															|  | 
 |  |                     sql += " AND p.create_time <='" + endTime + " 23:59:59'";
 | 
												
													
														
															|  | 
 |  |                 }
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  |         } else {
 |  |         } else {
 | 
												
													
														
															|  |             sql = sql +
 |  |             sql = sql +
 | 
												
													
														
															|  |                     "p.id AS \"prescriptionId\",\n" +
 |  |                     "p.id AS \"prescriptionId\",\n" +
 | 
												
											
												
													
														
															|  | @ -3346,6 +3382,41 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                     "JOIN wlyy_prescription_expressage e ON e.outpatient_id = o.id\n" +
 |  |                     "JOIN wlyy_prescription_expressage e ON e.outpatient_id = o.id\n" +
 | 
												
													
														
															|  |                     "WHERE\n" +
 |  |                     "WHERE\n" +
 | 
												
													
														
															|  |                     "\t1 = 1\n";//MySQL
 |  |                     "\t1 = 1\n";//MySQL
 | 
												
													
														
															|  | 
 |  |             if (StringUtils.isNotBlank(status)) {
 | 
												
													
														
															|  | 
 |  |                 totalSql += " AND p.status in(" + status + ") ";
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  |             if (StringUtils.isNotBlank(oneselfPickupFlg)) {
 | 
												
													
														
															|  | 
 |  |                 totalSql += " AND e.oneself_pickup_flg = " + oneselfPickupFlg+" ";
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  |             if (StringUtils.isNotBlank(nameKey)) {
 | 
												
													
														
															|  | 
 |  |                 totalSql += " AND e.name like '%" + nameKey + "%' ";
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  |             if (StringUtils.isNotBlank(patientName)) {
 | 
												
													
														
															|  | 
 |  |                 totalSql += " AND o.patient_name like '%" + patientName + "%' ";
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  |             if (StringUtils.isNotBlank(startTime)) {
 | 
												
													
														
															|  | 
 |  |                 if ("xm_ykyy_wx".equals(wxId)) {
 | 
												
													
														
															|  | 
 |  |                     if (flag){
 | 
												
													
														
															|  | 
 |  |                         totalSql += " and p.create_time >= str_to_date('" + startTime + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
 | 
												
													
														
															|  | 
 |  |                     }else {
 | 
												
													
														
															|  | 
 |  |                         totalSql += " and p.create_time >= to_date('" + startTime + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
 | 
												
													
														
															|  | 
 |  |                     }
 | 
												
													
														
															|  | 
 |  |                 } else {
 | 
												
													
														
															|  | 
 |  |                     totalSql += " AND p.create_time >='" + startTime + " 00:00:00'";
 | 
												
													
														
															|  | 
 |  |                 }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  |             if (StringUtils.isNotBlank(endTime)) {
 | 
												
													
														
															|  | 
 |  |                 if ("xm_ykyy_wx".equals(wxId)) {
 | 
												
													
														
															|  | 
 |  |                     if (flag){
 | 
												
													
														
															|  | 
 |  |                         totalSql += " and p.create_time <= str_to_date('" + endTime + " 23:59:59','YYYY-MM-DD HH24:MI:SS')";
 | 
												
													
														
															|  | 
 |  |                     }else {
 | 
												
													
														
															|  | 
 |  |                         totalSql += " and p.create_time <= to_date('" + endTime + " 23:59:59','YYYY-MM-DD HH24:MI:SS')";
 | 
												
													
														
															|  | 
 |  |                     }
 | 
												
													
														
															|  | 
 |  |                 } else {
 | 
												
													
														
															|  | 
 |  |                     sql += " AND p.create_time <='" + endTime + " 23:59:59'";
 | 
												
													
														
															|  | 
 |  |                 }
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         if (StringUtils.isNotBlank(status)) {
 |  |         if (StringUtils.isNotBlank(status)) {
 | 
												
											
												
													
														
															|  | @ -3388,17 +3459,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         sql +=" order by p.create_time desc ";
 |  |         sql +=" order by p.create_time desc ";
 | 
												
													
														
															|  |         /*       sql += " LIMIT " + (page - 1) * size + "," + size + "";*/
 |  |         /*       sql += " LIMIT " + (page - 1) * size + "," + size + "";*/
 | 
												
													
														
															|  |         logger.info("AAAAAAAAAAAAAAAAAAAAAAA"+ sql);
 |  | 
 | 
												
													
														
															|  |         List<Map<String, Object>> mapList = hibenateUtils.createSQLQuery(sql);
 |  |         List<Map<String, Object>> mapList = hibenateUtils.createSQLQuery(sql);
 | 
												
													
														
															|  |         for (Map<String, Object> map : mapList) {
 |  |         for (Map<String, Object> map : mapList) {
 | 
												
													
														
															|  |             if (map.get("prescriptionId") != null) {
 |  |             if (map.get("prescriptionId") != null) {
 | 
												
													
														
															|  |                 List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = prescriptionInfoDao.findByPrescriptionId(map.get("prescriptionId").toString(), 1);
 |  |                 List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = prescriptionInfoDao.findByPrescriptionId(map.get("prescriptionId").toString(), 1);
 | 
												
													
														
															|  |                 map.put("info", wlyyPrescriptionInfoDOS);
 |  |                 map.put("info", wlyyPrescriptionInfoDOS);
 | 
												
													
														
															|  |                 String drugName = "";
 |  | 
 | 
												
													
														
															|  | 
 |  |                 String infoName = "";
 | 
												
													
														
															|  |                 for (WlyyPrescriptionInfoDO info:wlyyPrescriptionInfoDOS) {
 |  |                 for (WlyyPrescriptionInfoDO info:wlyyPrescriptionInfoDOS) {
 | 
												
													
														
															|  |                     drugName += info.getDrugName() + ",";
 |  | 
 | 
												
													
														
															|  | 
 |  |                     infoName += info.getDrugName() + "*" + info.getQuantity() + ",";
 | 
												
													
														
															|  |                 }
 |  |                 }
 | 
												
													
														
															|  |                 map.put("infooName",drugName);
 |  | 
 | 
												
													
														
															|  | 
 |  |                 map.put("infooName",infoName);
 | 
												
													
														
															|  |             }
 |  |             }
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         return MixEnvelop.getSuccessListWithPage2(BaseHospitalRequestMapping.Prescription.api_success, mapList);
 |  |         return MixEnvelop.getSuccessListWithPage2(BaseHospitalRequestMapping.Prescription.api_success, mapList);
 | 
												
											
												
													
														
															|  | @ -3576,7 +3646,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     public void pushListWrite(OutputStream os, List<Map<String, Object>> ls) throws Exception {
 |  |     public void pushListWrite(OutputStream os, List<Map<String, Object>> ls) throws Exception {
 | 
												
													
														
															|  |         logger.info(ls.toString());
 |  | 
 | 
												
													
														
															|  |         WritableWorkbook wwb = jxl.Workbook.createWorkbook(os);
 |  |         WritableWorkbook wwb = jxl.Workbook.createWorkbook(os);
 | 
												
													
														
															|  |         try {
 |  |         try {
 | 
												
													
														
															|  |             WritableSheet ws;
 |  |             WritableSheet ws;
 | 
												
											
												
													
														
															|  | @ -3658,7 +3727,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                 addCell(ws, i, 1, m.get("realOrder")!=null?m.get("realOrder").toString():n);
 |  |                 addCell(ws, i, 1, m.get("realOrder")!=null?m.get("realOrder").toString():n);
 | 
												
													
														
															|  |                 addCell(ws, i, 2, m.get("patientName")!=null?m.get("patientName").toString():n);
 |  |                 addCell(ws, i, 2, m.get("patientName")!=null?m.get("patientName").toString():n);
 | 
												
													
														
															|  |                 addCell(ws, i, 3, m.get("name")!=null?m.get("name").toString():n);
 |  |                 addCell(ws, i, 3, m.get("name")!=null?m.get("name").toString():n);
 | 
												
													
														
															|  |                 logger.info(m.get("infooName").toString());
 |  | 
 | 
												
													
														
															|  |                 addCell(ws, i, 4, m.get("infooName")!=null?m.get("infooName").toString():n);
 |  |                 addCell(ws, i, 4, m.get("infooName")!=null?m.get("infooName").toString():n);
 | 
												
													
														
															|  |                 addCell(ws, i, 5, opf!=null?opf:n);
 |  |                 addCell(ws, i, 5, opf!=null?opf:n);
 | 
												
													
														
															|  |                 addCell(ws, i, 6, m.get("payTime")!=null?m.get("payTime").toString():n);
 |  |                 addCell(ws, i, 6, m.get("payTime")!=null?m.get("payTime").toString():n);
 | 
												
											
												
													
														
															|  | @ -3795,7 +3863,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                     statuss += " ";
 |  |                     statuss += " ";
 | 
												
													
														
															|  |                 }*/
 |  |                 }*/
 | 
												
													
														
															|  |                 String odry = "";
 |  |                 String odry = "";
 | 
												
													
														
															|  |                 String orderCategory ="";
 |  | 
 | 
												
													
														
															|  | 
 |  |                 String orderCategory = "";
 | 
												
													
														
															|  | 
 |  |                 String odte = "";
 | 
												
													
														
															|  | 
 |  |                 String status ="";
 | 
												
													
														
															|  | 
 |  |                 String pay = "";
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                 if (m.get("orderCategory")==null){
 |  |                 if (m.get("orderCategory")==null){
 | 
												
													
														
															|  |                     odry = null;
 |  |                     odry = null;
 | 
												
													
														
															|  |                 }else {
 |  |                 }else {
 | 
												
											
												
													
														
															|  | @ -3803,19 +3875,31 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                     if (orderCategory.equals("1")) {
 |  |                     if (orderCategory.equals("1")) {
 | 
												
													
														
															|  |                         odry += "专家咨询";
 |  |                         odry += "专家咨询";
 | 
												
													
														
															|  |                     }else if (orderCategory.equals("2")) {
 |  |                     }else if (orderCategory.equals("2")) {
 | 
												
													
														
															|  |                         odry += "图文诊室";
 |  | 
 | 
												
													
														
															|  | 
 |  |                         odry += "复诊";
 | 
												
													
														
															|  |                     }else if (orderCategory.equals("3")) {
 |  |                     }else if (orderCategory.equals("3")) {
 | 
												
													
														
															|  |                         odry += "视频诊室";
 |  |                         odry += "视频诊室";
 | 
												
													
														
															|  |                     }else if (orderCategory.equals("4")) {
 |  |                     }else if (orderCategory.equals("4")) {
 | 
												
													
														
															|  |                         odry += "处方";
 |  |                         odry += "处方";
 | 
												
													
														
															|  | 
 |  |                         odte += "处方";
 | 
												
													
														
															|  |                     }else if (orderCategory.equals("5")) {
 |  |                     }else if (orderCategory.equals("5")) {
 | 
												
													
														
															|  |                         odry += "就诊卡充值";
 |  |                         odry += "就诊卡充值";
 | 
												
													
														
															|  | 
 |  |                         odte += "就诊卡充值";
 | 
												
													
														
															|  |                     }else {
 |  |                     }else {
 | 
												
													
														
															|  |                         odry += " ";
 |  |                         odry += " ";
 | 
												
													
														
															|  |                     }
 |  |                     }
 | 
												
													
														
															|  |                 }
 |  |                 }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                 String status ="";
 |  | 
 | 
												
													
														
															|  | 
 |  |                 if(m.get("orderType") == null) {
 | 
												
													
														
															|  | 
 |  |                     odte = null;
 | 
												
													
														
															|  | 
 |  |                 }else{
 | 
												
													
														
															|  | 
 |  |                     String orderType =  m.get("orderType").toString();
 | 
												
													
														
															|  | 
 |  |                     if (orderType.equalsIgnoreCase("1")) {
 | 
												
													
														
															|  | 
 |  |                         odte += "图文";
 | 
												
													
														
															|  | 
 |  |                     }else if (orderType.equalsIgnoreCase("3")) {
 | 
												
													
														
															|  | 
 |  |                         odte += "视频";
 | 
												
													
														
															|  | 
 |  |                     }
 | 
												
													
														
															|  | 
 |  |                 }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                 if (m.get("status") == null) {
 |  |                 if (m.get("status") == null) {
 | 
												
													
														
															|  |                     status = null;
 |  |                     status = null;
 | 
												
													
														
															|  |                 }else {
 |  |                 }else {
 | 
												
											
												
													
														
															|  | @ -3839,22 +3923,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                     }
 |  |                     }
 | 
												
													
														
															|  |                 }
 |  |                 }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                 String odte = "";
 |  | 
 | 
												
													
														
															|  |                 if(m.get("orderType") == null) {
 |  | 
 | 
												
													
														
															|  |                     odte = null;
 |  | 
 | 
												
													
														
															|  |                 }else{
 |  | 
 | 
												
													
														
															|  |                     String orderType =  m.get("orderType").toString();
 |  | 
 | 
												
													
														
															|  |                     if (orderType.equalsIgnoreCase("1")) {
 |  | 
 | 
												
													
														
															|  |                         odte += "图文";
 |  | 
 | 
												
													
														
															|  |                     }else if (orderType.equalsIgnoreCase("3")) {
 |  | 
 | 
												
													
														
															|  |                         odte += "视频";
 |  | 
 | 
												
													
														
															|  |                     }else if (orderType.equalsIgnoreCase("10")) {
 |  | 
 | 
												
													
														
															|  |                         odte += "就诊卡号";
 |  | 
 | 
												
													
														
															|  |                     }else if (orderType.equalsIgnoreCase("11")) {
 |  | 
 | 
												
													
														
															|  |                         odte += "门诊卡号";
 |  | 
 | 
												
													
														
															|  |                     }
 |  | 
 | 
												
													
														
															|  |                 }
 |  | 
 | 
												
													
														
															|  |                 String pay = "";
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                 if (m.get("payPrice") == null) {
 |  |                 if (m.get("payPrice") == null) {
 | 
												
													
														
															|  |                     pay = null;
 |  |                     pay = null;
 | 
												
													
														
															|  |                 }else{
 |  |                 }else{
 | 
												
											
												
													
														
															|  | @ -3868,7 +3938,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                     time = m.get("payTime").toString();
 |  |                     time = m.get("payTime").toString();
 | 
												
													
														
															|  |                 }
 |  |                 }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                 addCell(ws, i, 0, m.get("id")!=null?m.get("id").toString():n);
 |  |                 addCell(ws, i, 0, m.get("id")!=null?m.get("id").toString():n);
 | 
												
													
														
															|  |                 addCell(ws, i, 1, time!=null?time:n);
 |  |                 addCell(ws, i, 1, time!=null?time:n);
 | 
												
													
														
															|  |                 addCell(ws, i, 2, (String) m.get("orderNo")!=null?(String) m.get("orderNo"):n);
 |  |                 addCell(ws, i, 2, (String) m.get("orderNo")!=null?(String) m.get("orderNo"):n);
 | 
												
											
												
													
														
															|  | @ -5168,6 +5237,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                 newConfig.setKeyword1( outpatientDO.getHospitalName());
 |  |                 newConfig.setKeyword1( outpatientDO.getHospitalName());
 | 
												
													
														
															|  |                 newConfig.setKeyword2(outpatientDO.getDoctorName());
 |  |                 newConfig.setKeyword2(outpatientDO.getDoctorName());
 | 
												
													
														
															|  |                 newConfig.setKeyword3( doctorDO.getFee());
 |  |                 newConfig.setKeyword3( doctorDO.getFee());
 | 
												
													
														
															|  | 
 |  |                 newConfig.setPagepath(newConfig.getPagepath() + "" + outpatientDO.getId());
 | 
												
													
														
															|  |                 //发起微信消息模板推送
 |  |                 //发起微信消息模板推送
 | 
												
													
														
															|  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 |  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 | 
												
													
														
															|  |                 logger.info("眼科微信消息模板推送 医生拒诊开始");
 |  |                 logger.info("眼科微信消息模板推送 医生拒诊开始");
 | 
												
											
												
													
														
															|  | @ -5180,6 +5250,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                 scene="jzddgcts";
 |  |                 scene="jzddgcts";
 | 
												
													
														
															|  |                 WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_outpatient_timeout_remind", scene, 1);
 |  |                 WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_outpatient_timeout_remind", scene, 1);
 | 
												
													
														
															|  |                 BeanUtils.copyProperties(config, newConfig);
 |  |                 BeanUtils.copyProperties(config, newConfig);
 | 
												
													
														
															|  | 
 |  |                 newConfig.setPagepath(newConfig.getPagepath() + "" + outpatientDO.getId());
 | 
												
													
														
															|  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 |  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 | 
												
													
														
															|  |                 logger.info("就诊等待过长提示");
 |  |                 logger.info("就诊等待过长提示");
 | 
												
													
														
															|  |             } else if ("payRemind".equalsIgnoreCase(titelType)) {
 |  |             } else if ("payRemind".equalsIgnoreCase(titelType)) {
 | 
												
											
												
													
														
															|  | @ -5205,6 +5276,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                 }
 |  |                 }
 | 
												
													
														
															|  |                 newConfig.setKeyword2(outpatientDO.getHospitalName());
 |  |                 newConfig.setKeyword2(outpatientDO.getHospitalName());
 | 
												
													
														
															|  |                 newConfig.setKeyword3(outpatientDO.getDoctorName());
 |  |                 newConfig.setKeyword3(outpatientDO.getDoctorName());
 | 
												
													
														
															|  | 
 |  |                 String path = "returnVisit/record?outpatientId="+outpatientDO.getId();
 | 
												
													
														
															|  | 
 |  |                 newConfig.setPagepath(newConfig.getPagepath()+URLEncoder.encode(path));
 | 
												
													
														
															|  |                 //发起微信消息模板推送
 |  |                 //发起微信消息模板推送
 | 
												
													
														
															|  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 |  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 | 
												
													
														
															|  |                 logger.info("眼科微信消息模板推送 就诊支付提醒开始");
 |  |                 logger.info("眼科微信消息模板推送 就诊支付提醒开始");
 | 
												
											
												
													
														
															|  | @ -5237,6 +5310,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                 }
 |  |                 }
 | 
												
													
														
															|  |                 newConfig.setKeyword2(outpatientDO.getHospitalName());
 |  |                 newConfig.setKeyword2(outpatientDO.getHospitalName());
 | 
												
													
														
															|  |                 newConfig.setKeyword3(outpatientDO.getDoctorName());
 |  |                 newConfig.setKeyword3(outpatientDO.getDoctorName());
 | 
												
													
														
															|  | 
 |  |                 String path = "returnVisit/record?outpatientId="+outpatientDO.getId();
 | 
												
													
														
															|  | 
 |  |                 newConfig.setPagepath(newConfig.getPagepath() +URLEncoder.encode(path));
 | 
												
													
														
															|  |                 //发起微信消息模板推送
 |  |                 //发起微信消息模板推送
 | 
												
													
														
															|  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 |  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 | 
												
													
														
															|  |             } else if ("doctorPick".equalsIgnoreCase(titelType)) {
 |  |             } else if ("doctorPick".equalsIgnoreCase(titelType)) {
 | 
												
											
												
													
														
															|  | @ -5263,6 +5338,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                 newConfig.setRemark(config.getRemark().replace("key1",outpatientDO.getDoctorName()));
 |  |                 newConfig.setRemark(config.getRemark().replace("key1",outpatientDO.getDoctorName()));
 | 
												
													
														
															|  |                 newConfig.setKeyword2(outpatientDO.getHospitalName());
 |  |                 newConfig.setKeyword2(outpatientDO.getHospitalName());
 | 
												
													
														
															|  |                 newConfig.setKeyword3(outpatientDO.getDoctorName());
 |  |                 newConfig.setKeyword3(outpatientDO.getDoctorName());
 | 
												
													
														
															|  | 
 |  |                 String path = "returnVisit/record?outpatientId="+outpatientDO.getId();
 | 
												
													
														
															|  | 
 |  |                 newConfig.setPagepath(newConfig.getPagepath() +URLEncoder.encode(path));
 | 
												
													
														
															|  |                 //发起微信消息模板推送
 |  |                 //发起微信消息模板推送
 | 
												
													
														
															|  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 |  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 | 
												
													
														
															|  |             }else if ("patientCancel".equalsIgnoreCase(titelType)) {
 |  |             }else if ("patientCancel".equalsIgnoreCase(titelType)) {
 | 
												
											
												
													
														
															|  | @ -5282,6 +5359,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                 newConfig.setKeyword1( outpatientDO.getHospitalName());
 |  |                 newConfig.setKeyword1( outpatientDO.getHospitalName());
 | 
												
													
														
															|  |                 newConfig.setKeyword2(outpatientDO.getDoctorName());
 |  |                 newConfig.setKeyword2(outpatientDO.getDoctorName());
 | 
												
													
														
															|  |                 newConfig.setKeyword3(outpatientDO.getFee()==null?"0":outpatientDO.getFee().toString());
 |  |                 newConfig.setKeyword3(outpatientDO.getFee()==null?"0":outpatientDO.getFee().toString());
 | 
												
													
														
															|  | 
 |  |                 String path = "returnVisit/record?outpatientId="+outpatientDO.getId();
 | 
												
													
														
															|  | 
 |  |                 newConfig.setPagepath(newConfig.getPagepath() + URLEncoder.encode(path));
 | 
												
													
														
															|  |                 //发起微信消息模板推送
 |  |                 //发起微信消息模板推送
 | 
												
													
														
															|  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 |  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 | 
												
													
														
															|  |                 logger.info("眼科微信消息模板推送");
 |  |                 logger.info("眼科微信消息模板推送");
 | 
												
											
												
													
														
															|  | @ -5294,6 +5373,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                 newConfig.setKeyword1( "处方支付");
 |  |                 newConfig.setKeyword1( "处方支付");
 | 
												
													
														
															|  |                 newConfig.setKeyword2(outpatientDO.getHospitalName());
 |  |                 newConfig.setKeyword2(outpatientDO.getHospitalName());
 | 
												
													
														
															|  |                 newConfig.setKeyword3(outpatientDO.getDoctorName());
 |  |                 newConfig.setKeyword3(outpatientDO.getDoctorName());
 | 
												
													
														
															|  | 
 |  |                 String path = "returnVisit/preChat?type=16&outpatientId="+outpatientDO.getId();
 | 
												
													
														
															|  | 
 |  |                 newConfig.setPagepath(newConfig.getPagepath()+URLEncoder.encode(path) );
 | 
												
													
														
															|  |                 //发起微信消息模板推送
 |  |                 //发起微信消息模板推送
 | 
												
													
														
															|  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 |  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 | 
												
													
														
															|  |                 logger.info("眼科微信消息模板推送 处方支付提醒开始");
 |  |                 logger.info("眼科微信消息模板推送 处方支付提醒开始");
 | 
												
											
												
													
														
															|  | @ -5315,6 +5396,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                 newConfig.setKeyword3( outpatientDO.getDoctorName());
 |  |                 newConfig.setKeyword3( outpatientDO.getDoctorName());
 | 
												
													
														
															|  |                 newConfig.setKeyword4(DateUtil.dateToStrLong(outpatientDO.getRegisterDate()));
 |  |                 newConfig.setKeyword4(DateUtil.dateToStrLong(outpatientDO.getRegisterDate()));
 | 
												
													
														
															|  |                 newConfig.setKeyword5(generalDoctorWaitingNumber(doctorDO.getId(), wxId, outpatientId));
 |  |                 newConfig.setKeyword5(generalDoctorWaitingNumber(doctorDO.getId(), wxId, outpatientId));
 | 
												
													
														
															|  | 
 |  |                 String path = "returnVisit/record?outpatientId="+outpatientDO.getId();
 | 
												
													
														
															|  | 
 |  |                 newConfig.setPagepath(newConfig.getPagepath() +URLEncoder.encode(path));
 | 
												
													
														
															|  |                 //发起微信消息模板推送
 |  |                 //发起微信消息模板推送
 | 
												
													
														
															|  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 |  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 | 
												
													
														
															|  |                 logger.info("眼科微信消息模板推送 视频问诊预约提醒开始");
 |  |                 logger.info("眼科微信消息模板推送 视频问诊预约提醒开始");
 | 
												
											
												
													
														
															|  | @ -5326,6 +5409,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                 newConfig.setFirst(config.getFirst().replaceFirst("key1", consPatientDO.getName()));
 |  |                 newConfig.setFirst(config.getFirst().replaceFirst("key1", consPatientDO.getName()));
 | 
												
													
														
															|  |                 newConfig.setKeyword2(hospitalDO.getOrgName());
 |  |                 newConfig.setKeyword2(hospitalDO.getOrgName());
 | 
												
													
														
															|  |                 newConfig.setKeyword3(consDoctorDO.getName());
 |  |                 newConfig.setKeyword3(consDoctorDO.getName());
 | 
												
													
														
															|  | 
 |  |                 String path = "fuwupingjia?consultCode="+consultTeam.getConsult();
 | 
												
													
														
															|  | 
 |  |                 newConfig.setPagepath(newConfig.getPagepath()+URLEncoder.encode(path));
 | 
												
													
														
															|  |                 //发起微信消息模板推送
 |  |                 //发起微信消息模板推送
 | 
												
													
														
															|  |                 newConfig.setUrl(newConfig.getUrl() + "" + consultTeam.getConsult());
 |  |                 newConfig.setUrl(newConfig.getUrl() + "" + consultTeam.getConsult());
 | 
												
													
														
															|  |                 logger.info("极光消息推送 医生拒诊开始");
 |  |                 logger.info("极光消息推送 医生拒诊开始");
 | 
												
											
												
													
														
															|  | @ -5348,7 +5433,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                 }
 |  |                 }
 | 
												
													
														
															|  |                 newConfig.setKeyword1( outpatientDO.getHospitalName());
 |  |                 newConfig.setKeyword1( outpatientDO.getHospitalName());
 | 
												
													
														
															|  |                 newConfig.setKeyword2(outpatientDO.getDoctorName());
 |  |                 newConfig.setKeyword2(outpatientDO.getDoctorName());
 | 
												
													
														
															|  |                 newConfig.setKeyword3( doctorDO.getFee());
 |  | 
 | 
												
													
														
															|  | 
 |  |                 newConfig.setKeyword3(outpatientDO.getFee()==null?"0":outpatientDO.getFee().toString());
 | 
												
													
														
															|  | 
 |  |                 String path = "returnVisit/record?outpatientId="+outpatientDO.getId();
 | 
												
													
														
															|  | 
 |  |                 newConfig.setPagepath(newConfig.getPagepath() +URLEncoder.encode(path));
 | 
												
													
														
															|  |                 //发起微信消息模板推送
 |  |                 //发起微信消息模板推送
 | 
												
													
														
															|  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 |  |                 newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
 | 
												
													
														
															|  |                 logger.info("眼科微信消息模板推送 系统拒诊开始");
 |  |                 logger.info("眼科微信消息模板推送 系统拒诊开始");
 | 
												
											
												
													
														
															|  | @ -5501,6 +5588,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |             newConfig.setKeyword3(mailNo);
 |  |             newConfig.setKeyword3(mailNo);
 | 
												
													
														
															|  |             newConfig.setKeyword4(remindMsg);
 |  |             newConfig.setKeyword4(remindMsg);
 | 
												
													
														
															|  |             newConfig.setRemark(config.getRemark());
 |  |             newConfig.setRemark(config.getRemark());
 | 
												
													
														
															|  | 
 |  |             String path = "returnVisit/logistics?outpatientId="+outpatientId+"&prescriptionCode="+prescriptionId;
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |             newConfig.setPagepath(newConfig.getPagepath()+ URLEncoder.encode(path));
 | 
												
													
														
															|  |             newConfig.setUrl(newConfig.getUrl().replace("key1",outpatientId).replace("key2",prescriptionId));
 |  |             newConfig.setUrl(newConfig.getUrl().replace("key1",outpatientId).replace("key2",prescriptionId));
 | 
												
													
														
															|  |             logger.info("=======setUrl========" + newConfig.getUrl());
 |  |             logger.info("=======setUrl========" + newConfig.getUrl());
 | 
												
													
														
															|  |             WxAccessTokenDO wxAccessTokenDO = wxAccessTokenService.getWxAccessTokenById(wechatId);
 |  |             WxAccessTokenDO wxAccessTokenDO = wxAccessTokenService.getWxAccessTokenById(wechatId);
 | 
												
											
												
													
														
															|  | @ -11994,7 +12084,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     public Map saveNatAppointment(String chargeAmount,String inspectionName,String mediaCard,String patientId,String name,String cardNo,String cardType,String mobile,
 |  |     public Map saveNatAppointment(String chargeAmount,String inspectionName,String mediaCard,String patientId,String name,String cardNo,String cardType,String mobile,
 | 
												
													
														
															|  |                                    String firstJobCode,String firstJobName,String secondJobCode,String secondJobName,String natTime,String address,String provinceName,String cityName,String townName,String streetName,String pm,String pushFlag,String cardNoType,String consumer,
 |  |                                    String firstJobCode,String firstJobName,String secondJobCode,String secondJobName,String natTime,String address,String provinceName,String cityName,String townName,String streetName,String pm,String pushFlag,String cardNoType,String consumer,
 | 
												
													
														
															|  |                                   String checkPart,String chargeFlag,String chargeCode,String icdCode,String preNo) throws Exception {
 |  | 
 | 
												
													
														
															|  | 
 |  |                                   String checkPart,String chargeFlag,String chargeCode,String icdCode,String preNo,String idnoType) throws Exception {
 | 
												
													
														
															|  |         Map returnMap = new HashMap();
 |  |         Map returnMap = new HashMap();
 | 
												
													
														
															|  |         Integer winNo = 6;
 |  |         Integer winNo = 6;
 | 
												
													
														
															|  |         if (checkPart==null||checkPart==""){
 |  |         if (checkPart==null||checkPart==""){
 | 
												
											
												
													
														
															|  | @ -12040,6 +12130,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |             jsondate.put("targetChild",secondJobName);
 |  |             jsondate.put("targetChild",secondJobName);
 | 
												
													
														
															|  |             jsondate.put("target",firstJobName);
 |  |             jsondate.put("target",firstJobName);
 | 
												
													
														
															|  |             jsondate.put("quantity",1);
 |  |             jsondate.put("quantity",1);
 | 
												
													
														
															|  | 
 |  |             jsondate.put("idno_type",idnoType);
 | 
												
													
														
															|  |             Map<String,Object> map = findRandomDoctor();
 |  |             Map<String,Object> map = findRandomDoctor();
 | 
												
													
														
															|  |             net.sf.json.JSONObject rs = new JSONObject();
 |  |             net.sf.json.JSONObject rs = new JSONObject();
 | 
												
													
														
															|  |             if (map!=null){
 |  |             if (map!=null){
 | 
												
											
												
													
														
															|  | @ -12087,6 +12178,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                     baseNatAppointmentDO.setIcdCode(icdCode);
 |  |                     baseNatAppointmentDO.setIcdCode(icdCode);
 | 
												
													
														
															|  |                     baseNatAppointmentDO.setChargeCode(chargeCode);
 |  |                     baseNatAppointmentDO.setChargeCode(chargeCode);
 | 
												
													
														
															|  |                     baseNatAppointmentDO.setWinNo(String.valueOf(winNo));
 |  |                     baseNatAppointmentDO.setWinNo(String.valueOf(winNo));
 | 
												
													
														
															|  | 
 |  |                     baseNatAppointmentDO.setIdnoType(idnoType);
 | 
												
													
														
															|  |                     baseNatAppointmentDO.setDept("3150000");
 |  |                     baseNatAppointmentDO.setDept("3150000");
 | 
												
													
														
															|  |                     baseNatAppointmentDO.setDeptName("感染疾病科");
 |  |                     baseNatAppointmentDO.setDeptName("感染疾病科");
 | 
												
													
														
															|  |                     baseNatAppointmentDO.setAmpm(pm);
 |  |                     baseNatAppointmentDO.setAmpm(pm);
 | 
												
											
												
													
														
															|  | @ -12259,6 +12351,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |             baseNatAppointmentDO.setAmpm(pm);
 |  |             baseNatAppointmentDO.setAmpm(pm);
 | 
												
													
														
															|  |             baseNatAppointmentDO.setHospitalFlag(pushFlag);
 |  |             baseNatAppointmentDO.setHospitalFlag(pushFlag);
 | 
												
													
														
															|  |             baseNatAppointmentDO.setConsumer(consumer);
 |  |             baseNatAppointmentDO.setConsumer(consumer);
 | 
												
													
														
															|  | 
 |  |             baseNatAppointmentDO.setIdnoType(idnoType);
 | 
												
													
														
															|  |             BasePatientDO basePatientDO = basePatientDao.findById(consumer);
 |  |             BasePatientDO basePatientDO = basePatientDao.findById(consumer);
 | 
												
													
														
															|  |             baseNatAppointmentDO.setConsumerName(basePatientDO.getName());
 |  |             baseNatAppointmentDO.setConsumerName(basePatientDO.getName());
 | 
												
													
														
															|  |             baseNatAppointmentDO= baseNatAppointmentDao.save(baseNatAppointmentDO);
 |  |             baseNatAppointmentDO= baseNatAppointmentDao.save(baseNatAppointmentDO);
 | 
												
											
												
													
														
															|  | @ -12388,6 +12481,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                 baseNatAppointmentDO.setName(name);
 |  |                 baseNatAppointmentDO.setName(name);
 | 
												
													
														
															|  |                 baseNatAppointmentDO.setCardNo(cardNo.trim());
 |  |                 baseNatAppointmentDO.setCardNo(cardNo.trim());
 | 
												
													
														
															|  |                 baseNatAppointmentDO.setCardType(cardType);
 |  |                 baseNatAppointmentDO.setCardType(cardType);
 | 
												
													
														
															|  | 
 |  |                 baseNatAppointmentDO.setIdnoType(idnoType);
 | 
												
													
														
															|  |                 baseNatAppointmentDO.setAddress(address);
 |  |                 baseNatAppointmentDO.setAddress(address);
 | 
												
													
														
															|  |                 baseNatAppointmentDO.setAppointmentTime(DateUtil.strToDateLong(natTime));
 |  |                 baseNatAppointmentDO.setAppointmentTime(DateUtil.strToDateLong(natTime));
 | 
												
													
														
															|  |                 baseNatAppointmentDO.setOderNum(orderNum);
 |  |                 baseNatAppointmentDO.setOderNum(orderNum);
 |