diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/labour/controller/LabourApiController.java b/ruoyi-admin/src/main/java/com/ruoyi/api/labour/controller/LabourApiController.java index 8ef24031..1db63852 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/api/labour/controller/LabourApiController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/labour/controller/LabourApiController.java @@ -481,9 +481,11 @@ public class LabourApiController extends BaseController { if(req.getDataSign(sysApplyConfig.getPrivateKey())){ try { SurProjectAttendanceData surProjectAttendanceData = JSONObject.parseObject(req.getData(), SurProjectAttendanceData.class); + String cacheKey = CACHEKEY + surProjectAttendanceData.getWorkerId(); + Boolean cacheValue = Convert.toBool(redisCache.getCacheObject(cacheKey),true); //30秒内未重复请求 - if(Convert.toBool(redisCache.getCacheObject(CACHEKEY+surProjectAttendanceData.getWorkerId()),true)){ - redisCache.setCacheObject(CACHEKEY+surProjectAttendanceData.getWorkerId(),false,60, TimeUnit.SECONDS); + if(cacheValue){ + redisCache.setCacheObject(cacheKey,false,60, TimeUnit.SECONDS); //判断base64图片 if(StringUtils.isNotEmpty(surProjectAttendanceData.getScanPhotoBase64())){ String filePath = FileUploadUtils.uploadImages(RuoYiConfig.getUploadPath(), MultipartFileUtils.base64ToMultipartFile(surProjectAttendanceData.getScanPhotoBase64())); @@ -578,6 +580,7 @@ public class LabourApiController extends BaseController { throw new Exception(messages); } }else{ + log.info("短时间重复打卡请求,本次已忽略...{}SUCCESS",cacheKey); return success("短时间重复打卡请求,本次已忽略...{}SUCCESS"); } }catch (Exception e){ @@ -638,8 +641,11 @@ public class LabourApiController extends BaseController { } for(SurProjectAttendanceData surProjectAttendanceData:surProjectAttendanceDataList){ //30秒内未重复请求 - if(Convert.toBool(redisCache.getCacheObject(CACHEKEY+surProjectAttendanceData.getWorkerId()),true)){ - redisCache.setCacheObject(CACHEKEY+surProjectAttendanceData.getWorkerId(),false,60, TimeUnit.SECONDS); + String cacheKey = CACHEKEY + surProjectAttendanceData.getWorkerId(); + Boolean cacheValue = Convert.toBool(redisCache.getCacheObject(cacheKey),true); + //30秒内未重复请求 + if(cacheValue){ + redisCache.setCacheObject(cacheKey,false,60, TimeUnit.SECONDS); //判断base64图片 if(StringUtils.isNotEmpty(surProjectAttendanceData.getScanPhotoBase64())){ String filePath = FileUploadUtils.uploadImages(RuoYiConfig.getUploadPath(), MultipartFileUtils.base64ToMultipartFile(surProjectAttendanceData.getScanPhotoBase64())); @@ -716,6 +722,8 @@ public class LabourApiController extends BaseController { surProjectAttendanceData.setCreateTime(new Date()); saveList.add(surProjectAttendanceData); } + }else{ + log.info("短时间重复打卡请求,本次已忽略...{}SUCCESS",cacheKey); } } if(StringUtils.isNotEmpty(saveList)){ diff --git a/ruoyi-ui/src/views/flow/flowLabourInfo/index.vue b/ruoyi-ui/src/views/flow/flowLabourInfo/index.vue index 0a36cff3..fd66c8d9 100644 --- a/ruoyi-ui/src/views/flow/flowLabourInfo/index.vue +++ b/ruoyi-ui/src/views/flow/flowLabourInfo/index.vue @@ -171,7 +171,7 @@ - + {{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }} diff --git a/ruoyi-ui/src/views/project/checkDetection/checkDetectionDrawer.vue b/ruoyi-ui/src/views/project/checkDetection/checkDetectionDrawer.vue index 9fc71de2..3c588c3f 100644 --- a/ruoyi-ui/src/views/project/checkDetection/checkDetectionDrawer.vue +++ b/ruoyi-ui/src/views/project/checkDetection/checkDetectionDrawer.vue @@ -49,7 +49,7 @@ - + {{ scope.row.materialName }} {{ scope.row.usePosition }} @@ -68,7 +68,7 @@ {{ scope.row.witnessUser }} - + {{ parseTime(scope.row.checkTime, "{y}-{m}-{d}") }} {{ scope.row.laboratoryName }} @@ -87,6 +87,11 @@ + + + {{ parseTime(scope.row.checkTime, "{y}-{m}-{d}") }} + + - + {{ parseTime(scope.row.checkTime, "{y}-{m}-{d}") }} @@ -157,12 +157,12 @@ - - + {{ parseTime(scope.row.checkTime, "{y}-{m}-{d}") }} + diff --git a/ruoyi-ui/src/views/project/materialSeal/index.vue b/ruoyi-ui/src/views/project/materialSeal/index.vue index 281ad015..0311be92 100644 --- a/ruoyi-ui/src/views/project/materialSeal/index.vue +++ b/ruoyi-ui/src/views/project/materialSeal/index.vue @@ -224,9 +224,9 @@ width="120" show-overflow-tooltip /> - + - {{ parseTime(scope.row.sealDate, "{y}-{m}-{d} {h}:{i}") }} + {{ parseTime(scope.row.sealDate, "{y}-{m}-{d}") }} @@ -284,7 +284,11 @@ - + + + {{ parseTime(scope.row.measureTime, "{y}-{m}-{d}") }} + + - + {{ scope.row.materialName }} {{ scope.row.usePosition }} - + 指定:{{ scope.row.contractBrand }} 拟用:{{ scope.row.useBrand }} - + - {{ parseTime(scope.row.sealDate, "{y}-{m}-{d} {h}:{i}") }} + {{ parseTime(scope.row.sealDate, "{y}-{m}-{d}") }} - + {{ scope.row.witnessUserName }} {{ scope.row.witnessUser }} @@ -79,7 +79,7 @@ --> - + @@ -99,6 +99,11 @@ - + + + {{ parseTime(scope.row.checkTime, "{y}-{m}-{d}") }} + + @@ -336,6 +336,11 @@ + + + {{ parseTime(scope.row.measureTime, "{y}-{m}-{d}") }} + + - + {{ scope.row.qualityUserName }} {{ scope.row.qualityUser }} - + {{ scope.row.superviseUserName }} {{ scope.row.superviseUser }} - + {{ parseTime(scope.row.checkingDate, "{y}-{m}-{d}") }} @@ -93,6 +93,11 @@ + + + {{ parseTime(scope.row.checkTime, "{y}-{m}-{d}") }} + + - + {{ parseTime(scope.row.measureTime, "{y}-{m}-{d}") }} @@ -285,6 +285,11 @@ + + + {{ parseTime(scope.row.measureTime, "{y}-{m}-{d}") }} + + - + {{ parseTime(scope.row.measureTime, "{y}-{m}-{d}") }} @@ -78,7 +78,7 @@ /> --> - + @@ -95,6 +95,11 @@ {{ scope.row.superviseUser }} + + + {{ parseTime(scope.row.checkTime, "{y}-{m}-{d}") }} + + @@ -290,7 +291,7 @@ @@ -555,6 +556,7 @@ export default { return false; } this.loading = true; + row.copySendUser = row.copySendUser.toString(); updateSmzSspProblemmodifyDraft(row).then((response) => { this.$modal.msgSuccess("提交成功!"); this.loading = false; @@ -610,6 +612,9 @@ export default { rows.push(row); } this.loading = true; + for (let i = 0; i < rows.length; i++){ + rows[i].copySendUser = rows[i].copySendUser.toString(); + } batchUpdateSmzSspProblemmodifyDraft(rows).then((response) => { this.$modal.msgSuccess("提交成功!"); this.loading = false; @@ -675,15 +680,16 @@ export default { break; } } + let ls = [];; for (let i = 0; i < data.length; i++) { for (let us = 0; us < data[i].userinfoList.length; us++) { let u = data[i].userinfoList[us]; - if (u.phonenumber == val) { - row.copySend = u.nickName + " [" + u.jobTypeName + "] "; - return false; + if (val.includes(u.phonenumber)) { + ls.push(u.nickName + " [" + u.jobTypeName + "]"); } } } + row.copySend = ls.toString(); }, selectRecheckSendUser(val, row) { let data = []; diff --git a/ruoyi-ui/src/views/trouble/sspProblemmodifyDraft/index.vue b/ruoyi-ui/src/views/trouble/sspProblemmodifyDraft/index.vue index 2369d951..91c5fa6f 100644 --- a/ruoyi-ui/src/views/trouble/sspProblemmodifyDraft/index.vue +++ b/ruoyi-ui/src/views/trouble/sspProblemmodifyDraft/index.vue @@ -231,6 +231,7 @@ @@ -287,7 +288,7 @@ @@ -552,6 +553,7 @@ export default { return false; } this.loading = true; + row.copySendUser = row.copySendUser.toString(); updateSmzSspProblemmodifyDraft(row).then((response) => { this.$modal.msgSuccess("提交成功!"); this.loading = false; @@ -607,6 +609,9 @@ export default { rows.push(row); } this.loading = true; + for (let i = 0; i < rows.length; i++){ + rows[i].copySendUser = rows[i].copySendUser.toString(); + } batchUpdateSmzSspProblemmodifyDraft(rows).then((response) => { this.$modal.msgSuccess("提交成功!"); this.loading = false; @@ -672,15 +677,16 @@ export default { break; } } + let ls = [];; for (let i = 0; i < data.length; i++) { for (let us = 0; us < data[i].userinfoList.length; us++) { let u = data[i].userinfoList[us]; - if (u.phonenumber == val) { - row.copySend = u.nickName + " [" + u.jobTypeName + "] "; - return false; + if (val.includes(u.phonenumber)) { + ls.push(u.nickName + " [" + u.jobTypeName + "]"); } } } + row.copySend = ls.toString(); }, selectRecheckSendUser(val, row) { let data = []; diff --git a/ruoyi-wechat/src/main/java/com/ruoyi/web/project/controller/ProjectAttendanceController.java b/ruoyi-wechat/src/main/java/com/ruoyi/web/project/controller/ProjectAttendanceController.java index e00e599c..a7b108b6 100644 --- a/ruoyi-wechat/src/main/java/com/ruoyi/web/project/controller/ProjectAttendanceController.java +++ b/ruoyi-wechat/src/main/java/com/ruoyi/web/project/controller/ProjectAttendanceController.java @@ -86,7 +86,7 @@ public class ProjectAttendanceController extends BaseController { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.DAY_OF_MONTH, -1); where.setAttendanceOutTime(DateUtil.format(calendar.getTime(),DateUtils.YYYY_MM_DD)); - calendar.add(Calendar.DAY_OF_MONTH, -7); + calendar.add(Calendar.DAY_OF_MONTH, -6); where.setAttendanceTime(DateUtil.format(calendar.getTime(),DateUtils.YYYY_MM_DD)); List> list = attendanceDataService.findGroupAllByDays(where); Map data = new HashMap<>(); diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/flow/controller/FlowLabourInfoController.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/flow/controller/FlowLabourInfoController.java index edfa37de..90bd6721 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/flow/controller/FlowLabourInfoController.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/flow/controller/FlowLabourInfoController.java @@ -54,7 +54,7 @@ public class FlowLabourInfoController extends BaseController flowLabourInfo.setNowDept(Convert.toStr(getDeptId())); } flowLabourInfo.setNowUser(Convert.toStr(getUserId())); - List list = flowLabourInfoService.selectFlowLabourInfoList(flowLabourInfo); + List list = flowLabourInfoService.selectFlowLabourInfoListV2(flowLabourInfo); return getDataTable(list); } diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/flow/mapper/FlowLabourInfoMapper.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/flow/mapper/FlowLabourInfoMapper.java index 7bef48c4..737918bd 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/flow/mapper/FlowLabourInfoMapper.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/flow/mapper/FlowLabourInfoMapper.java @@ -37,6 +37,14 @@ public interface FlowLabourInfoMapper */ public List selectFlowLabourInfoList(FlowLabourInfo flowLabourInfo); + /** + * 查询劳资投诉列表 + * + * @param flowLabourInfo 劳资投诉 + * @return 劳资投诉集合 + */ + public List selectFlowLabourInfoListV2(FlowLabourInfo flowLabourInfo); + /** * 统计劳资投诉信息 * diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/flow/service/IFlowLabourInfoService.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/flow/service/IFlowLabourInfoService.java index 40d8443d..0eb491eb 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/flow/service/IFlowLabourInfoService.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/flow/service/IFlowLabourInfoService.java @@ -39,6 +39,14 @@ public interface IFlowLabourInfoService */ public List selectFlowLabourInfoList(FlowLabourInfo flowLabourInfo); + /** + * 查询劳资投诉列表 + * + * @param flowLabourInfo 劳资投诉 + * @return 劳资投诉集合 + */ + public List selectFlowLabourInfoListV2(FlowLabourInfo flowLabourInfo); + /** * 统计劳资投诉信息 * diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/flow/service/impl/FlowLabourInfoServiceImpl.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/flow/service/impl/FlowLabourInfoServiceImpl.java index ca310537..43b068a7 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/flow/service/impl/FlowLabourInfoServiceImpl.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/flow/service/impl/FlowLabourInfoServiceImpl.java @@ -72,6 +72,20 @@ public class FlowLabourInfoServiceImpl implements IFlowLabourInfoService return flowLabourInfoMapper.selectFlowLabourInfoList(flowLabourInfo); } + /** + * 查询劳资投诉列表 + * + * @param flowLabourInfo 劳资投诉 + * @return 劳资投诉集合 + */ + public List selectFlowLabourInfoListV2(FlowLabourInfo flowLabourInfo){ + if(Convert.toInt(flowLabourInfo.getNowRole(),1)>4){ + //这里总包只能审批自己单位数据 + flowLabourInfo.setDeptId(Convert.toLong(flowLabourInfo.getNowDept())); + } + return flowLabourInfoMapper.selectFlowLabourInfoListV2(flowLabourInfo); + } + /** * 统计劳资投诉信息 * diff --git a/yanzhu-jh/src/main/resources/mapper/flow/FlowLabourInfoMapper.xml b/yanzhu-jh/src/main/resources/mapper/flow/FlowLabourInfoMapper.xml index 802fcc48..6e3f5eac 100644 --- a/yanzhu-jh/src/main/resources/mapper/flow/FlowLabourInfoMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/flow/FlowLabourInfoMapper.xml @@ -77,6 +77,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by fl.approve_status desc, fl.id desc + + + + fl.is_del=0 + and fl.project_id = #{projectId} + and fl.project_name like concat('%', #{projectName}, '%') + and fl.dept_id = #{deptId} + and fl.dept_name like concat('%', #{deptName}, '%') + and fl.sub_dept_id = #{subDeptId} + and fl.sub_dept_name like concat('%', #{subDeptName}, '%') + and fl.labor_name like concat('%', #{laborName}, '%') + and fl.labor_cardId like concat('%', #{laborCardId}, '%') + and fl.labor_phone = #{laborPhone} + and fl.approve_status = #{approveStatus} + and fl.approve_status != 100 + and date(fl.create_time) between #{params.beginDate} and #{params.endDate} + + and sp.deptId = #{projectDeptId} + + and sp.deptId = #{nowDept} + + + and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.job_type='24' and spui.del_flag=0 ) + + and fl.approve_status in ('10','20','21','30','31','100') and sp.id in (select spui.project_id from sur_project_userinfo spui where spui.dept_id = #{nowDept} and spui.user_id=(select su.user_id from sys_user su where su.user_id=#{nowUser}) and spui.job_type='24' and spui.is_del=0) + + and fl.approve_status != '100' + + + and fl.approve_status = 100 + + + order by fl.approve_status desc, fl.id desc + + select fl.approve_status as approveStatus, count(1) as total from flow_labour_info fl left join sur_project sp on sp.id = fl.project_id @@ -104,7 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and fl.approve_status in ('20','21','31','30','100') and sp.deptId = #{nowDept} and fl.approve_status in ('10','20','21','30','31','100') and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.job_type='24' and spui.del_flag=0 ) - and fl.approve_status in ('10','20','21','30','31','100') and sp.id in (select spui.project_id from sur_project_userinfo spui where spui.dept_id = #{nowDept} and spui.user_id=(select su.user_id from sys_user su where su.user_name=#{nowUser}) and spui.job_type='24' and spui.is_del=0) + and fl.approve_status in ('10','20','21','30','31','100') and sp.id in (select spui.project_id from sur_project_userinfo spui where spui.dept_id = #{nowDept} and spui.user_id=(select su.user_id from sys_user su where su.user_id=#{nowUser}) and spui.job_type='24' and spui.is_del=0) group by fl.approve_status