Commit cb186ac4 authored by litengwei's avatar litengwei

增加公司编码及类型

parent 26837c92
......@@ -61,6 +61,34 @@ public class PlanTask extends BasicEntity {
*/
@Column(name="point_num")
private int pointNum;
/**
* 信用代码
*/
@Column(name="use_code")
private String useCode;
public String getUseCode() {
return useCode;
}
public void setUseCode(String useCode) {
this.useCode = useCode;
}
public String getPlanType() {
return planType;
}
public void setPlanType(String planType) {
this.planType = planType;
}
/**
* 计划类型
*/
@Column(name="plan_type")
private String planType;
/**
* 路线编号
......
......@@ -739,6 +739,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
String userDept = list.get(i).get("USER_DEPT") == null ? "-1" : list.get(i).get("USER_DEPT").toString();
String userName = list.get(i).get("USER_NAME") == null ? "-1" : String.valueOf(list.get(i).get("USER_NAME"));
String orgCode = list.get(i).get("ORG_CODE") == null ? "-1" : String.valueOf(list.get(i).get("ORG_CODE"));
String unitCode = list.get(i).get("UNIT_CODE") == null ? "-1" : String.valueOf(list.get(i).get("UNIT_CODE"));
PlanTask planTask = iplanTaskDao.findByUserIdAndBeginTimeAndEndTimeAndPlanIdAndRouteId(userId, startTime, endTime, plan.getId(), plan.getRouteId());
if (planTask != null) {
......@@ -749,6 +750,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
//修改巡检p_plan_task orgcode为执行人的org_code -- add by wujunkai 20201216
planTask.setOrgCode(orgCode);
planTask.setUserName(userName);
planTask.setUseCode(unitCode);
planTask.setPlanType(plan.getPlanType());
planTask.setPlanId(plan.getId());
planTask.setBatchNo(batchNo);
planTask.setRouteId(plan.getRouteId());
......
......@@ -538,12 +538,14 @@ public static List<HashMap<String, Object>> genWholeExeData(List<HashMap<String,
temp = (HashMap<String, Object>) tempMap.clone();
String userIds = userDetailsDto.stream().map(UserDetailsDto::getUserId).filter(Objects::nonNull).collect(Collectors.joining(","));
String userNames = userDetailsDto.stream().map(UserDetailsDto::getUserName).filter(Objects::nonNull).collect(Collectors.joining(","));
String userDept = userDetailsDto.stream().map(dto-> dto.getUserId() + "@" + unitOrgCode + "@" + dto.getUnitName()).collect(Collectors.joining(","));
String orgCodes = userDetailsDto.stream().map(UserDetailsDto::getUnitOrgCode).filter(Objects::nonNull).collect(Collectors.joining(","));
String userDept = userDetailsDto.stream().map(dto-> dto.getUserId() + "@" + unitOrgCode + "@" + dto.getUnitName()).findFirst().get();
String orgCodes = userDetailsDto.stream().map(UserDetailsDto::getUnitOrgCode).filter(Objects::nonNull).findFirst().get();
String unitCode = userDetailsDto.stream().map(UserDetailsDto::getUnitCode).filter(Objects::nonNull).findFirst().get();
temp.put("USER_ID", userIds);
temp.put("USER_NAME", userNames);
temp.put("ORG_CODE", orgCodes);
temp.put("USER_DEPT", userDept);
temp.put("UNIT_CODE", unitCode);
finalWholeList.add(temp);
} else {
userDetailsDto.forEach(dto -> {
......
......@@ -97,7 +97,7 @@
<!--巡检计划查询 -->
<select id="getPlanInfo" resultType="java.util.HashMap">
SELECT
a.id,a.name , IFNULL(a.plan_begin,'') planBegin,a.status,
a.id,a.name , IFNULL(a.plan_begin, null) planBegin,a.status,
(
case a.plan_type
when 1 THEN '天'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment