Commit e69cfbfe by HlQ

[add]

1.服务下发 name 字段也下发
2.任务详情添加项目经理字段
3.用户列表优化
1 parent 50efe02c
...@@ -75,4 +75,7 @@ public class ServiceInfo extends BaseDTO { ...@@ -75,4 +75,7 @@ public class ServiceInfo extends BaseDTO {
@TableField(exist = false) @TableField(exist = false)
private ServiceRecord serviceRecord; private ServiceRecord serviceRecord;
@TableField(exist = false)
private String agentUid;
} }
\ No newline at end of file \ No newline at end of file
...@@ -140,8 +140,12 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem ...@@ -140,8 +140,12 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
.selectAs(Store::getSalesperson, TaskVO::getSalesperson) .selectAs(Store::getSalesperson, TaskVO::getSalesperson)
.selectAs(Store::getMaintainStatus, TaskVO::getMaintainStatus) .selectAs(Store::getMaintainStatus, TaskVO::getMaintainStatus)
.selectAs(Contract::getName, TaskVO::getContractName) .selectAs(Contract::getName, TaskVO::getContractName)
.selectAs(RStoreUser::getUserId, TaskVO::getUserId)
.selectCollection(FileInfo.class, TaskTempVO::getFileList) .selectCollection(FileInfo.class, TaskTempVO::getFileList)
.leftJoin(Store.class, Store::getId, Task::getStoreId) .leftJoin(Store.class, Store::getId, Task::getStoreId)
.leftJoin(RStoreUser.class, on -> on
.eq(RStoreUser::getStoreId, Task::getStoreId)
.eq(RStoreUser::getIsMain, 1))
.leftJoin(Contract.class, Contract::getId, Task::getContractId) .leftJoin(Contract.class, Contract::getId, Task::getContractId)
.leftJoin(FileInfo.class, on -> on .leftJoin(FileInfo.class, on -> on
.eq(FileInfo::getSourceId, Task::getId) .eq(FileInfo::getSourceId, Task::getId)
......
...@@ -56,9 +56,9 @@ public class UserServiceImpl extends MPJBaseServiceImpl<UserMapper, User> implem ...@@ -56,9 +56,9 @@ public class UserServiceImpl extends MPJBaseServiceImpl<UserMapper, User> implem
.selectAll(User.class) .selectAll(User.class)
.select(Dept::getDeptName) .select(Dept::getDeptName)
.leftJoin(Dept.class, Dept::getDeptId, User::getDeptId) .leftJoin(Dept.class, Dept::getDeptId, User::getDeptId)
.ne(User::getStatus, 5)
.in(ObjUtil.isNotNull(dto.getRoleId()), User::getId, userIdSet) .in(ObjUtil.isNotNull(dto.getRoleId()), User::getId, userIdSet)
.orderByAsc(User::getStatus); .orderByAsc(User::getStatus)
.orderByDesc(User::getModifyTime);
var userVOS = this.selectJoinListPage(Page.of(dto.getPageNum(), dto.getPageSize()), UserVO.class, wrapper); var userVOS = this.selectJoinListPage(Page.of(dto.getPageNum(), dto.getPageSize()), UserVO.class, wrapper);
var roleWrapper = new MPJLambdaWrapper<Role>() var roleWrapper = new MPJLambdaWrapper<Role>()
.selectAll(Role.class) .selectAll(Role.class)
......
...@@ -189,7 +189,7 @@ public class AgentServiceImpl extends MPJBaseServiceImpl<AgentMapper, Agent> imp ...@@ -189,7 +189,7 @@ public class AgentServiceImpl extends MPJBaseServiceImpl<AgentMapper, Agent> imp
} }
var objNode = JsonUtil.createObj() var objNode = JsonUtil.createObj()
.put("type", MqttMessageType.SERVICE_ADD.getType()) .put("type", MqttMessageType.SERVICE_ADD.getType())
.putPOJO("services", JsonUtil.toJsonString(rAgentServiceList)); .putPOJO("services", JsonUtil.toJsonString(serviceInfoList));
client.publish(topic, JsonUtil.toJsonByte(objNode), MqttQoS.QOS2); client.publish(topic, JsonUtil.toJsonByte(objNode), MqttQoS.QOS2);
} }
return "保存成功"; return "保存成功";
...@@ -198,7 +198,18 @@ public class AgentServiceImpl extends MPJBaseServiceImpl<AgentMapper, Agent> imp ...@@ -198,7 +198,18 @@ public class AgentServiceImpl extends MPJBaseServiceImpl<AgentMapper, Agent> imp
@Override @Override
public String updateAgent2ServiceById(Long id, RAgentService rAgentService) { public String updateAgent2ServiceById(Long id, RAgentService rAgentService) {
if (rAgentServiceService.updateById(rAgentService)) { if (rAgentServiceService.updateById(rAgentService)) {
var agentService = rAgentServiceService.getById(id); var wrapper = new MPJLambdaWrapper<ServiceInfo>()
.selectAs(RAgentService::getAgentUid, ServiceInfo::getAgentUid)
.selectAs(ServiceInfo::getUid, ServiceInfo::getUid)
.selectAs(ServiceInfo::getName, ServiceInfo::getName)
.selectAs(ServiceInfo::getType, ServiceInfo::getType)
.selectAs(RAgentService::getUrl, ServiceInfo::getUrl)
.selectAs(RAgentService::getMethod, ServiceInfo::getMethod)
.selectAs(RAgentService::getUsername, ServiceInfo::getUsername)
.selectAs(RAgentService::getPassword, ServiceInfo::getPassword)
.leftJoin(RAgentService.class, RAgentService::getServiceUid, ServiceInfo::getUid)
.eq(RAgentService::getId, id);
var agentService = serviceInfoService.selectJoinOne(ServiceInfo.class, wrapper);
var topic = TopicUtil.getServiceTopic(agentService.getAgentUid()); var topic = TopicUtil.getServiceTopic(agentService.getAgentUid());
if (StrUtil.isBlank(topic)) { if (StrUtil.isBlank(topic)) {
var msg = StrUtil.format("agent:{} 获取topic失败", agentService.getAgentUid()); var msg = StrUtil.format("agent:{} 获取topic失败", agentService.getAgentUid());
......
...@@ -124,10 +124,17 @@ public class TaskVO { ...@@ -124,10 +124,17 @@ public class TaskVO {
* 集团id * 集团id
*/ */
private Long accountId; private Long accountId;
// 集团名字 /**
* 集团名字
*/
private String accountName; private String accountName;
private List<FileInfo> fileList; private List<FileInfo> fileList;
private ServiceOrder serviceOrder; private ServiceOrder serviceOrder;
private List<FaultLog> faultLogList; private List<FaultLog> faultLogList;
/**
* 项目经理
*/
private Long userId;
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!