|
@ -1,30 +1,20 @@
|
|
|
package com.yihu.wlyy.service.synergy;
|
|
|
|
|
|
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderExecutorDO;
|
|
|
import com.yihu.wlyy.util.DateUtil;
|
|
|
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderDO;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderDO;
|
|
|
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderExecutorDO;
|
|
|
import com.yihu.wlyy.repository.synergy.ManageSynergyWorkOrderDao;
|
|
|
import com.yihu.wlyy.repository.synergy.ManageSynergyWorkorderExecutorDao;
|
|
|
import com.yihu.wlyy.repository.synergy.ManageSynergyWorkorderServicerDao;
|
|
|
import com.yihu.wlyy.util.DateUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* Created by 刘文彬 on 2018/9/27.
|
|
|
*/
|
|
@ -126,7 +116,7 @@ public class SynergyManageService {
|
|
|
" and e.del=1 "+whereSql;
|
|
|
List<Map<String,Object>> resultWorkorderList = jdbcTemplate.queryForList(sql);
|
|
|
List<Map<String,Object>> resultList = new ArrayList<>();
|
|
|
for(Map<String,Object> one:resultWorkorderList){
|
|
|
for(Map<String,Object> one : resultWorkorderList){
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
map.put("workorderCode",one.get("code"));//服务编码
|
|
|
Integer workorderTypeR = (Integer) one.get("type");
|
|
@ -158,7 +148,7 @@ public class SynergyManageService {
|
|
|
case 4:statusName="退回";break;
|
|
|
}
|
|
|
map.put("statusName",statusName);
|
|
|
List<ManageSynergyWorkorderExecutorDO> managerList = workorderExecutorDao.findByWorkorderExecutorCode(one.get("code")+"",1);
|
|
|
List<ManageSynergyWorkorderExecutorDO> managerList = workorderExecutorDao.findByWorkorderCode(one.get("code")+"",1);
|
|
|
String managerName = managerList.size()>0?managerList.get(0).getExecutorName():"";
|
|
|
map.put("managerName",managerName);//负责人的名称
|
|
|
}
|
|
@ -226,21 +216,21 @@ public class SynergyManageService {
|
|
|
|
|
|
//获取负责人信息
|
|
|
if(role == 3){
|
|
|
List<ManageSynergyWorkorderExecutorDO> managerList = workorderExecutorDao.findByWorkorderExecutorCode(workorderCode,1);
|
|
|
List<ManageSynergyWorkorderExecutorDO> collaboratorList = workorderExecutorDao.findByWorkorderExecutorCode(workorderCode,2);
|
|
|
String manager = managerList.size()>0?managerList.get(0).getExecutorName():"";
|
|
|
String collaborator ="";
|
|
|
List<ManageSynergyWorkorderExecutorDO> managerList = workorderExecutorDao.findByWorkorderCode(workorderCode,1);
|
|
|
List<ManageSynergyWorkorderExecutorDO> collaboratorList = workorderExecutorDao.findByWorkorderCode(workorderCode,2);
|
|
|
String manager = managerList.size()>0 ? managerList.get(0).getExecutorName() : "";
|
|
|
String collaborator = "";
|
|
|
for(ManageSynergyWorkorderExecutorDO one:collaboratorList){
|
|
|
collaborator+="、"+one.getExecutorName();
|
|
|
collaborator += "、" + one.getExecutorName();
|
|
|
}
|
|
|
map.put("manager", manager);//负责人
|
|
|
map.put("collaboratorList", StringUtils.isNotEmpty(collaborator)?collaborator.substring(1):"");//参与人可能有多个
|
|
|
map.put("collaboratorList", StringUtils.isNotEmpty(collaborator) ? collaborator.substring(1) : "");//参与人可能有多个
|
|
|
}
|
|
|
|
|
|
//获取处理结果
|
|
|
if(workorderDO.getStatus() == 3){
|
|
|
map.put("remark", workorderDO.getDealResultRemark());
|
|
|
map.put("accessory",workorderDO.getDealResultAccessory());
|
|
|
map.put("accessory", workorderDO.getDealResultAccessory());
|
|
|
}
|
|
|
return map;
|
|
|
}
|