|
@ -2,6 +2,7 @@ package com.yihu.wlyy.service.synergy;
|
|
|
|
|
|
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderDO;
|
|
|
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderExecutorDO;
|
|
|
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderServicerDO;
|
|
|
import com.yihu.wlyy.repository.synergy.ManageSynergyWorkOrderDao;
|
|
|
import com.yihu.wlyy.repository.synergy.ManageSynergyWorkorderExecutorDao;
|
|
|
import com.yihu.wlyy.repository.synergy.ManageSynergyWorkorderServicerDao;
|
|
@ -239,8 +240,14 @@ public class SynergyManageService {
|
|
|
return serviceStatus;
|
|
|
}
|
|
|
|
|
|
//获取系统服务详情
|
|
|
public Map<String, Object> getWorkOrderInfo(String workorderCode, Integer role) {
|
|
|
/**
|
|
|
* 获取系统服务详情
|
|
|
* @param workorderCode
|
|
|
* @param patient
|
|
|
* @param role
|
|
|
* @return
|
|
|
*/
|
|
|
public Map<String, Object> getWorkOrderInfo(String workorderCode, String patient, Integer role) {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
ManageSynergyWorkorderDO workorderDO = workOrderDao.findByCode(workorderCode);
|
|
|
//存入协同服务工单信息
|
|
@ -251,18 +258,23 @@ public class SynergyManageService {
|
|
|
map.put("status", workorderDO.getStatus());
|
|
|
map.put("title", workorderDO.getRelationCodeName());
|
|
|
map.put("remark", workorderDO.getRemark());
|
|
|
map.put("servicerKey", workorderDO.getServicerKey());
|
|
|
map.put("servicerCount", workorderDO.getServicerCount());
|
|
|
map.put("createTime", workorderDO.getCreateTime());
|
|
|
map.put("createUserName", workorderDO.getCreateUserName());
|
|
|
//判断是否超时
|
|
|
Date now = new Date();
|
|
|
long hour = (now.getTime() - workorderDO.getServiceTime().getTime())/60*60*1000;
|
|
|
if(hour <= 4){
|
|
|
map.put("delay", "red");
|
|
|
}else if(hour <= 24){
|
|
|
map.put("delay", "yellow");
|
|
|
|
|
|
//获取服务对象
|
|
|
if(StringUtils.isNotBlank(patient)){
|
|
|
//获取单个居民处理完成的工单信息
|
|
|
ManageSynergyWorkorderServicerDO workorderServicerDO = workorderServicerDao.findByWorkOrderCodeAndPatientCode(workorderCode, patient);
|
|
|
map.put("servicerKey", workorderServicerDO.getServicePatientName());
|
|
|
map.put("idcard", workorderServicerDO.getIdcard());
|
|
|
map.put("ssc", workorderServicerDO.getSsc());
|
|
|
}else {
|
|
|
map.put("servicerKey", workorderDO.getServicerKey());
|
|
|
map.put("servicerCount", workorderDO.getServicerCount());
|
|
|
}
|
|
|
|
|
|
//超时标签
|
|
|
map.put("delayStatus", this.isServiceOverTime(workorderDO.getServiceTime()));
|
|
|
//根据角色显示对应工单状态
|
|
|
if(workorderDO.getCreateUserType() == 1 && role == 2){
|
|
|
map.put("status", "待接收");
|
|
@ -288,7 +300,6 @@ public class SynergyManageService {
|
|
|
map.put("remark", workorderDO.getDealResultRemark());
|
|
|
map.put("accessory", workorderDO.getDealResultAccessory());
|
|
|
}
|
|
|
|
|
|
return map;
|
|
|
}
|
|
|
|