大屏部分接口

This commit is contained in:
guoshengxiong 2024-05-11 17:55:41 +08:00
parent e251badba4
commit 8206913696
29 changed files with 552 additions and 271 deletions

View File

@ -732,7 +732,9 @@ public class ParamEnum {
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum QualityInspectionRecordLevel implements BaseEnum {
ZDYH(1, "重大隐患"),
YBYH(2, "一般隐患"),
JDYH(2, "较大隐患"),
YBYH(3, "一般隐患"),
DYH(4, "低隐患"),
;
QualityInspectionRecordLevel(Integer value, String desc) {
@ -761,4 +763,38 @@ public class ParamEnum {
}
/**
* 使用状态1人为因素2环境因素3不可抵抗因素
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DelayEventTypeEnum implements BaseEnum {
RWYS(1, "人为因素"),
HJYS(2, "环境因素"),
BKDKYS(3, "不可抵抗因素"),
;
DelayEventTypeEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
private Integer value;
private String desc;
public Integer getValue() {
return value;
}
public void setValue(Integer value) {
this.value = value;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}
}

View File

@ -1,5 +1,6 @@
package com.zhgd.xmgl.modules.basicdata.service.impl;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializeConfig;
import com.alibaba.fastjson.serializer.ToStringSerializer;
@ -17,6 +18,8 @@ import com.zhgd.xmgl.modules.basicdata.mapper.NoticeMapper;
import com.zhgd.xmgl.modules.basicdata.mapper.SystemUserMapper;
import com.zhgd.xmgl.modules.basicdata.service.INoticeService;
import com.zhgd.xmgl.push.service.UniPushService;
import com.zhgd.xmgl.security.entity.UserInfo;
import com.zhgd.xmgl.security.util.SecurityUtils;
import org.apache.commons.collections.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@ -54,6 +57,13 @@ public class NoticeServiceImpl extends ServiceImpl<NoticeMapper, Notice> impleme
int pageNo = Integer.parseInt(map.getOrDefault("pageNo", 1).toString());
int pageSize = Integer.parseInt(map.getOrDefault("pageSize", 10).toString());
Page<Notice> page = new Page<>(pageNo, pageSize);
String accountId = MapUtils.getString(map, "accountId");
if (StrUtil.isBlank(accountId)) {
UserInfo user = SecurityUtils.getUser();
if (user != null) {
map.put("accountId", user.getUserId());
}
}
List<Notice> list = noticeMapper.selectNoticePageList(page, map);
return page.setRecords(list);
}

View File

@ -1,5 +1,6 @@
package com.zhgd.xmgl.modules.dangerous.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringProgressRecord;
import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringProgressRecordService;
@ -36,29 +37,41 @@ public class DangerousEngineeringProgressRecordController {
@Autowired
private IDangerousEngineeringProgressRecordService dangerousEngineeringProgressRecordService;
/**
* 分页列表查询
* @return
*/
@ApiOperation(value = "列表查询现场危大工程-进度记录信息", notes = "列表查询现场危大工程-进度记录信息", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "engineeringId", value = "危大工程ID", paramType = "body", required = false, dataType = "String"),
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = false, dataType = "String"),
})
@PostMapping(value = "/list")
public Result<List<DangerousEngineeringProgressRecord>> selectEngineeringProgressList(@RequestBody Map<String,Object> map) {
public Result<List<DangerousEngineeringProgressRecord>> selectEngineeringProgressList(@RequestBody Map<String, Object> map) {
return Result.success(dangerousEngineeringProgressRecordService.selectEngineeringProgressList(map));
}
/**
* 添加
* @param dangerousEngineeringProgressRecord
* @return
*/
@ApiOperation(value = "添加现场危大工程-进度记录信息", notes = "添加现场危大工程-进度记录信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<DangerousEngineeringProgressRecord> add(@RequestBody DangerousEngineeringProgressRecord dangerousEngineeringProgressRecord) {
Result<DangerousEngineeringProgressRecord> result = new Result<DangerousEngineeringProgressRecord>();
/**
* 分页列表查询
*
* @return
*/
@ApiOperation(value = "列表查询现场危大工程-进度记录信息", notes = "列表查询现场危大工程-进度记录信息", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "engineeringId", value = "危大工程ID", paramType = "body", required = false, dataType = "String"),
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = false, dataType = "String"),
})
@PostMapping(value = "/page")
public Result<Page<DangerousEngineeringProgressRecord>> selectEngineeringProgressPage(@RequestBody Map<String, Object> map) {
return Result.success(dangerousEngineeringProgressRecordService.selectEngineeringProgressPage(map));
}
/**
* 添加
*
* @param dangerousEngineeringProgressRecord
* @return
*/
@ApiOperation(value = "添加现场危大工程-进度记录信息", notes = "添加现场危大工程-进度记录信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<DangerousEngineeringProgressRecord> add(@RequestBody DangerousEngineeringProgressRecord dangerousEngineeringProgressRecord) {
Result<DangerousEngineeringProgressRecord> result = new Result<DangerousEngineeringProgressRecord>();
try {
dangerousEngineeringProgressRecord.setCreateTime(new Date());
dangerousEngineeringProgressRecordService.save(dangerousEngineeringProgressRecord);

View File

@ -1,5 +1,6 @@
package com.zhgd.xmgl.modules.dangerous.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringSideStation;
@ -23,11 +24,11 @@ import java.util.List;
import java.util.Map;
/**
/**
* @Title: Controller
* @Description: 危大工程-旁站记录
* @author pds
* @date 2021-06-29
* @date 2021-06-29
* @version V1.0
*/
@RestController
@ -35,112 +36,121 @@ import java.util.Map;
@Slf4j
@Api(tags = "现场危大工程-旁站记录")
public class DangerousEngineeringSideStationController {
@Autowired
private IDangerousEngineeringSideStationService dangerousEngineeringSideStationService;
@Autowired
private IDangerousEngineeringSideStationService dangerousEngineeringSideStationService;
/**
* 分页列表查询
* @return
*/
@ApiOperation(value = "列表查询危大工程-旁站记录信息", notes = "列表查询危大工程-旁站记录信息", httpMethod="POST")
@ApiOperation(value = "列表查询危大工程-旁站记录信息", notes = "列表查询危大工程-旁站记录信息", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "engineeringId", value = "危大工程ID", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "projectSn", value = "projectSn", paramType = "body", required = false, dataType = "String"),
})
@PostMapping(value = "/selectList")
public Result<List<EntityMap>> selectSideStationList(@RequestBody Map<String,Object> map) {
return Result.success(dangerousEngineeringSideStationService.selectSideStationList(map));
}
@PostMapping(value = "/selectList")
public Result<List<EntityMap>> selectSideStationList(@RequestBody Map<String, Object> map) {
return Result.success(dangerousEngineeringSideStationService.selectSideStationList(map));
}
/**
* 添加
* @param dangerousEngineeringSideStation
* @return
*/
@ApiOperation(value = "添加危大工程-旁站记录信息", notes = "添加危大工程-旁站记录信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<DangerousEngineeringSideStation> add(@RequestBody DangerousEngineeringSideStation dangerousEngineeringSideStation) {
Result<DangerousEngineeringSideStation> result = new Result<DangerousEngineeringSideStation>();
try {
@ApiOperation(value = "分页列表查询危大工程-旁站记录信息", notes = "分页列表查询危大工程-旁站记录信息", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "engineeringId", value = "危大工程ID", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "projectSn", value = "projectSn", paramType = "body", required = false, dataType = "String"),
})
@PostMapping(value = "/page")
public Result<Page<EntityMap>> selectSideStationPage(@RequestBody Map<String, Object> map) {
return Result.success(dangerousEngineeringSideStationService.selectSideStationPage(map));
}
/**
* 添加
*
* @param dangerousEngineeringSideStation
* @return
*/
@ApiOperation(value = "添加危大工程-旁站记录信息", notes = "添加危大工程-旁站记录信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<DangerousEngineeringSideStation> add(@RequestBody DangerousEngineeringSideStation dangerousEngineeringSideStation) {
Result<DangerousEngineeringSideStation> result = new Result<DangerousEngineeringSideStation>();
try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
dangerousEngineeringSideStation.setCreateTime(sdf.format(new Date()));
dangerousEngineeringSideStationService.save(dangerousEngineeringSideStation);
dangerousEngineeringSideStationService.save(dangerousEngineeringSideStation);
result.successMsg(MessageUtil.get("addSucess"));
} catch (Exception e) {
log.error("error", e);
} catch (Exception e) {
log.error("error", e);
log.info(e.getMessage());
result.error500(MessageUtil.get("failErr"));
}
return result;
}
}
return result;
}
/**
* 编辑
* @param dangerousEngineeringSideStation
* @return
*/
@ApiOperation(value = "编辑危大工程-旁站记录信息", notes = "编辑危大工程-旁站记录信息" , httpMethod="POST")
@PostMapping(value = "/edit")
public Result<DangerousEngineeringSideStation> edit(@RequestBody DangerousEngineeringSideStation dangerousEngineeringSideStation) {
Result<DangerousEngineeringSideStation> result = new Result<DangerousEngineeringSideStation>();
DangerousEngineeringSideStation dangerousEngineeringSideStationEntity = dangerousEngineeringSideStationService.getById(dangerousEngineeringSideStation.getId());
if(dangerousEngineeringSideStationEntity==null) {
/**
* 编辑
*
* @param dangerousEngineeringSideStation
* @return
*/
@ApiOperation(value = "编辑危大工程-旁站记录信息", notes = "编辑危大工程-旁站记录信息", httpMethod = "POST")
@PostMapping(value = "/edit")
public Result<DangerousEngineeringSideStation> edit(@RequestBody DangerousEngineeringSideStation dangerousEngineeringSideStation) {
Result<DangerousEngineeringSideStation> result = new Result<DangerousEngineeringSideStation>();
DangerousEngineeringSideStation dangerousEngineeringSideStationEntity = dangerousEngineeringSideStationService.getById(dangerousEngineeringSideStation.getId());
if (dangerousEngineeringSideStationEntity == null) {
result.error500(MessageUtil.get("notFindErr"));
}else {
boolean ok = dangerousEngineeringSideStationService.updateById(dangerousEngineeringSideStation);
} else {
boolean ok = dangerousEngineeringSideStationService.updateById(dangerousEngineeringSideStation);
if(ok) {
if (ok) {
result.successMsg(MessageUtil.get("editSucess"));
}
}
}
}
return result;
}
}
/**
* 通过id删除
* @param
* @return
*/
@ApiOperation(value = "删除危大工程-旁站记录信息", notes = "删除危大工程-旁站记录信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "危大工程-旁站记录ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/delete")
public Result<DangerousEngineeringSideStation> delete(@RequestBody Map<String,Object> map) {
Result<DangerousEngineeringSideStation> result = new Result<DangerousEngineeringSideStation>();
DangerousEngineeringSideStation dangerousEngineeringSideStation = dangerousEngineeringSideStationService.getById(MapUtils.getString(map,"id"));
if(dangerousEngineeringSideStation==null) {
/**
* 通过id删除
*
* @param
* @return
*/
@ApiOperation(value = "删除危大工程-旁站记录信息", notes = "删除危大工程-旁站记录信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "危大工程-旁站记录ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/delete")
public Result<DangerousEngineeringSideStation> delete(@RequestBody Map<String, Object> map) {
Result<DangerousEngineeringSideStation> result = new Result<DangerousEngineeringSideStation>();
DangerousEngineeringSideStation dangerousEngineeringSideStation = dangerousEngineeringSideStationService.getById(MapUtils.getString(map, "id"));
if (dangerousEngineeringSideStation == null) {
result.error500(MessageUtil.get("notFindErr"));
}else {
boolean ok = dangerousEngineeringSideStationService.removeById(MapUtils.getString(map,"id"));
if(ok) {
} else {
boolean ok = dangerousEngineeringSideStationService.removeById(MapUtils.getString(map, "id"));
if (ok) {
result.successMsg(MessageUtil.get("deleteSucess"));
}
}
}
}
return result;
}
return result;
}
/**
* 通过id查询
* @param
* @return
*/
@ApiOperation(value = "通过id查询危大工程-旁站记录信息", notes = "通过id查询危大工程-旁站记录信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "危大工程-旁站记录ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/queryById")
public Result<DangerousEngineeringSideStation> queryById(@RequestBody Map<String,Object> map) {
Result<DangerousEngineeringSideStation> result = new Result<DangerousEngineeringSideStation>();
DangerousEngineeringSideStation dangerousEngineeringSideStation = dangerousEngineeringSideStationService.getById(MapUtils.getString(map,"id"));
if(dangerousEngineeringSideStation==null) {
/**
* 通过id查询
*
* @param
* @return
*/
@ApiOperation(value = "通过id查询危大工程-旁站记录信息", notes = "通过id查询危大工程-旁站记录信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "危大工程-旁站记录ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/queryById")
public Result<DangerousEngineeringSideStation> queryById(@RequestBody Map<String, Object> map) {
Result<DangerousEngineeringSideStation> result = new Result<DangerousEngineeringSideStation>();
DangerousEngineeringSideStation dangerousEngineeringSideStation = dangerousEngineeringSideStationService.getById(MapUtils.getString(map, "id"));
if (dangerousEngineeringSideStation == null) {
result.error500(MessageUtil.get("notFindErr"));
}else {
result.setResult(dangerousEngineeringSideStation);
result.setSuccess(true);
}
return result;
}
} else {
result.setResult(dangerousEngineeringSideStation);
result.setSuccess(true);
}
return result;
}
}

View File

@ -3,6 +3,7 @@ package com.zhgd.xmgl.modules.dangerous.mapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringProgressRecord;
@ -11,13 +12,15 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 现场危大工程-进度记录
* @author pds
* @date 2021-08-24
* @date 2021-08-24
* @version V1.0
*/
@Mapper
public interface DangerousEngineeringProgressRecordMapper extends BaseMapper<DangerousEngineeringProgressRecord> {
List<DangerousEngineeringProgressRecord> selectEngineeringProgressList(Map<String, Object> map);
List<DangerousEngineeringProgressRecord> selectEngineeringProgressList(@Param("param") Map<String, Object> map);
DangerousEngineeringProgressRecord selectNewestEngineeringProgressRecord(@Param("engineeringId") String engineeringId);
Page<DangerousEngineeringProgressRecord> selectEngineeringProgressList(@Param("param") Map<String, Object> map, Page page);
}

View File

@ -3,19 +3,23 @@ package com.zhgd.xmgl.modules.dangerous.mapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.jeecg.common.mybatis.EntityMap;
import org.apache.ibatis.annotations.Mapper;
import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringSideStation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
/**
* @Description: 危大工程-旁站记录
* @author pds
* @date 2021-06-29
* @date 2021-06-29
* @version V1.0
*/
@Mapper
public interface DangerousEngineeringSideStationMapper extends BaseMapper<DangerousEngineeringSideStation> {
List<EntityMap> selectSideStationList(Map<String, Object> map);
List<EntityMap> selectSideStationList(@Param("param") Map<String, Object> map);
Page<EntityMap> selectSideStationList(@Param("param") Map<String, Object> map, Page page);
}

View File

@ -8,11 +8,11 @@
from dangerous_engineering_progress_record a LEFT JOIN system_user b ON a.create_user=b.user_id
left join dangerous_engineering_record d on d.id=a.engineering_id
WHERE 1=1
<if test="engineeringId != null and engineeringId != ''">
and a.engineering_id=#{engineeringId}
<if test="param.engineeringId != null and param.engineeringId != ''">
and a.engineering_id=#{param.engineeringId}
</if>
<if test="projectSn != null and projectSn != ''">
and d.project_sn = #{projectSn}
<if test="param.projectSn != null and param.projectSn != ''">
and d.project_sn = #{param.projectSn}
</if>
ORDER BY a.create_time DESC
</select>

View File

@ -7,11 +7,11 @@
from dangerous_engineering_side_station a LEFT JOIN system_user b ON a.create_user=b.user_id
left join dangerous_engineering_record der on der.id=a.dangerous_engineering_id
where 1=1
<if test="engineeringId != null and engineeringId != ''">
and a.dangerous_engineering_id = #{engineeringId}
<if test="param.engineeringId != null and param.engineeringId != ''">
and a.dangerous_engineering_id = #{param.engineeringId}
</if>
<if test="projectSn != null and projectSn != ''">
and der.project_sn = #{projectSn}
<if test="param.projectSn != null and param.projectSn != ''">
and der.project_sn = #{param.projectSn}
</if>
ORDER BY a.create_time DESC
</select>

View File

@ -1,5 +1,6 @@
package com.zhgd.xmgl.modules.dangerous.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringProgressRecord;
import com.baomidou.mybatisplus.extension.service.IService;
@ -15,4 +16,6 @@ import java.util.Map;
public interface IDangerousEngineeringProgressRecordService extends IService<DangerousEngineeringProgressRecord> {
List<DangerousEngineeringProgressRecord> selectEngineeringProgressList(Map<String, Object> map);
Page<DangerousEngineeringProgressRecord> selectEngineeringProgressPage(Map<String, Object> map);
}

View File

@ -1,5 +1,6 @@
package com.zhgd.xmgl.modules.dangerous.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringSideStation;
import com.baomidou.mybatisplus.extension.service.IService;
@ -10,10 +11,12 @@ import java.util.Map;
/**
* @Description: 危大工程-旁站记录
* @author pds
* @date 2021-06-29
* @date 2021-06-29
* @version V1.0
*/
public interface IDangerousEngineeringSideStationService extends IService<DangerousEngineeringSideStation> {
List<EntityMap> selectSideStationList(Map<String, Object> map);
Page<EntityMap> selectSideStationPage(Map<String, Object> map);
}

View File

@ -1,8 +1,10 @@
package com.zhgd.xmgl.modules.dangerous.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringProgressRecord;
import com.zhgd.xmgl.modules.dangerous.mapper.DangerousEngineeringProgressRecordMapper;
import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringProgressRecordService;
import com.zhgd.xmgl.util.PageUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -28,4 +30,11 @@ public class DangerousEngineeringProgressRecordServiceImpl extends ServiceImpl<D
public List<DangerousEngineeringProgressRecord> selectEngineeringProgressList(Map<String, Object> map) {
return dangerousEngineeringProgressRecordMapper.selectEngineeringProgressList(map);
}
@Override
public Page<DangerousEngineeringProgressRecord> selectEngineeringProgressPage(Map<String, Object> map) {
Page page = PageUtil.getPage(map);
return dangerousEngineeringProgressRecordMapper.selectEngineeringProgressList(map, page);
}
}

View File

@ -1,9 +1,11 @@
package com.zhgd.xmgl.modules.dangerous.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringSideStation;
import com.zhgd.xmgl.modules.dangerous.mapper.DangerousEngineeringSideStationMapper;
import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringSideStationService;
import com.zhgd.xmgl.util.PageUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -23,10 +25,16 @@ import java.util.Map;
@Transactional(rollbackFor = Exception.class)
public class DangerousEngineeringSideStationServiceImpl extends ServiceImpl<DangerousEngineeringSideStationMapper, DangerousEngineeringSideStation> implements IDangerousEngineeringSideStationService {
@Autowired
private DangerousEngineeringSideStationMapper dangerousEngineeringSideStationMapper;
private DangerousEngineeringSideStationMapper dangerousEngineeringSideStationMapper;
@Override
public List<EntityMap> selectSideStationList(Map<String, Object> map) {
return dangerousEngineeringSideStationMapper.selectSideStationList(map);
}
@Override
public Page<EntityMap> selectSideStationPage(Map<String, Object> map) {
Page page = PageUtil.getPage(map);
return dangerousEngineeringSideStationMapper.selectSideStationList(map, page);
}
}

View File

@ -44,13 +44,14 @@ public class AiStatisticController {
@ApiOperation(value = "AI预警类型统计", notes = "AI预警类型统计")
@ApiImplicitParams({
@ApiImplicitParam(name = "sn", value = "公司或项目sn", paramType = "body", required = true, dataType = "String"),
@ApiImplicitParam(name = "type", value = "不传查今日1查今明两天", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "type", value = "默认查今日1查今天、今天较昨天、本月、历史", paramType = "body", required = false, dataType = "Integer"),
})
@PostMapping("/selectAiAnalyseHardWareAlarmTypeCount")
public Result<AiAnalyseHardWareAlarmTypeCountVO> selectAiAnalyseHardWareAlarmTypeCount(@RequestBody Map<String, Object> map) {
return Result.success(aiStatisticService.selectAiAnalyseHardWareAlarmTypeCount(map));
}
@ApiOperation(value = "AI预警Top项目列表", notes = "AI预警Top项目列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "sn", value = "公司sn", paramType = "body", required = true, dataType = "String"),

View File

@ -9,14 +9,17 @@ import lombok.Data;
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AiAnalyseHardWareAlarmRecordVo extends AiAnalyseHardWareAlarmRecord {
@ApiModelProperty(value = "AI扣分规则")
private XzAiDeductRule aiDeductRule;
@ApiModelProperty(value = "报警数量")
@ApiModelProperty(value = "(历史)报警数量")
private Integer alarmNum;
@ApiModelProperty(value = "日期")
private String date;
@ApiModelProperty(value = "今日报警数量")
private Integer alarmNumToday;
@ApiModelProperty(value = "今日报警数量")
private Integer alarmNumYesterday;
@ApiModelProperty(value = "今日较昨日报警数量")
private Integer subYesterday;
@ApiModelProperty(value = "本月报警数量")
private Integer alarmNumMonth;
}

View File

@ -36,7 +36,7 @@ public interface AiAnalyseHardWareAlarmRecordMapper extends BaseMapper<AiAnalyse
List<SectorOneVo> getAiAnalyseHardWareAlarmTotal(Map<String, Object> map);
List<AiAnalyseHardWareAlarmRecordVo> selectAiAnalyseHardWareAlarmTypeCount(Map<String, Object> map);
List<AiAnalyseHardWareAlarmRecordVo> selectAiAnalyseHardWareAlarmTypeCount(@Param("param") Map<String, Object> map);
List<Map<String, Object>> selectProjectAiAlarmCountList(Map<String, Object> map);

View File

@ -190,31 +190,41 @@
<select id="selectAiAnalyseHardWareAlarmTypeCount"
resultType="com.zhgd.xmgl.modules.video.entity.vo.AiAnalyseHardWareAlarmRecordVo"
parameterType="java.util.Map">
SELECT w1.alarm_type alarmType,
COUNT(1) alarmNum,
DATE_FORMAT(w1.create_time, '%Y-%m-%d') date
SELECT COUNT(1) as alarmNum,
DATE_FORMAT(w1.create_time, '%Y-%m-%d') as date,
w1.alarm_type as alarmType
from ai_analyse_hard_ware_alarm_record w1
INNER JOIN project a ON w1.project_sn = a.project_sn
LEFT JOIN company cp ON a.company_sn = cp.company_sn
INNER JOIN company b ON cp.parent_id = b.company_id
Left JOIN company f ON b.parent_id = f.company_id
where w1.create_time &gt;= CONCAT(DATE_FORMAT(DATE_SUB(now(), interval 1 day), '%Y-%m-%d'), ' 00:00:00')
<if test="companyType == '1'.toString()">
and f.headquarters_sn = #{sn}
where 1 = 1
<if test="param.notType == '1'.toString() or param.timeUnit == '2'.toString()">
and w1.create_time &gt;= CONCAT(DATE_FORMAT(now(), '%Y-%m-%d'), ' 00:00:00')
</if>
<if test="companyType == '2'.toString()">
and f.company_sn = #{sn}
<if test="param.timeUnit == '1'.toString()">
and w1.create_time &gt;= CONCAT(DATE_FORMAT(DATE_SUB(now(), interval 1 day), '%Y-%m-%d'), ' 00:00:00')
and w1.create_time &lt;= CONCAT(DATE_FORMAT(DATE_SUB(now(), interval 1 day), '%Y-%m-%d'), ' 23:59:59')
</if>
<if test="companyType == '3'.toString()">
and b.company_sn = #{sn}
<if test="param.timeUnit == '3'.toString()">
and w1.create_time &gt;= CONCAT(DATE_FORMAT(now(), '%Y-%m-01'), ' 00:00:00')
</if>
<if test="companyType == '4'.toString()">
and w1.project_sn = #{sn}
<if test="param.companyType == '1'.toString()">
and f.headquarters_sn = #{param.sn}
</if>
<if test="companyType == '5'.toString()">
and cp.company_sn = #{sn}
<if test="param.companyType == '2'.toString()">
and f.company_sn = #{param.sn}
</if>
group by w1.alarm_type, DATE_FORMAT(w1.create_time, '%Y-%m-%d')
<if test="param.companyType == '3'.toString()">
and b.company_sn = #{param.sn}
</if>
<if test="param.companyType == '4'.toString()">
and w1.project_sn = #{param.sn}
</if>
<if test="param.companyType == '5'.toString()">
and cp.company_sn = #{param.sn}
</if>
group by w1.alarm_type
</select>
<select id="selectProjectAiAlarmCountList" resultType="java.util.Map" parameterType="java.util.Map">
SELECT a.project_sn projectSn,

View File

@ -1,7 +1,6 @@
package com.zhgd.xmgl.modules.video.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.modules.basicdata.constant.DictionaryConstant;
@ -68,44 +67,39 @@ public class AiStatisticServiceImpl implements IAiStatisticService {
@Override
public AiAnalyseHardWareAlarmTypeCountVO selectAiAnalyseHardWareAlarmTypeCount(Map<String, Object> param) {
Map<String, Object> map = companyService.getCompanyType(param);
List<AiAnalyseHardWareAlarmRecordVo> alarmList = aiAnalyseHardWareAlarmRecordMapper.selectAiAnalyseHardWareAlarmTypeCount(map);
List<AiAnalyseHardWareAlarmRecordVo> rsList = new ArrayList<>();
Map<String, List<AiAnalyseHardWareAlarmRecordVo>> dateMap = alarmList.stream().collect(Collectors.groupingBy(AiAnalyseHardWareAlarmRecordVo::getDate));
List<AiAnalyseHardWareAlarmRecordVo> todayList = dateMap.get(DateUtil.today());
if (todayList == null) {
todayList = new ArrayList<>();
}
Integer type = MapUtils.getInteger(param, "type");
if (Objects.equals(type, 1)) {
//今明
List<AiAnalyseHardWareAlarmRecordVo> yesterdayList = dateMap.get(DateUtil.formatDate(DateUtil.offsetDay(new Date(), -1)));
if (yesterdayList == null) {
yesterdayList = new ArrayList<>();
if (type == null) {
param.put("notType", 1);
//默认查今日
rsList = aiAnalyseHardWareAlarmRecordMapper.selectAiAnalyseHardWareAlarmTypeCount(map);
for (AiAnalyseHardWareAlarmRecordVo record : rsList) {
record.setAlarmNumToday(record.getAlarmNum());
}
} else if (Objects.equals(type, 1)) {
List<AiAnalyseHardWareAlarmRecordVo> historyList = aiAnalyseHardWareAlarmRecordMapper.selectAiAnalyseHardWareAlarmTypeCount(map);
map.put("timeUnit", 1);
List<AiAnalyseHardWareAlarmRecordVo> yesterdayList = aiAnalyseHardWareAlarmRecordMapper.selectAiAnalyseHardWareAlarmTypeCount(map);
map.put("timeUnit", 2);
List<AiAnalyseHardWareAlarmRecordVo> todayList = aiAnalyseHardWareAlarmRecordMapper.selectAiAnalyseHardWareAlarmTypeCount(map);
map.put("timeUnit", 3);
List<AiAnalyseHardWareAlarmRecordVo> monthList = aiAnalyseHardWareAlarmRecordMapper.selectAiAnalyseHardWareAlarmTypeCount(map);
Map<Integer, AiAnalyseHardWareAlarmRecordVo> todayMap = todayList.stream().collect(Collectors.toMap(AiAnalyseHardWareAlarmRecordVo::getAlarmType, Function.identity(), (aiAnalyseHardWareAlarmRecord, aiAnalyseHardWareAlarmRecord2) -> aiAnalyseHardWareAlarmRecord));
Map<Integer, AiAnalyseHardWareAlarmRecordVo> yesterdayMap = yesterdayList.stream().collect(Collectors.toMap(AiAnalyseHardWareAlarmRecordVo::getAlarmType, Function.identity(), (aiAnalyseHardWareAlarmRecord, aiAnalyseHardWareAlarmRecord2) -> aiAnalyseHardWareAlarmRecord));
List<Integer> typeList = alarmList.stream().map(AiAnalyseHardWareAlarmRecord::getAlarmType).distinct().collect(Collectors.toList());
Map<Integer, AiAnalyseHardWareAlarmRecordVo> historyMap = historyList.stream().collect(Collectors.toMap(AiAnalyseHardWareAlarmRecordVo::getAlarmType, Function.identity(), (aiAnalyseHardWareAlarmRecord, aiAnalyseHardWareAlarmRecord2) -> aiAnalyseHardWareAlarmRecord));
Map<Integer, AiAnalyseHardWareAlarmRecordVo> monthMap = monthList.stream().collect(Collectors.toMap(AiAnalyseHardWareAlarmRecordVo::getAlarmType, Function.identity(), (aiAnalyseHardWareAlarmRecord, aiAnalyseHardWareAlarmRecord2) -> aiAnalyseHardWareAlarmRecord));
List<Integer> typeList = historyList.stream().map(AiAnalyseHardWareAlarmRecord::getAlarmType).distinct().collect(Collectors.toList());
//计算两日的差
for (Integer t1 : typeList) {
AiAnalyseHardWareAlarmRecordVo today = todayMap.get(t1);
AiAnalyseHardWareAlarmRecordVo yesterday = yesterdayMap.get(t1);
if (today == null) {
yesterday.setAlarmNumToday(0);
yesterday.setSubYesterday(-yesterday.getAlarmNum());
rsList.add(yesterday);
} else if (yesterday == null) {
today.setAlarmNumToday(today.getAlarmNum());
today.setSubYesterday(today.getAlarmNum());
rsList.add(today);
} else {
today.setAlarmNumToday(today.getAlarmNum());
today.setSubYesterday(today.getAlarmNum() - yesterday.getAlarmNum());
rsList.add(today);
}
}
} else {
rsList = todayList;
for (AiAnalyseHardWareAlarmRecordVo record : rsList) {
record.setAlarmNumToday(record.getAlarmNum());
AiAnalyseHardWareAlarmRecordVo history = historyMap.get(t1);
AiAnalyseHardWareAlarmRecordVo month = monthMap.get(t1);
history.setAlarmNumToday(today == null ? 0 : today.getAlarmNum());
history.setAlarmNumYesterday(yesterday == null ? 0 : yesterday.getAlarmNum());
history.setAlarmNumMonth(month == null ? 0 : month.getAlarmNum());
history.setSubYesterday(today == null && yesterday == null ? 0 : (today == null ? -yesterday.getAlarmNum() : today.getAlarmNum()));
rsList.add(history);
}
}

View File

@ -69,8 +69,11 @@ public class XzSecurityQualityInspectionRecordController {
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "body", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "body", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "isDangerousEngineering", value = "是否危大1是", paramType = "body", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "enumType", value = "问题等级1重大隐患2较大隐患3一般隐患4低隐患", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "isNotQualified", value = "是否未销项", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "isOverdueRectification", value = "是否超期未整改1是", paramType = "body", required = false, dataType = "Integer"),
})
@PostMapping(value = "/list")
@PostMapping(value = {"/list", "/page"})
public Result<XzSecurityRecordVo> queryPageList(@RequestBody Map<String, Object> map) {
return Result.success(qualityInspectionRecordService.selectQualityInspectionRecordPage(map));
}
@ -322,6 +325,11 @@ public class XzSecurityQualityInspectionRecordController {
@ApiOperation(value = "责任区城分析", notes = "责任区城分析", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
@ApiImplicitParam(name = "enumType", value = "问题等级1重大隐患2较大隐患3一般隐患4低隐患", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "isNotQualified", value = "是否未销项", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "isOverdueRectification", value = "是否超期未整改1是", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "inspectTime_begin", value = "检查开始时间", paramType = "body", required = false, dataType = "String"),
@ApiImplicitParam(name = "inspectTime_end", value = "检查结束时间", paramType = "body", required = false, dataType = "String"),
})
@PostMapping(value = "/countQualityInspectionRecordRegion")
public Result<List<TrendOneVo>> countQualityInspectionRecordRegion(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
@ -344,8 +352,8 @@ public class XzSecurityQualityInspectionRecordController {
@ApiOperation(value = "统计隐患等级", notes = "统计隐患等级", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
@ApiImplicitParam(name = "isNotQualified", value = "是否未销项", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "isOverdueRectification", value = "是否超期未整改", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "isNotQualified", value = "是否未销项1是", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "isOverdueRectification", value = "是否超期未整改1是", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "inspectStartTime", value = "检查开始时间", paramType = "body", required = false, dataType = "String"),
@ApiImplicitParam(name = "inspectEndTime", value = "检查结束时间", paramType = "body", required = false, dataType = "String"),
})
@ -375,6 +383,9 @@ public class XzSecurityQualityInspectionRecordController {
@ApiImplicitParam(name = "notQualified", value = "未销项", paramType = "body", required = false, dataType = "String"),
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "body", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "body", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "isNotQualified", value = "是否未销项", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "isOverdueRectification", value = "是否超期未整改1是", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "enumType", value = "问题等级1重大隐患2较大隐患3一般隐患4低隐患", paramType = "body", required = false, dataType = "Integer"),
})
@PostMapping(value = "/statsByEnterprise")
public Result<Page<StatsByEnterpriseVo>> statsByEnterprise(@ApiIgnore @RequestBody Map<String, Object> paramMap) {
@ -384,11 +395,34 @@ public class XzSecurityQualityInspectionRecordController {
@ApiOperation(value = "隐患类型分析", notes = "隐患类型分析", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
@ApiImplicitParam(name = "enumType", value = "问题等级1重大隐患2较大隐患3一般隐患4低隐患", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "isNotQualified", value = "是否未销项", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "isOverdueRectification", value = "是否超期未整改1是", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "inspectTime_begin", value = "检查开始时间", paramType = "body", required = false, dataType = "String"),
@ApiImplicitParam(name = "inspectTime_end", value = "检查结束时间", paramType = "body", required = false, dataType = "String"),
})
@PostMapping(value = "/statsDangerType")
public Result<SectorVo> statsDangerType(@ApiIgnore @RequestBody Map<String, Object> paramMap) {
return Result.success(qualityInspectionRecordService.statsDangerType(paramMap));
}
@ApiOperation(value = "指挥部大屏数量统计", notes = "指挥部大屏数量统计", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
})
@PostMapping(value = "/statsDirectorateBigScreen")
public Result<StatsDirectorateBigscreenVo> statsDirectorateBigscreen(@ApiIgnore @RequestBody Map<String, Object> paramMap) {
return Result.success(qualityInspectionRecordService.statsDirectorateBigScreen(paramMap));
}
@ApiOperation(value = "督办", notes = "督办", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "安全检查记录信息id", paramType = "body", required = true, dataType = "String"),
})
@PostMapping(value = "/supervise")
public Result supervise(@ApiIgnore @RequestBody Map<String, Object> paramMap) {
qualityInspectionRecordService.supervise(paramMap);
return Result.ok();
}
}

View File

@ -0,0 +1,20 @@
package com.zhgd.xmgl.modules.xz.security.entity.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class StatsDirectorateBigscreenVo {
//@ApiModelProperty("危大工程数量")
//private Integer wdNum;
//@ApiModelProperty("人员登记培训数量")
//private Integer Num;
//@ApiModelProperty("影响进度数量")
//private Integer Num;
//@ApiModelProperty("风险统计数量")
//private Integer Num;
//@ApiModelProperty("安全隐患数量")
//private Integer Num;
//@ApiModelProperty("AI报警数量")
//private Integer Num;
}

View File

@ -14,7 +14,7 @@ public class XzSecurityQualityInspectionRecordTotalVo {
private Integer investigateNum;
@ApiModelProperty("超期未关闭")
private Integer overdueNotCloseNum;
@ApiModelProperty("整改数")
@ApiModelProperty("(待)整改数")
private Integer rectificationNum;
private Integer ybUrgentLevelNum;
private Integer yzUrgentLevelNum;

View File

@ -31,7 +31,7 @@ public interface XzSecurityQualityInspectionRecordMapper extends BaseMapper<XzSe
List<XzSecurityQualityInspectionRecordVo> selectQualityInspectionRecordPage(Page<XzSecurityQualityInspectionRecordVo> page, @Param("param") Map<String, Object> map);
XzSecurityQualityInspectionRecordTotalVo selectQualityInspectionRecordPageTotal(@Param("map") Map<String, Object> map);
XzSecurityQualityInspectionRecordTotalVo selectQualityInspectionRecordPageTotal(@Param("param") Map<String, Object> map);
List<XzSecurityQualityInspectionRecordTotalVo> selectQualityInspectionRecordPageTotal(@Param("map") Map<String, Object> map, @Param("o") Object o);
@ -63,7 +63,7 @@ public interface XzSecurityQualityInspectionRecordMapper extends BaseMapper<XzSe
List<SectorOneVo> countQualityInspectionRecordUrgentLevel(HashMap<String, Object> paramMap);
List<TrendOneVo> countQualityInspectionRecordRegion(HashMap<String, Object> paramMap);
List<TrendOneVo> countQualityInspectionRecordRegion(@Param("param") HashMap<String, Object> paramMap);
Page<StatsByChangeIdVo> statsByChangeId(@Param("param") Map<String, Object> paramMap, Page page);
@ -73,5 +73,5 @@ public interface XzSecurityQualityInspectionRecordMapper extends BaseMapper<XzSe
Page<StatsByEnterpriseVo> statsByEnterprise(@Param("param") Map<String, Object> paramMap, Page page);
List<SectorOneVo> statsDangerType(Map<String, Object> paramMap);
List<SectorOneVo> statsDangerType(@Param("param") Map<String, Object> paramMap);
}

View File

@ -71,6 +71,15 @@
LEFT join subdivision_project subentry on subentry.id = a.subentry_id
LEFT join dangerous_engineering_record der on der.id = a.engineering_id
WHERE a.project_sn = #{param.projectSn}
<if test="param.isOverdueRectification == '1'.toString()">
and (a.status = 2 AND now() > a.change_limit_time)
</if>
<if test="param.isNotQualified == '1'.toString()">
and a.status != 5
</if>
<if test="param.enumType != null and param.enumType != ''">
and a.level = #{param.enumType}
</if>
<if test="param.regionId != null and param.regionId != '' and param.regionId.size > 0">
and a.region_id in
<foreach item="item" index="index" collection="param.regionId"
@ -118,7 +127,10 @@
and a.inspect_time >= #{param.inspectStartTime}
</if>
<if test="param.inspectEndTime != null and param.inspectEndTime != ''">
and a.inspect_time &lt;= #{param.inspectEndTime}
and a.inspect_time &lt;= if(LENGTH(#{param.inspectEndTime}) = 10,
CONCAT(DATE_FORMAT(#{param.inspectEndTime},
'%Y-%m-%d'),
' 23:59:59'), #{param.inspectEndTime})
</if>
<if test="param.recordStatus == '1'.toString()">
and a.record_type = 2
@ -172,101 +184,102 @@
overdueRectificationNumRatio
from (
SELECT count(1) totalNum,
IFNULL(SUM((CASE WHEN a.record_type = 2 THEN 1 ELSE 0 END)), 0) investigateNum,
IFNULL(SUM((CASE WHEN a.status = 5 THEN 1 ELSE 0 END)), 0) closeNum,
IFNULL(SUM((CASE WHEN t.record_type = 2 THEN 1 ELSE 0 END)), 0) investigateNum,
IFNULL(SUM((CASE WHEN t.status = 5 THEN 1 ELSE 0 END)), 0) closeNum,
IFNULL(SUM((CASE
WHEN a.status = 1 OR a.status = 2 OR a.status = 3 OR a.status = 4 THEN 1
WHEN t.status = 1 OR t.status = 2 OR t.status = 3 OR t.status = 4 THEN 1
ELSE 0 END)), 0) notCloseNum,
IFNULL(SUM((CASE
WHEN a.status != 5 AND now() > a.change_limit_time THEN 1
WHEN t.status != 5 AND now() > t.change_limit_time THEN 1
ELSE 0 END)), 0) overdueNotCloseNum,
IFNULL(SUM((CASE
WHEN a.status = 2 AND now() > a.change_limit_time THEN 1
WHEN t.status = 2 AND now() > t.change_limit_time THEN 1
ELSE 0 END)), 0) overdueRectificationNum,
IFNULL(SUM((CASE WHEN a.status = 2 THEN 1 ELSE 0 END)), 0) rectificationNum,
IFNULL(SUM((CASE WHEN a.status != 2 THEN 1 ELSE 0 END)), 0) alreadyRectificationNum,
IFNULL(SUM((CASE WHEN a.status = 3 THEN 1 ELSE 0 END)), 0) reviewNum,
IFNULL(SUM((CASE WHEN a.status = 4 THEN 1 ELSE 0 END)), 0) verificationNum,
IFNULL(SUM((CASE WHEN a.urgent_level = 1 THEN 1 ELSE 0 END)), 0) ybUrgentLevelNum,
IFNULL(SUM((CASE WHEN a.urgent_level = 2 THEN 1 ELSE 0 END)), 0) yzUrgentLevelNum,
IFNULL(SUM((CASE WHEN a.urgent_level = 3 THEN 1 ELSE 0 END)), 0) jyUrgentLevelNum,
IFNULL(SUM((CASE WHEN a.record_type = 1 THEN 1 ELSE 0 END)), 0) dangerNum,
IFNULL(SUM((CASE WHEN a.level = 1 THEN 1 ELSE 0 END)), 0) greatFaultLevelNum,
IFNULL(SUM((CASE WHEN a.level = 2 THEN 1 ELSE 0 END)), 0) largerRiskNum,
IFNULL(SUM((CASE WHEN a.level = 3 THEN 1 ELSE 0 END)), 0) generalRiskNum,
IFNULL(SUM((CASE WHEN a.level = 4 THEN 1 ELSE 0 END)), 0) lowRiskNum,
if(FLOOR((DAYOFMONTH(a.create_time)-1) / 7)>3,3,FLOOR((DAYOFMONTH(a.create_time)-1) / 7)) whichWeekOfMonth
from xz_security_quality_inspection_record a
WHERE a.project_sn = #{map.projectSn}
and a.status != 6
<if test="map.isDangerousEngineering == '1'.toString()">
and a.engineering_id is not null
IFNULL(SUM((CASE WHEN t.status = 2 THEN 1 ELSE 0 END)), 0) rectificationNum,
IFNULL(SUM((CASE WHEN t.status != 2 THEN 1 ELSE 0 END)), 0) alreadyRectificationNum,
IFNULL(SUM((CASE WHEN t.status = 3 THEN 1 ELSE 0 END)), 0) reviewNum,
IFNULL(SUM((CASE WHEN t.status = 4 THEN 1 ELSE 0 END)), 0) verificationNum,
IFNULL(SUM((CASE WHEN t.urgent_level = 1 THEN 1 ELSE 0 END)), 0) ybUrgentLevelNum,
IFNULL(SUM((CASE WHEN t.urgent_level = 2 THEN 1 ELSE 0 END)), 0) yzUrgentLevelNum,
IFNULL(SUM((CASE WHEN t.urgent_level = 3 THEN 1 ELSE 0 END)), 0) jyUrgentLevelNum,
IFNULL(SUM((CASE WHEN t.record_type = 1 THEN 1 ELSE 0 END)), 0) dangerNum,
IFNULL(SUM((CASE WHEN t.level = 1 THEN 1 ELSE 0 END)), 0) greatFaultLevelNum,
IFNULL(SUM((CASE WHEN t.level = 2 THEN 1 ELSE 0 END)), 0) largerRiskNum,
IFNULL(SUM((CASE WHEN t.level = 3 THEN 1 ELSE 0 END)), 0) generalRiskNum,
IFNULL(SUM((CASE WHEN t.level = 4 THEN 1 ELSE 0 END)), 0) lowRiskNum,
if(FLOOR((DAYOFMONTH(t.create_time)-1) / 7)>3,3,FLOOR((DAYOFMONTH(t.create_time)-1) / 7)) whichWeekOfMonth
from xz_security_quality_inspection_record t
WHERE t.project_sn = #{param.projectSn}
and t.status != 6
<if test="param.isDangerousEngineering == '1'.toString()">
and t.engineering_id is not null
</if>
<if test="map.regionId != null and map.regionId != ''">
and a.region_id = #{map.regionId}
<if test="param.regionId != null and param.regionId != ''">
and t.region_id = #{param.regionId}
</if>
<if test="map.recordType != null and map.recordType != ''">
and a.record_type = #{map.recordType}
<if test="param.recordType != null and param.recordType != ''">
and t.record_type = #{param.recordType}
</if>
<if test="map.level != null and map.level != ''">
and a.level = #{map.level}
<if test="param.level != null and param.level != ''">
and t.level = #{param.level}
</if>
<if test="map.changeId != null and map.changeId != ''">
and a.change_id = #{map.changeId}
<if test="param.changeId != null and param.changeId != ''">
and t.change_id = #{param.changeId}
</if>
<if test="map.reviewId != null and map.reviewId != ''">
and a.review_id = #{map.reviewId}
<if test="param.reviewId != null and param.reviewId != ''">
and t.review_id = #{param.reviewId}
</if>
<if test="map.verifyManId != null and map.verifyManId != ''">
and a.verify_man_id = #{map.verifyManId}
<if test="param.verifyManId != null and param.verifyManId != ''">
and t.verify_man_id = #{param.verifyManId}
</if>
<if test="map.creatorId != null and map.creatorId != ''">
and a.creator_id = #{map.creatorId}
<if test="param.creatorId != null and param.creatorId != ''">
and t.creator_id = #{param.creatorId}
</if>
<if test="map.inspectManId != null and map.inspectManId != ''">
and a.inspect_man_id = #{map.inspectManId}
<if test="param.inspectManId != null and param.inspectManId != ''">
and t.inspect_man_id = #{param.inspectManId}
</if>
<if test="map.operatorId != null and map.operatorId != ''">
and ((a.change_id = #{map.operatorId} and a.status = 2) or
(a.review_id = #{map.operatorId} and a.status = 3) or
(a.verify_man_id = #{map.operatorId} and a.status = 4))
<if test="param.operatorId != null and param.operatorId != ''">
and ((t.change_id = #{param.operatorId} and t.status = 2) or
(t.review_id = #{param.operatorId} and t.status = 3) or
(t.verify_man_id = #{param.operatorId} and t.status = 4))
</if>
<if test="map.status != null and map.status != '' and status != '7'.toString()">
and a.status = #{map.status}
<if test="param.status != null and param.status != '' and param.status != '7'.toString()">
and t.status = #{param.status}
</if>
<if test="map.status == '7'.toString()">
and a.change_limit_time <![CDATA[<]]> current_date
and a.status != 5
<if test="param.status == '7'.toString()">
and t.change_limit_time <![CDATA[<]]> current_date
and t.status != 5
</if>
<if test="map.urgentLevel != null and map.urgentLevel != ''">
and a.urgent_level = #{map.urgentLevel}
<if test="param.urgentLevel != null and param.urgentLevel != ''">
and t.urgent_level = #{param.urgentLevel}
</if>
<if test="map.inspectStartTime != null and map.inspectStartTime != ''">
and a.inspect_time >= #{map.inspectStartTime}
<if test="param.inspectStartTime != null and param.inspectStartTime != ''">
and t.inspect_time >= #{param.inspectStartTime}
</if>
<if test="map.inspectEndTime != null and map.inspectEndTime != ''">
and a.inspect_time &lt;= if(LENGTH(#{map.inspectEndTime}) = 10, CONCAT(DATE_FORMAT(#{map.inspectEndTime},
<if test="param.inspectEndTime != null and param.inspectEndTime != ''">
and t.inspect_time &lt;= if(LENGTH(#{param.inspectEndTime}) = 10,
CONCAT(DATE_FORMAT(#{param.inspectEndTime},
'%Y-%m-%d'),
' 23:59:59'), #{map.inspectEndTime})
' 23:59:59'), #{param.inspectEndTime})
</if>
<if test="map.regionId != null and map.regionId != ''">
and a.region_id = #{map.regionId}
<if test="param.regionId != null and param.regionId != ''">
and t.region_id = #{param.regionId}
</if>
<if test="map.search != null and map.search != ''">
<if test="param.search != null and param.search != ''">
and (
a.region_name like concat('%', #{map.search}, '%')
or a.danger_item_content like concat('%', #{map.search}, '%')
or a.danger_desc like concat('%', #{map.search}, '%')
or a.remark like concat('%', #{map.search}, '%')
t.region_name like concat('%', #{param.search}, '%')
or t.danger_item_content like concat('%', #{param.search}, '%')
or t.danger_desc like concat('%', #{param.search}, '%')
or t.remark like concat('%', #{param.search}, '%')
)
</if>
<if test="map.itemId != null and map.itemId != ''">
and a.item_id = #{map.itemId}
<if test="param.itemId != null and param.itemId != ''">
and t.item_id = #{param.itemId}
</if>
<if test="map.engineeringId != null and map.engineeringId != ''">
and a.engineering_id = #{map.engineeringId}
<if test="param.engineeringId != null and param.engineeringId != ''">
and t.engineering_id = #{param.engineeringId}
</if>
<if test="map.isStatsByWeek == '1'.toString()">
<if test="param.isStatsByWeek == '1'.toString()">
group by whichWeekOfMonth
</if>
) tp
@ -527,11 +540,29 @@
</select>
<select id="countQualityInspectionRecordRegion" resultType="com.zhgd.xmgl.base.entity.vo.TrendOneVo">
select qr.region_name x, ifnull(sum(if(qir.id is not null, 1, 0)), 0) y
select qr.region_name x, ifnull(sum(if(t.id is not null, 1, 0)), 0) y
from quality_region qr
left join xz_security_quality_inspection_record qir on qr.id = qir.region_id
left join xz_security_quality_inspection_record t on qr.id = t.region_id
where 1 = 1
and qr.project_sn = #{projectSn}
and qr.project_sn = #{param.projectSn} and t.status !=6 and t.record_type = 1
<if test="param.isNotQualified == '1'.toString()">
and t.status != 5
</if>
<if test="param.isOverdueRectification == '1'.toString()">
and (t.status = 2 AND now() > t.change_limit_time)
</if>
<if test="param.inspectStartTime != null and param.param.inspectStartTime != ''">
and t.inspect_time >= #{param.inspectStartTime}
</if>
<if test="param.inspectEndTime != null and param.param.inspectEndTime != ''">
and t.inspect_time &lt;= if(LENGTH(#{param.inspectEndTime}) = 10,
CONCAT(DATE_FORMAT(#{param.inspectEndTime},
'%Y-%m-%d'),
' 23:59:59'), #{param.inspectEndTime})
</if>
<if test="param.enumType != null and param.enumType != ''">
and t.level = #{param.enumType}
</if>
group by qr.id
order by y desc
</select>
@ -569,7 +600,7 @@
</select>
<select id="countDangerLevel" resultType="com.zhgd.xmgl.base.entity.vo.SectorOneVo">
select count(*) count, if(a.level = 1, 1, 2) enumType
select count(*) count, a.level as enumType
from xz_security_quality_inspection_record a
where project_sn = #{projectSn}
and a.record_type = 1
@ -625,45 +656,59 @@
round(IFNULL(TRUNCATE(IFNULL(t.rectifiedNumTimely, 0) / IFNULL(totalNum, 0), 4), 0) * 100, 2)
rectifiedNumRatioTimely
from (SELECT count(*) totalNum,
IFNULL(SUM((CASE WHEN hdir.status != 2 THEN 1 ELSE 0 END)), 0) rectifiedNum,
IFNULL(SUM((CASE WHEN hdir.status != 2 and change_limit_time &lt; now() THEN 1 ELSE 0 END)), 0)
IFNULL(SUM((CASE WHEN t.status != 2 THEN 1 ELSE 0 END)), 0) rectifiedNum,
IFNULL(SUM((CASE WHEN t.status != 2 and change_limit_time &lt; now() THEN 1 ELSE 0 END)), 0)
rectifiedNumTimely,
ei.enterprise_name
from xz_security_quality_inspection_record hdir
left join enterprise_info ei on ei.id = hdir.enterprise_id
from xz_security_quality_inspection_record t
left join enterprise_info ei on ei.id = t.enterprise_id
WHERE record_type = 1
and hdir.status != 6
and t.status != 6
and project_sn = #{param.projectSn}
<if test="param.inspectTime_begin != null and param.inspectTime_begin != ''">
and hdir.inspect_time <![CDATA[>=]]> #{param.inspectTime_begin}
and t.inspect_time <![CDATA[>=]]> #{param.inspectTime_begin}
</if>
<if test="param.inspectTime_end != null and param.inspectTime_end != ''">
and hdir.inspect_time <![CDATA[<=]]> if(LENGTH(#{param.inspectTime_end}) = 10,
and t.inspect_time <![CDATA[<=]]> if(LENGTH(#{param.inspectTime_end}) = 10,
CONCAT(DATE_FORMAT(#{param.inspectTime_end}, '%Y-%m-%d'), ' 23:59:59'),
#{param.inspectTime_end})
</if>
group by hdir.enterprise_id
<if test="param.isNotQualified == '1'.toString()">
and t.status != 5
</if>
<if test="param.enumType != null and param.enumType != ''">
and t.level = #{param.enumType}
</if>
<if test="param.isOverdueRectification == '1'.toString()">
and (t.status = 2 AND now() > t.change_limit_time)
</if>
group by t.enterprise_id
order by rectifiedNum desc) t
</select>
<select id="statsDangerType" resultType="com.zhgd.xmgl.base.entity.vo.SectorOneVo">
select count(*) count, SUBSTRING_INDEX(a.danger_item_content,'/',1) as name
from xz_security_quality_inspection_record a
where project_sn = #{projectSn}
and a.record_type = 1
and a.status != 6
<if test="isOverdueRectification == '1'.toString()">
and (a.status = 2 AND now() > a.change_limit_time)
select count(*) count, SUBSTRING_INDEX(t.danger_item_content,'/',1) as name
from xz_security_quality_inspection_record t
where project_sn = #{param.projectSn}
and t.record_type = 1
and t.status != 6
<if test="param.isOverdueRectification == '1'.toString()">
and (t.status = 2 AND now() > t.change_limit_time)
</if>
<if test="isNotQualified == '1'.toString()">
and a.status != 5
<if test="param.isNotQualified == '1'.toString()">
and t.status != 5
</if>
<if test="inspectStartTime != null and inspectStartTime != ''">
and a.inspect_time >= #{inspectStartTime}
<if test="param.inspectStartTime != null and param.inspectStartTime != ''">
and t.inspect_time >= #{param.inspectStartTime}
</if>
<if test="inspectEndTime != null and inspectEndTime != ''">
and a.inspect_time &lt;= #{inspectEndTime}
<if test="param.inspectEndTime != null and param.inspectEndTime != ''">
and t.inspect_time &lt;= if(LENGTH(#{param.inspectEndTime}) = 10,
CONCAT(DATE_FORMAT(#{param.inspectEndTime},
'%Y-%m-%d'),
' 23:59:59'), #{param.inspectEndTime})
</if>
<if test="param.enumType != null and param.enumType != ''">
and t.level = #{param.enumType}
</if>
group by name
</select>

View File

@ -80,4 +80,8 @@ public interface IXzSecurityQualityInspectionRecordService extends IService<XzSe
Page<StatsByEnterpriseVo> statsByEnterprise(Map<String, Object> paramMap);
SectorVo statsDangerType(Map<String, Object> paramMap);
StatsDirectorateBigscreenVo statsDirectorateBigScreen(Map<String, Object> paramMap);
void supervise(Map<String, Object> paramMap);
}

View File

@ -210,7 +210,6 @@ public class XzSecurityXzSecurityQualityInspectionRecordServiceImpl extends Serv
}
private void setDifferYesterday(Map<String, Object> map, XzSecurityQualityInspectionRecordTotalVo total) {
Date date = new Date();
map.put("inspectStartTime", DateUtil.today());
map.put("inspectEndTime", DateUtil.format(DateUtil.endOfDay(new Date()), "yyyy-MM-dd HH:mm:ss"));
XzSecurityQualityInspectionRecordTotalVo todayTotal = xzSecurityQualityInspectionRecordMapper.selectQualityInspectionRecordPageTotal(map);
@ -273,12 +272,16 @@ public class XzSecurityXzSecurityQualityInspectionRecordServiceImpl extends Serv
xzSecurityQualityInspectionRecord.setEnterpriseId(enterpriseInfo.getId());
}
xzSecurityQualityInspectionRecordMapper.insert(xzSecurityQualityInspectionRecord);
noticeUser(xzSecurityQualityInspectionRecord);
deductScoreIf(xzSecurityQualityInspectionRecord);
}
private void noticeUser(XzSecurityQualityInspectionRecord xzSecurityQualityInspectionRecord) {
if (xzSecurityQualityInspectionRecord.getRecordType() == 1 && xzSecurityQualityInspectionRecord.getStatus() == 2) {
noticeService.addUserNoticeAndApp(xzSecurityQualityInspectionRecord.getChangeId(), "您有一条安全检查待整改,问题:" + xzSecurityQualityInspectionRecord.getDangerItemContent(), "安全管理待整改", "10",
PushPayloads.buildPushPayload(10, xzSecurityQualityInspectionRecord));
}
deductScoreIf(xzSecurityQualityInspectionRecord);
}
private void deductScoreIf(XzSecurityQualityInspectionRecord hiddenDangerInspectRecord) {
@ -556,6 +559,23 @@ public class XzSecurityXzSecurityQualityInspectionRecordServiceImpl extends Serv
return SectorVo.getSectorVo(data);
}
@Override
public StatsDirectorateBigscreenVo statsDirectorateBigScreen(Map<String, Object> paramMap) {
StatsDirectorateBigscreenVo statsDirectorateBigscreenVo = new StatsDirectorateBigscreenVo();
return statsDirectorateBigscreenVo;
}
@Override
public void supervise(Map<String, Object> paramMap) {
Integer id = MapUtils.getInteger(paramMap, "id");
XzSecurityQualityInspectionRecord record = baseMapper.selectById(id);
if (record == null) {
throw new OpenAlertException("数据不存在");
}
noticeUser(record);
}
private void recoverScore(XzSecurityQualityInspectionRecord hiddenDangerInspectRecord) {
if (hiddenDangerInspectRecord.getRecordType() == null || hiddenDangerInspectRecord.getRecordType() == 2) {
return;

View File

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.system.query.QueryGenerator;
import com.zhgd.jeecg.common.util.oConvertUtils;
import com.zhgd.xmgl.base.entity.vo.SectorVo;
import com.zhgd.xmgl.modules.xz.entity.XzTaskProgressContent;
import com.zhgd.xmgl.modules.xz.service.IXzTaskProgressContentService;
import io.swagger.annotations.Api;
@ -30,6 +31,7 @@ import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
@ -57,6 +59,7 @@ public class XzTaskProgressContentController {
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "isAudit", value = "1已审核0待审核", paramType = "query", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "date", value = "日期yyyy-MM-dd", paramType = "query", required = false, dataType = "Integer"),
})
@GetMapping(value = "/page")
public Result<IPage<XzTaskProgressContent>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
@ -191,4 +194,13 @@ public class XzTaskProgressContentController {
return mv;
}
@ApiOperation(value = "统计影响进度因素", notes = "统计影响进度因素", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
@ApiImplicitParam(name = "month", value = "月份yyyy-MM", paramType = "body", required = false, dataType = "String"),
})
@PostMapping(value = "/statsDelayEventType")
public Result<SectorVo> statsDelayEventType(@ApiIgnore @RequestBody Map<String, Object> paramMap) {
return Result.success(taskProgressContentService.statsDelayEventType(paramMap));
}
}

View File

@ -6,11 +6,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.annotation.DataScope;
import com.zhgd.xmgl.base.entity.vo.SectorOneVo;
import com.zhgd.xmgl.modules.xz.entity.XzTaskProgressContent;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @Description: 任务进度甘特图-内容
@ -26,4 +29,6 @@ public interface XzTaskProgressContentMapper extends BaseMapper<XzTaskProgressCo
List<XzTaskProgressContent> queryList(@Param(Constants.WRAPPER) QueryWrapper<XzTaskProgressContent> queryWrapper);
IPage<XzTaskProgressContent> queryList(Page<XzTaskProgressContent> page, @Param(Constants.WRAPPER) QueryWrapper<XzTaskProgressContent> queryWrapper);
ArrayList<SectorOneVo> statsDelayEventType(Map<String, Object> paramMap);
}

View File

@ -9,4 +9,22 @@
left join enterprise_info ei on ei.id=c.enterprise_id
${ew.customSqlSegment}
</select>
<select id="statsDelayEventType" resultType="com.zhgd.xmgl.base.entity.vo.SectorOneVo">
select count(*) count,c.delay_event_type as enumType
from xz_task_progress_content c
join xz_task_progress xtp on c.task_progress_id = xtp.id
left join quality_region qr on xtp.quality_region_id = qr.id
left join enterprise_info ei on ei.id=c.enterprise_id
where 1=1
<if test="projectSn != null and projectSn != ''">
and c.project_sn = #{projectSn}
</if>
<if test="month != null and month != ''">
and c.upload_date >= #{month}
and c.upload_date &lt;= concat(#{month},'-31 23:59:59')
</if>
and c.audit_type=2
group by c.delay_event_type
</select>
</mapper>

View File

@ -1,12 +1,14 @@
package com.zhgd.xmgl.modules.xz.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zhgd.xmgl.base.entity.vo.SectorVo;
import com.zhgd.xmgl.modules.xz.entity.XzTaskProgressContent;
import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description: 任务进度甘特图-内容
@ -26,4 +28,5 @@ public interface IXzTaskProgressContentService extends IService<XzTaskProgressCo
void edit(XzTaskProgressContent taskProgressContent);
SectorVo statsDelayEventType(Map<String, Object> paramMap);
}

View File

@ -1,6 +1,7 @@
package com.zhgd.xmgl.modules.xz.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -10,6 +11,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhgd.jeecg.common.execption.OpenAlertException;
import com.zhgd.jeecg.common.system.query.QueryGenerator;
import com.zhgd.xmgl.base.entity.vo.SectorOneVo;
import com.zhgd.xmgl.base.entity.vo.SectorVo;
import com.zhgd.xmgl.enums.ParamEnum;
import com.zhgd.xmgl.modules.xz.entity.XzTaskProgress;
import com.zhgd.xmgl.modules.xz.entity.XzTaskProgressContent;
import com.zhgd.xmgl.modules.xz.mapper.XzTaskProgressContentMapper;
@ -25,9 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import java.util.*;
/**
* @Description: 任务进度甘特图-内容
@ -101,8 +103,15 @@ public class XzTaskProgressContentServiceImpl extends ServiceImpl<XzTaskProgress
baseMapper.updateById(taskProgressContent);
}
@Override
public SectorVo statsDelayEventType(Map<String, Object> paramMap) {
ArrayList<SectorOneVo> list = baseMapper.statsDelayEventType(paramMap);
return SectorVo.getSectorVoByEnum(list, ParamEnum.DelayEventTypeEnum.values(), false);
}
private QueryWrapper<XzTaskProgressContent> getQueryWrapper(HashMap<String, Object> paramMap) {
String taskName = MapUtils.getString(paramMap, "taskName");
String date = MapUtils.getString(paramMap, "date");
Integer isAudit = MapUtils.getInteger(paramMap, "isAudit");
String alias = "c.";
QueryWrapper<XzTaskProgressContent> queryWrapper = QueryGenerator.initPageQueryWrapper(XzTaskProgressContent.class, paramMap, alias);
@ -115,6 +124,10 @@ public class XzTaskProgressContentServiceImpl extends ServiceImpl<XzTaskProgress
queryWrapper.eq(alias + RefUtil.fieldNameUlc(XzTaskProgressContent::getAuditType), 1);
}
if (StrUtil.isNotBlank(date)) {
queryWrapper.ge(alias + RefUtil.fieldNameUlc(XzTaskProgressContent::getUploadDate), DateUtil.formatDateTime(DateUtil.beginOfDay(DateUtil.parse(date))));
queryWrapper.le(alias + RefUtil.fieldNameUlc(XzTaskProgressContent::getUploadDate), DateUtil.formatDateTime(DateUtil.endOfDay(DateUtil.parse(date))));
}
queryWrapper.orderByDesc(alias + RefUtil.fieldNameUlc(XzTaskProgressContent::getCreateDate));
return queryWrapper;
}