feat:瀚高适配

hangao
wangxy 5 months ago
parent a60ba85fa7
commit 35bfc9080d

@ -2,6 +2,7 @@ package com.ruoyi.web.controller.manager;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.ruoyi.system.domain.check.TdCheckReport; import com.ruoyi.system.domain.check.TdCheckReport;
import com.ruoyi.system.domain.exam.ExamManagerDTO;
import com.ruoyi.system.domain.paper.dto.request.PaperListReqDTO; import com.ruoyi.system.domain.paper.dto.request.PaperListReqDTO;
import com.ruoyi.system.domain.paper.dto.response.PaperListRespDTO; import com.ruoyi.system.domain.paper.dto.response.PaperListRespDTO;
import com.ruoyi.system.domain.userexam.ElUserExam; import com.ruoyi.system.domain.userexam.ElUserExam;
@ -111,4 +112,9 @@ public class UserExamManager {
.count(); .count();
} }
public Integer countExamMonth(ExamManagerDTO examManagerDTO){
return elUserExamService.countExamMonth(examManagerDTO);
}
} }

@ -152,11 +152,11 @@ public class SysPropertynumController extends BaseController {
value.set(propertyStateCountDTO.getYbf()); value.set(propertyStateCountDTO.getYbf());
} else if("设备未报废".equals(name)) { } else if("设备未报废".equals(name)) {
value.set(tdPropertyEmentService.lambdaQuery() value.set(tdPropertyEmentService.lambdaQuery()
.eq(TdPropertyEment::getDestoryType,0) .eq(TdPropertyEment::getDestoryType,'0')
.count()); .count());
}else{ }else{
value.set(tdPropertyEmentService.lambdaQuery() value.set(tdPropertyEmentService.lambdaQuery()
.eq(TdPropertyEment::getDestoryType,1) .eq(TdPropertyEment::getDestoryType,'1')
.count()); .count());
} }
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();

