Commit 7e4da754 authored by 赵啸非's avatar 赵啸非

添加请假跨天判读

parent d1d8f0e2
...@@ -3,10 +3,12 @@ package com.mortals.xhx.base.login.web; ...@@ -3,10 +3,12 @@ package com.mortals.xhx.base.login.web;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.ap.CookieService; import com.mortals.framework.ap.CookieService;
import com.mortals.framework.ap.GlobalSysInfo; import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.ap.SysConstains; import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.IAuthTokenService; import com.mortals.framework.service.IAuthTokenService;
import com.mortals.framework.service.ICacheService; import com.mortals.framework.service.ICacheService;
import com.mortals.framework.service.IUser; import com.mortals.framework.service.IUser;
...@@ -19,12 +21,11 @@ import com.mortals.xhx.base.system.menu.model.MenuEntity; ...@@ -19,12 +21,11 @@ import com.mortals.xhx.base.system.menu.model.MenuEntity;
import com.mortals.xhx.base.system.menu.service.MenuService; import com.mortals.xhx.base.system.menu.service.MenuService;
import com.mortals.xhx.base.system.resource.service.ResourceService; import com.mortals.xhx.base.system.resource.service.ResourceService;
import com.mortals.xhx.base.system.user.model.UserEntity; import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService; import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.base.system.valid.service.ValidCodeService; import com.mortals.xhx.base.system.valid.service.ValidCodeService;
import com.mortals.xhx.common.code.GoWorkResultEnum; import com.mortals.xhx.busiz.h5.req.DingTalkReq;
import com.mortals.xhx.common.code.OffWorkResultEnum; import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.code.ProcessStatusEnum;
import com.mortals.xhx.common.code.SourceType;
import com.mortals.xhx.common.key.RedisKey; import com.mortals.xhx.common.key.RedisKey;
import com.mortals.xhx.common.pdu.HomeStatInfo; import com.mortals.xhx.common.pdu.HomeStatInfo;
import com.mortals.xhx.common.pdu.user.UserPdu; import com.mortals.xhx.common.pdu.user.UserPdu;
...@@ -54,8 +55,7 @@ import java.util.Date; ...@@ -54,8 +55,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import static com.mortals.xhx.common.key.ErrorCode.ERROR_TOKEN_EXPIRED; import static com.mortals.xhx.common.key.ErrorCode.*;
import static com.mortals.xhx.common.key.ErrorCode.ERROR_TOKEN_EXPIRED_CONTENT;
@RestController @RestController
@Slf4j @Slf4j
...@@ -70,28 +70,10 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi ...@@ -70,28 +70,10 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
private ResourceService resourceService; private ResourceService resourceService;
@Autowired @Autowired
private MenuService menuService; private MenuService menuService;
// @Autowired
// private ITokenService tokenService;
@Autowired @Autowired
private ICacheService cacheService; private ICacheService cacheService;
@Autowired @Autowired
private IAuthTokenService authTokenService; private IAuthTokenService authTokenService;
@Autowired
private AttendanceRecordService recordService;
@Autowired
private AttendanceRecordHikService recordHikService;
@Autowired
private AttendanceVacationRecordService vacationRecordService;
@Autowired
private AttendanceLeaveRecordService leaveRecordService;
@Autowired
private StaffService staffService;
@Autowired
private DeptService deptService;
@Autowired @Autowired
private IUserFeign userFeign; private IUserFeign userFeign;
...@@ -104,9 +86,9 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi ...@@ -104,9 +86,9 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
String loginName = loginForm.getLoginName(); String loginName = loginForm.getLoginName();
String password = loginForm.getPassword(); String password = loginForm.getPassword();
if(loginForm.getType()!=null && loginForm.getType()==2){ if (loginForm.getType() != null && loginForm.getType() == 2) {
loginName = LoginAESUtil.decrypt(loginName,AES_KEY,AES_IV,LoginAESUtil.AES_CBC); loginName = LoginAESUtil.decrypt(loginName, AES_KEY, AES_IV, LoginAESUtil.AES_CBC);
password = LoginAESUtil.decrypt(password,AES_KEY,AES_IV,LoginAESUtil.AES_CBC); password = LoginAESUtil.decrypt(password, AES_KEY, AES_IV, LoginAESUtil.AES_CBC);
} }
UserPdu userPdu = new UserPdu(); UserPdu userPdu = new UserPdu();
userPdu.setLoginName(loginName); userPdu.setLoginName(loginName);
...@@ -174,6 +156,56 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi ...@@ -174,6 +156,56 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
}*/ }*/
} }
@RequestMapping("locallogin")
@UnAuth
public String authlogin(@RequestBody LoginForm loginForm) throws Exception {
JSONObject ret = new JSONObject();
JSONObject data = new JSONObject();
String loginName = loginForm.getLoginName();
String password = loginForm.getPassword();
String ip = super.getRequestIP(request);
if (StringUtils.isEmpty(loginName) || StringUtils.isEmpty(password)) {
ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
ret.put(KEY_RESULT_MSG, "未获取到用户信息,请重新登录");
return ret.toJSONString();
}
UserEntity userEntity = null;
try {
loginForm.validate();
userEntity = userService.doLogin(loginName, password, ip);
userEntity.setLastLoginAddress(ip);
recordSysLog(request, userEntity, "用户登录系统成功!");
data.put("id", userEntity.getId());
data.put("userType", userEntity.getUserType());
userEntity.setLoginTime(System.currentTimeMillis());
userEntity.setToken(IdUtil.fastSimpleUUID());
userEntity.setExpireTime(DateUtils.addCurrDate(1).getTime());
String token = authTokenService.createToken(userEntity);
data.put("token", token);
ret.put(KEY_RESULT_DATA, data);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_MSG, "用户登录系统成功!");
recordSysLog(request, userEntity, "钉钉用户登录系统成功!");
return ret.toJSONString();
} catch (AppException e) {
log.error("login error ", e);
ret.put(KEY_RESULT_CODE, e.getCode());
ret.put(KEY_RESULT_MSG, super.convertException(e));
return ret.toJSONString();
} catch (Exception e) {
log.error("系统异常 error ", e);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
ret.put(KEY_RESULT_MSG, super.convertException(e));
return ret.toJSONString();
}
}
@RequestMapping("logout") @RequestMapping("logout")
public void logout(HttpServletRequest request, HttpServletResponse response) throws Exception { public void logout(HttpServletRequest request, HttpServletResponse response) throws Exception {
recordSysLog(request, "退出登录"); recordSysLog(request, "退出登录");
...@@ -238,7 +270,7 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi ...@@ -238,7 +270,7 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
cacheService.hset(RedisKey.KEY_ATTENC_TOTOAL_CACHE, DateUtil.format(new Date(), "yyyy-MM"), totalCache); cacheService.hset(RedisKey.KEY_ATTENC_TOTOAL_CACHE, DateUtil.format(new Date(), "yyyy-MM"), totalCache);
}*//* }*//*
*//* Long totalCache = cacheService.hget(RedisKey.KEY_ATTENC_TOTOAL_CACHE, DateUtil.yesterday().toDateStr(), Long.class); *//* Long totalCache = cacheService.hget(RedisKey.KEY_ATTENC_TOTOAL_CACHE, DateUtil.yesterday().toDateStr(), Long.class);
if (ObjectUtils.isEmpty(totalCache)) { if (ObjectUtils.isEmpty(totalCache)) {
totalCache = recordHikService.find(hikQuery).parallelStream().map(item -> item.getStaffId()).distinct().count(); totalCache = recordHikService.find(hikQuery).parallelStream().map(item -> item.getStaffId()).distinct().count();
cacheService.hset(RedisKey.KEY_ATTENC_TOTOAL_CACHE, DateUtil.yesterday().toDateStr(), totalCache); cacheService.hset(RedisKey.KEY_ATTENC_TOTOAL_CACHE, DateUtil.yesterday().toDateStr(), totalCache);
......
...@@ -55,6 +55,8 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq> ...@@ -55,6 +55,8 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
private PerformStaffConfService performStaffConfService; private PerformStaffConfService performStaffConfService;
@Autowired @Autowired
private PerformStaffConfDetailService performStaffConfDetailService; private PerformStaffConfDetailService performStaffConfDetailService;
@Autowired
private PerformErrorRecordService errorRecordService;
/** /**
...@@ -167,14 +169,26 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq> ...@@ -167,14 +169,26 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
@UnAuth @UnAuth
public Rest<Void> effectSave(@RequestBody EffectSaveReq req) { public Rest<Void> effectSave(@RequestBody EffectSaveReq req) {
log.info("web Api req==>{}", JSON.toJSONString(req)); // log.info("web Api req==>{}", JSON.toJSONString(req));
String busiDesc = "外部效能新增"; String busiDesc = "外部效能新增";
Rest rest = Rest.ok(busiDesc + "成功!"); Rest rest = Rest.ok(busiDesc + "成功!");
try { try {
if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!"); //如果手机号码为空 将当前记录保存到临时表中,人工手动处理
if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!"); if (ObjectUtils.isEmpty(req.getPhone())) {
boolean bool = effect(req); //保存异常数据
if (bool) throw new AppException(busiDesc + "失败!"); effectErrorSave(req);
rest = Rest.fail("手机号码为空!");
} else {
if (ObjectUtils.isEmpty(req.getRuleCode())) {
throw new AppException("绩效规则编码不能为空!");
} else {
effect(req);
}
}
//if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!");
//if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!");
// boolean bool = effect(req);
// if (bool) throw new AppException(busiDesc + "失败!");
} catch (Exception e) { } catch (Exception e) {
log.error(busiDesc, e); log.error(busiDesc, e);
return Rest.fail(e.getMessage()); return Rest.fail(e.getMessage());
...@@ -290,7 +304,7 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq> ...@@ -290,7 +304,7 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
//查询当前规则 //查询当前规则
List<PerformStaffConfDetailEntity> staffConfDetailEntities = performStaffConfDetailService.find(new PerformStaffConfDetailQuery().staffConfId(performStaffConfEntity.getId())); List<PerformStaffConfDetailEntity> staffConfDetailEntities = performStaffConfDetailService.find(new PerformStaffConfDetailQuery().staffConfId(performStaffConfEntity.getId()));
for (PerformStaffConfDetailEntity staffConfDetailEntity : staffConfDetailEntities) { for (PerformStaffConfDetailEntity staffConfDetailEntity : staffConfDetailEntities) {
if (staffConfDetailEntity.getRuleId() == rule.getId()){ if (staffConfDetailEntity.getRuleId() == rule.getId()) {
rulePass = true; rulePass = true;
break; break;
} }
...@@ -298,7 +312,7 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq> ...@@ -298,7 +312,7 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
} }
if (rulePass) break; if (rulePass) break;
} }
if(rulePass) throw new AppException("当前用户与绩效规则未配置自动核查,请在后台配置后再新增!"); if (rulePass) throw new AppException("当前用户与绩效规则未配置自动核查,请在后台配置后再新增!");
} }
private boolean complain(ComplainSaveReq req) throws AppException { private boolean complain(ComplainSaveReq req) throws AppException {
...@@ -399,6 +413,35 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq> ...@@ -399,6 +413,35 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
return save.newEntity(); return save.newEntity();
} }
private void effectErrorSave(EffectSaveReq req) throws AppException {
//效能异常保存
//StaffEntity staffEntity = getStaff(req.getPhone());
PerformRulesEntity rule = getRule(req.getRuleCode());
//checkStaffAutoConf(staffEntity, rule);
PerformErrorRecordEntity recordEntity = new PerformErrorRecordEntity();
recordEntity.initAttrValue();
recordEntity.setSubMethod(SubMethodEnum.系统自动.getValue());
BeanUtils.copyProperties(req, recordEntity);
recordEntity.setSubAddType(rule.getSubAddType());
recordEntity.setScore(rule.getScore());
recordEntity.setRuleId(rule.getId());
recordEntity.setRuleName(rule.getName());
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setDeductPerson("系统管理员");
recordEntity.setDeductTime(new Date());
recordEntity.setWindowNum(req.getWindowNum());
recordEntity.setCreateUserId(1L);
recordEntity.setCreateTime(new Date());
PerformRulesCategoryEntity categoryEntity = categoryService.get(rule.getCategoryId());
recordEntity.setCategoryName(categoryEntity == null ? "" : categoryEntity.getName());
errorRecordService.save(recordEntity);
}
private boolean other(OtherSaveReq req) throws AppException { private boolean other(OtherSaveReq req) throws AppException {
//其它保存 //其它保存
StaffEntity staffEntity = getStaff(req.getPhone()); StaffEntity staffEntity = getStaff(req.getPhone());
......
...@@ -49,8 +49,6 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> { ...@@ -49,8 +49,6 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
@Autowired @Autowired
private FeedbackAnswerService answerService; private FeedbackAnswerService answerService;
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "processStatus", FeedProcessStatusEnum.getEnumMap()); this.addDict(model, "processStatus", FeedProcessStatusEnum.getEnumMap());
} }
......
package com.mortals.xhx.module.perform.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.perform.model.PerformErrorRecordEntity;
import java.util.List;
/**
* 绩效异常记录信息Dao
* 绩效异常记录信息 DAO接口
*
* @author zxfei
* @date 2024-01-24
*/
public interface PerformErrorRecordDao extends ICRUDDao<PerformErrorRecordEntity,Long>{
}
package com.mortals.xhx.module.perform.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.perform.dao.PerformErrorRecordDao;
import com.mortals.xhx.module.perform.model.PerformErrorRecordEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 绩效异常记录信息DaoImpl DAO接口
*
* @author zxfei
* @date 2024-01-24
*/
@Repository("performErrorRecordDao")
public class PerformErrorRecordDaoImpl extends BaseCRUDDaoMybatis<PerformErrorRecordEntity,Long> implements PerformErrorRecordDao {
}
package com.mortals.xhx.module.perform.model;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.perform.model.vo.PerformErrorRecordVo;
import lombok.Data;
/**
* 绩效异常记录信息实体对象
*
* @author zxfei
* @date 2024-01-24
*/
@Data
public class PerformErrorRecordEntity extends PerformErrorRecordVo {
private static final long serialVersionUID = 1L;
/**
* 员工ID
*/
private Long staffId;
/**
* 员工姓名
*/
@Excel(name = "员工姓名")
private String staffName;
/**
* 工号
*/
@Excel(name = "工号")
private String workNum;
/**
* 窗口编号
*/
@Excel(name = "窗口编号")
private String windowNum;
/**
* 所属部门
*/
private Long deptId;
/**
* 所属部门名称
*/
@Excel(name = "所属部门名称")
private String deptName;
/**
* 违规类型(1.脱岗,2.离岗,3.玩手机,4.睡觉)
*/
@Excel(name = "违规类型", readConverterExp = "1=脱岗,2=离岗,3=玩手机,4=睡觉")
private Integer irregularType;
/**
* 发生时间
*/
@Excel(name = "发生时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date happenTime;
/**
* 持续时间,秒
*/
private Integer duration;
/**
* 报警时间
*/
private Date alarmTime;
/**
* 图片凭证地址
*/
private String snapPath;
/**
* 绩效规则分类id
*/
private Long categoryId;
/**
* 规则名称
*/
private String categoryName;
/**
* 绩效规则id
*/
private Long ruleId;
/**
* 规则名称
*/
private String ruleName;
/**
* 扣分方式(1.系统自动,2.人工添加)
*/
private Integer subMethod;
/**
* 扣分人员
*/
@Excel(name = "扣分人员")
private String deductPerson;
/**
* 扣分时间
*/
private Date deductTime;
/**
* 增减类型(1.增加,2.扣除)
*/
private Integer subAddType;
/**
* 扣分或增加分值
*/
private BigDecimal score;
/**
* 处理状态(1.未处理,2.已处理)
*/
@Excel(name = "处理状态", readConverterExp = "1=未处理,2=已处理")
private Integer processStatus;
/**
* 附件名称,多个逗号分割
*/
@Excel(name = "附件名称,多个逗号分割")
private String fileNames;
/**
* 附件下载地址,多个逗号分割
*/
@Excel(name = "附件下载地址,多个逗号分割")
private String filePaths;
/**
* 备注
*/
private String remark;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof PerformErrorRecordEntity) {
PerformErrorRecordEntity tmp = (PerformErrorRecordEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.staffId = null;
this.staffName = "";
this.workNum = "";
this.windowNum = "";
this.deptId = null;
this.deptName = "";
this.irregularType = 0;
this.happenTime = new Date();
this.duration = 0;
this.alarmTime = new Date();
this.snapPath = "";
this.categoryId = null;
this.categoryName = "";
this.ruleId = null;
this.ruleName = "";
this.subMethod = 2;
this.deductPerson = "";
this.deductTime = new Date();
this.subAddType = 1;
this.score = BigDecimal.ZERO;
this.processStatus = 1;
this.fileNames = "";
this.filePaths = "";
this.remark = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.perform.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.perform.model.PerformErrorRecordEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import com.mortals.framework.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
/**
* 绩效异常记录信息视图对象
*
* @author zxfei
* @date 2024-01-24
*/
@Data
public class PerformErrorRecordVo extends BaseEntityLong {
/** 序号,主键,自增长列表 */
private List <Long> idList;
}
\ No newline at end of file
package com.mortals.xhx.module.perform.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.perform.model.PerformErrorRecordEntity;
import com.mortals.xhx.module.perform.dao.PerformErrorRecordDao;
/**
* PerformErrorRecordService
*
* 绩效异常记录信息 service接口
*
* @author zxfei
* @date 2024-01-24
*/
public interface PerformErrorRecordService extends ICRUDService<PerformErrorRecordEntity,Long>{
PerformErrorRecordDao getDao();
}
\ No newline at end of file
package com.mortals.xhx.module.perform.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.perform.dao.PerformErrorRecordDao;
import com.mortals.xhx.module.perform.model.PerformErrorRecordEntity;
import com.mortals.xhx.module.perform.service.PerformErrorRecordService;
import lombok.extern.slf4j.Slf4j;
/**
* PerformErrorRecordService
* 绩效异常记录信息 service实现
*
* @author zxfei
* @date 2024-01-24
*/
@Service("performErrorRecordService")
@Slf4j
public class PerformErrorRecordServiceImpl extends AbstractCRUDServiceImpl<PerformErrorRecordDao, PerformErrorRecordEntity, Long> implements PerformErrorRecordService {
}
\ No newline at end of file
package com.mortals.xhx.module.perform.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.perform.model.PerformErrorRecordEntity;
import com.mortals.xhx.module.perform.service.PerformErrorRecordService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
import com.mortals.xhx.common.code.*;
/**
*
* 绩效异常记录信息
*
* @author zxfei
* @date 2024-01-24
*/
@RestController
@RequestMapping("perform/error/record")
public class PerformErrorRecordController extends BaseCRUDJsonBodyMappingController<PerformErrorRecordService,PerformErrorRecordEntity,Long> {
@Autowired
private ParamService paramService;
public PerformErrorRecordController(){
super.setModuleDesc( "绩效异常记录信息");
}
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "irregularType", IrregularTypeEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "processStatus", ProcessStatusEnum.getEnumMap());
super.init(model, context);
}
}
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"baseUrl": "http://127.0.0.1:17500/attendance" "baseUrl": "http://127.0.0.1:17500/attendance"
}, },
"test": { "test": {
"baseUrl": "http://192.168.0.98:11039/attendance", "baseUrl": "http://8.136.255.30:11039/attendance",
"baseLogin": "http://192.168.0.98:11078/base" "baseLogin": "http://192.168.0.98:11078/base"
}, },
"yibin": { "yibin": {
......
###登录
POST {{baseUrl}}/login/login
Content-Type: application/json
{
"loginName":"admin",
"password":"admin",
"securityCode":"8888"
}
> {%
client.global.set("SmsSet_id", JSON.parse(response.body).data.id);
client.global.set("authToken", JSON.parse(response.body).data.token);
%}
###绩效异常记录信息列表
POST {{baseUrl}}/perform/error/record/list
Content-Type: application/json
{
"staffName":"w4fqca",
"workNum":"v4mob9",
"windowNum":"i9nauz",
"deptName":"gxxv48",
"irregularType":181,
"happenTime":"1706025600000",
"duration":0,
"ruleName":"t6r2x1",
"deductPerson":"ty0q2g",
"score":0.00,
"processStatus":1,
"page":1,
"size":10
}
###绩效异常记录信息更新与保存
POST {{baseUrl}}/perform/error/record/save
Authorization: {{authToken}}
Content-Type: application/json
{
"staffId":260,
"staffName":"t40p8f",
"workNum":"7518ud",
"windowNum":"18i5r3",
"deptId":966,
"deptName":"js12ry",
"irregularType":512,
"happenTime":"1706025600000",
"duration":0,
"alarmTime":"1706025600000",
"snapPath":"9k91eq",
"categoryId":292,
"categoryName":"oix6e8",
"ruleId":975,
"ruleName":"73prp5",
"subMethod":2,
"deductPerson":"tp6byl",
"deductTime":"1706025600000",
"subAddType":1,
"score":0.00,
"processStatus":1,
"fileNames":"5qw28j",
"filePaths":"72lefs",
"remark":"zq2ovs",
}
> {%
client.global.set("PerformErrorRecord_id", JSON.parse(response.body).data.id);
%}
###绩效异常记录信息查看
GET {{baseUrl}}/perform/error/record/info?id={{PerformErrorRecord_id}}
Accept: application/json
###绩效异常记录信息编辑
GET {{baseUrl}}/perform/error/record/edit?id={{PerformErrorRecord_id}}
Accept: application/json
###绩效异常记录信息删除
GET {{baseUrl}}/perform/error/record/delete?id={{PerformErrorRecord_id}}
Authorization: {{authToken}}
Accept: application/json
...@@ -4,8 +4,8 @@ POST {{baseUrl}}/login/login ...@@ -4,8 +4,8 @@ POST {{baseUrl}}/login/login
Content-Type: application/json Content-Type: application/json
{ {
"loginName":"admin", "loginName":"admin1",
"password":"admin", "password":"aA123!@#",
"securityCode":"admin" "securityCode":"admin"
} }
...@@ -16,6 +16,14 @@ client.global.set("authToken", JSON.parse(response.body).data.token); ...@@ -16,6 +16,14 @@ client.global.set("authToken", JSON.parse(response.body).data.token);
###修改用户密码
POST {{baseUrl}}/user/change/password
Authorization: {{authToken}}
Content-Type: application/x-www-form-urlencoded
oldPwd=aA123!@#&newPwd=aA123!@#.
###首页 ###首页
POST {{baseUrl}}/login/index POST {{baseUrl}}/login/index
Authorization: {{authToken}} Authorization: {{authToken}}
...@@ -30,8 +38,8 @@ Authorization: {{authToken}} ...@@ -30,8 +38,8 @@ Authorization: {{authToken}}
Content-Type: application/json Content-Type: application/json
{ {
"attendanceDateStart":"2023-12-20", "attendanceDateStart":"2023-12-01",
"attendanceDateEnd":"2023-12-20" "attendanceDateEnd":"2024-01-23"
} }
###海康考勤打卡记录计算1 ###海康考勤打卡记录计算1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment