修改大屏的多配置

dev_xd
lj7788 2026-04-01 17:07:10 +08:00
parent 8d2b984abb
commit b7f45c850c
12 changed files with 96 additions and 27 deletions

View File

@ -0,0 +1,44 @@
# yanzhu-bigscreen 项目中调用的 attendance_ubi_data 相关 Mapper 方法
## 完整对应关系
| 后台 Mapper 方法 | yanzhu-bigscreen 调用位置 | 调用文件 |
| ------------------------------------- | -------------------------------- | -------------------------------------- |
| **AttendanceUbiDataMapper** | | |
| `selectAttendanceUbiDataList[ok]` | `attendanceUbiDataList()` | src/api/detail.js |
| | → attendanceInfoDlg.vue#L168 | src/views/detail/attendanceInfoDlg.vue |
| **ProProjectInfoSubdeptsUsersMapper** | | |
| `groupByCraftTypeByAttendance[ok]` | `groupByCraftTypeByAttendance()` | src/api/detail.js |
| | → projectDetail.vue#L715 | src/views/projectDetail.vue |
| | → projectLabor.vue#L523 | src/views/projectLabor.vue |
| `getWorkerCountGroupByType` | `getWorkerCountGroupByType()` | src/api/labor.js |
| | → projectLabor.vue#L230 | src/views/projectLabor.vue |
| `getAttendanceAlert[ok]` | `getAttendanceAlert()` | src/api/labor.js |
| | → projectLabor.vue#L231 | src/views/projectLabor.vue |
| `getRealAttendance[ok]` | `getRealAttendance()` | src/api/labor.js |
| | → projectLabor.vue#L229 | src/views/projectLabor.vue |
| `groupAttendanceLastWeek` | `groupAttendanceLastWeek()` | src/api/labor.js |
| | → projectLabor.vue#L228 | src/views/projectLabor.vue |
## yanzhu-bigscreen 中未调用的方法
以下后台方法虽然在 Mapper 中存在,但 **未在 yanzhu-bigscreen 项目中调用**
| Mapper | 未调用的方法 |
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **AttendanceUbiDataMapper** | `queryAttendaceInfo`、`queryStatistics`、`queryStatisticsByUserIds`、`selectAttendanceUbiDataById`、`insertAttendanceUbiData`、`updateAttendanceUbiData`、`deleteAttendanceUbiDataById`、`deleteAttendanceUbiDataByIds`、`statsAttendanceDays`、`statsAttendanceView` |
| **ProProjectInfoSubdeptsUsersMapper** | `getEduCompletedCount` |
| **QuartzProAttendanceDataMapper** | 全部未调用(该 Mapper 属于 job 模块) |
## 汇总
| 状态 | 数量 |
| --------------------------- | --------- |
| **yanzhu-bigscreen 已调用** | 6 个方法 |
| **未调用** | 11 个方法 |

View File

@ -12328,7 +12328,7 @@
},
"node_modules/process": {
"version": "0.11.10",
"resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
"dev": true,
"license": "MIT",

View File

@ -91,31 +91,20 @@ module.exports = defineConfig({
});
},
configureWebpack: (config) => {
if (process.env.NODE_ENV === "production") {
config.externals = {
vue: "Vue",
};
}
// 为了解决 ezuikit-js 中的 require is not defined 问题
if (!config.resolve) {
config.resolve = {};
}
if (!config.resolve.fallback) {
config.resolve.fallback = {};
if (!config.resolve.alias) {
config.resolve.alias = {};
}
Object.assign(config.resolve.fallback, {
"path": require.resolve("path-browserify"),
"buffer": require.resolve("buffer"),
"stream": require.resolve("stream-browserify"),
"crypto": require.resolve("crypto-browserify"),
"http": require.resolve("stream-http"),
"https": require.resolve("https-browserify"),
"os": require.resolve("os-browserify"),
"url": require.resolve("url/"),
"zlib": require.resolve("browserify-zlib")
});
// 使用 ezuikit.js 的 UMD 版本,避免 require is not defined 错误
config.resolve.alias['ezuikit-js'] = require.resolve('ezuikit-js/ezuikit.js');
// 添加插件提供全局变量
config.plugins = (config.plugins || []).concat([

View File

@ -6882,7 +6882,7 @@ process-nextick-args@~2.0.0:
process@^0.11.10, process@0.11.10:
version "0.11.10"
resolved "https://registry.npmmirror.com/process/-/process-0.11.10.tgz"
resolved "https://registry.npmjs.org/process/-/process-0.11.10.tgz"
integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==
progress-webpack-plugin@^1.0.12:

View File

@ -38,6 +38,8 @@ public class ProProjectInfoSubdeptsUsers extends BaseEntity
/** 分包单位 */
private Long subDeptId;
private Long cfgId;
/** 分包单位名称 */
private String subDeptName;
@ -203,6 +205,14 @@ public class ProProjectInfoSubdeptsUsers extends BaseEntity
/** 数据来源 */
private String source;
public Long getCfgId() {
return cfgId;
}
public void setCfgId(Long cfgId) {
this.cfgId = cfgId;
}
public Long getId() {
return id;
}

View File

@ -190,7 +190,7 @@ public interface ProProjectInfoSubdeptsUsersMapper
* @param prjId
* @return
*/
List<ProProjectInfoSubdeptsUsers> getAttendanceAlert(@Param("projectId")Long prjId);
List<ProProjectInfoSubdeptsUsers> getAttendanceAlert(@Param("projectId")Long prjId,@Param("cfgId")Long cfgId);
/**
*

View File

@ -132,7 +132,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDefaultCfgByProjectAndCom" resultMap="AttendanceCfgResult">
<include refid="selectAttendanceCfgVo"/>
where ac.project_id = #{projectId} and ac.com_id = #{comId} and ac.is_default = 1 and ac.enabled = 1
where ac.project_id = #{projectId} and
ac.is_default = 1 and ac.enabled = 1
<if test="comId != null"> and ac.com_id = #{comId}</if>
limit 1
</select>
</mapper>

View File

@ -367,8 +367,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="comId != null">and com_id = #{comId}</if>
<if test="projectId != null">and project_id = #{projectId}</if>
<if test="cfgId!=null and cfgId!=0">and cfg_id=#{cfgId}</if>
<if test="createTime != null">
and (date(inTime)= date( #{createTime}) or date(outTime)=date( #{createTime})))</if>
</where>
GROUP BY
craft_type
@ -483,6 +485,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
join (
select userId,max(ifNull(inTime,outTime)) dt from attendance_ubi_data
where projectid=#{projectId} and is_del!=1
<if test="cfgId != null and cfgId!=0"> and cfg_id=#{cfgId}</if>
group by userId
order by max(ifNull(inTime,outTime)) ) att on us.id=att.userId
</select>

View File

@ -112,6 +112,7 @@ public class LaborController extends BaseController {
@GetMapping("/getAttendanceAlert/{type}/{prjId}")
public AjaxResult getAttendanceAlert(@PathVariable("type")String type, @PathVariable("prjId") Long prjId){
if("uni".equals(type.toLowerCase())){
List<ProProjectInfoSubdeptsUsers> sList=proProjectInfoSubdeptsUsersService.getAttendanceAlert(prjId);
return AjaxResult.success(sList);
}else{

View File

@ -73,6 +73,12 @@ public class AttendanceUbiDataServiceImpl implements IAttendanceUbiDataService
@Override
public List<AttendanceUbiData> selectAttendanceUbiDataList(AttendanceUbiData attendanceUbiData)
{
if(attendanceUbiData.getCfgId()==null){
AttendanceCfg cfg=attendanceCfgService.getDefaultAttendanceCfg(attendanceUbiData.getProjectId(),attendanceUbiData.getComId());
if(cfg!=null){
attendanceUbiData.setCfgId(cfg.getId());
}
}
return attendanceUbiDataMapper.selectAttendanceUbiDataList(attendanceUbiData);
}
@ -135,6 +141,12 @@ public class AttendanceUbiDataServiceImpl implements IAttendanceUbiDataService
@Override
public List<AttendanceUbiData> queryStatistics(AttendanceUbiData attendanceUbiData) {
if(attendanceUbiData.getCfgId()==null){
AttendanceCfg cfg=attendanceCfgService.getDefaultAttendanceCfg(attendanceUbiData.getProjectId(),attendanceUbiData.getComId());
if(cfg!=null){
attendanceUbiData.setCfgId(cfg.getId());
}
}
return attendanceUbiDataMapper.queryStatistics(attendanceUbiData);
}

View File

@ -17,6 +17,7 @@ import com.yanzhu.manage.config.ProfileConfig;
import com.yanzhu.manage.domain.*;
import com.yanzhu.manage.enums.*;
import com.yanzhu.manage.mapper.*;
import com.yanzhu.manage.service.IAttendanceCfgService;
import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService;
import com.yanzhu.manage.service.IProUserInoutRecordService;
import com.yanzhu.manage.service.IUniService;
@ -95,6 +96,9 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
@Autowired
private IBaiduFaceService baiduFaceService;
@Autowired
private IAttendanceCfgService attendanceCfgService;
private static final Logger log = LoggerFactory.getLogger(ProProjectInfoSubdeptsUsersServiceImpl.class);
@ -1577,6 +1581,10 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
*/
@Override
public List<ProProjectInfoSubdeptsUsers> groupByCraftTypeByAttendance(ProProjectInfoSubdeptsUsers where) {
AttendanceCfg cfg=attendanceCfgService.getDefaultAttendanceCfg(where.getProjectId(),where.getComId());
if(cfg!=null){
where.setCfgId(cfg.getId());
}
return proProjectInfoSubdeptsUsersMapper.groupByCraftTypeByAttendance(where);
}
@ -1851,7 +1859,9 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
*/
@Override
public List<ProProjectInfoSubdeptsUsers> getAttendanceAlert(Long prjId) {
return proProjectInfoSubdeptsUsersMapper.getAttendanceAlert(prjId);
AttendanceCfg cfg= attendanceCfgService.getDefaultAttendanceCfg(prjId,null);
Long cfgId=cfg!=null?cfg.getId():null;
return proProjectInfoSubdeptsUsersMapper.getAttendanceAlert(prjId,cfgId);
}
/**

View File

@ -168,10 +168,8 @@
<el-switch v-model="form.enabled" :active-value="1" :inactive-value="0" />
</el-form-item>
<el-form-item label="是否默认" prop="isDefault">
<el-tag :type="form.isDefault === 1 ? 'success' : 'info'" v-if="form.id">
{{ form.isDefault === 1 ? '是' : '否' }}
</el-tag>
<el-switch v-model="form.isDefault" :active-value="1" :inactive-value="0" v-if="!form.id" />
<el-switch v-model="form.isDefault" :active-value="1" :inactive-value="0" />
</el-form-item>
</el-form>
<template #footer>