@ -111,8 +111,8 @@ public class SysUsernumController extends BaseController {
@GetMapping("/print/{deptId}") @GetMapping("/print/{deptId}")
public String print(@PathVariable("deptId") Long deptId, SysUser user, ModelMap mmap) { public String print(@PathVariable("deptId") Long deptId, SysUser user, ModelMap mmap) {
List<SysUser> list = userService.lambdaQuery().eq(SysUser::getDeptId, deptId) List<SysUser> list = userService.lambdaQuery().eq(SysUser::getDeptId, deptId)
.eq(SysUser::getDelFlag, 0) .eq(SysUser::getDelFlag, '0')
.ne(SysUser::getUserId, 1) .ne(SysUser::getUserId, '1')
.list(); .list();
list.forEach(sysuser -> { list.forEach(sysuser -> {
List<SysUserPost> postList = sysUserPostService.lambdaQuery(). List<SysUserPost> postList = sysUserPostService.lambdaQuery().

@ -14,6 +14,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.ruoyi.common.utils.ObtainLastSixMonthsUtil; import com.ruoyi.common.utils.ObtainLastSixMonthsUtil;
import com.ruoyi.system.domain.check.TdCheckReport; import com.ruoyi.system.domain.check.TdCheckReport;
import com.ruoyi.system.domain.exam.ExamManagerDTO;
import com.ruoyi.system.domain.userbook.dto.UserBookDTO; import com.ruoyi.system.domain.userbook.dto.UserBookDTO;
import com.ruoyi.system.domain.userexam.dto.request.UserExamReqDTO; import com.ruoyi.system.domain.userexam.dto.request.UserExamReqDTO;
import com.ruoyi.system.domain.userexam.dto.response.UserExamExportDTO; import com.ruoyi.system.domain.userexam.dto.response.UserExamExportDTO;
@ -136,7 +137,11 @@ public class TdExamnumController extends BaseController {
date = Date.from(LocalDate.parse(month.concat(StrPool.DASHED).concat("01")).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); date = Date.from(LocalDate.parse(month.concat(StrPool.DASHED).concat("01")).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date minDayTime = ObtainLastSixMonthsUtil.getStartOfDay(date); Date minDayTime = ObtainLastSixMonthsUtil.getStartOfDay(date);
AtomicReference<Long> yAxis = new AtomicReference<>(0L); AtomicReference<Long> yAxis = new AtomicReference<>(0L);
Integer count = userExamManager.countExamMonth(minDayTime, maxDayTime,true); ExamManagerDTO examManagerDTO =new ExamManagerDTO();
examManagerDTO.setMinDayTime(minDayTime);
examManagerDTO.setMaxDayTime(maxDayTime);
examManagerDTO.setPassed(1);
Integer count = userExamManager.countExamMonth(examManagerDTO);
if(Objects.isNull(count)){ if(Objects.isNull(count)){
count = 0; count = 0;
} }
@ -169,7 +174,11 @@ public class TdExamnumController extends BaseController {
date = Date.from(LocalDate.parse(month.concat(StrPool.DASHED).concat("01")).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); date = Date.from(LocalDate.parse(month.concat(StrPool.DASHED).concat("01")).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date minDayTime = ObtainLastSixMonthsUtil.getStartOfDay(date); Date minDayTime = ObtainLastSixMonthsUtil.getStartOfDay(date);
AtomicReference<Long> yAxis = new AtomicReference<>(0L); AtomicReference<Long> yAxis = new AtomicReference<>(0L);
Integer count = userExamManager.countExamMonth(minDayTime, maxDayTime,false); ExamManagerDTO examManagerDTO =new ExamManagerDTO();
examManagerDTO.setMinDayTime(minDayTime);
examManagerDTO.setMaxDayTime(maxDayTime);
examManagerDTO.setPassed(0);
Integer count = userExamManager.countExamMonth(examManagerDTO);
if(Objects.isNull(count)){ if(Objects.isNull(count)){
count = 0; count = 0;
} }

@ -0,0 +1,31 @@
package com.ruoyi.system.domain.exam;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* ClassName: PropertyManagerDTO
* Package: com.ruoyi.system.domain.count
* Description:
*
* @Author wangxy
* @Create 2024/10/8 16:21
* @Version 1.0
*/
@Data
@ApiModel(value="密品报废统计", description="密品报废统计")
public class ExamManagerDTO implements Serializable {
private Date minDayTime;
private Date maxDayTime;
private Integer passed;
}

@ -1,6 +1,7 @@
package com.ruoyi.system.mapper; package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.exam.ExamManagerDTO;
import com.ruoyi.system.domain.userexam.ElUserExam; import com.ruoyi.system.domain.userexam.ElUserExam;
import com.ruoyi.system.domain.userexam.dto.request.UserExamReqDTO; import com.ruoyi.system.domain.userexam.dto.request.UserExamReqDTO;
import com.ruoyi.system.domain.userexam.dto.response.ExamCountDTO; import com.ruoyi.system.domain.userexam.dto.response.ExamCountDTO;
@ -28,6 +29,9 @@ public interface ElUserExamMapper extends BaseMapper<ElUserExam> {
public List<ExamCountDTO> selectCountExam(); public List<ExamCountDTO> selectCountExam();
public Integer countExamMonth(ExamManagerDTO examManagerDTO);
} }

@ -1,6 +1,7 @@
package com.ruoyi.system.service; package com.ruoyi.system.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.system.domain.exam.ExamManagerDTO;
import com.ruoyi.system.domain.exam.dto.ExamDTO; import com.ruoyi.system.domain.exam.dto.ExamDTO;
import com.ruoyi.system.domain.userexam.ElUserExam; import com.ruoyi.system.domain.userexam.ElUserExam;
import com.ruoyi.system.domain.userexam.dto.request.UserExamReqDTO; import com.ruoyi.system.domain.userexam.dto.request.UserExamReqDTO;
@ -27,4 +28,7 @@ public interface ElUserExamService extends IService<ElUserExam> {
public List<ExamCountDTO> selectCountExam(); public List<ExamCountDTO> selectCountExam();
public Integer countExamMonth(ExamManagerDTO ExamManagerDTO);
} }

@ -1,6 +1,7 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.domain.exam.ExamManagerDTO;
import com.ruoyi.system.domain.exam.dto.ExamDTO; import com.ruoyi.system.domain.exam.dto.ExamDTO;
import com.ruoyi.system.domain.userexam.ElUserExam; import com.ruoyi.system.domain.userexam.ElUserExam;
import com.ruoyi.system.domain.userexam.dto.request.UserExamReqDTO; import com.ruoyi.system.domain.userexam.dto.request.UserExamReqDTO;
@ -40,6 +41,11 @@ public class ElUserExamServiceImpl extends ServiceImpl<ElUserExamMapper, ElUserE
public List<ExamCountDTO> selectCountExam() { public List<ExamCountDTO> selectCountExam() {
return userExamMapper.selectCountExam(); return userExamMapper.selectCountExam();
} }
@Override
public Integer countExamMonth(ExamManagerDTO examManagerDTO) {
return userExamMapper.countExamMonth(examManagerDTO);
}
} }

@ -67,6 +67,12 @@
</select> </select>
<select id="countExamMonth" resultType="java.lang.Integer" parameterType="ExamManagerDTO">
SELECT COUNT(*) FROM ${prefix}el_user_exam
WHERE update_time >= #{minDayTime} AND update_time &lt;= #{maxDayTime} AND passed = #{passed}
</select>
</mapper> </mapper>

@ -317,12 +317,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCountUser" resultType="com.ruoyi.system.domain.count.UserCountDTO"> <select id="selectCountUser" resultType="com.ruoyi.system.domain.count.UserCountDTO">
SELECT SELECT
SUM (CASE WHEN examine = 2 THEN 1 ELSE 0 END) AS ydj, SUM (CASE WHEN examine = '2' THEN 1 ELSE 0 END) AS ydj,
SUM (CASE WHEN examine = 3 THEN 1 ELSE 0 END) AS ysb, SUM (CASE WHEN examine = '3' THEN 1 ELSE 0 END) AS ysb,
SUM (CASE WHEN examine = 0 THEN 1 ELSE 0 END) AS ysh, SUM (CASE WHEN examine = '0' THEN 1 ELSE 0 END) AS ysh,
(SELECT SUM (CASE WHEN leavestate = 1 THEN 1 ELSE 0 END) (SELECT SUM (CASE WHEN leavestate = '1' THEN 1 ELSE 0 END)
FROM td_leave t) as ylz, FROM td_leave t) as ylz,
(SELECT SUM (CASE WHEN leavestate = 2 THEN 1 ELSE 0 END) (SELECT SUM (CASE WHEN leavestate = '2' THEN 1 ELSE 0 END)
FROM td_leave t) as ylg FROM td_leave t) as ylg
FROM ${prefix}sys_user s FROM ${prefix}sys_user s
</select> </select>
@ -330,9 +330,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCountSmUser" resultType="com.ruoyi.system.domain.count.UserSmCountDTO"> <select id="selectCountSmUser" resultType="com.ruoyi.system.domain.count.UserSmCountDTO">
SELECT SELECT
SUM (CASE WHEN shemichengdu = 0 THEN 1 ELSE 0 END) AS yb, SUM (CASE WHEN shemichengdu = '0' THEN 1 ELSE 0 END) AS yb,
SUM (CASE WHEN shemichengdu = 1 THEN 1 ELSE 0 END) AS zy, SUM (CASE WHEN shemichengdu = '1' THEN 1 ELSE 0 END) AS zy,
SUM (CASE WHEN shemichengdu = 2 THEN 1 ELSE 0 END) AS hx SUM (CASE WHEN shemichengdu = '2' THEN 1 ELSE 0 END) AS hx
from ${prefix}sys_user where status='0' and del_flag='0' from ${prefix}sys_user where status='0' and del_flag='0'
</select> </select>

Loading…
Cancel
Save