dev_xds
姜玉琦 2024-07-01 23:57:31 +08:00
commit 1e415b020c
5 changed files with 75 additions and 27 deletions

View File

@ -49,7 +49,7 @@ spring:
druid:
# 主库数据源
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
password: Sxyanzhu@cf123
#url: jdbc:mysql://192.168.126.19:3306/yanzhu_jh?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8

View File

@ -45,7 +45,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<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>
<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="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) = date(#{attendanceTime})</if>
</where>
order by attendance_time desc LIMIT 1
order by id desc LIMIT 1
</select>
<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="serverid != null "> and serverid = #{serverid}</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="teamId != null "> and teamId = #{teamId}</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 test="scanPhoto != null and scanPhoto != ''"> and scanPhoto = #{scanPhoto}</if>
<if test="isDel != null "> and is_del = #{isDel}</if>
<if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) = date(#{attendanceTime})</if>
</where>
order by attendance_time desc
order by id desc
</select>
<select id="selectSurProjectAttendanceDataList" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
@ -103,7 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="cfgid != null "> and cfgid = #{cfgid}</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="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</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!=''">
and date(attendance_out_time) &lt;=date(#{attendanceOutTime})
</if>
<if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) &gt;= 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>
<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="workerName != null and workerName != ''"> and workerName like concat('%', #{workerName}, '%')</if>
<if test="isDel != null "> and is_del = #{isDel}</if>
<if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) &gt;= date(#{attendanceTime})</if>
<if test="identification != null and identification != ''"> and identification = #{identification}</if>
</where>
order by attendance_time desc
order by id desc
</select>
<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 ady.companyTypeId,count(1) id from sur_project_attendance_data_${year} ady
left join sur_project sp on sp.id = ady.projectId
where sp.isDel=0 and sp.progressVisible=0
<if test="projectId!=null and projectId>0">
and ady.projectId=#{projectId}
</if>
<if test="deptId!=null and deptId>0">
and sp.deptId=#{deptId}
</if>
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
<if test="prjIds !=null and prjIds.size()>0">
and ady.projectId in
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="attendanceTime != null and attendanceTime != ''"> and date(ady.attendance_time) =date(#{attendanceTime})</if>
where ady.cfgid in (select id from sur_project_attendance_cfg where
is_del=0
<if test="projectId!=null and projectId>0">
and projectId=#{projectId}
</if>
and projectId in (select id from sur_project sp where sp.isDel=0 and sp.progressVisible=0
<if test="deptId!=null and deptId>0">
and sp.deptId=#{deptId}
</if>
<if test="attendanceTime != null and attendanceTime != ''"> and date(ady.attendance_time) =date(#{attendanceTime})</if>
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
<if test="prjIds !=null and prjIds.size()>0">
and ady.projectId in
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
)
)
group by ady.companyTypeId
</select>

View File

@ -292,6 +292,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item}
</foreach>
</if>
<if test="createTime!=null "> and a.create_time &gt;= #{createTime}</if>
<if test="updateTime!=null "> and a.create_time &lt;= #{updateTime}</if>
ORDER BY a.create_time
</select>
<select id="groupBYProject" parameterType="SurProjectCostOutput" resultMap="SurProjectCostOutputResult">

View File

@ -107,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="sumGroupByType" parameterType="SurProjectWorkingCommittee" resultMap="SurProjectWorkingCommitteeResult">
select sum(x.money) id, c.dict_value workingType,c.dict_label costName
select sum(x.money*10000.0) id, c.dict_value workingType,c.dict_label costName
from (
select a.* from sur_project_working_committee a,sur_project b
where a.projectId=b.id

View File

@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item}
</foreach>
</if>
order by spp.video_date desc
order by sp.projectSort ASC,sp.projectName
</select>
<select id="querySurProjectPhotographyList" parameterType="SurProjectPhotography" resultMap="SurProjectPhotographyResult">