|
@ -35,6 +35,7 @@ import com.yihu.jw.order.pay.wx.WeChatConfig;
|
|
|
import com.yihu.jw.order.pay.ylz.YlzPayService;
|
|
|
import com.yihu.jw.patient.dao.BasePatientDao;
|
|
|
import com.yihu.jw.restmodel.web.MixEnvelop;
|
|
|
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
|
|
|
import com.yihu.jw.sms.dao.BaseSmsTemplateDao;
|
|
|
import com.yihu.jw.util.common.IdCardUtil;
|
|
|
import com.yihu.jw.util.common.QrcodeUtil;
|
|
@ -2037,6 +2038,132 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
|
|
|
mixEnvelop.setTotalCount(listCount==null?0:listCount.size());
|
|
|
return mixEnvelop;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public MixEnvelop pushYktCardCharge(String startTime, String endTime, String orderNo, String yktOrderNo, String patientName
|
|
|
, String idCard, String medicard,Integer status, Integer page, Integer pageSize,String orderType,String orderCategory){
|
|
|
String sql = " SELECT\n" +
|
|
|
"\tIFNULL(t.id, ' ') AS \"id\",\n" +
|
|
|
"\tIFNULL(t.patient, ' ') AS \"patient\",\n" +
|
|
|
"\tIFNULL(t.patient_name, ' ') AS \"patientName\",\n" +
|
|
|
"\tIFNULL(t.order_no, ' ') AS \"orderNo\",\n" +
|
|
|
"\tIFNULL(t.order_type, ' ') AS \"orderType\",\n" +
|
|
|
"\tIFNULL(t.relation_code, ' ') AS \"relationCode\",\n" +
|
|
|
"\tIFNULL(t.relation_name, ' ') AS \"relationName\",\n" +
|
|
|
"\tIFNULL(t.description, ' ') AS \"description\",\n" +
|
|
|
"\tIFNULL(t.pay_type, ' ') AS \"payType\",\n" +
|
|
|
"\tIFNULL(t.pay_price, ' ') AS \"payPrice\",\n" +
|
|
|
"\tIFNULL(t.pay_time, ' ') AS \"payTime\",\n" +
|
|
|
"\tIFNULL(t.upload_status, ' ') AS \"uploadStatus\",\n" +
|
|
|
"\tIFNULL(t.create_time, ' ') AS \"createTime\",\n" +
|
|
|
"\tIFNULL(t.remark, ' ') AS \"remark\",\n" +
|
|
|
"\tIFNULL(t.relation_code, ' ') AS \"medicard\",\n" +
|
|
|
"\tIFNULL(t.yk_order_no, ' ') AS \"ykOrderNo\",\n" +
|
|
|
"\tIFNULL(t.yk_order_id, ' ') AS \"ykOrderId\",\n" +
|
|
|
"\tIFNULL(b.idcard, ' ') AS \"idcard\",\n" +
|
|
|
"\tIFNULL(b.mobile, ' ') AS \"mobile\",\n" +
|
|
|
"\tCASE t. STATUS\n" +
|
|
|
"WHEN 0 THEN\n" +
|
|
|
"\t'未支付'\n" +
|
|
|
"WHEN 1 THEN\n" +
|
|
|
"\t'已支付'\n" +
|
|
|
"WHEN 2 THEN\n" +
|
|
|
"\t'交易关闭'\n" +
|
|
|
"WHEN 3 THEN\n" +
|
|
|
"\t'支付超时'\n" +
|
|
|
"WHEN 4 THEN\n" +
|
|
|
"\t'交易完成'\n" +
|
|
|
"WHEN 5 THEN\n" +
|
|
|
"\t'交易进行中'\n" +
|
|
|
"WHEN 6 THEN\n" +
|
|
|
"\t'退款申请'\n" +
|
|
|
"WHEN 9 THEN\n" +
|
|
|
"\t'退款完成'\n" +
|
|
|
"WHEN NULL THEN\n" +
|
|
|
"\t' '\n" +
|
|
|
"ELSE\n" +
|
|
|
"\tt. STATUS\n" +
|
|
|
"END AS \"status\",\n" +
|
|
|
"\tCASE t.order_category\n" +
|
|
|
"WHEN '2' THEN\n" +
|
|
|
"\t'2'\n" +
|
|
|
"WHEN '3' THEN\n" +
|
|
|
"\t'2'\n" +
|
|
|
"WHEN NULL THEN\n" +
|
|
|
"\t' '\n" +
|
|
|
"ELSE\n" +
|
|
|
"\tt.order_category\n" +
|
|
|
"END AS \"orderCategory\"\n" +
|
|
|
"FROM\n" +
|
|
|
"\tbase_business_order_pay t\n" +
|
|
|
"LEFT JOIN base_patient b ON t.patient = b.id\n" +
|
|
|
"WHERE\n" +
|
|
|
"\t1 = 1";
|
|
|
if (StringUtils.isNoneBlank(startTime)){
|
|
|
if("xm_ykyy_wx".equals(wechatId)){
|
|
|
if (flag){
|
|
|
sql+=" and t.create_time > '" + startTime + "'";
|
|
|
}else {
|
|
|
sql+=" and t.create_time > to_date('" + startTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
|
|
|
}
|
|
|
}else{
|
|
|
sql+=" and t.create_time > '" + startTime + "'";
|
|
|
}
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(endTime)){
|
|
|
if("xm_ykyy_wx".equals(wechatId)){
|
|
|
if (flag){
|
|
|
sql+=" and t.create_time <= '" + endTime + "'";
|
|
|
}else {
|
|
|
sql+=" and t.create_time <= to_date('" + endTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
|
|
|
}
|
|
|
}else{
|
|
|
sql+=" and t.create_time <= '" + endTime + "'";
|
|
|
}
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(orderNo)){
|
|
|
sql+=" and t.order_no ='"+orderNo+"'";
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(yktOrderNo)){
|
|
|
sql+=" and t.yk_order_no ='"+yktOrderNo+"'";
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(patientName)){
|
|
|
sql+=" and t.patient_name like '%"+patientName+"%'";
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(idCard)){
|
|
|
sql+=" and b.idcard ='"+idCard+"'";
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(medicard)){
|
|
|
sql+=" and t.relation_code ='"+medicard+"'";
|
|
|
}
|
|
|
if (status!=null){
|
|
|
sql+=" and t.status ="+status+"";
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNoneBlank(orderType)){
|
|
|
sql+=" and t.order_type ="+orderType+"";
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNoneBlank(orderCategory)){
|
|
|
if (orderCategory.equalsIgnoreCase("2")){
|
|
|
sql+=" and t.order_category IN ('2','3') ";
|
|
|
}
|
|
|
sql+=" and t.order_category = '"+orderCategory+"' ";
|
|
|
}
|
|
|
|
|
|
sql+=" order by t.create_time desc ";
|
|
|
List<Map<String,Object>> mapList = hibenateUtils.createSQLQuery(sql);
|
|
|
/*for (Map<String,Object> map:list){
|
|
|
if (map.get("createTime")!=null){
|
|
|
map.put("createTime",);
|
|
|
}
|
|
|
}*/
|
|
|
return MixEnvelop.getSuccessListWithPage2(BaseHospitalRequestMapping.Prescription.api_success, mapList);
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public JSONObject validateGeet( String geetestChallenge,String geetestValidate,String geetestSeccode,String isPatient){
|
|
|
|
|
|
String validateUrl = "http://localhost:8088/validate";
|