提交代码
parent
6a0fa6d652
commit
2c11fb72cb
|
@ -230,7 +230,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="projectId != null "> and d.projectId = #{projectId}</if>
|
<if test="projectId != null "> and d.projectId = #{projectId}</if>
|
||||||
<if test="subDeptId != null "> and d.sub_dept_id = #{subDeptId}</if>
|
<if test="subDeptId != null "> and d.sub_dept_id = #{subDeptId}</if>
|
||||||
<if test="subDeptGroup != null "> and d.sub_dept_group = #{subDeptGroup}</if>
|
<if test="subDeptGroup != null "> and d.sub_dept_group = #{subDeptGroup}</if>
|
||||||
and u.use_status = '0' and date(d.create_time) = CURDATE()
|
and date(d.create_time) = CURDATE()
|
||||||
</where>
|
</where>
|
||||||
group by u.craft_type
|
group by u.craft_type
|
||||||
</select>
|
</select>
|
||||||
|
@ -242,7 +242,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="projectId != null "> and d.projectId = #{projectId}</if>
|
<if test="projectId != null "> and d.projectId = #{projectId}</if>
|
||||||
<if test="subDeptId != null "> and d.sub_dept_id = #{subDeptId}</if>
|
<if test="subDeptId != null "> and d.sub_dept_id = #{subDeptId}</if>
|
||||||
<if test="subDeptGroup != null "> and d.sub_dept_group = #{subDeptGroup}</if>
|
<if test="subDeptGroup != null "> and d.sub_dept_group = #{subDeptGroup}</if>
|
||||||
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and date(d.create_time) between #{params.beginTime} and #{params.endTime}</if>
|
and date(d.create_time) >= CURDATE() - INTERVAL 7 DAY
|
||||||
</where>
|
</where>
|
||||||
group by attendanceTime
|
group by attendanceTime
|
||||||
order by attendanceTime
|
order by attendanceTime
|
||||||
|
|
|
@ -674,13 +674,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="statsAttendanceDaysByProId" parameterType="SurProjectAttendanceData" resultType="Map">
|
<select id="statsAttendanceDaysByProId" parameterType="SurProjectAttendanceData" resultType="Map">
|
||||||
select '1' as craftType,count(1) as total from sur_project_attendance_data_${year}
|
select '1' as craftType,count(1) as total from sur_project_attendance_data_${year}
|
||||||
where projectId=#{projectId} and specWorkType = 1 and companyTypeId != 1
|
where projectId=#{projectId} and specWorkType = 1 and companyTypeId != 1 and date(create_time) = CURDATE()
|
||||||
UNION ALL
|
UNION ALL
|
||||||
select '2' as craftType,count(1) as total from sur_project_attendance_data_${year}
|
select '2' as craftType,count(1) as total from sur_project_attendance_data_${year}
|
||||||
where projectId=#{projectId} and specWorkType = 0 and companyTypeId != 1
|
where projectId=#{projectId} and specWorkType = 0 and companyTypeId != 1 and date(create_time) = CURDATE()
|
||||||
UNION ALL
|
UNION ALL
|
||||||
select '3' as craftType,count(1) as total from sur_project_attendance_data_${year}
|
select '3' as craftType,count(1) as total from sur_project_attendance_data_${year}
|
||||||
where projectId=#{projectId} and companyTypeId = 1
|
where projectId=#{projectId} and companyTypeId = 1 and date(create_time) = CURDATE()
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="statsAttendanceViewByProId" parameterType="SurProjectAttendanceData" resultType="Map">
|
<select id="statsAttendanceViewByProId" parameterType="SurProjectAttendanceData" resultType="Map">
|
||||||
|
@ -688,7 +688,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select date(d.create_time) as attendanceTime, count(1) as total from sur_project_attendance_data_${year} d
|
select date(d.create_time) as attendanceTime, count(1) as total from sur_project_attendance_data_${year} d
|
||||||
<where>
|
<where>
|
||||||
<if test="projectId != null "> and d.projectId = #{projectId}</if>
|
<if test="projectId != null "> and d.projectId = #{projectId}</if>
|
||||||
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and date(d.create_time) between #{params.beginTime} and #{params.endTime}</if>
|
and date(d.create_time) >= CURDATE() - INTERVAL 7 DAY
|
||||||
</where>
|
</where>
|
||||||
group by attendanceTime
|
group by attendanceTime
|
||||||
order by attendanceTime
|
order by attendanceTime
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class WXAttendanceController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/v1/findSubDeptsAttendanceView/{proId}")
|
@GetMapping("/v1/findSubDeptsAttendanceView/{proId}")
|
||||||
public AjaxResult findSubDeptsAttendanceView(@PathVariable("proId") Long proId){
|
public AjaxResult findSubDeptsAttendanceView(@PathVariable("proId") Long proId){
|
||||||
List<Map<String, Object>> list = new ArrayList<>();
|
List<Map<String, Object>> list;
|
||||||
AttendanceCfg attendanceCfgQuery = new AttendanceCfg();
|
AttendanceCfg attendanceCfgQuery = new AttendanceCfg();
|
||||||
attendanceCfgQuery.setProjectId(proId);
|
attendanceCfgQuery.setProjectId(proId);
|
||||||
List<AttendanceCfg> cfgList = attendanceCfgService.selectAttendanceCfgList(attendanceCfgQuery);
|
List<AttendanceCfg> cfgList = attendanceCfgService.selectAttendanceCfgList(attendanceCfgQuery);
|
||||||
|
|
|
@ -246,13 +246,6 @@ public class AttendanceUbiDataServiceImpl implements IAttendanceUbiDataService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Map<String, Object> params = new HashMap<>();
|
|
||||||
Calendar calendar = Calendar.getInstance();
|
|
||||||
calendar.add(Calendar.DAY_OF_MONTH, -1);
|
|
||||||
params.put("beginTime",DateUtil.format(calendar.getTime(),DateUtils.YYYY_MM_DD));
|
|
||||||
calendar.add(Calendar.DAY_OF_MONTH, -6);
|
|
||||||
params.put("endTime",DateUtil.format(calendar.getTime(),DateUtils.YYYY_MM_DD));
|
|
||||||
attendanceQuery.setParams(params);
|
|
||||||
return attendanceUbiDataMapper.statsAttendanceView(attendanceQuery);
|
return attendanceUbiDataMapper.statsAttendanceView(attendanceQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -351,13 +351,6 @@ public class SurProjectAttendanceDataServiceImpl implements ISurProjectAttendanc
|
||||||
public List<Map<String, Object>> statsAttendanceViewByProId(Long proId){
|
public List<Map<String, Object>> statsAttendanceViewByProId(Long proId){
|
||||||
SurProjectAttendanceData query = new SurProjectAttendanceData();
|
SurProjectAttendanceData query = new SurProjectAttendanceData();
|
||||||
query.setProjectId(proId);
|
query.setProjectId(proId);
|
||||||
Map<String, Object> params = new HashMap<>();
|
|
||||||
Calendar calendar = Calendar.getInstance();
|
|
||||||
calendar.add(Calendar.DAY_OF_MONTH, -1);
|
|
||||||
params.put("beginTime",DateUtil.format(calendar.getTime(),DateUtils.YYYY_MM_DD));
|
|
||||||
calendar.add(Calendar.DAY_OF_MONTH, -6);
|
|
||||||
params.put("endTime",DateUtil.format(calendar.getTime(),DateUtils.YYYY_MM_DD));
|
|
||||||
query.setParams(params);
|
|
||||||
return surProjectAttendanceDataMapper.statsAttendanceViewByProId(query);
|
return surProjectAttendanceDataMapper.statsAttendanceViewByProId(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue