Commit e69cfbfe by HlQ

[add]

1.服务下发 name 字段也下发
2.任务详情添加项目经理字段
3.用户列表优化
1 parent 50efe02c
......@@ -75,4 +75,7 @@ public class ServiceInfo extends BaseDTO {
@TableField(exist = false)
private ServiceRecord serviceRecord;
@TableField(exist = false)
private String agentUid;
}
\ No newline at end of file
......@@ -140,8 +140,12 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
.selectAs(Store::getSalesperson, TaskVO::getSalesperson)
.selectAs(Store::getMaintainStatus, TaskVO::getMaintainStatus)
.selectAs(Contract::getName, TaskVO::getContractName)
.selectAs(RStoreUser::getUserId, TaskVO::getUserId)
.selectCollection(FileInfo.class, TaskTempVO::getFileList)
.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(FileInfo.class, on -> on
.eq(FileInfo::getSourceId, Task::getId)
......
......@@ -56,9 +56,9 @@ public class UserServiceImpl extends MPJBaseServiceImpl<UserMapper, User> implem
.selectAll(User.class)
.select(Dept::getDeptName)
.leftJoin(Dept.class, Dept::getDeptId, User::getDeptId)
.ne(User::getStatus, 5)
.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 roleWrapper = new MPJLambdaWrapper<Role>()
.selectAll(Role.class)
......
......@@ -189,7 +189,7 @@ public class AgentServiceImpl extends MPJBaseServiceImpl<AgentMapper, Agent> imp
}
var objNode = JsonUtil.createObj()
.put("type", MqttMessageType.SERVICE_ADD.getType())
.putPOJO("services", JsonUtil.toJsonString(rAgentServiceList));
.putPOJO("services", JsonUtil.toJsonString(serviceInfoList));
client.publish(topic, JsonUtil.toJsonByte(objNode), MqttQoS.QOS2);
}
return "保存成功";
......@@ -198,7 +198,18 @@ public class AgentServiceImpl extends MPJBaseServiceImpl<AgentMapper, Agent> imp
@Override
public String updateAgent2ServiceById(Long id, RAgentService 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());
if (StrUtil.isBlank(topic)) {
var msg = StrUtil.format("agent:{} 获取topic失败", agentService.getAgentUid());
......
......@@ -124,10 +124,17 @@ public class TaskVO {
* 集团id
*/
private Long accountId;
// 集团名字
/**
* 集团名字
*/
private String accountName;
private List<FileInfo> fileList;
private ServiceOrder serviceOrder;
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!