update code
parent
f7fa9a0217
commit
8ed539f272
|
@ -49,7 +49,7 @@ spring:
|
||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://62.234.3.186:3306/yanzhu_jh_test_2024?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
url: jdbc:mysql://62.234.3.186:3306/yanzhu_jh?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: Sxyanzhu@cf123
|
password: Sxyanzhu@cf123
|
||||||
#url: jdbc:mysql://192.168.126.19:3306/yanzhu_jh?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
#url: jdbc:mysql://192.168.126.19:3306/yanzhu_jh?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
||||||
|
|
|
@ -45,7 +45,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSurProjectAttendanceDataVo">
|
<sql id="selectSurProjectAttendanceDataVo">
|
||||||
select * from sur_project_attendance_data_${year}
|
select
|
||||||
|
id,
|
||||||
|
cfgid,
|
||||||
|
app_id,
|
||||||
|
projectId,
|
||||||
|
projectName,
|
||||||
|
deptId,
|
||||||
|
deptName,
|
||||||
|
vendors_code,
|
||||||
|
serverid,
|
||||||
|
workerId,
|
||||||
|
workerName,
|
||||||
|
identification,
|
||||||
|
workerPhoto,
|
||||||
|
workerGender,
|
||||||
|
birthDate,
|
||||||
|
ethnic,
|
||||||
|
nativePlace,
|
||||||
|
phone,
|
||||||
|
workTypeName,
|
||||||
|
specWorkType,
|
||||||
|
groupName,
|
||||||
|
companyTypeId,
|
||||||
|
companyName,
|
||||||
|
attendance_time,
|
||||||
|
attendance_out_time,
|
||||||
|
scanPhoto,
|
||||||
|
teamId,
|
||||||
|
workTypeCode,
|
||||||
|
companyId,
|
||||||
|
vendorId,
|
||||||
|
device_code,
|
||||||
|
is_del,
|
||||||
|
create_by,
|
||||||
|
create_time,
|
||||||
|
update_by,
|
||||||
|
update_time,
|
||||||
|
remark
|
||||||
|
from sur_project_attendance_data_${year}
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="findCurrentAttendanceData" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
<select id="findCurrentAttendanceData" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||||
|
@ -56,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="workerId != null and workerId != ''"> and workerId = #{workerId}</if>
|
<if test="workerId != null and workerId != ''"> and workerId = #{workerId}</if>
|
||||||
<if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) = date(#{attendanceTime})</if>
|
<if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) = date(#{attendanceTime})</if>
|
||||||
</where>
|
</where>
|
||||||
order by attendance_time desc LIMIT 1
|
order by id desc LIMIT 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSurProjectAttendanceDataListEx" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
<select id="selectSurProjectAttendanceDataListEx" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||||
|
@ -69,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<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>
|
||||||
<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="identification != null and identification != ''"> and identification = #{identification}</if>
|
||||||
<if test="teamId != null "> and teamId = #{teamId}</if>
|
<if test="teamId != null "> and teamId = #{teamId}</if>
|
||||||
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
|
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
|
||||||
|
@ -94,8 +132,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
<if test="scanPhoto != null and scanPhoto != ''"> and scanPhoto = #{scanPhoto}</if>
|
<if test="scanPhoto != null and scanPhoto != ''"> and scanPhoto = #{scanPhoto}</if>
|
||||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||||
|
<if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) = date(#{attendanceTime})</if>
|
||||||
</where>
|
</where>
|
||||||
order by attendance_time desc
|
order by id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSurProjectAttendanceDataList" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
<select id="selectSurProjectAttendanceDataList" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||||
|
@ -103,7 +142,7 @@ 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="projectId != null ">and cfgid in (select id from sur_project_attendance_cfg where projectId = #{projectId})</if>
|
||||||
<if test="deptId != null "> and deptId = #{deptId}</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>
|
||||||
|
@ -111,8 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="attendanceOutTime!=null and attendanceOutTime!=''">
|
<if test="attendanceOutTime!=null and attendanceOutTime!=''">
|
||||||
and date(attendance_out_time) <=date(#{attendanceOutTime})
|
and date(attendance_out_time) <=date(#{attendanceOutTime})
|
||||||
</if>
|
</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="teamId != null "> and teamId = #{teamId}</if>
|
||||||
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
|
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
|
||||||
<if test="companyId != null "> and companyId = #{companyId}</if>
|
<if test="companyId != null "> and companyId = #{companyId}</if>
|
||||||
|
@ -137,8 +175,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="scanPhoto != null and scanPhoto != ''"> and scanPhoto like concat('%', #{scanPhoto}, '%')</if>
|
<if test="scanPhoto != null and scanPhoto != ''"> and scanPhoto like concat('%', #{scanPhoto}, '%')</if>
|
||||||
<if test="workerName != null and workerName != ''"> and workerName like concat('%', #{workerName}, '%')</if>
|
<if test="workerName != null and workerName != ''"> and workerName like concat('%', #{workerName}, '%')</if>
|
||||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||||
|
<if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) >= date(#{attendanceTime})</if>
|
||||||
|
<if test="identification != null and identification != ''"> and identification = #{identification}</if>
|
||||||
</where>
|
</where>
|
||||||
order by attendance_time desc
|
order by id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSurProjectAttendanceDataById" parameterType="Long" resultMap="SurProjectAttendanceDataResult">
|
<select id="selectSurProjectAttendanceDataById" parameterType="Long" resultMap="SurProjectAttendanceDataResult">
|
||||||
|
@ -460,22 +500,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="groupTodayCompanyTypeId" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
<select id="groupTodayCompanyTypeId" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||||
select ady.companyTypeId,count(1) id from sur_project_attendance_data_${year} ady
|
select ady.companyTypeId,count(1) id from sur_project_attendance_data_${year} ady
|
||||||
left join sur_project sp on sp.id = ady.projectId
|
where ady.cfgid in (select id from sur_project_attendance_cfg where
|
||||||
where sp.isDel=0 and sp.progressVisible=0
|
is_del=0
|
||||||
<if test="projectId!=null and projectId>0">
|
<if test="projectId!=null and projectId>0">
|
||||||
and ady.projectId=#{projectId}
|
and projectId=#{projectId}
|
||||||
</if>
|
</if>
|
||||||
<if test="deptId!=null and deptId>0">
|
and projectId in (select id from sur_project sp where sp.isDel=0 and sp.progressVisible=0
|
||||||
and sp.deptId=#{deptId}
|
|
||||||
</if>
|
<if test="deptId!=null and deptId>0">
|
||||||
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
|
and sp.deptId=#{deptId}
|
||||||
<if test="prjIds !=null and prjIds.size()>0">
|
</if>
|
||||||
and ady.projectId in
|
<if test="attendanceTime != null and attendanceTime != ''"> and date(ady.attendance_time) =date(#{attendanceTime})</if>
|
||||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
|
||||||
#{item}
|
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
|
||||||
</foreach>
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
</if>
|
and ady.projectId in
|
||||||
<if test="attendanceTime != null and attendanceTime != ''"> and date(ady.attendance_time) =date(#{attendanceTime})</if>
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
group by ady.companyTypeId
|
group by ady.companyTypeId
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
order by spp.video_date desc
|
order by sp.projectSort ASC,sp.projectName
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="querySurProjectPhotographyList" parameterType="SurProjectPhotography" resultMap="SurProjectPhotographyResult">
|
<select id="querySurProjectPhotographyList" parameterType="SurProjectPhotography" resultMap="SurProjectPhotographyResult">
|
||||||
|
|
Loading…
Reference in New Issue