修复数字建BUG

dev_xd
haha 2025-06-25 23:15:23 +08:00
parent 8a4261e572
commit b494391d44
6 changed files with 1030 additions and 953 deletions

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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