|
@ -49,7 +49,7 @@ public class SynergyManageService {
|
|
|
* @param priority
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public void acceptTaskList(String code,String keywords,Integer workorderType,
|
|
|
public List<Map<String,Object>> acceptTaskList(String code,String keywords,Integer workorderType,
|
|
|
Integer isMyTask,Integer status,Integer priority,Integer timeout,String workorderCode,
|
|
|
String principal,String serviceStartTime,String serviceEndTime,
|
|
|
String patientName,String ssc,String idcard) throws Exception{
|
|
@ -81,7 +81,7 @@ public class SynergyManageService {
|
|
|
}
|
|
|
//是否超时
|
|
|
if(timeout!=null){
|
|
|
|
|
|
whereSql +=" and w.service_time >'"+DateUtil.dateToStrLong(new Date())+"' ";
|
|
|
}
|
|
|
//服务编码
|
|
|
if(StringUtils.isNotEmpty(workorderCode)){
|
|
@ -113,7 +113,7 @@ public class SynergyManageService {
|
|
|
String sql =" select DISTINCT w.* from wlyy.manage_synergy_workorder w " +servicerTable+
|
|
|
" left join wlyy.vmanage_synergy_workorder_executor e on e.workorder_code=w.code " +
|
|
|
" where w.status in (2,3) and w.del=1 " +
|
|
|
" and e.del=1 "+whereSql;
|
|
|
" and e.del=1 "+whereSql+ " order by w.priority desc,w.service_time desc";
|
|
|
List<Map<String,Object>> resultWorkorderList = jdbcTemplate.queryForList(sql);
|
|
|
List<Map<String,Object>> resultList = new ArrayList<>();
|
|
|
for(Map<String,Object> one : resultWorkorderList){
|
|
@ -134,6 +134,8 @@ public class SynergyManageService {
|
|
|
map.put("serviceTime", DateUtil.dateToStr((Date)one.get("service_time"),"yyyy-MM-dd HH:mm"));//服务时间
|
|
|
map.put("priority",one.get("priority"));//工单优先级
|
|
|
map.put("priorityName",((Integer)one.get("priority"))==1?"加急":"普通");
|
|
|
Integer overTime = isServiceOverTime((Date)one.get("service_time"));
|
|
|
map.put("overTime",overTime);//是否超时
|
|
|
String[] servicer = (one.get("servicer_key")+"").split(",");
|
|
|
map.put("servicer",servicer[0]);//服务对象
|
|
|
map.put("servicerCount",one.get("servicer_count"));//服务对象人数
|
|
@ -151,7 +153,11 @@ public class SynergyManageService {
|
|
|
List<ManageSynergyWorkorderExecutorDO> managerList = workorderExecutorDao.findByWorkorderCode(one.get("code")+"",1);
|
|
|
String managerName = managerList.size()>0?managerList.get(0).getExecutorName():"";
|
|
|
map.put("managerName",managerName);//负责人的名称
|
|
|
Integer finishedServicerCount = workorderServicerDao.findByWorkorderCodeCount(one.get("code")+"",3);
|
|
|
map.put("finishedServicerCount",finishedServicerCount);//服务完成人数
|
|
|
resultList.add(map);
|
|
|
}
|
|
|
return resultList;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@ -177,10 +183,23 @@ public class SynergyManageService {
|
|
|
//服务时间+4小时 > 当前时间 > 服务时间(红色超时)2
|
|
|
//服务时间 HH:mm:59()> 当前时间 > 服务时间 HH:mm:00(黄色超时)1
|
|
|
//服务时间 HH:mm:00 > 当前时间 (正常)0
|
|
|
Long serviceTimeAfter4Long = serviceTime.getTime()+4*60*60*1000;
|
|
|
Long serviceTimeLong = serviceTime.getTime();
|
|
|
Integer serviceStatus = null;
|
|
|
String serviceTimeStart = DateUtil.dateToStr(serviceTime,"yyyy-MM-dd HH:mm")+":00";
|
|
|
String serviceTimeEnd = DateUtil.dateToStr(serviceTime,"yyyy-MM-dd HH:mm")+":59";
|
|
|
Long serviceTimeStartLong = DateUtil.strToDate(serviceTimeStart,"yyyy-MM-dd HH:mm:ss").getTime();
|
|
|
Long serviceTimeEndLong = DateUtil.strToDate(serviceTimeEnd,"yyyy-MM-dd HH:mm:ss").getTime();
|
|
|
Long serviceTimeAfter4Long = serviceTimeEndLong+4*60*60*1000;
|
|
|
Long currentTime = new Date().getTime();
|
|
|
return 0;
|
|
|
if(currentTime<serviceTimeStartLong){//正常
|
|
|
serviceStatus=0;
|
|
|
}else if(currentTime>=serviceTimeStartLong&¤tTime<=serviceTimeEndLong){//黄色超时
|
|
|
serviceStatus=1;
|
|
|
}else if(currentTime>serviceTimeEndLong&¤tTime<=serviceTimeAfter4Long){//红色超时
|
|
|
serviceStatus=2;
|
|
|
}else if(currentTime>serviceTimeAfter4Long){//已超时
|
|
|
serviceStatus=3;
|
|
|
}
|
|
|
return serviceStatus;
|
|
|
}
|
|
|
|
|
|
//获取系统服务详情
|
|
@ -232,6 +251,8 @@ public class SynergyManageService {
|
|
|
map.put("remark", workorderDO.getDealResultRemark());
|
|
|
map.put("accessory", workorderDO.getDealResultAccessory());
|
|
|
}
|
|
|
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
}
|