Compare commits

..

No commits in common. "51f31be16f3af538e1bd29da03b4084ea9b7eafd" and "cb561658907aeee0467793621f2203d049e2dfbe" have entirely different histories.

6 changed files with 955 additions and 1032 deletions

View File

@ -207,7 +207,7 @@ export default {
if (tmps.length > 0) { if (tmps.length > 0) {
this.$store.dispatch("SetSelProject", tmps[0]); this.$store.dispatch("SetSelProject", tmps[0]);
this.selProject = tmps[0]; this.selProject = tmps[0];
if(this.selProject.vendorsCode == "jgw" ){ if(this.sel.vendorsCode == "jgw" ){
this.selProject.vendorsCode = "uni"; this.selProject.vendorsCode = "uni";
} }

File diff suppressed because it is too large Load Diff

View File

@ -399,15 +399,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="groupAllByComany" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult"> <select id="groupAllByComany" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
select ct.sub_type companyTypeId,count(1) id select g.companyTypeId,count(1) id
from sur_project_attendance_user u, attendance_cfg c, from sur_project_attendance_user u, attendance_cfg c,view_sur_project_attendance_group g,
view_sur_project_attendance_group g, pro_project_info sp
pro_project_info sp, where u.cfgid=c.id and u.companyId=g.companyId and u.state=#{id} and c.project_id = sp.id
sur_project_attendance_company_type ct and sp.is_Del=0
where u.cfgid=c.id and u.companyId=g.companyId and u.state=0 and c.project_id = sp.id and g.companyTypeId in (0,1,2,3,4,5,6,8)
and u.vendors_code=ct.vendors_code and g.companyTypeId=ct.type_id
and sp.is_Del=0
and ct.sub_type in (0,1,2,3,4,5,6,8)
<if test="projectId!=null and projectId>0"> <if test="projectId!=null and projectId>0">
and c.project_id=#{projectId} and c.project_id=#{projectId}
</if> </if>
@ -421,7 +418,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item} #{item}
</foreach> </foreach>
</if> </if>
group by ct.sub_type group by g.companyTypeId
</select> </select>
<select id="getHuazhuPage" parameterType="SurProjectAttendanceData" resultType="Long"> <select id="getHuazhuPage" parameterType="SurProjectAttendanceData" resultType="Long">
@ -658,8 +655,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from sur_project_attendance_data_${year} where from sur_project_attendance_data_${year} where
is_del !=1 is_del !=1
and projectid=#{prjId} and projectid=#{prjId}
AND DATE( ifnull( attendance_time, attendance_out_time ) ) &gt;= date(#{dateStart}) AND (date(attendance_time) &gt;= date(#{dateStart}) or date(attendance_out_time) &gt;= date(#{dateStart}))
AND DATE( ifnull( attendance_time, attendance_out_time ) ) &lt;= date(#{dateEnd}) AND (date(attendance_time) &lt;= date(#{dateEnd}) or date(attendance_out_time) &lt;= date(#{dateEnd}))
) tmp ) tmp
group by dt group by dt

View File

@ -112,8 +112,8 @@ public class AttendanceSzjTask {
try { try {
params.put("offset",5); params.put("offset",5);
params.put("recordSize",5); params.put("recordSize",5);
params.put("startTime","2025-06-25"); params.put("startTime","2025-06-01");
params.put("endTime","2025-06-26"); params.put("endTime","2025-06-07");
String result = HttpUtils.sendJSONPost(SZJ_HOST + "v1/api/recognition/query", JSON.toJSONString(params), headerMap); String result = HttpUtils.sendJSONPost(SZJ_HOST + "v1/api/recognition/query", JSON.toJSONString(params), headerMap);
JSONObject jsonObject = JSONObject.parseObject(result); JSONObject jsonObject = JSONObject.parseObject(result);
if (jsonObject != null && jsonObject.getBoolean("success")) { if (jsonObject != null && jsonObject.getBoolean("success")) {
@ -460,7 +460,7 @@ public class AttendanceSzjTask {
headerMap.put("token",token); headerMap.put("token",token);
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
try { try {
params.put("offset",pageIndex); params.put("offset",1);
params.put("recordSize",100); params.put("recordSize",100);
String result = HttpUtils.sendJSONPost(SZJ_HOST + "v1/api/person/query", JSON.toJSONString(params), headerMap); String result = HttpUtils.sendJSONPost(SZJ_HOST + "v1/api/person/query", JSON.toJSONString(params), headerMap);
JSONObject jsonObject = JSONObject.parseObject(result); JSONObject jsonObject = JSONObject.parseObject(result);
@ -504,7 +504,7 @@ public class AttendanceSzjTask {
public void syncAttendanceData() { public void syncAttendanceData() {
log.info("开始同步数智建考勤记录...{}",DateUtils.dateTimeStr()); log.info("开始同步数智建考勤记录...{}",DateUtils.dateTimeStr());
String startTime=DateUtil.formatDate(new Date()); String startTime=DateUtil.formatDate(new Date());
String endTime=DateUtil.formatDate(DateUtil.offsetDay(new Date(),1)); String endTime=DateUtil.formatDate(new Date());
syncAttendanceData(startTime,endTime); syncAttendanceData(startTime,endTime);
} }
@ -513,8 +513,8 @@ public class AttendanceSzjTask {
*/ */
public void syncLastWeekAttendanceData() { public void syncLastWeekAttendanceData() {
log.info("开始同步数智建考勤记录...{}",DateUtils.dateTimeStr()); log.info("开始同步数智建考勤记录...{}",DateUtils.dateTimeStr());
String startTime=DateUtil.formatDate(DateUtil.offsetDay(new Date(),-6)); String startTime=DateUtil.formatDate(DateUtil.offsetDay(new Date(),-7));
String endTime=DateUtil.formatDate(DateUtil.offsetDay(new Date(),1)); String endTime=DateUtil.formatDate(new Date());
syncAttendanceData(startTime,endTime); syncAttendanceData(startTime,endTime);
} }
@ -544,7 +544,6 @@ public class AttendanceSzjTask {
try { try {
String token = getToken(jSONObject.getString("secret")); String token = getToken(jSONObject.getString("secret"));
doSyncAttendance(token, item,0,startTime,endTime); doSyncAttendance(token, item,0,startTime,endTime);
System.out.println("====完成====");
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();
} }
@ -597,8 +596,6 @@ public class AttendanceSzjTask {
att.setCompanyName(user.getCompanyName()); att.setCompanyName(user.getCompanyName());
att.setCompanyTypeId(user.getCompanyTypeId()); att.setCompanyTypeId(user.getCompanyTypeId());
QuartzProjectAttendanceGroup groupWhere=new QuartzProjectAttendanceGroup(); QuartzProjectAttendanceGroup groupWhere=new QuartzProjectAttendanceGroup();
groupWhere.setCfgid(cfg.getId());
groupWhere.setTeamId(NumberUtil.parseLong(user.getGroupId()));
List<QuartzProjectAttendanceGroup> groupList=groupService.selectSurProjectAttendanceGroupList(groupWhere); List<QuartzProjectAttendanceGroup> groupList=groupService.selectSurProjectAttendanceGroupList(groupWhere);
if(!groupList.isEmpty()){ if(!groupList.isEmpty()){
QuartzProjectAttendanceGroup group=groupList.get(0); QuartzProjectAttendanceGroup group=groupList.get(0);
@ -627,7 +624,7 @@ public class AttendanceSzjTask {
} }
} }
if(atts.size()==100){ if(atts.size()==100){
doSyncAttendance(token,cfg,offset,startTime,endTime); doSyncAttendance(token,cfg,offset+1,startTime,endTime);
} }
} }

View File

@ -132,7 +132,7 @@ 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( ifnull( attendance_time, attendance_out_time ) ) = date(#{attendanceTime})</if> <if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) = date(#{attendanceTime})</if>
</where> </where>
order by id desc order by id desc
</select> </select>

View File

@ -65,7 +65,7 @@ public class LaborController extends BaseController {
@GetMapping("/groupAttendanceLastWeek/{type}/{prjId}") @GetMapping("/groupAttendanceLastWeek/{type}/{prjId}")
public AjaxResult groupAttendanceLastWeek(@PathVariable("type")String type, @PathVariable("prjId") Long prjId){ public AjaxResult groupAttendanceLastWeek(@PathVariable("type")String type, @PathVariable("prjId") Long prjId){
Date dateEnd=new DateTime(); Date dateEnd=new DateTime();
Date dateStart=DateUtil.offsetDay(dateEnd,-6); Date dateStart=DateUtil.offsetDay(dateEnd,-7);
if("uni".equals(type.toLowerCase())){ if("uni".equals(type.toLowerCase())){
JSONArray sList=attendanceUbiDataService.groupAttendanceLastWeek(prjId,dateStart,dateEnd); JSONArray sList=attendanceUbiDataService.groupAttendanceLastWeek(prjId,dateStart,dateEnd);
return AjaxResult.success(sList); return AjaxResult.success(sList);