Commit ba5c1535 authored by 赵啸非's avatar 赵啸非

添加照片海康下载

parent c8cd0432
......@@ -92,7 +92,7 @@ public class DingTalkLoginController extends BaseCRUDJsonBodyMappingController<U
@UnAuth
public String login(@RequestBody DingTalkReq req) throws Exception {
JSONObject ret = new JSONObject();
JSONObject data = new JSONObject();
UserEntity userEntity = null;
try {
if (ObjectUtils.isEmpty(req.getCode())) {
......@@ -104,14 +104,17 @@ public class DingTalkLoginController extends BaseCRUDJsonBodyMappingController<U
throw new AppException(String.format("获取钉钉用户异常,%s", personRest.getMsg()));
}
if(ObjectUtils.isEmpty(personRest.getData())) throw new AppException(REGISTER_AUTH_FAIL, "不存在当前匹配的钉钉关联用户!");
if (ObjectUtils.isEmpty(personRest.getData()))
throw new AppException(REGISTER_AUTH_FAIL, "不存在当前匹配的钉钉关联用户!");
//根据钉钉的用户查询系统绑定的用户,获取
UserQuery userQuery = new UserQuery();
userQuery.setDingUserId(personRest.getData());
userEntity = userService.selectOne(userQuery);
if (ObjectUtils.isEmpty(userEntity))
if (ObjectUtils.isEmpty(userEntity)) {
data.put("openId", personRest.getData());
throw new AppException(REGISTER_AUTH_FAIL, "不存在当前匹配的钉钉关联用户!");
JSONObject data = new JSONObject();
}
data.put("id", userEntity.getId());
data.put("userType", userEntity.getUserType());
userEntity.setLoginTime(System.currentTimeMillis());
......
......@@ -15,11 +15,9 @@ import com.mortals.xhx.busiz.h5.req.PerformReq;
import com.mortals.xhx.busiz.h5.rsp.PerformDetailInfo;
import com.mortals.xhx.busiz.h5.rsp.PerformInfo;
import com.mortals.xhx.busiz.h5.rsp.PerformStatInfo;
import com.mortals.xhx.common.code.AppealResultEnum;
import com.mortals.xhx.common.code.AppealStatusEnum;
import com.mortals.xhx.common.code.PerformTypeEnum;
import com.mortals.xhx.common.code.ProcessStatusEnum;
import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.dao.CheckAllRecordDao;
import com.mortals.xhx.module.check.model.*;
import com.mortals.xhx.module.check.model.vo.CheckAllRecordVo;
import com.mortals.xhx.module.check.service.*;
......@@ -72,6 +70,8 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
@Autowired
private PerformAttendAppealService appealService;
@Autowired
private CheckAllRecordDao checkAllRecordDao;
/**
* 个人当天绩效统计
......@@ -88,9 +88,16 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
log.info("【{}】【请求体】--> 用户:{}", busiDesc, context.getUser().getRealName());
try {
//todo
CheckAllRecordQuery checkAllRecordQuery = new CheckAllRecordQuery();
checkAllRecordQuery.setSubAddType(SubAddTypeEnum.扣除.getValue());
checkAllRecordQuery.setStaffId(context.getUser().getCustomerId());
int totalTimes = checkAllRecordDao.getCount(checkAllRecordQuery);
PerformStatInfo performStatInfo = new PerformStatInfo();
performStatInfo.setTotalScore(RandomUtil.randomBigDecimal(new BigDecimal("15"),new BigDecimal("45")).setScale(1,BigDecimal.ROUND_HALF_UP));
performStatInfo.setTotalTimes(RandomUtil.randomInt(10,40));
performStatInfo.setTotalTimes(totalTimes);
performStatInfo.setTodayScore(RandomUtil.randomBigDecimal(new BigDecimal("2"),new BigDecimal("10")).setScale(1,BigDecimal.ROUND_HALF_UP));
performStatInfo.setTodayTimes(RandomUtil.randomInt(10));
rest.setData(performStatInfo);
......
package com.mortals.xhx.common.code;
/**
* @author karlhoo
*/
public enum OneThingRespCodeEnum {
/** 接收成功 */
SUCCESS(200, "成功"),
/** 执行失败 */
FAILED(400,"执行失败"),
;
private final Integer value;
private final String label;
OneThingRespCodeEnum(Integer value, String label) {
this.value = value;
this.label = label;
}
public int getValue() {
return this.value;
}
public String getLabel() {
return this.label;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
public enum OneThingStatusEnum implements IBaseEnum{
BOM_EDIT(401, "修订中"),
BOM_AUDIT(402, "审核中"),
BOM_PUBLISH(403, "已发布");
private int value;
private String desc;
OneThingStatusEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public static OneThingStatusEnum getByValue(int value) {
for (OneThingStatusEnum YesNoEnum : OneThingStatusEnum.values()) {
if (YesNoEnum.getValue() == value) {
return YesNoEnum;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (OneThingStatusEnum item : OneThingStatusEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* @author: finegirl
* @date: 2021/7/16 11:50
* @description: //TODO 请完善注释信息
**/
public enum OneThingTypeEnum {
UNSUBMIT(1, "资料上传"),
SUBMIT(2, "确认提交");
private int value;
private String desc;
private OneThingTypeEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static OneThingTypeEnum getByValue(int value) {
OneThingTypeEnum[] var1 = values();
int var2 = var1.length;
for(int var3 = 0; var3 < var2; ++var3) {
OneThingTypeEnum examStatus = var1[var3];
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
public static Map<String, String> getEnumMap(int... eItem) {
Map<String, String> resultMap = new LinkedHashMap();
OneThingTypeEnum[] var2 = values();
int var3 = var2.length;
for(int var4 = 0; var4 < var3; ++var4) {
OneThingTypeEnum item = var2[var4];
try {
boolean hasE = false;
int[] var7 = eItem;
int var8 = eItem.length;
for(int var9 = 0; var9 < var8; ++var9) {
int e = var7[var9];
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception var11) {
}
}
return resultMap;
}
}
\ No newline at end of file
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 政治面貌 (1.中共党员,2.中共预备党员,3.共青团员,4.群众,5.其它)枚举类
*
* @author zxfei
*/
public enum PoliticalstatusEnum {
中共党员(1, "中共党员"),
中共预备党员(2, "中共预备党员"),
共青团员(3, "共青团员"),
群众(4, "群众"),
其它(5, "其它");
private Integer value;
private String desc;
PoliticalstatusEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static PoliticalstatusEnum getByValue(Integer value) {
for (PoliticalstatusEnum politicalstatusEnum : PoliticalstatusEnum.values()) {
if (politicalstatusEnum.getValue() == value) {
return politicalstatusEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (PoliticalstatusEnum item : PoliticalstatusEnum.values()) {
try {
boolean hasE = false;
for (Integer e : eItem) {
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception ex) {
}
}
return resultMap;
}
}
\ No newline at end of file
......@@ -28,4 +28,7 @@ public interface CheckAllRecordDao {
* @return
*/
CheckAllScoreSummaryVo getScoreSummary(StaffCheckSummaryQuery query);
int getCount(CheckAllRecordQuery checkAllRecordQuery);
}
......@@ -68,9 +68,9 @@ public class CheckAllRecordDaoImpl extends SqlSessionDaoSupport implements Check
}
return result;
}
private int getCount(CheckAllRecordQuery checkAllRecordQuery) {
return (Integer)this.getSqlSession().selectOne(this.getSqlId("getListCount"), checkAllRecordQuery);
@Override
public int getCount(CheckAllRecordQuery checkAllRecordQuery) {
return this.getSqlSession().selectOne(this.getSqlId("getListCount"), checkAllRecordQuery);
}
@Override
......
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