优化
This commit is contained in:
parent
b34283a07b
commit
4725a03fcb
@ -106,9 +106,9 @@ public class AsyncAiAnalyse {
|
||||
MessageRecord messageRecord = new MessageRecord();
|
||||
messageRecord.setMessageId(messageId);
|
||||
messageRecord.setType(type);
|
||||
messageRecord.setLastTime(createTime);
|
||||
messageRecord.setCreateTime(createTime);
|
||||
messageRecord.setTitle(title);
|
||||
messageRecordService.saveOrUpdateInfo(messageRecord, userIds);
|
||||
// mqttCustomerClient.publish(userIds,"wisdomSite/message/", JSON.toJSONString(messageRecord));
|
||||
mqttCustomerClient.publish(userIds,"wisdomSite/message/", type.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ import com.zhgd.xmgl.modules.basicdata.service.IMessageRecordService;
|
||||
import com.zhgd.xmgl.security.SecurityUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -35,6 +36,7 @@ public class MessageRecordController {
|
||||
|
||||
/**
|
||||
* 首页查询是否有新消息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "推送消息记录管理", operType = "查询", operDesc = "首页查询是否有新消息")
|
||||
@ -42,37 +44,47 @@ public class MessageRecordController {
|
||||
@GetMapping(value = "/queryBySelf")
|
||||
public Result<MessageRecord> queryBySelf() {
|
||||
MessageRecord messageRecord = messageRecordService.getOne(Wrappers.<MessageRecord>lambdaQuery().eq(MessageRecord::getUserId, SecurityUtil.getUser().getUserId())
|
||||
.orderByDesc(MessageRecord::getLastTime).last("limit 1"));
|
||||
.orderByDesc(MessageRecord::getCreateTime).last("limit 1"));
|
||||
return Result.success(messageRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有信息的条数
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "推送消息记录管理", operType = "查询", operDesc = "查询所有信息的条数")
|
||||
@ApiOperation(value = "查询所有信息的条数", notes = "查询所有信息的条数", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<MessageRecord>> queryListBySelf() {
|
||||
List<MessageRecord> messageRecords = messageRecordService.list(Wrappers.<MessageRecord>lambdaQuery().eq(MessageRecord::getUserId, SecurityUtil.getUser().getUserId()));
|
||||
List<MessageRecord> messageRecords = messageRecordService.list(Wrappers.<MessageRecord>lambdaQuery()
|
||||
.eq(MessageRecord::getUserId, SecurityUtil.getUser().getUserId()).eq(MessageRecord::getIsRead, 0)
|
||||
.orderByDesc(MessageRecord::getCreateTime));
|
||||
return Result.success(messageRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param messageRecord
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "推送消息记录管理", operType = "修改", operDesc = "编辑推送消息记录信息")
|
||||
@ApiOperation(value = "编辑推送消息记录信息", notes = "编辑推送消息记录信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "type", value = "消息类型(1:通知;2:政策法规)", paramType = "body", dataType = "Integer")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "type", value = "消息类型(1:通知;2:政策法规)", paramType = "body", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "messageId", value = "消息ID", paramType = "body", dataType = "String")
|
||||
})
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<MessageRecord> edit(@ApiIgnore @RequestBody MessageRecord messageRecord) {
|
||||
LambdaUpdateWrapper<MessageRecord> wrapper = Wrappers.<MessageRecord>lambdaUpdate();
|
||||
wrapper.set(MessageRecord::getNum, 0);
|
||||
wrapper.set(MessageRecord::getIsRead, 0);
|
||||
if (messageRecord.getType() != null) {
|
||||
wrapper.eq(MessageRecord::getType, messageRecord.getType());
|
||||
}
|
||||
if (messageRecord.getMessageId() != null) {
|
||||
wrapper.eq(MessageRecord::getMessageId, messageRecord.getMessageId());
|
||||
}
|
||||
wrapper.eq(MessageRecord::getUserId, SecurityUtil.getUser().getUserId());
|
||||
messageRecordService.update(wrapper);
|
||||
return Result.ok();
|
||||
|
||||
@ -136,7 +136,7 @@ public class VideoOpController {
|
||||
public Result<Object> controlling(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
JSONObject jsonObject = monitorApi.controlling(map);
|
||||
if (jsonObject == null) {
|
||||
return Result.error("操作失败!");
|
||||
return Result.error("此设备不支持该操作!");
|
||||
}
|
||||
return Result.success(jsonObject);
|
||||
}
|
||||
|
||||
@ -8,10 +8,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.util.PageUtil;
|
||||
import com.zhgd.xmgl.modules.wisdom.dto.EnvironmentDevDto;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Engineering;
|
||||
import com.zhgd.xmgl.modules.wisdom.entity.EnvironmentDev;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService;
|
||||
import com.zhgd.xmgl.modules.wisdom.dto.EnvironmentDevDto;
|
||||
import com.zhgd.xmgl.modules.wisdom.entity.EnvironmentDev;
|
||||
import com.zhgd.xmgl.modules.wisdom.service.IEnvironmentDevService;
|
||||
import com.zhgd.xmgl.security.SecurityUser;
|
||||
import com.zhgd.xmgl.security.SecurityUtil;
|
||||
@ -77,6 +76,7 @@ public class EntEnvironmentDevController {
|
||||
wrapper.like("d.name", name);
|
||||
}
|
||||
Page<EnvironmentDev> page = PageUtil.getPage(map);
|
||||
wrapper.orderByDesc("d.priority");
|
||||
IPage<EnvironmentDev> pageList = environmentDevService.pageList(page, wrapper);
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
@ -75,6 +75,7 @@ public class EntMonitorDevController {
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
wrapper.like("m.name", name);
|
||||
}
|
||||
wrapper.orderByDesc("m.priority");
|
||||
return Result.success(monitorDevService.pageList(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
@ -1,15 +1,12 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.controller.enterprise;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.PageUtil;
|
||||
import com.zhgd.xmgl.modules.basicdata.constant.ParamConstants;
|
||||
import com.zhgd.xmgl.modules.wisdom.entity.TowerCraneWorkCycle;
|
||||
import com.zhgd.xmgl.modules.wisdom.service.ITowerCraneWorkCycleService;
|
||||
import io.swagger.annotations.Api;
|
||||
@ -17,7 +14,6 @@ import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@ -56,8 +52,8 @@ public class EntTowerCraneWorkCycleController {
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "devName", value = "设备名称", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "devId", value = "设备ID", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime_begin", value = "工作循环开始时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime_end", value = "工作循环结束结束时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "createTime_begin", value = "工作循环开始时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "createTime_end", value = "工作循环结束结束时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "engineeringSn", value = "工程sn", paramType = "body", dataType = "String")
|
||||
})
|
||||
@PostMapping(value = "/page")
|
||||
|
||||
@ -101,6 +101,7 @@ public class GovEnvironmentDevController {
|
||||
public Result<IPage<EnvironmentDev>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
QueryWrapper<EnvironmentDev> wrapper = QueryGenerator.initPageQueryWrapper(EnvironmentDev.class, map);
|
||||
Page<EnvironmentDev> page = PageUtil.getPage(map);
|
||||
wrapper.lambda().orderByDesc(EnvironmentDev::getPriority);
|
||||
IPage<EnvironmentDev> pageList = environmentDevService.page(page, wrapper);
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
@ -75,6 +75,7 @@ public class GovMonitorDevController {
|
||||
queryWrapper.lambda().eq(MonitorDev::getEngineeringSn, StrUtil.EMPTY);
|
||||
}
|
||||
Page<MonitorDev> page = PageUtil.getPage(map);
|
||||
queryWrapper.lambda().orderByDesc(MonitorDev::getPriority);
|
||||
IPage<MonitorDev> pageList = monitorDevService.page(page, queryWrapper);
|
||||
result.setSuccess(true);
|
||||
result.setResult(pageList);
|
||||
|
||||
@ -69,6 +69,7 @@ public class EnvironmentDevController {
|
||||
wrapper.lambda().eq(EnvironmentDev::getEngineeringSn, StrUtil.EMPTY);
|
||||
}
|
||||
Page<EnvironmentDev> page = PageUtil.getPage(map);
|
||||
wrapper.lambda().orderByDesc(EnvironmentDev::getPriority);
|
||||
IPage<EnvironmentDev> pageList = environmentDevService.page(page, wrapper);
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
@ -70,6 +70,7 @@ public class MonitorDevController {
|
||||
queryWrapper.lambda().eq(MonitorDev::getEngineeringSn, StrUtil.EMPTY);
|
||||
}
|
||||
Page<MonitorDev> page = PageUtil.getPage(map);
|
||||
queryWrapper.lambda().orderByDesc(MonitorDev::getPriority);
|
||||
IPage<MonitorDev> pageList = monitorDevService.page(page, queryWrapper);
|
||||
result.setSuccess(true);
|
||||
result.setResult(pageList);
|
||||
|
||||
@ -56,8 +56,8 @@ public class TowerCraneWorkCycleController {
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "devName", value = "设备名称", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "devId", value = "设备ID", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime_begin", value = "工作循环开始时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime_end", value = "工作循环结束结束时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "createTime_begin", value = "工作循环开始时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "createTime_end", value = "工作循环结束结束时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "engineeringSn", value = "工程sn", paramType = "body", dataType = "String")
|
||||
})
|
||||
@PostMapping(value = "/page")
|
||||
|
||||
@ -30,17 +30,17 @@ public class MessageRecord implements Serializable {
|
||||
@ApiModelProperty(value = " 主键")
|
||||
private Integer id;
|
||||
/**
|
||||
* 最新消息ID
|
||||
* 消息ID
|
||||
*/
|
||||
@Excel(name = "最新消息ID", width = 15)
|
||||
@ApiModelProperty(value = "最新消息ID")
|
||||
@Excel(name = "消息ID", width = 15)
|
||||
@ApiModelProperty(value = "消息ID")
|
||||
private String messageId;
|
||||
/**
|
||||
* 未读消息条数
|
||||
* 是否已读
|
||||
*/
|
||||
@Excel(name = "未读消息条数", width = 15)
|
||||
@ApiModelProperty(value = "未读消息条数")
|
||||
private Integer num;
|
||||
@Excel(name = "是否已读", width = 15)
|
||||
@ApiModelProperty(value = "是否已读")
|
||||
private Integer isRead;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ -54,11 +54,11 @@ public class MessageRecord implements Serializable {
|
||||
@ApiModelProperty(value = "消息类型(1:通知;2:政策法规)")
|
||||
private Integer type;
|
||||
/**
|
||||
* 最新推送时间
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "最新推送时间", width = 15)
|
||||
@ApiModelProperty(value = "最新推送时间")
|
||||
private Date lastTime;
|
||||
@Excel(name = "创建时间", width = 15)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 消息标题
|
||||
*/
|
||||
|
||||
@ -125,10 +125,16 @@ public class BaseMenuServiceImpl extends ServiceImpl<BaseMenuMapper, BaseMenu> i
|
||||
// 查询角色下的菜单
|
||||
List<SystemRoleMenu> systemRoleMenus = systemRoleMenuService.list(Wrappers.<SystemRoleMenu>lambdaQuery()
|
||||
.eq(SystemRoleMenu::getRoleId, roleId));
|
||||
List<BaseMenu> baseMenuList = baseMenuMapper.selectList(Wrappers.<BaseMenu>lambdaQuery().in(BaseMenu::getMenuId,
|
||||
systemRoleMenus.stream().filter(s -> s.getType() == 1).map(s -> s.getAuthorityId()).collect(Collectors.toList())));
|
||||
List<BaseAction> baseActionList = baseActionMapper.selectList(Wrappers.<BaseAction>lambdaQuery().in(BaseAction::getActionId,
|
||||
systemRoleMenus.stream().filter(s -> s.getType() == 2).map(s -> s.getAuthorityId()).collect(Collectors.toList())));
|
||||
List<Long> menuIds = systemRoleMenus.stream().filter(s -> s.getType() == 1).map(s -> s.getAuthorityId()).collect(Collectors.toList());
|
||||
if (menuIds.size() == 0) {
|
||||
menuIds.add(0L);
|
||||
}
|
||||
List<BaseMenu> baseMenuList = baseMenuMapper.selectList(Wrappers.<BaseMenu>lambdaQuery().in(BaseMenu::getMenuId, menuIds));
|
||||
List<Long> actionIds = systemRoleMenus.stream().filter(s -> s.getType() == 2).map(s -> s.getAuthorityId()).collect(Collectors.toList());
|
||||
if (actionIds.size() == 0) {
|
||||
actionIds.add(0L);
|
||||
}
|
||||
List<BaseAction> baseActionList = baseActionMapper.selectList(Wrappers.<BaseAction>lambdaQuery().in(BaseAction::getActionId, actionIds));
|
||||
systemRoleMenus.stream().forEach(s -> {
|
||||
if (s.getType() == 0) {
|
||||
s.setChildren(baseMenuList.stream().filter(b -> b.getModuleId().equals(s.getAuthorityId())).collect(Collectors.toList()).size());
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.MessageRecord;
|
||||
import com.zhgd.xmgl.modules.basicdata.mapper.MessageRecordMapper;
|
||||
@ -23,26 +22,12 @@ public class MessageRecordServiceImpl extends ServiceImpl<MessageRecordMapper, M
|
||||
public boolean saveOrUpdateInfo(MessageRecord messageRecord, List<String> userIds) {
|
||||
List<MessageRecord> add = new ArrayList<>();
|
||||
for (String userId : userIds) {
|
||||
MessageRecord record = this.getOne(Wrappers.<MessageRecord>lambdaQuery().eq(MessageRecord::getUserId, userId)
|
||||
.eq(MessageRecord::getType, messageRecord.getType()));
|
||||
if (record == null) {
|
||||
MessageRecord userRecord = new MessageRecord();
|
||||
userRecord.setMessageId(messageRecord.getMessageId());
|
||||
userRecord.setNum(0);
|
||||
userRecord.setUserId(userId);
|
||||
userRecord.setType(messageRecord.getType());
|
||||
add.add(userRecord);
|
||||
}
|
||||
}
|
||||
this.saveBatch(add);
|
||||
List<MessageRecord> records = this.list(Wrappers.<MessageRecord>lambdaQuery().in(MessageRecord::getUserId, userIds)
|
||||
.eq(MessageRecord::getType, messageRecord.getType()));
|
||||
for (MessageRecord record : records) {
|
||||
record.setMessageId(messageRecord.getMessageId());
|
||||
record.setNum(record.getNum() + 1);
|
||||
record.setLastTime(messageRecord.getLastTime());
|
||||
record.setTitle(messageRecord.getTitle());
|
||||
}
|
||||
return this.updateBatchById(records);
|
||||
return this.saveBatch(add);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,19 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.xmgl.handler.exception.CustomException;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemDept;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
||||
import com.zhgd.xmgl.modules.basicdata.mapper.SystemDeptMapper;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemDeptService;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
||||
import com.zhgd.xmgl.security.SecurityUser;
|
||||
import com.zhgd.xmgl.security.SecurityUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -27,6 +30,9 @@ import java.util.stream.Collectors;
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class SystemDeptServiceImpl extends ServiceImpl<SystemDeptMapper, SystemDept> implements ISystemDeptService {
|
||||
|
||||
@Autowired
|
||||
private ISystemUserService systemUserService;
|
||||
|
||||
@Override
|
||||
public List<SystemDept> getList(SystemDept systemDept) {
|
||||
SecurityUser user = SecurityUtil.getUser();
|
||||
@ -73,8 +79,13 @@ public class SystemDeptServiceImpl extends ServiceImpl<SystemDeptMapper, SystemD
|
||||
|
||||
@Override
|
||||
public boolean delInfo(Long deptId) {
|
||||
this.remove(Wrappers.<SystemDept>lambdaQuery().apply("FIND_IN_SET({0}, ancestors)", deptId));
|
||||
return this.removeById(deptId);
|
||||
List<Long> deptIds = this.list(Wrappers.<SystemDept>lambdaQuery().apply("FIND_IN_SET({0}, ancestors)", deptId)).stream().map(l -> l.getDeptId()).collect(Collectors.toList());
|
||||
deptIds.add(deptId);
|
||||
LambdaUpdateWrapper<SystemUser> wrapper = Wrappers.<SystemUser>lambdaUpdate();
|
||||
wrapper.set(SystemUser::getDepartment, null);
|
||||
wrapper.in(SystemUser::getDepartment, deptIds);
|
||||
systemUserService.update(wrapper);
|
||||
return this.removeByIds(deptIds);
|
||||
}
|
||||
|
||||
private List<SystemDept> getTreeList(List<SystemDept> treeList, List<SystemDept> list) {
|
||||
|
||||
@ -46,6 +46,7 @@ public class MonthlyReportServiceImpl extends ServiceImpl<MonthlyReportMapper, M
|
||||
|
||||
@Override
|
||||
public Page<MonthlyReport> pageList(Page page, QueryWrapper<MonthlyReport> wrapper) {
|
||||
wrapper.lambda().orderByDesc(MonthlyReport::getCreateTime);
|
||||
return baseMapper.pageList(page, wrapper);
|
||||
}
|
||||
|
||||
|
||||
@ -97,6 +97,8 @@ public class InspectRecordServiceImpl extends ServiceImpl<InspectRecordMapper, I
|
||||
if (null != joinFlag && joinFlag) {
|
||||
wrapper.lambda().ne(InspectRecord::getCreateBy, userId).apply("FIND_IN_SET({0}, inspect_user)", userId);
|
||||
wrapper.lambda().orderByAsc(InspectRecord::getState);
|
||||
} else {
|
||||
wrapper.lambda().eq(InspectRecord::getCreateBy, userId);
|
||||
}
|
||||
wrapper.lambda().orderByDesc(InspectRecord::getCreateTime);
|
||||
Page<InspectRecordDto> inspectRecordDtoPage = baseMapper.pageList(page, wrapper);
|
||||
|
||||
@ -95,7 +95,7 @@ public class EnvironmentDevServiceImpl extends ServiceImpl<EnvironmentDevMapper,
|
||||
wrapper.eq(EnvironmentDev::getEngineeringSn, environmentDev.getEngineeringSn());
|
||||
}
|
||||
if (environmentDev.getProjectSn() != null) {
|
||||
wrapper.eq(EnvironmentDev::getProjectSn, environmentDev.getProjectSn());
|
||||
wrapper.eq(EnvironmentDev::getProjectSn, environmentDev.getProjectSn()).eq(EnvironmentDev::getEngineeringSn, StrUtil.EMPTY);
|
||||
}
|
||||
List<EnvironmentDev> list = this.list(wrapper);
|
||||
List<EnvironmentDevDto> environmentDevDtoList = BeanUtil.copyToList(list, EnvironmentDevDto.class);
|
||||
|
||||
@ -224,7 +224,8 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
long hourTotal = attendStatList.stream().filter(a -> record.get("id").toString().equals(a.getWorkerId())).mapToLong(AttendanceStatistics::getWorkHour).sum();
|
||||
record.put("workerHour", hourTotal / 60 + "时" + hourTotal % 60 + "分");
|
||||
int monthDay = DateUtil.lengthOfMonth(DateUtil.month(DateUtil.parse(month, "yyyy-MM")) + 1, DateUtil.isLeapYear(DateUtil.year(DateUtil.parse(month, "yyyy-MM"))));
|
||||
for (int i = 1; i < monthDay; i++) {
|
||||
record.put("monthDay", monthDay);
|
||||
for (int i = 1; i < monthDay + 1; i++) {
|
||||
String time = i < 10 ? month + "-0" + i : month + "-" + i;
|
||||
List<AttendanceStatistics> attendanceStatistics = attendStatList.stream().filter(
|
||||
a -> a.getDayDate().equals(time)
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"groupId" : "485e36d471af4f809398babc4abadafe",
|
||||
"name" : "查询工程分类统计",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1691574587721,
|
||||
"updateTime" : 1695117310293,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : "admin",
|
||||
@ -47,7 +47,7 @@ for (item in list) {
|
||||
var dict_value = map.get("dict_value")
|
||||
var num = map.get("num")::int
|
||||
Map resultMap = new HashMap();
|
||||
if (index < 3){
|
||||
if (index < 2){
|
||||
resultMap.put("dict_value" ,dict_value)
|
||||
resultMap.put("num" ,num)
|
||||
BigDecimal totalNum = new BigDecimal(total);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user