|
@ -190,7 +190,7 @@ public class PrescriptionInfoService extends BaseService {
|
|
params.add(patient);
|
|
params.add(patient);
|
|
//查询已经审核通过的,否则查询所有
|
|
//查询已经审核通过的,否则查询所有
|
|
if ("2".equals(type)) {
|
|
if ("2".equals(type)) {
|
|
sqlBuffer.append(" AND p.status >=10 ");
|
|
|
|
|
|
sqlBuffer.append(" AND p.status >="+PrescriptionLog.PrescriptionLogStatus.wait_pay.getValue());
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(startDate)) {
|
|
if (StringUtils.isNotBlank(startDate)) {
|
|
sqlBuffer.append(" AND p.create_time >= ?");
|
|
sqlBuffer.append(" AND p.create_time >= ?");
|
|
@ -211,6 +211,13 @@ public class PrescriptionInfoService extends BaseService {
|
|
String code = (String) map.get("code");
|
|
String code = (String) map.get("code");
|
|
map.put("patient", p.getCode());
|
|
map.put("patient", p.getCode());
|
|
map.put("patientName", p.getName());
|
|
map.put("patientName", p.getName());
|
|
|
|
StringBuffer isAdjustSql = new StringBuffer("SELECT a.id FROM wlyy_prescription_adjust a WHERE a.prescription_code = ? ");
|
|
|
|
List<Map<String,Object>> adjusts = jdbcTemplate.queryForList(isAdjustSql.toString(),new Object[]{code});
|
|
|
|
if(adjusts!=null&&adjusts.size()>0){
|
|
|
|
map.put("isAdjust", "1");
|
|
|
|
}else{
|
|
|
|
map.put("isAdjust", "0");
|
|
|
|
}
|
|
map.put("prescriptionInfo", prescriptionDiagnosisService.getPrescriptionInfo(code));
|
|
map.put("prescriptionInfo", prescriptionDiagnosisService.getPrescriptionInfo(code));
|
|
map.put("prescriptionDt", prescriptionDiagnosisService.getPrescriptionDiagnosis(code));
|
|
map.put("prescriptionDt", prescriptionDiagnosisService.getPrescriptionDiagnosis(code));
|
|
}
|
|
}
|
|
@ -307,8 +314,8 @@ public class PrescriptionInfoService extends BaseService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
if (prescription != null && prescription.getStatus() == PrescriptionLog.PrescriptionLogStatus.wait_pay.getValue()) {
|
|
|
|
Long s = (prescription.getCreateTime().getTime() - new Date().getTime()) / 1000;
|
|
|
|
|
|
if (prescription!=null&&reviewed != null && prescription.getStatus() == PrescriptionLog.PrescriptionLogStatus.wait_pay.getValue()&&reviewed.getReviewedTime()!=null) {
|
|
|
|
Long s = (new Date().getTime()-reviewed.getReviewedTime().getTime()) / 1000;
|
|
//rs.put("time",s);
|
|
//rs.put("time",s);
|
|
if (s > 172800) {
|
|
if (s > 172800) {
|
|
prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.pay_outtime.getValue());
|
|
prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.pay_outtime.getValue());
|
|
@ -530,7 +537,7 @@ public class PrescriptionInfoService extends BaseService {
|
|
p.setReviewedTime(new Date());
|
|
p.setReviewedTime(new Date());
|
|
reviewed.setReason(reason);
|
|
reviewed.setReason(reason);
|
|
reviewed.setReviewedTime(new Date());
|
|
reviewed.setReviewedTime(new Date());
|
|
reviewed.setStatus(PrescriptionReviewed.PrescriptionReviewedStatus.del.getValue());
|
|
|
|
|
|
reviewed.setStatus(PrescriptionReviewed.PrescriptionReviewedStatus.reviewed_fail.getValue());
|
|
|
|
|
|
//修改系统的续方消息的审核状态
|
|
//修改系统的续方消息的审核状态
|
|
messageDao.updatePreScriptionMessage(p.getConsult(), "2", 6);
|
|
messageDao.updatePreScriptionMessage(p.getConsult(), "2", 6);
|
|
@ -821,10 +828,10 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
|
|
|
List<Map<String, Object>> states = new ArrayList<>();
|
|
List<Map<String, Object>> states = new ArrayList<>();
|
|
|
|
|
|
Map<String, Object> map0 = new HashMap<>();
|
|
|
|
map0.put("name", "续方申请通过");
|
|
|
|
map0.put("code", PrescriptionLog.PrescriptionLogStatus.wait_pay.getValue());
|
|
|
|
states.add(map0);
|
|
|
|
|
|
// Map<String, Object> map0 = new HashMap<>();
|
|
|
|
// map0.put("name", "续方申请通过");
|
|
|
|
// map0.put("code", PrescriptionLog.PrescriptionLogStatus.wait_pay.getValue());
|
|
|
|
// states.add(map0);
|
|
|
|
|
|
Map<String, Object> map1 = new HashMap<>();
|
|
Map<String, Object> map1 = new HashMap<>();
|
|
map1.put("name", "订单已支付");
|
|
map1.put("name", "订单已支付");
|
|
@ -1162,4 +1169,10 @@ public class PrescriptionInfoService extends BaseService {
|
|
List<Map<String, Object>> rs = jdbcTemplate.queryForList(sql.toString());
|
|
List<Map<String, Object>> rs = jdbcTemplate.queryForList(sql.toString());
|
|
return new JSONArray(rs);
|
|
return new JSONArray(rs);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public JSONArray getPhysicMinDose(String code) {
|
|
|
|
StringBuffer sql = new StringBuffer("SELECT t.min_dose AS minDose,t.physicCode FROM zy_iv_physic_dict t WHERE t.physic_code = ?");
|
|
|
|
List<Map<String, Object>> rs = jdbcTemplate.queryForList(sql.toString());
|
|
|
|
return new JSONArray(rs);
|
|
|
|
}
|
|
}
|
|
}
|