项目部旷工逻辑修改

小程序打卡地址不从百度转换
This commit is contained in:
fl 2025-04-01 09:20:41 +08:00
parent e25ea374c7
commit a60d613abc
9 changed files with 71 additions and 47 deletions

View File

@ -179,7 +179,6 @@ public class AttCalServiceImpl implements AttCalService {
listUpdate = attSourceDataDao.getAttDataUpdateByStatus(pushDate,"1"); listUpdate = attSourceDataDao.getAttDataUpdateByStatus(pushDate,"1");
} }
} }
}else if(pushType == 2){ }else if(pushType == 2){
list = attSourceDataDao.getAttDataByStatus(pushDate,""); list = attSourceDataDao.getAttDataByStatus(pushDate,"");
listUpdate = attSourceDataDao.getAttDataUpdateByStatus(pushDate,""); listUpdate = attSourceDataDao.getAttDataUpdateByStatus(pushDate,"");

View File

@ -29,7 +29,7 @@ public class NewAttTask {
/** /**
* 考勤模版数据定时器 凌晨10分启动一次一天仅仅一次 * 考勤模版数据定时器 凌晨10分启动一次一天仅仅一次
*/ */
// @Scheduled(cron = "0 10 0 * * ?") @Scheduled(cron = "0 10 0 * * ?")
@Async @Async
public void getAttTempDataTask() { public void getAttTempDataTask() {
log.info("--------考勤模版数据定时器开启------"); log.info("--------考勤模版数据定时器开启------");
@ -44,7 +44,7 @@ public class NewAttTask {
* 1.数据拉取考勤定时器 每隔1个小时获取一次数据(从早上 5 点开始每小时执行一次) * 1.数据拉取考勤定时器 每隔1个小时获取一次数据(从早上 5 点开始每小时执行一次)
* 2.考勤数据应用步骤一考勤数据更新 * 2.考勤数据应用步骤一考勤数据更新
*/ */
// @Scheduled(cron = "0 0 5-23 * * ?") @Scheduled(cron = "0 0 5-23 * * ?")
@Async @Async
public void getAttDataPullTask() { public void getAttDataPullTask() {
log.info("--------数据拉取(考勤)定时器开启------"); log.info("--------数据拉取(考勤)定时器开启------");
@ -59,7 +59,7 @@ public class NewAttTask {
* 1.数据拉取考勤定时器 * 1.数据拉取考勤定时器
* 2.考勤数据应用步骤一考勤数据更新 * 2.考勤数据应用步骤一考勤数据更新
*/ */
// @Scheduled(cron = "0 40 8 * * ?") @Scheduled(cron = "0 40 8 * * ?")
@Async @Async
public void getEightAttDataPullTask() { public void getEightAttDataPullTask() {
log.info("--------数据拉取(考勤)定时器开启------"); log.info("--------数据拉取(考勤)定时器开启------");
@ -75,7 +75,7 @@ public class NewAttTask {
* 每天12点将当天未打卡考勤人员上班置为旷工 * 每天12点将当天未打卡考勤人员上班置为旷工
* 每天晚上22点将下班未打卡置为旷工 * 每天晚上22点将下班未打卡置为旷工
*/ */
// @Scheduled(cron = "0 0 12,22 * * ?") @Scheduled(cron = "0 0 12,22 * * ?")
@Async @Async
public void getAbsenteeismDataTask() { public void getAbsenteeismDataTask() {
log.info("--------旷工判断定时器开启------"); log.info("--------旷工判断定时器开启------");
@ -89,7 +89,7 @@ public class NewAttTask {
* 昨日下班卡更新 * 昨日下班卡更新
* 每天7点将昨天数据更新一下 * 每天7点将昨天数据更新一下
*/ */
// @Scheduled(cron = "0 0 7 * * ?") @Scheduled(cron = "0 0 7 * * ?")
@Async @Async
public void getYesterdayAttDataTask() { public void getYesterdayAttDataTask() {
log.info("--------昨日下班卡更新定时器开启------"); log.info("--------昨日下班卡更新定时器开启------");
@ -107,7 +107,7 @@ public class NewAttTask {
* 请假数据应用--法假 * 请假数据应用--法假
* 每天更新一次1点更新 * 每天更新一次1点更新
*/ */
// @Scheduled(cron = "0 0 1 * * ?") @Scheduled(cron = "0 0 1 * * ?")
@Async @Async
public void getLegalHolidayDataTask() { public void getLegalHolidayDataTask() {
log.info("--------请假数据应用--法假定时器开启------"); log.info("--------请假数据应用--法假定时器开启------");
@ -120,7 +120,7 @@ public class NewAttTask {
* 请假数据应用--请假 * 请假数据应用--请假
* 每天更新两次上午8点下午18点45天前数据 * 每天更新两次上午8点下午18点45天前数据
*/ */
// @Scheduled(cron = "0 0 8,18 * * ?") @Scheduled(cron = "0 0 8,18 * * ?")
@Async @Async
public void getLeaveDataTask() { public void getLeaveDataTask() {
log.info("--------请假数据应用--请假定时器开启------"); log.info("--------请假数据应用--请假定时器开启------");
@ -134,7 +134,7 @@ public class NewAttTask {
* 报表数据生成--日报表 * 报表数据生成--日报表
* 6点10分开始,一小时更新一次 * 6点10分开始,一小时更新一次
*/ */
// @Scheduled(cron = "0 10 6-23 * * ?") @Scheduled(cron = "0 10 6-23 * * ?")
@Async @Async
public void getDayReportDataTask() { public void getDayReportDataTask() {
log.info("--------报表数据生成--日报表定时器开启------"); log.info("--------报表数据生成--日报表定时器开启------");
@ -148,7 +148,7 @@ public class NewAttTask {
* 报表数据生成--月报表 * 报表数据生成--月报表
* 月初生成之后修改 * 月初生成之后修改
*/ */
// @Scheduled(cron = "0 15 1 1 * ?") @Scheduled(cron = "0 15 1 1 * ?")
@Async @Async
public void getMonthReportDataTempTask() { public void getMonthReportDataTempTask() {
log.info("--------报表数据生成--月报表定时器开启------"); log.info("--------报表数据生成--月报表定时器开启------");
@ -161,7 +161,7 @@ public class NewAttTask {
* 报表数据生成--月报表 * 报表数据生成--月报表
* 每日数据变化修改之后修改 * 每日数据变化修改之后修改
*/ */
// @Scheduled(cron = "0 0 8,10,17,19,23 * * ?") @Scheduled(cron = "0 0 8,10,17,19,23 * * ?")
@Async @Async
public void getMonthReportDataTask() { public void getMonthReportDataTask() {
log.info("--------报表数据生成--月报表定时器开启------"); log.info("--------报表数据生成--月报表定时器开启------");

View File

@ -56,7 +56,7 @@ public class WechatTasks {
/** /**
* 人员基础数据同步定时器 * 人员基础数据同步定时器
*/ */
// @Scheduled(initialDelay = 60000, fixedDelay = 60000 * 15) @Scheduled(initialDelay = 60000, fixedDelay = 60000 * 15)
@Async @Async
public void pushPersonTask() { public void pushPersonTask() {
log.info("--------人员基础数据同步定时器开启------"); log.info("--------人员基础数据同步定时器开启------");
@ -84,7 +84,7 @@ public class WechatTasks {
/** /**
* 休假出差数据同步定时器 * 休假出差数据同步定时器
*/ */
// @Scheduled(initialDelay = 60000 * 6, fixedDelay = 60000 * 15) @Scheduled(initialDelay = 60000 * 6, fixedDelay = 60000 * 15)
@Async @Async
public void leaveTask() { public void leaveTask() {
log.info("--------休假出差数据定时器开启------"); log.info("--------休假出差数据定时器开启------");
@ -169,7 +169,7 @@ public class WechatTasks {
/** /**
* 考勤数据同步定时器 * 考勤数据同步定时器
*/ */
// @Scheduled(initialDelay = 60000 * 12, fixedDelay = 60000 * 15) @Scheduled(initialDelay = 60000 * 12, fixedDelay = 60000 * 15)
@Async @Async
public void wechatAttTask() { public void wechatAttTask() {
log.info("--------考勤数据定时器开启------"); log.info("--------考勤数据定时器开启------");
@ -211,14 +211,14 @@ public class WechatTasks {
try { try {
JSONObject result = AddressCoordinateFormatUtil. JSONObject result = AddressCoordinateFormatUtil.
coordinateToAddress2(bean.getAttLon(), bean.getAttLat()); coordinateToAddress2(bean.getAttLon(), bean.getAttLat());
address = result.getString("formatted_address"); // address = result.getString("formatted_address");
province = result.getJSONObject("addressComponent").getString("province"); province = result.getJSONObject("addressComponent").getString("province");
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
address = "地址未转化成功"; // address = "地址未转化成功";
province = "地址未转化成功"; province = "地址未转化成功";
} }
bean.setAttAddress(address); // bean.setAttAddress(address);
bean.setProvince(province); bean.setProvince(province);
}); });
//新增数据 //新增数据
@ -349,10 +349,6 @@ public class WechatTasks {
private String httpPost(String method, String jsonStr) { private String httpPost(String method, String jsonStr) {
try { try {
// HttpResponse response = HttpRequest.post(IpAndPathConfig.getWechatUrl() + "/wechatData/" + method)
// .header("Content-Type", "application/json")
// .body(jsonStr)
// .execute();
if (index > 0) { if (index > 0) {
HttpResponse response = HttpRequest.post(IpAndPathConfig.getWechatUrl() + "/wechatData/" + method) HttpResponse response = HttpRequest.post(IpAndPathConfig.getWechatUrl() + "/wechatData/" + method)
.header("Content-Type", "application/json") .header("Content-Type", "application/json")

View File

@ -48,7 +48,6 @@ public class WorkReportController extends BaseController {
@Log(title = "流程管理->工作安排统计报表->列表查询", businessType = BusinessType.QUERY) @Log(title = "流程管理->工作安排统计报表->列表查询", businessType = BusinessType.QUERY)
public TableDataInfo list(WorkReportBean bean) { public TableDataInfo list(WorkReportBean bean) {
try{ try{
startPage();
return getDataTable(service.getWorkReportList(bean)); return getDataTable(service.getWorkReportList(bean));
}catch (Exception e){ }catch (Exception e){
log.error(e.toString(),e); log.error(e.toString(),e);

View File

@ -200,7 +200,7 @@
lat as attLat, lat as attLat,
IF(attendance_external = '外勤打卡', 1, 2) as isOutsideAtt, IF(attendance_external = '外勤打卡', 1, 2) as isOutsideAtt,
'1' as dataSource '1' as dataSource
from gz_cloud_test.fc_sup_attendance sup from gz_cloud.fc_sup_attendance sup
where sup.attendance_date = #{pushDate} where sup.attendance_date = #{pushDate}
and is_wechat != 1 and is_wechat != 1
</select> </select>
@ -433,29 +433,60 @@
</select> </select>
<select id="getAttDataByStatus" resultType="com.bonus.system.att.entity.AttDataBean"> <select id="getAttDataByStatus" resultType="com.bonus.system.att.entity.AttDataBean">
SELECT <if test='attType == ""'>
* SELECT
FROM *
att_data FROM
WHERE att_data
att_current_day = #{pushDate} WHERE
AND att_status = 0 att_current_day = #{pushDate}
AND att_status = 0
</if>
<if test='attType != ""'> <if test='attType != ""'>
AND att_type = #{attType} SELECT
ad.*
FROM
att_data ad
LEFT JOIN att_setting_history ash ON ash.user_id = ad.user_id
AND ad.att_current_day = ash.current_day
AND ash.current_day = #{pushDate}
LEFT JOIN att_group ag ON ag.id = ash.group_id
AND ag.is_active = '1'
WHERE
ad.att_current_day = #{pushDate}
AND ad.att_status = 0
AND ad.att_type = #{attType}
and ag.att_type = '1'
</if> </if>
</select> </select>
<select id="getAttDataUpdateByStatus" resultType="com.bonus.system.att.entity.AttDataBean"> <select id="getAttDataUpdateByStatus" resultType="com.bonus.system.att.entity.AttDataBean">
SELECT <if test='attType == ""'>
* SELECT
FROM *
att_data_update FROM
WHERE att_data_update
att_current_day = #{pushDate} WHERE
AND att_status = 0 att_current_day = #{pushDate}
And is_update = 0 AND att_status = 0
And is_update = 0
</if>
<if test='attType != ""'> <if test='attType != ""'>
AND att_type = #{attType} SELECT
ad.*
FROM
att_data_update ad
LEFT JOIN att_setting_history ash ON ash.user_id = ad.user_id
AND ad.att_current_day = ash.current_day
AND ash.current_day = #{pushDate}
LEFT JOIN att_group ag ON ag.id = ash.group_id
AND ag.is_active = '1'
WHERE
ad.att_current_day = #{pushDate}
AND ad.att_status = 0
AND ad.att_type = #{attType}
AND ad.is_update = 0
AND ag.att_type = '1'
</if> </if>
</select> </select>

View File

@ -432,7 +432,7 @@
(select * FROM att_setting_history WHERE current_day = #{attCurrentDay}) ash (select * FROM att_setting_history WHERE current_day = #{attCurrentDay}) ash
LEFT JOIN sys_user su ON ash.user_id = su.user_id LEFT JOIN sys_user su ON ash.user_id = su.user_id
LEFT JOIN ( SELECT * FROM v_att_update_data WHERE att_current_day = #{attCurrentDay} ) v on su.user_id = v.user_id LEFT JOIN ( SELECT * FROM v_att_update_data WHERE att_current_day = #{attCurrentDay} ) v on su.user_id = v.user_id
LEFT JOIN sys_user_org org ON org.user_id = su.user_id And suo.is_active= '1' LEFT JOIN sys_user_org org ON org.user_id = su.user_id And org.is_active= '1'
LEFT JOIN sys_organization so ON so.id = org.org_id LEFT JOIN sys_organization so ON so.id = org.org_id
<where> <where>
<if test="attendType == 1 || attendType == '1'"> <if test="attendType == 1 || attendType == '1'">

View File

@ -38,7 +38,7 @@
<insert id="pushAttDataToQsy"> <insert id="pushAttDataToQsy">
<foreach collection="list" item="item" separator=";"> <foreach collection="list" item="item" separator=";">
replace INTO gz_cloud_test.fc_sup_attendance ( replace INTO gz_cloud.fc_sup_attendance (
name, name,
id_number, id_number,
org_id, org_id,
@ -204,7 +204,7 @@
If(PROJECT_ID is null,0,PROJECT_ID) AS proId, If(PROJECT_ID is null,0,PROJECT_ID) AS proId,
If(ORG_ID is null,0,ORG_ID) AS orgId If(ORG_ID is null,0,ORG_ID) AS orgId
FROM FROM
gz_cloud_test.bm_sup_attend_history gz_cloud.bm_sup_attend_history
WHERE WHERE
ID_NUMBER = #{idNumber} ID_NUMBER = #{idNumber}
limit 1 limit 1

View File

@ -151,7 +151,7 @@
select * from (SELECT o.*, GROUP_CONCAT(u.user_id) as orgHeadUserId, GROUP_CONCAT(u.user_name) as orgHeadUserName, select * from (SELECT o.*, GROUP_CONCAT(u.user_id) as orgHeadUserId, GROUP_CONCAT(u.user_name) as orgHeadUserName,
a.user_id as attendanceUserId, a.user_name as attendanceUserName FROM ( a.user_id as attendanceUserId, a.user_name as attendanceUserName FROM (
SELECT o.* FROM sys_user u SELECT o.* FROM sys_user u
LEFT JOIN sys_user_org uo ON u.user_id = uo.user_id and suo.is_active = '1' LEFT JOIN sys_user_org uo ON u.user_id = uo.user_id and uo.is_active = '1'
LEFT JOIN sys_organization o ON o.id =uo.org_id LEFT JOIN sys_organization o ON o.id =uo.org_id
WHERE u.user_id = #{bean.userId} WHERE u.user_id = #{bean.userId}
) o ) o
@ -193,8 +193,7 @@
LEFT JOIN sys_role sr ON sr.role_id = sur.role_id LEFT JOIN sys_role sr ON sr.role_id = sur.role_id
AND sr.del_flag = 0 AND sr.del_flag = 0
WHERE WHERE
suo.user_id IN ( SELECT user_id FROM sys_user_org where is_active = '1' GROUP BY user_id HAVING COUNT(*) > 1 ) suo.user_id IN ( SELECT user_id FROM sys_user_org GROUP BY user_id HAVING COUNT(*) > 1 )
and suo.is_active= '1'
<if test="userName != null and userName != ''"> <if test="userName != null and userName != ''">
AND locate(#{userName}, su.user_name) AND locate(#{userName}, su.user_name)
</if> </if>

View File

@ -182,7 +182,7 @@
LEFT JOIN sys_organization so ON so.id = lc.org_id LEFT JOIN sys_organization so ON so.id = lc.org_id
AND so.is_active = 1 AND so.is_active = 1
WHERE WHERE
lc.is_active =1 lc.is_active = 1
<if test="startDate!=null and startDate!='' and endDate!=null and endDate!=''"> <if test="startDate!=null and startDate!='' and endDate!=null and endDate!=''">
and lc.`month` BETWEEN #{startDate} AND #{endDate} and lc.`month` BETWEEN #{startDate} AND #{endDate}
</if> </if>