Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev
commit
0f8e5522cd
|
@ -52,23 +52,20 @@
|
||||||
|
|
||||||
<el-table-column label="照片" align="center" prop="id">
|
<el-table-column label="照片" align="center" prop="id">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-image :src="row.recentPhoto" :preview-src-list="[row.recentPhoto]" style="height:60px"/>
|
<el-image :src="row.workerPhoto||row.scanPhoto" :preview-src-list="[row.workerPhoto||row.scanPhoto]" style="height:60px"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="姓名" align="center" prop="name" />
|
<el-table-column label="姓名" align="center" prop="workerName" />
|
||||||
<el-table-column label="籍贯" align="center" prop="nativePlace" />
|
<el-table-column label="籍贯" align="center" prop="nativePlace" />
|
||||||
<el-table-column label="性别" align="center" prop="attendanceType" >
|
<el-table-column label="性别" align="center" prop="attendanceType" >
|
||||||
<template slot-scope="{row}">{{ row.gender==1?'女':'男' }}</template>
|
<template slot-scope="{row}">{{ row.workerGender==1?'女':'男' }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="进场时间" align="center" prop="inTime">
|
<el-table-column label="进场时间" align="center" prop="inTime">
|
||||||
<template slot-scope="{row}">{{ row.inTime|formatTime }}</template>
|
<template slot-scope="{row}">{{ row.attendanceTime|formatTime }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="离场时间" align="center" prop="outTime">
|
<el-table-column label="离场时间" align="center" prop="outTime">
|
||||||
<template slot-scope="{row}">{{ row.outTime|formatTime }}</template>
|
<template slot-scope="{row}">{{ row.attendanceOutTime|formatTime }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
|
||||||
<template slot-scope="{row}">{{ row.status==1?'退场':'进场' }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="分包商名称" align="center" prop="companyName" />
|
<el-table-column label="分包商名称" align="center" prop="companyName" />
|
||||||
<el-table-column label="所属班组" align="center" prop="groupName" />
|
<el-table-column label="所属班组" align="center" prop="groupName" />
|
||||||
<el-table-column label="工种" align="center" prop="workTypeName" />
|
<el-table-column label="工种" align="center" prop="workTypeName" />
|
||||||
|
@ -223,11 +220,13 @@ export default {
|
||||||
this.$refs.attDrawer.show();
|
this.$refs.attDrawer.show();
|
||||||
},
|
},
|
||||||
/** 查询劳务实名制管理列表 */
|
/** 查询劳务实名制管理列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let postData={...this.queryParams};
|
let postData={};
|
||||||
postData.attendanceTime=this.$dt(new Date()).format("YYYY-MM-DD");
|
postData.attendanceTime=this.$dt(this.queryParams.attendanceTime).format("YYYY-MM-DD");
|
||||||
listAttendance(this.queryParams).then(response=>{
|
postData.projectId=this.queryParams.projectId;
|
||||||
|
postData.deptId=this.queryParams.subDeptId;
|
||||||
|
listAttendance(postData).then(response=>{
|
||||||
this.attendanceList = response.rows;
|
this.attendanceList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package com.yanzhu.jh.bigscreen.web.controller;
|
package com.yanzhu.jh.bigscreen.web.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
@ -120,7 +122,8 @@ public class ProjectAttendanceController extends BaseController {
|
||||||
where.setPrjIds(getProjectIds());
|
where.setPrjIds(getProjectIds());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<SurProjectAttendanceData> list=attendanceDataService.groupByComany(where);
|
where.setAttendanceTime(DateUtil.formatDate(DateTime.now()));
|
||||||
|
List<SurProjectAttendanceData> list=attendanceDataService.groupTodayCompanyTypeId(where);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,18 +143,16 @@ public class ProjectAttendanceController extends BaseController {
|
||||||
* 今日出勤详情
|
* 今日出勤详情
|
||||||
*/
|
*/
|
||||||
@PostMapping("/todayAttendance")
|
@PostMapping("/todayAttendance")
|
||||||
public TableDataInfo todayAttendance(@RequestBody SurProjectAttendanceUser where){
|
public TableDataInfo todayAttendance(@RequestBody SurProjectAttendanceData where){
|
||||||
if(where.getDeptId()==null || where.getDeptId()<=0) {
|
if(where.getDeptId()==null || where.getDeptId()<=0) {
|
||||||
if (SecurityUtils.isUserB()) {
|
if (SecurityUtils.isUserB()) {
|
||||||
where.setPrjIds(getProjectIds());
|
where.setPrjIds(getProjectIds());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
long cnt=attendanceUserService.countTodayAttendance(where);
|
startPage();
|
||||||
List<SurProjectAttendanceUser> list=attendanceUserService.todayAttendance(where);
|
where.setAttendanceTime(DateUtil.formatDate(DateTime.now()));
|
||||||
TableDataInfo dataInfo=new TableDataInfo();
|
List<SurProjectAttendanceData> list=attendanceDataService.todayAttendance(where);
|
||||||
dataInfo.setTotal(cnt);
|
return getDataTable(list);
|
||||||
dataInfo.setRows(list);
|
|
||||||
return dataInfo;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,4 +100,8 @@ public interface SurProjectAttendanceDataMapper
|
||||||
public List<Map<String,Object>> initHuaZhuData(Map<String,Object> data);
|
public List<Map<String,Object>> initHuaZhuData(Map<String,Object> data);
|
||||||
|
|
||||||
public String findHuaZhuCompanyType(String deptName);
|
public String findHuaZhuCompanyType(String deptName);
|
||||||
|
|
||||||
|
public List<SurProjectAttendanceData> todayAttendance(SurProjectAttendanceData where);
|
||||||
|
|
||||||
|
public List<SurProjectAttendanceData> groupTodayCompanyTypeId(SurProjectAttendanceData where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,4 +101,8 @@ public interface ISurProjectAttendanceDataService
|
||||||
public List<Map<String,Object>> initOtherData(Map<String,Object> data);
|
public List<Map<String,Object>> initOtherData(Map<String,Object> data);
|
||||||
|
|
||||||
public List<Map<String,Object>> initHuaZhuData(Map<String,Object> data);
|
public List<Map<String,Object>> initHuaZhuData(Map<String,Object> data);
|
||||||
|
|
||||||
|
List<SurProjectAttendanceData> todayAttendance(SurProjectAttendanceData where);
|
||||||
|
|
||||||
|
List<SurProjectAttendanceData> groupTodayCompanyTypeId(SurProjectAttendanceData where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.yanzhu.jh.project.service;
|
package com.yanzhu.jh.project.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.yanzhu.jh.project.domain.SurProjectAttendanceData;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectWorkAttendance;
|
import com.yanzhu.jh.project.domain.SurProjectWorkAttendance;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -68,4 +70,5 @@ public interface ISurProjectWorkAttendanceService
|
||||||
public int deleteSurProjectWorkAttendanceById(Long id);
|
public int deleteSurProjectWorkAttendanceById(Long id);
|
||||||
|
|
||||||
public List<SurProjectWorkAttendance> selectByDate(SurProjectWorkAttendance surProjectWorkAttendance);
|
public List<SurProjectWorkAttendance> selectByDate(SurProjectWorkAttendance surProjectWorkAttendance);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,9 +173,8 @@ public class SurProjectAttendanceDataServiceImpl implements ISurProjectAttendanc
|
||||||
SurProjectAttendanceData where=new SurProjectAttendanceData();
|
SurProjectAttendanceData where=new SurProjectAttendanceData();
|
||||||
where.setVendorsCode(sdata.getVendorsCode());
|
where.setVendorsCode(sdata.getVendorsCode());
|
||||||
where.setCfgid(sdata.getCfgid());
|
where.setCfgid(sdata.getCfgid());
|
||||||
where.setServerid(sdata.getServerid());
|
where.setWorkerId(sdata.getWorkerId());
|
||||||
where.setServerid(sdata.getWorkerId());
|
where.setAttendanceTime(sdata.getAttendanceTime());
|
||||||
where.setAttendanceTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", DateTime.now()));
|
|
||||||
List<SurProjectAttendanceData> list=selectSurProjectAttendanceDataListEx(where);
|
List<SurProjectAttendanceData> list=selectSurProjectAttendanceDataListEx(where);
|
||||||
if(list.size()==0){
|
if(list.size()==0){
|
||||||
//设置考勤其它参数
|
//设置考勤其它参数
|
||||||
|
@ -213,6 +212,7 @@ public class SurProjectAttendanceDataServiceImpl implements ISurProjectAttendanc
|
||||||
sdata.setCompanyTypeId(group.getCompanyTypeId());
|
sdata.setCompanyTypeId(group.getCompanyTypeId());
|
||||||
//查询华筑的分组信息
|
//查询华筑的分组信息
|
||||||
if("huazhu".equals(sdata.getVendorsCode())){
|
if("huazhu".equals(sdata.getVendorsCode())){
|
||||||
|
sdata.setWorkerGender(sdata.getWorkerGender()==1?0l:1l);
|
||||||
sdata.setCompanyTypeId(getHuazhuCompanyTypeId(group.getCompanyName()));//获取华筑的分包商类型
|
sdata.setCompanyTypeId(getHuazhuCompanyTypeId(group.getCompanyName()));//获取华筑的分包商类型
|
||||||
}
|
}
|
||||||
//查询项目部门信息
|
//查询项目部门信息
|
||||||
|
@ -227,6 +227,9 @@ public class SurProjectAttendanceDataServiceImpl implements ISurProjectAttendanc
|
||||||
sdata.setDeptId(cfg.getSubDeptId());
|
sdata.setDeptId(cfg.getSubDeptId());
|
||||||
sdata.setProjectName(cfg.getProjectName());
|
sdata.setProjectName(cfg.getProjectName());
|
||||||
sdata.setDeptName(cfg.getDeptName());
|
sdata.setDeptName(cfg.getDeptName());
|
||||||
|
if(sdata.getCompanyTypeId()==null){
|
||||||
|
sdata.setCompanyTypeId("0");
|
||||||
|
}
|
||||||
insertSurProjectAttendanceData(sdata);
|
insertSurProjectAttendanceData(sdata);
|
||||||
}else{
|
}else{
|
||||||
sdata.setId(list.get(0).getId());
|
sdata.setId(list.get(0).getId());
|
||||||
|
@ -301,4 +304,14 @@ public class SurProjectAttendanceDataServiceImpl implements ISurProjectAttendanc
|
||||||
}
|
}
|
||||||
return dataList;
|
return dataList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SurProjectAttendanceData> todayAttendance(SurProjectAttendanceData where) {
|
||||||
|
return surProjectAttendanceDataMapper.todayAttendance(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SurProjectAttendanceData> groupTodayCompanyTypeId(SurProjectAttendanceData where) {
|
||||||
|
return surProjectAttendanceDataMapper.groupTodayCompanyTypeId(where);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
import com.ruoyi.common.enums.PublicStateEnum;
|
import com.ruoyi.common.enums.PublicStateEnum;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.yanzhu.jh.project.domain.SurProjectAttendanceData;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectDeptWroks;
|
import com.yanzhu.jh.project.domain.SurProjectDeptWroks;
|
||||||
import com.yanzhu.jh.project.mapper.SurProjectDeptWroksMapper;
|
import com.yanzhu.jh.project.mapper.SurProjectDeptWroksMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -148,4 +149,6 @@ public class SurProjectWorkAttendanceServiceImpl implements ISurProjectWorkAtten
|
||||||
public List<SurProjectWorkAttendance> selectByDate(SurProjectWorkAttendance surProjectWorkAttendance) {
|
public List<SurProjectWorkAttendance> selectByDate(SurProjectWorkAttendance surProjectWorkAttendance) {
|
||||||
return surProjectWorkAttendanceMapper.selectByDate(surProjectWorkAttendance);
|
return surProjectWorkAttendanceMapper.selectByDate(surProjectWorkAttendance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,6 +63,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<where>
|
<where>
|
||||||
<if test="cfgid != null "> and cfgid = #{cfgid}</if>
|
<if test="cfgid != null "> and cfgid = #{cfgid}</if>
|
||||||
<if test="appId != null "> and app_id = #{appId}</if>
|
<if test="appId != null "> and app_id = #{appId}</if>
|
||||||
|
<if test="projectId != null "> and projectId = #{projectId}</if>
|
||||||
|
<if test="deptId != null "> and deptId = #{deptId}</if>
|
||||||
<if test="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</if>
|
<if test="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</if>
|
||||||
<if test="serverid != null "> and serverid = #{serverid}</if>
|
<if test="serverid != null "> and serverid = #{serverid}</if>
|
||||||
<if test="workerId != null "> and workerId = #{workerId}</if>
|
<if test="workerId != null "> and workerId = #{workerId}</if>
|
||||||
|
@ -83,6 +85,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<where>
|
<where>
|
||||||
<if test="cfgid != null "> and cfgid = #{cfgid}</if>
|
<if test="cfgid != null "> and cfgid = #{cfgid}</if>
|
||||||
<if test="appId != null "> and app_id = #{appId}</if>
|
<if test="appId != null "> and app_id = #{appId}</if>
|
||||||
|
<if test="projectId != null "> and projectId = #{projectId}</if>
|
||||||
|
<if test="deptId != null "> and deptId = #{deptId}</if>
|
||||||
<if test="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</if>
|
<if test="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</if>
|
||||||
<if test="serverid != null "> and serverid = #{serverid}</if>
|
<if test="serverid != null "> and serverid = #{serverid}</if>
|
||||||
<if test="workerId != null "> and workerId = #{workerId}</if>
|
<if test="workerId != null "> and workerId = #{workerId}</if>
|
||||||
|
@ -362,4 +366,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where sd.dept_name = #{deptName}
|
where sd.dept_name = #{deptName}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="todayAttendance" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||||
|
select * from sur_project_attendance_data_${year}
|
||||||
|
<where>
|
||||||
|
<if test="id==1">
|
||||||
|
and companyTypeId in (1,6)
|
||||||
|
</if>
|
||||||
|
<if test="id==2">
|
||||||
|
and companyTypeId in (0,2,3,4,5)
|
||||||
|
</if>
|
||||||
|
<if test="id==8">
|
||||||
|
and companyTypeId =8
|
||||||
|
</if>
|
||||||
|
<if test="projectId!=null and projectId>0">
|
||||||
|
and projectId=#{projectId}
|
||||||
|
</if>
|
||||||
|
<if test="deptId!=null and deptId>0">
|
||||||
|
and deptid=#{deptId}
|
||||||
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and projectId in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) =date(#{attendanceTime})</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="groupTodayCompanyTypeId" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||||
|
select companyTypeId,count(1) id from sur_project_attendance_data_${year}
|
||||||
|
<where>
|
||||||
|
<if test="projectId!=null and projectId>0">
|
||||||
|
and projectId=#{projectId}
|
||||||
|
</if>
|
||||||
|
<if test="deptId!=null and deptId>0">
|
||||||
|
and deptid=#{deptId}
|
||||||
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and projectId in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) =date(#{attendanceTime})</if>
|
||||||
|
</where>
|
||||||
|
group by companyTypeId
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue