Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev
# Conflicts: # yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectAttendanceDataServiceImpl.javadev_xds
commit
378f6da4a3
|
@ -24,7 +24,7 @@ spring:
|
|||
# 国际化资源文件路径
|
||||
basename: i18n/messages
|
||||
profiles:
|
||||
active: prod
|
||||
active: druid
|
||||
# 文件上传
|
||||
servlet:
|
||||
multipart:
|
||||
|
|
|
@ -42,6 +42,15 @@ public class SurProjectAttendanceCfg extends BaseEntity
|
|||
@Excel(name = "状态")
|
||||
private Long state;
|
||||
|
||||
private String deptName;
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
private String projectName;
|
||||
private String unitName;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.yanzhu.jh.project.domain;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
|
@ -16,6 +17,9 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||
*/
|
||||
public class SurProjectAttendanceData extends BaseEntity
|
||||
{
|
||||
public SurProjectAttendanceData(){
|
||||
this.year= DateTime.now().year();
|
||||
}
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private int year;
|
||||
|
@ -60,11 +64,11 @@ public class SurProjectAttendanceData extends BaseEntity
|
|||
this.workerPhoto = workerPhoto;
|
||||
}
|
||||
|
||||
public Integer getWorkerGender() {
|
||||
public Long getWorkerGender() {
|
||||
return workerGender;
|
||||
}
|
||||
|
||||
public void setWorkerGender(Integer workerGender) {
|
||||
public void setWorkerGender(Long workerGender) {
|
||||
this.workerGender = workerGender;
|
||||
}
|
||||
|
||||
|
@ -153,7 +157,7 @@ public class SurProjectAttendanceData extends BaseEntity
|
|||
@Excel(name = "照片")
|
||||
private String workerPhoto;
|
||||
@Excel(name = "性别0:男 1:女")
|
||||
private Integer workerGender;
|
||||
private Long workerGender;
|
||||
@Excel(name = "出生日期时间戳")
|
||||
private Long birthDate;
|
||||
@Excel(name = "所属班组")
|
||||
|
|
|
@ -58,4 +58,6 @@ public interface SurProjectAttendanceCfgMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceCfgByIds(Long[] ids);
|
||||
|
||||
public List<SurProjectAttendanceCfg> selectSurProjectAttendanceCfgListForAllInfo(SurProjectAttendanceCfg where);
|
||||
}
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
package com.yanzhu.jh.project.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.yanzhu.jh.project.domain.SurProjectAttendanceCfg;
|
||||
import com.yanzhu.jh.project.domain.SurProjectAttendanceGroup;
|
||||
import com.yanzhu.jh.project.domain.SurProjectAttendanceUser;
|
||||
import com.yanzhu.jh.project.mapper.SurProjectAttendanceCfgMapper;
|
||||
import com.yanzhu.jh.project.mapper.SurProjectAttendanceGroupMapper;
|
||||
import com.yanzhu.jh.project.mapper.SurProjectAttendanceUserMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -28,6 +31,16 @@ public class SurProjectAttendanceDataServiceImpl implements ISurProjectAttendanc
|
|||
@Autowired
|
||||
private SurProjectAttendanceDataMapper surProjectAttendanceDataMapper;
|
||||
|
||||
@Autowired
|
||||
private SurProjectAttendanceUserMapper surProjectAttendanceUserMapper;
|
||||
|
||||
@Autowired
|
||||
private SurProjectAttendanceGroupMapper surProjectAttendanceGroupMapper;
|
||||
|
||||
@Autowired
|
||||
private SurProjectAttendanceCfgMapper surProjectAttendanceCfgMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询劳务实名制管理
|
||||
*
|
||||
|
@ -144,15 +157,68 @@ public class SurProjectAttendanceDataServiceImpl implements ISurProjectAttendanc
|
|||
where.setVendorsCode(sdata.getVendorsCode());
|
||||
where.setCfgid(sdata.getCfgid());
|
||||
where.setServerid(sdata.getServerid());
|
||||
where.setServerid(sdata.getWorkerId());
|
||||
where.setAttendanceTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", DateTime.now()));
|
||||
List<SurProjectAttendanceData> list=selectSurProjectAttendanceDataListEx(where);
|
||||
if(list.size()==0){
|
||||
//设置考勤其它参数
|
||||
//查询人员信息
|
||||
SurProjectAttendanceUser userWhere=new SurProjectAttendanceUser();
|
||||
userWhere.setWorkerId(sdata.getWorkerId());
|
||||
List<SurProjectAttendanceUser> uList= surProjectAttendanceUserMapper.selectSurProjectAttendanceUserList(userWhere);
|
||||
if(uList.size()==0){
|
||||
return;
|
||||
}
|
||||
SurProjectAttendanceUser user=uList.get(0);
|
||||
sdata.setWorkerName(user.getName());
|
||||
sdata.setWorkerPhoto(user.getPhoto());
|
||||
sdata.setWorkerGender(user.getGender());;
|
||||
sdata.setGroupName(user.getGroupName());
|
||||
sdata.setWorkTypeName(user.getWorkTypeName());
|
||||
sdata.setEthnic(user.getEthnic());
|
||||
sdata.setNativePlace(user.getNativePlace());
|
||||
sdata.setPhone(user.getPhone());
|
||||
sdata.setSpecWorkType(user.getSpecWorkType());
|
||||
//查询分组信息
|
||||
SurProjectAttendanceGroup groupWhere=new SurProjectAttendanceGroup();
|
||||
groupWhere.setCfgid(sdata.getCfgid());
|
||||
groupWhere.setCompanyId(sdata.getCompanyId());
|
||||
List<SurProjectAttendanceGroup> gList=surProjectAttendanceGroupMapper.selectSurProjectAttendanceGroupList(groupWhere);
|
||||
if(gList.size()==0){
|
||||
return;
|
||||
}
|
||||
SurProjectAttendanceGroup group=gList.get(0);
|
||||
sdata.setCompanyName(group.getCompanyName());
|
||||
sdata.setCompanyTypeId(group.getCompanyTypeId());
|
||||
//查询华筑的分组信息
|
||||
if("huazhu".equals(sdata.getVendorsCode())){
|
||||
sdata.setCompanyTypeId(getHuazhuCompanyTypeId(group.getCompanyName()));//获取华筑的分包商类型
|
||||
}
|
||||
//查询项目部门信息
|
||||
SurProjectAttendanceCfg cfgWhere=new SurProjectAttendanceCfg();
|
||||
cfgWhere.setId(sdata.getCfgid());
|
||||
List<SurProjectAttendanceCfg> cfgList=surProjectAttendanceCfgMapper.selectSurProjectAttendanceCfgListForAllInfo(cfgWhere);
|
||||
if(cfgList.size()==0){
|
||||
return;
|
||||
}
|
||||
SurProjectAttendanceCfg cfg=cfgList.get(0);
|
||||
sdata.setProjectId(cfg.getProjectId());
|
||||
sdata.setDeptId(cfg.getSubDeptId());
|
||||
sdata.setProjectName(cfg.getProjectName());
|
||||
sdata.setDeptName(cfg.getDeptName());
|
||||
insertSurProjectAttendanceData(sdata);
|
||||
}else{
|
||||
sdata.setId(list.get(0).getId());
|
||||
SurProjectAttendanceData upData=list.get(0);
|
||||
upData.setAttendanceOutTime(sdata.getAttendanceTime());
|
||||
updateSurProjectAttendanceData(sdata);
|
||||
}
|
||||
}
|
||||
|
||||
private String getHuazhuCompanyTypeId(String groupName) {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLastServerId(SurProjectAttendanceData where) {
|
||||
return ""+surProjectAttendanceDataMapper.getLastServerId(where);
|
||||
|
|
|
@ -78,6 +78,7 @@ public class AttendanceJgwTask {
|
|||
public static void main(String[] args){
|
||||
String d="sxyzxx2024suc";
|
||||
System.out.println(Base64.encode(d));
|
||||
System.out.println(DateTime.now().year());
|
||||
|
||||
String appid="6a6f24fe35b04ee0bcf31cfb46ed1051";
|
||||
String secret="c3h5enh4MjAyNHN1Yw==";
|
||||
|
|
|
@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="projectName" column="projectName"/>
|
||||
<result property="deptName" column="dept_name"/>
|
||||
<result property="unitName" column="unitName"/>
|
||||
<result property="vendorName" column="vendorName"/>
|
||||
</resultMap>
|
||||
|
@ -46,6 +47,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectSurProjectAttendanceCfgListForAllInfo" parameterType="SurProjectAttendanceCfg" resultMap="SurProjectAttendanceCfgResult">
|
||||
SELECT a.*,b.projectName,c.dept_name
|
||||
FROM sur_project_attendance_cfg a,sur_project b,sys_dept c WHERE c.dept_id=a.sub_dept_id AND a.project_id=b.id
|
||||
<where>
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSurProjectAttendanceCfgById" parameterType="Long" resultMap="SurProjectAttendanceCfgResult">
|
||||
<include refid="selectSurProjectAttendanceCfgVo"/>
|
||||
where id = #{id}
|
||||
|
|
|
@ -8,45 +8,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="id" column="id" />
|
||||
<result property="cfgid" column="cfgid" />
|
||||
<result property="appId" column="app_id" />
|
||||
<result property="projectId" column="projectId" />
|
||||
<result property="projectName" column="projectName" />
|
||||
<result property="deptId" column="deptId" />
|
||||
<result property="deptName" column="deptName" />
|
||||
<result property="vendorsCode" column="vendors_code" />
|
||||
<result property="serverid" column="serverid" />
|
||||
<result property="workerId" column="workerId" />
|
||||
<result property="attendanceType" column="attendance_type" />
|
||||
<result property="attendanceTime" column="attendance_time" />
|
||||
<result property="workerName" column="workerName" />
|
||||
<result property="identification" column="identification" />
|
||||
<result property="workerPhoto" column="workerPhoto" />
|
||||
<result property="workerGender" column="workerGender" />
|
||||
<result property="birthDate" column="birthDate" />
|
||||
<result property="ethnic" column="ethnic" />
|
||||
<result property="nativePlace" column="nativePlace" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="workTypeName" column="workTypeName" />
|
||||
<result property="specWorkType" column="specWorkType" />
|
||||
<result property="groupName" column="groupName" />
|
||||
<result property="companyTypeId" column="companyTypeId" />
|
||||
<result property="companyName" column="companyName" />
|
||||
<result property="attendanceTime" column="attendance_time" />
|
||||
<result property="attendanceOutTime" column="attendance_out_time" />
|
||||
<result property="scanPhoto" column="scanPhoto" />
|
||||
<result property="teamId" column="teamId" />
|
||||
<result property="workTypeCode" column="workTypeCode" />
|
||||
<result property="companyId" column="companyId" />
|
||||
<result property="vendorId" column="vendorId" />
|
||||
<result property="projectType" column="projectType" />
|
||||
<result property="deviceCode" column="device_code" />
|
||||
<result property="workPointId" column="work_point_id" />
|
||||
<result property="scanPhoto" column="scanPhoto" />
|
||||
<result property="other" column="other" />
|
||||
<result property="state" column="state" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="subDeptId" column="sub_dept_id"/>
|
||||
<result property="companyTypeId" column="companyTypeId"/>
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSurProjectAttendanceDataVo">
|
||||
select * FROM
|
||||
(
|
||||
select a.*,b.project_id,b.sub_dept_id,c.companyTypeId
|
||||
from sur_project_attendance_data a,sur_project_attendance_cfg b,view_sur_project_attendance_group c
|
||||
where a.cfgid=b.id and a.companyId=c.companyId
|
||||
select a.*
|
||||
from sur_project_attendance_data_${year} a
|
||||
)
|
||||
sur_project_attendance_data
|
||||
</sql>
|
||||
|
||||
<select id="selectSurProjectAttendanceDataListEx" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||
select * from sur_project_attendance_data
|
||||
select * from sur_project_attendance_data_${year}
|
||||
<where>
|
||||
<if test="cfgid != null "> and cfgid = #{cfgid}</if>
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
|
@ -54,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="serverid != null "> and serverid = #{serverid}</if>
|
||||
<if test="workerId != null "> and workerId = #{workerId}</if>
|
||||
<if test="attendanceType != null and attendanceType != ''"> and attendance_type = #{attendanceType}</if>
|
||||
<if test="attendanceTime != null and attendanceTime != ''"> and attendance_time = #{attendanceTime}</if>
|
||||
<if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) = date(#{attendanceTime})</if>
|
||||
<if test="identification != null and identification != ''"> and identification = #{identification}</if>
|
||||
<if test="teamId != null "> and teamId = #{teamId}</if>
|
||||
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
|
||||
|
@ -100,120 +108,156 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSurProjectAttendanceData" parameterType="SurProjectAttendanceData" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sur_project_attendance_data
|
||||
<insert id="insertSurProjectAttendanceData2024" parameterType="SurProjectAttendanceData" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sur_project_attendance_data_${year}
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgid != null">cfgid,</if>
|
||||
<if test="appId != null">app_id,</if>
|
||||
<if test="projectId != null">projectId,</if>
|
||||
<if test="projectName != null">projectName,</if>
|
||||
<if test="deptId != null">deptId,</if>
|
||||
<if test="deptName != null">deptName,</if>
|
||||
<if test="vendorsCode != null">vendors_code,</if>
|
||||
<if test="serverid != null">serverid,</if>
|
||||
<if test="workerId != null">workerId,</if>
|
||||
<if test="attendanceType != null">attendance_type,</if>
|
||||
<if test="attendanceTime != null">attendance_time,</if>
|
||||
<if test="workerName != null">workerName,</if>
|
||||
<if test="identification != null">identification,</if>
|
||||
<if test="workerPhoto != null">workerPhoto,</if>
|
||||
<if test="workerGender != null">workerGender,</if>
|
||||
<if test="birthDate != null">birthDate,</if>
|
||||
<if test="ethnic != null">ethnic,</if>
|
||||
<if test="nativePlace != null">nativePlace,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="workTypeName != null">workTypeName,</if>
|
||||
<if test="specWorkType != null">specWorkType,</if>
|
||||
<if test="groupName != null">groupName,</if>
|
||||
<if test="companyTypeId != null">companyTypeId,</if>
|
||||
<if test="companyName != null">companyName,</if>
|
||||
<if test="attendanceTime != null">attendance_time,</if>
|
||||
<if test="attendanceOutTime != null">attendance_out_time,</if>
|
||||
<if test="scanPhoto != null">scanPhoto,</if>
|
||||
<if test="teamId != null">teamId,</if>
|
||||
<if test="workTypeCode != null">workTypeCode,</if>
|
||||
<if test="companyId != null">companyId,</if>
|
||||
<if test="vendorId != null">vendorId,</if>
|
||||
<if test="projectType != null">projectType,</if>
|
||||
<if test="deviceCode != null">device_code,</if>
|
||||
<if test="workPointId != null">work_point_id,</if>
|
||||
<if test="scanPhoto != null">scanPhoto,</if>
|
||||
<if test="other != null">other,</if>
|
||||
<if test="state != null">state,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgid != null">#{cfgid},</if>
|
||||
<if test="appId != null">#{appId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="projectName != null">#{projectName},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="deptName != null">#{deptName},</if>
|
||||
<if test="vendorsCode != null">#{vendorsCode},</if>
|
||||
<if test="serverid != null">#{serverid},</if>
|
||||
<if test="workerId != null">#{workerId},</if>
|
||||
<if test="attendanceType != null">#{attendanceType},</if>
|
||||
<if test="attendanceTime != null">#{attendanceTime},</if>
|
||||
<if test="workerName != null">#{workerName},</if>
|
||||
<if test="identification != null">#{identification},</if>
|
||||
<if test="workerPhoto != null">#{workerPhoto},</if>
|
||||
<if test="workerGender != null">#{workerGender},</if>
|
||||
<if test="birthDate != null">#{birthDate},</if>
|
||||
<if test="ethnic != null">#{ethnic},</if>
|
||||
<if test="nativePlace != null">#{nativePlace},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="workTypeName != null">#{workTypeName},</if>
|
||||
<if test="specWorkType != null">#{specWorkType},</if>
|
||||
<if test="groupName != null">#{groupName},</if>
|
||||
<if test="companyTypeId != null">#{companyTypeId},</if>
|
||||
<if test="companyName != null">#{companyName},</if>
|
||||
<if test="attendanceTime != null">#{attendanceTime},</if>
|
||||
<if test="attendanceOutTime != null">#{attendanceOutTime},</if>
|
||||
<if test="scanPhoto != null">#{scanPhoto},</if>
|
||||
<if test="teamId != null">#{teamId},</if>
|
||||
<if test="workTypeCode != null">#{workTypeCode},</if>
|
||||
<if test="companyId != null">#{companyId},</if>
|
||||
<if test="vendorId != null">#{vendorId},</if>
|
||||
<if test="projectType != null">#{projectType},</if>
|
||||
<if test="deviceCode != null">#{deviceCode},</if>
|
||||
<if test="workPointId != null">#{workPointId},</if>
|
||||
<if test="scanPhoto != null">#{scanPhoto},</if>
|
||||
<if test="other != null">#{other},</if>
|
||||
<if test="state != null">#{state},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSurProjectAttendanceData" parameterType="SurProjectAttendanceData">
|
||||
update sur_project_attendance_data
|
||||
<update id="updateSurProjectAttendanceData2024" parameterType="SurProjectAttendanceData">
|
||||
update sur_project_attendance_data_${year}
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cfgid != null">cfgid = #{cfgid},</if>
|
||||
<if test="appId != null">app_id = #{appId},</if>
|
||||
<if test="projectId != null">projectId = #{projectId},</if>
|
||||
<if test="projectName != null">projectName = #{projectName},</if>
|
||||
<if test="deptId != null">deptId = #{deptId},</if>
|
||||
<if test="deptName != null">deptName = #{deptName},</if>
|
||||
<if test="vendorsCode != null">vendors_code = #{vendorsCode},</if>
|
||||
<if test="serverid != null">serverid = #{serverid},</if>
|
||||
<if test="workerId != null">workerId = #{workerId},</if>
|
||||
<if test="attendanceType != null">attendance_type = #{attendanceType},</if>
|
||||
<if test="attendanceTime != null">attendance_time = #{attendanceTime},</if>
|
||||
<if test="workerName != null">workerName = #{workerName},</if>
|
||||
<if test="identification != null">identification = #{identification},</if>
|
||||
<if test="workerPhoto != null">workerPhoto = #{workerPhoto},</if>
|
||||
<if test="workerGender != null">workerGender = #{workerGender},</if>
|
||||
<if test="birthDate != null">birthDate = #{birthDate},</if>
|
||||
<if test="ethnic != null">ethnic = #{ethnic},</if>
|
||||
<if test="nativePlace != null">nativePlace = #{nativePlace},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="workTypeName != null">workTypeName = #{workTypeName},</if>
|
||||
<if test="specWorkType != null">specWorkType = #{specWorkType},</if>
|
||||
<if test="groupName != null">groupName = #{groupName},</if>
|
||||
<if test="companyTypeId != null">companyTypeId = #{companyTypeId},</if>
|
||||
<if test="companyName != null">companyName = #{companyName},</if>
|
||||
<if test="attendanceTime != null">attendance_time = #{attendanceTime},</if>
|
||||
<if test="attendanceOutTime != null">attendance_out_time = #{attendanceOutTime},</if>
|
||||
<if test="scanPhoto != null">scanPhoto = #{scanPhoto},</if>
|
||||
<if test="teamId != null">teamId = #{teamId},</if>
|
||||
<if test="workTypeCode != null">workTypeCode = #{workTypeCode},</if>
|
||||
<if test="companyId != null">companyId = #{companyId},</if>
|
||||
<if test="vendorId != null">vendorId = #{vendorId},</if>
|
||||
<if test="projectType != null">projectType = #{projectType},</if>
|
||||
<if test="deviceCode != null">device_code = #{deviceCode},</if>
|
||||
<if test="workPointId != null">work_point_id = #{workPointId},</if>
|
||||
<if test="scanPhoto != null">scanPhoto = #{scanPhoto},</if>
|
||||
<if test="other != null">other = #{other},</if>
|
||||
<if test="state != null">state = #{state},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSurProjectAttendanceDataById" parameterType="Long">
|
||||
delete from sur_project_attendance_data where id = #{id}
|
||||
delete from sur_project_attendance_data_${year} where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSurProjectAttendanceDataByIds" parameterType="String">
|
||||
delete from sur_project_attendance_data where id in
|
||||
delete from sur_project_attendance_data_${year} where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSurProjectAttendanceDataByParams" parameterType="String">
|
||||
delete from sur_project_attendance_data where CONCAT(app_id,'-',serverid,'-',workerId) in
|
||||
delete from sur_project_attendance_data_${year} where CONCAT(app_id,'-',serverid,'-',workerId) in
|
||||
<foreach collection="list" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchSurProjectAttendanceData">
|
||||
insert into sur_project_attendance_data( id, cfgid, app_id, vendors_code, serverid, workerId, attendance_type, attendance_time, identification, teamId, workTypeCode, companyId, vendorId, projectType, device_code, work_point_id, scanPhoto, other, state, remark, is_del, create_by, create_time, update_by, update_time) values
|
||||
insert into sur_project_attendance_data_${year}( id, cfgid, app_id, vendors_code, serverid, workerId, attendance_type, attendance_time, identification, teamId, workTypeCode, companyId, vendorId, projectType, device_code, work_point_id, scanPhoto, other, state, remark, is_del, create_by, create_time, update_by, update_time) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.cfgid},#{item.appId}, #{item.vendorsCode}, #{item.serverid}, #{item.workerId}, #{item.attendanceType}, #{item.attendanceTime}, #{item.identification}, #{item.teamId}, #{item.workTypeCode}, #{item.companyId}, #{item.vendorId}, #{item.projectType}, #{item.deviceCode}, #{item.workPointId}, #{item.scanPhoto}, #{item.other}, #{item.state}, #{item.remark}, #{item.isDel}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="getLastServerId" parameterType="SurProjectAttendanceData" resultType="Long">
|
||||
SELECT IF(MAX(serverid+0),MAX(serverid+0),0) serverid FROM sur_project_attendance_data WHERE cfgid=#{cfgid}
|
||||
SELECT IF(MAX(serverid+0),MAX(serverid+0),0) serverid FROM sur_project_attendance_data_${year} WHERE cfgid=#{cfgid}
|
||||
</select>
|
||||
<select id="groupByComanyOld" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||
select companyTypeId,count(1) id from ( <include refid="selectSurProjectAttendanceDataVo"/> ) x2 where id in (
|
||||
|
@ -291,7 +335,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<select id="getHuazhuPage" parameterType="long" resultType="Long">
|
||||
select max(vendorId) vendorId from sur_project_attendance_data WHERE cfgid=#{id}
|
||||
select max(vendorId) vendorId from sur_project_attendance_data_${year} WHERE cfgid=#{id}
|
||||
</select>
|
||||
|
||||
<select id="initOtherData" parameterType="map" resultType="map">
|
||||
|
|
Loading…
Reference in New Issue