Merge remote-tracking branch 'origin/guoshengxiong' into guoshengxiong
This commit is contained in:
commit
68c6283193
@ -122,7 +122,7 @@ public class LoginController {
|
|||||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = false, dataType = "String"),
|
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = false, dataType = "String"),
|
||||||
})
|
})
|
||||||
@PostMapping(value = "/workerInfo/login")
|
@PostMapping(value = "/workerInfo/login")
|
||||||
public Result<WorkerInfo> workerInfoLogin(@RequestBody Map<String, Object> map) {
|
public Result<Map<String, Object>> workerInfoLogin(@RequestBody Map<String, Object> map) {
|
||||||
return Result.success(systemUserService.workerInfoLogin(map));
|
return Result.success(systemUserService.workerInfoLogin(map));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -294,7 +294,7 @@ public interface ISystemUserService extends IService<SystemUser> {
|
|||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
WorkerInfo workerInfoLogin(Map<String, Object> map);
|
Map<String, Object> workerInfoLogin(Map<String, Object> map);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否项目子账号
|
* 是否项目子账号
|
||||||
|
|||||||
@ -1767,7 +1767,7 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WorkerInfo workerInfoLogin(Map<String, Object> map) {
|
public Map<String, Object> workerInfoLogin(Map<String, Object> map) {
|
||||||
String idCard = MapUtils.getString(map, "idCard");
|
String idCard = MapUtils.getString(map, "idCard");
|
||||||
String name = MapUtils.getString(map, "name");
|
String name = MapUtils.getString(map, "name");
|
||||||
String projectSn = MapUtils.getString(map, "projectSn");
|
String projectSn = MapUtils.getString(map, "projectSn");
|
||||||
@ -1789,7 +1789,10 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
|||||||
throw new OpenAlertException("身份证号和人员姓名不匹配");
|
throw new OpenAlertException("身份证号和人员姓名不匹配");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return workerInfos.get(0);
|
WorkerInfo workerInfo = workerInfos.get(0);
|
||||||
|
Map<String, Object> paramMap = new HashMap<>();
|
||||||
|
paramMap.put("workerId", workerInfo.getId());
|
||||||
|
return (Map<String, Object>) workerInfoService.viewWorkerInfoDetail(paramMap).get("workerInfo");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -105,6 +105,9 @@ public class ZtWorkerController {
|
|||||||
requestMap.put("project_id", "1833149331474493441");
|
requestMap.put("project_id", "1833149331474493441");
|
||||||
requestMap.put("device_numbers", "E03C1CB19B121805,E03C1CB19F7A1805");
|
requestMap.put("device_numbers", "E03C1CB19B121805,E03C1CB19F7A1805");
|
||||||
String post = HttpUtil.post("http://spm3.1357.cn/hewu-api/api/realtime-records", JSON.toJSONString(requestMap));
|
String post = HttpUtil.post("http://spm3.1357.cn/hewu-api/api/realtime-records", JSON.toJSONString(requestMap));
|
||||||
|
if (!post.contains("[")) {
|
||||||
|
return Result.success(new ArrayList<>());
|
||||||
|
}
|
||||||
return Result.success(JSONArray.parseArray(post));
|
return Result.success(JSONArray.parseArray(post));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import lombok.Data;
|
|||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 项目配置
|
* @Description: 项目配置
|
||||||
* @author: pds
|
* @author: pds
|
||||||
@ -23,29 +24,41 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
public class ProjectConfig implements Serializable {
|
public class ProjectConfig implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**id*/
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@ApiModelProperty(value = "id")
|
@ApiModelProperty(value = "id")
|
||||||
private java.lang.Long id;
|
private java.lang.Long id;
|
||||||
/**项目SN*/
|
/**
|
||||||
|
* 项目SN
|
||||||
|
*/
|
||||||
@Excel(name = "项目SN", width = 15)
|
@Excel(name = "项目SN", width = 15)
|
||||||
@ApiModelProperty(value = "项目SN")
|
@ApiModelProperty(value = "项目SN")
|
||||||
private java.lang.String projectSn;
|
private java.lang.String projectSn;
|
||||||
/**人员定位类型,1卡片,2信标*/
|
/**
|
||||||
|
* 人员定位类型,1卡片,2信标
|
||||||
|
*/
|
||||||
@Excel(name = "人员定位类型,1卡片,2信标", width = 15)
|
@Excel(name = "人员定位类型,1卡片,2信标", width = 15)
|
||||||
@ApiModelProperty(value = "人员定位类型,1卡片,2信标")
|
@ApiModelProperty(value = "人员定位类型,1卡片,2信标")
|
||||||
private java.lang.Integer positionType;
|
private java.lang.Integer positionType;
|
||||||
/**手机打卡是否需要图片,0否,1是*/
|
/**
|
||||||
|
* 手机打卡是否需要图片,0否,1是
|
||||||
|
*/
|
||||||
@Excel(name = "手机打卡是否需要图片,0否,1是", width = 15)
|
@Excel(name = "手机打卡是否需要图片,0否,1是", width = 15)
|
||||||
@ApiModelProperty(value = "手机打卡是否需要图片,0否,1是")
|
@ApiModelProperty(value = "手机打卡是否需要图片,0否,1是")
|
||||||
private java.lang.Integer phoneClockImageType;
|
private java.lang.Integer phoneClockImageType;
|
||||||
|
|
||||||
/**人脸比对分数,0-100*/
|
/**
|
||||||
|
* 人脸比对分数,0-100
|
||||||
|
*/
|
||||||
@Excel(name = "人脸比对分数,0-100", width = 15)
|
@Excel(name = "人脸比对分数,0-100", width = 15)
|
||||||
@ApiModelProperty(value = "人脸比对分数,0-100")
|
@ApiModelProperty(value = "人脸比对分数,0-100")
|
||||||
private java.lang.Integer faceScore;
|
private java.lang.Integer faceScore;
|
||||||
|
|
||||||
/**手机录入人员是否需要审核,1是,0否*/
|
/**
|
||||||
|
* 手机录入人员是否需要审核,1是,0否
|
||||||
|
*/
|
||||||
@Excel(name = "手机录入人员是否需要审核,1是,0否", width = 15)
|
@Excel(name = "手机录入人员是否需要审核,1是,0否", width = 15)
|
||||||
@ApiModelProperty(value = "手机录入人员是否需要审核,1是,0否")
|
@ApiModelProperty(value = "手机录入人员是否需要审核,1是,0否")
|
||||||
private java.lang.Integer workerAuditType;
|
private java.lang.Integer workerAuditType;
|
||||||
@ -58,4 +71,7 @@ public class ProjectConfig implements Serializable {
|
|||||||
@ApiModelProperty(value = "外部平台项目审核状态,1待审核,2审核通过,3驳回")
|
@ApiModelProperty(value = "外部平台项目审核状态,1待审核,2审核通过,3驳回")
|
||||||
private java.lang.Integer projectAuditStatus;
|
private java.lang.Integer projectAuditStatus;
|
||||||
|
|
||||||
|
@Excel(name = "是否启用移动考勤,1是,0否", width = 15)
|
||||||
|
@ApiModelProperty(value = "是否启用移动考勤,1是,0否")
|
||||||
|
private java.lang.Integer isMobileAttendance;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -119,5 +119,20 @@ public class WorkerAttendanceRuleController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过i查询
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@OperLog(operModul = "劳务管理",operType = "查询考勤规则信息",operDesc = "查询考勤规则信息")
|
||||||
|
@ApiOperation(value = "查询考勤规则信息", notes = "查询考勤规则信息", httpMethod = "POST")
|
||||||
|
@ApiImplicitParam(name = "id", value = "考勤规则ID", paramType = "body", required = true, dataType = "Integer")
|
||||||
|
@PostMapping(value = "/queryById")
|
||||||
|
public Result<WorkerAttendanceRule> queryById(@RequestBody Map<String,Object> map) {
|
||||||
|
Result<WorkerAttendanceRule> result = new Result<WorkerAttendanceRule>();
|
||||||
|
WorkerAttendanceRule workerAttendanceRule = workerAttendanceRuleService.getById(MapUtils.getString(map,"id"));
|
||||||
|
result.setSuccess(true);
|
||||||
|
result.setResult(workerAttendanceRule);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,6 +60,17 @@ public class WorkerMonthAttendanceStatisticsController {
|
|||||||
return Result.success(workerMonthAttendanceStatisticsService.selectMonthAttendanceByPage(map));
|
return Result.success(workerMonthAttendanceStatisticsService.selectMonthAttendanceByPage(map));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询人员考勤统计列表", notes = "查询人员考勤统计列表", httpMethod = "POST")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "workerId", value = "人员ID", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "monthTime", value = "日期 格式2020-08", paramType = "body", required = true, dataType = "String"),
|
||||||
|
})
|
||||||
|
@PostMapping(value = "/selectMonthAttendanceByWorkerId")
|
||||||
|
public Result<EntityMap> selectMonthAttendanceByWorkerId(@RequestBody Map<String,Object> map) {
|
||||||
|
return Result.success(workerMonthAttendanceStatisticsService.selectMonthAttendanceByWorkerId(map));
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "查询人员指定月份考勤统计", notes = "查询人员指定月份考勤统计", httpMethod = "POST")
|
@ApiOperation(value = "查询人员指定月份考勤统计", notes = "查询人员指定月份考勤统计", httpMethod = "POST")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "personSn", value = "人员唯一标识", paramType = "body", required = true, dataType = "String"),
|
@ApiImplicitParam(name = "personSn", value = "人员唯一标识", paramType = "body", required = true, dataType = "String"),
|
||||||
|
|||||||
@ -133,6 +133,11 @@ public class WorkerAttendance implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "辅助考勤(补卡)原因")
|
@ApiModelProperty(value = "辅助考勤(补卡)原因")
|
||||||
private java.lang.String reissueCardReason;
|
private java.lang.String reissueCardReason;
|
||||||
|
/**
|
||||||
|
* 打卡地址
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "打卡地址")
|
||||||
|
private java.lang.String address;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 出入时间的小时
|
* 出入时间的小时
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import lombok.Data;
|
|||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 考勤规则
|
* @Description: 考勤规则
|
||||||
* @author: pds
|
* @author: pds
|
||||||
@ -23,60 +24,95 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
public class WorkerAttendanceRule implements Serializable {
|
public class WorkerAttendanceRule implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**id*/
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@ApiModelProperty(value = "id")
|
@ApiModelProperty(value = "id")
|
||||||
private java.lang.Long id;
|
private java.lang.Long id;
|
||||||
/**项目sn*/
|
/**
|
||||||
|
* 项目sn
|
||||||
|
*/
|
||||||
@Excel(name = "项目sn", width = 15)
|
@Excel(name = "项目sn", width = 15)
|
||||||
@ApiModelProperty(value = "项目sn")
|
@ApiModelProperty(value = "项目sn")
|
||||||
private java.lang.String projectSn;
|
private java.lang.String projectSn;
|
||||||
/**规则名称*/
|
/**
|
||||||
|
* 规则名称
|
||||||
|
*/
|
||||||
@Excel(name = "规则名称", width = 15)
|
@Excel(name = "规则名称", width = 15)
|
||||||
@ApiModelProperty(value = "规则名称")
|
@ApiModelProperty(value = "规则名称")
|
||||||
private java.lang.String ruleName;
|
private java.lang.String ruleName;
|
||||||
/**开始上班时间*/
|
/**
|
||||||
|
* 开始上班时间
|
||||||
|
*/
|
||||||
@Excel(name = "开始上班时间", width = 15)
|
@Excel(name = "开始上班时间", width = 15)
|
||||||
@ApiModelProperty(value = "开始上班时间")
|
@ApiModelProperty(value = "开始上班时间")
|
||||||
private java.lang.String startTime;
|
private java.lang.String startTime;
|
||||||
/**结束上班时间*/
|
/**
|
||||||
|
* 结束上班时间
|
||||||
|
*/
|
||||||
@Excel(name = "结束上班时间", width = 15)
|
@Excel(name = "结束上班时间", width = 15)
|
||||||
@ApiModelProperty(value = "结束上班时间")
|
@ApiModelProperty(value = "结束上班时间")
|
||||||
private java.lang.String endTime;
|
private java.lang.String endTime;
|
||||||
/**迟到多久不算迟到*/
|
/**
|
||||||
|
* 迟到多久不算迟到
|
||||||
|
*/
|
||||||
@Excel(name = "迟到多久不算迟到", width = 15)
|
@Excel(name = "迟到多久不算迟到", width = 15)
|
||||||
@ApiModelProperty(value = "迟到多久不算迟到")
|
@ApiModelProperty(value = "迟到多久不算迟到")
|
||||||
private java.lang.Integer notLater;
|
private java.lang.Integer notLater;
|
||||||
/**迟到多久算旷工*/
|
/**
|
||||||
|
* 迟到多久算旷工
|
||||||
|
*/
|
||||||
@Excel(name = "迟到多久算旷工", width = 15)
|
@Excel(name = "迟到多久算旷工", width = 15)
|
||||||
@ApiModelProperty(value = "迟到多久算旷工")
|
@ApiModelProperty(value = "迟到多久算旷工")
|
||||||
private java.lang.Integer yesLater;
|
private java.lang.Integer yesLater;
|
||||||
/**早退多久不算早退*/
|
/**
|
||||||
|
* 早退多久不算早退
|
||||||
|
*/
|
||||||
@Excel(name = "早退多久不算早退", width = 15)
|
@Excel(name = "早退多久不算早退", width = 15)
|
||||||
@ApiModelProperty(value = "早退多久不算早退")
|
@ApiModelProperty(value = "早退多久不算早退")
|
||||||
private java.lang.Integer notAdvance;
|
private java.lang.Integer notAdvance;
|
||||||
/**早退多久算旷工*/
|
/**
|
||||||
|
* 早退多久算旷工
|
||||||
|
*/
|
||||||
@Excel(name = "早退多久算旷工", width = 15)
|
@Excel(name = "早退多久算旷工", width = 15)
|
||||||
@ApiModelProperty(value = "早退多久算旷工")
|
@ApiModelProperty(value = "早退多久算旷工")
|
||||||
private java.lang.Integer yesAdvance;
|
private java.lang.Integer yesAdvance;
|
||||||
/**是否启用加班*/
|
/**
|
||||||
|
* 是否启用加班
|
||||||
|
*/
|
||||||
@Excel(name = "是否启用加班", width = 15)
|
@Excel(name = "是否启用加班", width = 15)
|
||||||
@ApiModelProperty(value = "是否启用加班")
|
@ApiModelProperty(value = "是否启用加班")
|
||||||
private java.lang.Integer yesOrNotOvertime;
|
private java.lang.Integer yesOrNotOvertime;
|
||||||
/**几点之后算加班*/
|
/**
|
||||||
|
* 几点之后算加班
|
||||||
|
*/
|
||||||
@Excel(name = "几点之后算加班", width = 15)
|
@Excel(name = "几点之后算加班", width = 15)
|
||||||
@ApiModelProperty(value = "几点之后算加班")
|
@ApiModelProperty(value = "几点之后算加班")
|
||||||
private java.lang.String overtimeDate;
|
private java.lang.String overtimeDate;
|
||||||
/**是否需要中午外出,0否,1是*/
|
/**
|
||||||
|
* 是否需要中午外出,0否,1是
|
||||||
|
*/
|
||||||
@Excel(name = "是否需要中午外出,0否,1是", width = 15)
|
@Excel(name = "是否需要中午外出,0否,1是", width = 15)
|
||||||
@ApiModelProperty(value = "是否需要中午外出,0否,1是")
|
@ApiModelProperty(value = "是否需要中午外出,0否,1是")
|
||||||
private java.lang.Integer isRest;
|
private java.lang.Integer isRest;
|
||||||
/**上午下班时间*/
|
/**
|
||||||
|
* 上午下班时间
|
||||||
|
*/
|
||||||
@Excel(name = "上午下班时间", width = 15)
|
@Excel(name = "上午下班时间", width = 15)
|
||||||
@ApiModelProperty(value = "上午下班时间")
|
@ApiModelProperty(value = "上午下班时间")
|
||||||
private java.lang.String morningEndTime;
|
private java.lang.String morningEndTime;
|
||||||
/**下午上班时间*/
|
/**
|
||||||
|
* 下午上班时间
|
||||||
|
*/
|
||||||
@Excel(name = "下午上班时间", width = 15)
|
@Excel(name = "下午上班时间", width = 15)
|
||||||
@ApiModelProperty(value = "下午上班时间")
|
@ApiModelProperty(value = "下午上班时间")
|
||||||
private java.lang.String afternoonStartTime;
|
private java.lang.String afternoonStartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否启用一天一打卡(1:启用;0:不启用;)
|
||||||
|
*/
|
||||||
|
@Excel(name = "是否启用一天一打卡(1:启用;0:不启用;)", width = 15)
|
||||||
|
@ApiModelProperty(value = "是否启用一天一打卡(1:启用;0:不启用;)")
|
||||||
|
private java.lang.Integer onceAttendance;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,6 +28,8 @@ public interface WorkerMonthAttendanceStatisticsMapper extends BaseMapper<Worker
|
|||||||
*/
|
*/
|
||||||
List<EntityMap> selectMonthAttendanceByPage(Page<EntityMap> page, @Param("param") Map<String, Object> map);
|
List<EntityMap> selectMonthAttendanceByPage(Page<EntityMap> page, @Param("param") Map<String, Object> map);
|
||||||
|
|
||||||
|
EntityMap selectMonthAttendanceByWorkerId( @Param("param") Map<String, Object> map);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新人员考勤统计
|
* 更新人员考勤统计
|
||||||
*
|
*
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
a.pass_type,
|
a.pass_type,
|
||||||
a.project_sn,
|
a.project_sn,
|
||||||
a.temperature,
|
a.temperature,
|
||||||
|
a.address,
|
||||||
IF(a.image_url IS NOT NULL, a.image_url, b.id_card_big_photo_url) image_url,
|
IF(a.image_url IS NOT NULL, a.image_url, b.id_card_big_photo_url) image_url,
|
||||||
b.worker_name,
|
b.worker_name,
|
||||||
b.id_card
|
b.id_card
|
||||||
|
|||||||
@ -42,6 +42,24 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMonthAttendanceByWorkerId" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||||
|
select
|
||||||
|
a.worker_name,a.id_card,a.project_sn,a.person_sn,a.person_type, c.query_time,a.inService_type,
|
||||||
|
day1, day2, day3,
|
||||||
|
day4, day5, day6, day7, day8, day9, day10, day11, day12, day13, day14, day15, day16,
|
||||||
|
day17, day18, day19, day20, day21, day22, day23, day24, day25, day26, day27, day28,
|
||||||
|
IF(29>DAY(last_day(str_to_date(CONCAT(#{param.monthTime},'-01'),'%Y-%m-%d'))),NULL,day29) day29,
|
||||||
|
IF(30>DAY(last_day(str_to_date(CONCAT(#{param.monthTime},'-01'),'%Y-%m-%d'))),NULL,day30) day30,
|
||||||
|
IF(31>DAY(last_day(str_to_date(CONCAT(#{param.monthTime},'-01'),'%Y-%m-%d'))),NULL,day31) day31
|
||||||
|
from worker_info a
|
||||||
|
LEFT JOIN worker_month_attendance_statistics c ON a.person_sn=c.person_sn AND c.query_time=#{param.monthTime}
|
||||||
|
where a.project_sn=#{param.projectSn}
|
||||||
|
<if test="param.workerId != null and param.workerId != ''">
|
||||||
|
and a.id=#{param.workerId}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectWorkerMonthAttendanceTotal" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
<select id="selectWorkerMonthAttendanceTotal" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||||
select a.worker_name,
|
select a.worker_name,
|
||||||
a.id_card,
|
a.id_card,
|
||||||
|
|||||||
@ -26,6 +26,7 @@ public interface IWorkerMonthAttendanceStatisticsService extends IService<Worker
|
|||||||
*/
|
*/
|
||||||
IPage<EntityMap> selectMonthAttendanceByPage(Map<String, Object> map);
|
IPage<EntityMap> selectMonthAttendanceByPage(Map<String, Object> map);
|
||||||
|
|
||||||
|
EntityMap selectMonthAttendanceByWorkerId(Map<String, Object> map);
|
||||||
/**
|
/**
|
||||||
* 统计前一天的考勤状况
|
* 统计前一天的考勤状况
|
||||||
*
|
*
|
||||||
|
|||||||
@ -515,6 +515,7 @@ public class WorkerAttendanceServiceImpl extends ServiceImpl<WorkerAttendanceMap
|
|||||||
workerAttendance.setAttendanceType(1);
|
workerAttendance.setAttendanceType(1);
|
||||||
workerAttendance.setCardType(7);
|
workerAttendance.setCardType(7);
|
||||||
workerAttendance.setImageUrl(MapUtils.getString(map, "photoUrl"));
|
workerAttendance.setImageUrl(MapUtils.getString(map, "photoUrl"));
|
||||||
|
workerAttendance.setAddress(MapUtils.getString(map, "address"));
|
||||||
workerAttendanceMapper.insert(workerAttendance);
|
workerAttendanceMapper.insert(workerAttendance);
|
||||||
if (environmentUtil.isJlwProd()) {
|
if (environmentUtil.isJlwProd()) {
|
||||||
// 向政务平台发送数据
|
// 向政务平台发送数据
|
||||||
|
|||||||
@ -106,6 +106,27 @@ public class WorkerMonthAttendanceStatisticsServiceImpl extends ServiceImpl<Work
|
|||||||
return page.setRecords(list);
|
return page.setRecords(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EntityMap selectMonthAttendanceByWorkerId(Map<String, Object> map) {
|
||||||
|
EntityMap entityMap = workerMonthAttendanceStatisticsMapper.selectMonthAttendanceByWorkerId(map);
|
||||||
|
Integer type = MapUtils.getInteger(map, "type");
|
||||||
|
if (Objects.equals(type, 1)) {
|
||||||
|
//1只显示出勤和未出勤(除了未出勤就是出勤),0无考勤,1、正常 2、迟到 3、早退 4、加班5、缺卡
|
||||||
|
for (Map.Entry<String, Object> entry : entityMap.entrySet()) {
|
||||||
|
String key = entry.getKey();
|
||||||
|
if (StringUtils.startsWith(key, "day")) {
|
||||||
|
if (entry.getValue() != null) {
|
||||||
|
Integer value = (Integer) entry.getValue();
|
||||||
|
if (!Objects.equals(value, 0)) {
|
||||||
|
entityMap.put(key, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return entityMap;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<EntityMap> selectProjectMonthAttendanceList(HashMap<String, Object> param) {
|
public List<EntityMap> selectProjectMonthAttendanceList(HashMap<String, Object> param) {
|
||||||
return workerMonthAttendanceStatisticsMapper.selectProjectMonthAttendanceList(param);
|
return workerMonthAttendanceStatisticsMapper.selectProjectMonthAttendanceList(param);
|
||||||
@ -562,13 +583,15 @@ public class WorkerMonthAttendanceStatisticsServiceImpl extends ServiceImpl<Work
|
|||||||
//如果中午有休息
|
//如果中午有休息
|
||||||
int notLater = 0; //迟到多久不算迟到
|
int notLater = 0; //迟到多久不算迟到
|
||||||
int notAdvance = 0; //早退多久不算早退
|
int notAdvance = 0; //早退多久不算早退
|
||||||
|
int yesAdvance = 0; //早退多久算旷工
|
||||||
|
int yesLater = 0; //迟到多久算旷工
|
||||||
WorkerAttendanceRule attendanceRule = null;
|
WorkerAttendanceRule attendanceRule = null;
|
||||||
if (workerAttendanceRuleId != null) {
|
if (workerAttendanceRuleId != null) {
|
||||||
attendanceRule = workerAttendanceRuleMapper.selectById(workerAttendanceRuleId);
|
attendanceRule = workerAttendanceRuleMapper.selectById(workerAttendanceRuleId);
|
||||||
}
|
}
|
||||||
if (attendanceRule == null) {
|
if (attendanceRule == null) {
|
||||||
startTimes = "09:00";
|
startTimes = "09:00";
|
||||||
endTimes = "17:00";
|
endTimes = "18:00";
|
||||||
} else {
|
} else {
|
||||||
startTimes = attendanceRule.getStartTime();
|
startTimes = attendanceRule.getStartTime();
|
||||||
endTimes = attendanceRule.getEndTime();
|
endTimes = attendanceRule.getEndTime();
|
||||||
@ -576,7 +599,7 @@ public class WorkerMonthAttendanceStatisticsServiceImpl extends ServiceImpl<Work
|
|||||||
startTimes = "09:00";
|
startTimes = "09:00";
|
||||||
}
|
}
|
||||||
if (StringUtils.isEmpty(endTimes)) {
|
if (StringUtils.isEmpty(endTimes)) {
|
||||||
endTimes = "09:00";
|
endTimes = "18:00";
|
||||||
}
|
}
|
||||||
if (attendanceRule.getNotLater() != null) {
|
if (attendanceRule.getNotLater() != null) {
|
||||||
notLater = attendanceRule.getNotLater();
|
notLater = attendanceRule.getNotLater();
|
||||||
@ -584,7 +607,25 @@ public class WorkerMonthAttendanceStatisticsServiceImpl extends ServiceImpl<Work
|
|||||||
if (attendanceRule.getNotAdvance() != null) {
|
if (attendanceRule.getNotAdvance() != null) {
|
||||||
notAdvance = attendanceRule.getNotAdvance();
|
notAdvance = attendanceRule.getNotAdvance();
|
||||||
}
|
}
|
||||||
|
if (attendanceRule.getYesAdvance() != null) {
|
||||||
|
yesAdvance = attendanceRule.getYesAdvance();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (attendanceRule != null && attendanceRule.getOnceAttendance() != null && attendanceRule.getOnceAttendance() == 1) {
|
||||||
|
Date attendanceTime = null;
|
||||||
|
if (StringUtils.isEmpty(maxTime) && StringUtils.isEmpty(minTime)) {
|
||||||
|
attendanceType = 5; //缺卡
|
||||||
|
} else {
|
||||||
|
Date startDate = sdf.parse(new StringBuilder(passTime).append(" ").append(startTimes).append(":00").toString());
|
||||||
|
Date endDate = sdf.parse(new StringBuilder(passTime).append(" ").append(endTimes).append(":00").toString());
|
||||||
|
attendanceTime = StringUtils.isEmpty(maxTime) ? sdf.parse(minTime) : sdf.parse(maxTime);
|
||||||
|
if (attendanceTime.getTime() < startDate.getTime() && attendanceTime.getTime() > endDate.getTime()) {
|
||||||
|
attendanceType = 1; //正常
|
||||||
|
} else {
|
||||||
|
attendanceType = 0; //缺勤
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
//判断进和出时间是否都有
|
//判断进和出时间是否都有
|
||||||
if (StringUtils.isEmpty(maxTime) || StringUtils.isEmpty(minTime)) {
|
if (StringUtils.isEmpty(maxTime) || StringUtils.isEmpty(minTime)) {
|
||||||
attendanceType = 5; //缺卡
|
attendanceType = 5; //缺卡
|
||||||
@ -598,22 +639,38 @@ public class WorkerMonthAttendanceStatisticsServiceImpl extends ServiceImpl<Work
|
|||||||
}
|
}
|
||||||
|
|
||||||
Date startDate = sdf.parse(new StringBuilder(passTime).append(" ").append(startTimes).append(":00").toString());
|
Date startDate = sdf.parse(new StringBuilder(passTime).append(" ").append(startTimes).append(":00").toString());
|
||||||
|
Date yesLaterDate = null;
|
||||||
|
if (yesLater > 0) {
|
||||||
|
yesLaterDate = org.apache.commons.lang.time.DateUtils.addMinutes(startDate, yesLater);
|
||||||
|
}
|
||||||
if (notLater > 0) {
|
if (notLater > 0) {
|
||||||
startDate = org.apache.commons.lang.time.DateUtils.addMinutes(startDate, notLater);
|
startDate = org.apache.commons.lang.time.DateUtils.addMinutes(startDate, notLater);
|
||||||
}
|
}
|
||||||
Date endDate = sdf.parse(new StringBuilder(passTime).append(" ").append(endTimes).append(":00").toString());
|
Date endDate = sdf.parse(new StringBuilder(passTime).append(" ").append(endTimes).append(":00").toString());
|
||||||
|
Date yesAdvanceDate = null;
|
||||||
|
if (yesAdvance > 0) {
|
||||||
|
yesAdvanceDate = org.apache.commons.lang.time.DateUtils.addMinutes(endDate, -yesAdvance);
|
||||||
|
}
|
||||||
if (notAdvance > 0) {
|
if (notAdvance > 0) {
|
||||||
endDate = org.apache.commons.lang.time.DateUtils.addMinutes(endDate, -notAdvance);
|
endDate = org.apache.commons.lang.time.DateUtils.addMinutes(endDate, -notAdvance);
|
||||||
}
|
}
|
||||||
|
if (yesLaterDate != null && minDate.getTime() > yesLaterDate.getTime()) {
|
||||||
if (minDate.getTime() > startDate.getTime()) {
|
attendanceType = 0; //缺勤
|
||||||
|
} else if (minDate.getTime() > endDate.getTime() && maxDate.getTime() > endDate.getTime()) {
|
||||||
|
attendanceType = 0; //缺勤
|
||||||
|
} else if (minDate.getTime() > startDate.getTime()) {
|
||||||
attendanceType = 2; //迟到
|
attendanceType = 2; //迟到
|
||||||
} else if (maxDate.getTime() < endDate.getTime()) {
|
} else if (maxDate.getTime() < endDate.getTime()) {
|
||||||
|
if (yesAdvanceDate != null && maxDate.getTime() < yesAdvanceDate.getTime()) {
|
||||||
|
attendanceType = 0; //缺勤
|
||||||
|
} else {
|
||||||
attendanceType = 3; //早退
|
attendanceType = 3; //早退
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
attendanceType = 1; //正常
|
attendanceType = 1; //正常
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
attendanceType = 0;
|
attendanceType = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -417,6 +417,15 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
.antMatchers("/xmgl/safetyHatData/allList").permitAll()
|
.antMatchers("/xmgl/safetyHatData/allList").permitAll()
|
||||||
.antMatchers("/xmgl/api/saveHardWareAlarm").permitAll()
|
.antMatchers("/xmgl/api/saveHardWareAlarm").permitAll()
|
||||||
.antMatchers("/xmgl/safetyHatData/exportUseHistory").permitAll()
|
.antMatchers("/xmgl/safetyHatData/exportUseHistory").permitAll()
|
||||||
|
.antMatchers("/xmgl/workerAttendance/getPersonAttendanceTime").permitAll()
|
||||||
|
.antMatchers("/xmgl/projectConfig/getProjectConfigList").permitAll()
|
||||||
|
.antMatchers("/xmgl/workerAttendance/addPhoneAttendance").permitAll()
|
||||||
|
.antMatchers("/xmgl/electricFence/checkLocation").permitAll()
|
||||||
|
.antMatchers("/xmgl/workerMonthAttendanceStatistics/selectWorkerMonthAttendanceTotal").permitAll()
|
||||||
|
.antMatchers("/xmgl/workerMonthAttendanceStatistics/selectWorkerMonthAttendanceType").permitAll()
|
||||||
|
.antMatchers("/xmgl/workerMonthAttendanceStatistics/selectMonthAttendanceByWorkerId").permitAll()
|
||||||
|
.antMatchers("/xmgl/workerAttendance/viewDayAttendanceList").permitAll()
|
||||||
|
.antMatchers("/xmgl/workerAttendanceRule/queryById").permitAll()
|
||||||
.antMatchers(HttpMethod.OPTIONS, "/**").anonymous()
|
.antMatchers(HttpMethod.OPTIONS, "/**").anonymous()
|
||||||
.anyRequest().authenticated() // 剩下所有的验证都需要验证.
|
.anyRequest().authenticated() // 剩下所有的验证都需要验证.
|
||||||
.and()
|
.and()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user