Review 代码 清理异常代码
This commit is contained in:
parent
74d8266b37
commit
35e75d8e68
@ -13,7 +13,9 @@ import com.evo.common.constant.Constants;
|
||||
import com.evo.common.core.domain.AjaxResult;
|
||||
import com.evo.common.utils.Collections;
|
||||
import com.evo.common.utils.http.HttpUtils;
|
||||
import com.evo.common.utils.spring.SpringUtils;
|
||||
import com.evo.ding.DingUtils;
|
||||
import com.evo.ding.processor.callback.impl.DingCallBackUserAddOrgExchangeProcessor;
|
||||
import com.evo.personnelMatters.mapper.RzOverTimeDetailMapper;
|
||||
import com.evo.personnelMatters.mapper.RzOverTimeMapper;
|
||||
import com.evo.restaurant.service.IRzRestaurantStatisticsService;
|
||||
@ -78,6 +80,17 @@ public class TestController {
|
||||
private GZHAccessTokenService gzhAccessTokenService;
|
||||
@Resource
|
||||
private StringEncryptor stringEncryptor;
|
||||
|
||||
/**
|
||||
* 清洗加班
|
||||
*/
|
||||
@GetMapping("/ding/addUser")
|
||||
public AjaxResult dingAdduser() throws ParseException {
|
||||
String userStr = "{\"eventId\":\"8885d16e2e94467586272bac110c0083\",\"CorpId\":\"dinga5c6eeb2f797ecdbf5bf40eda33b7ba0\",\"EventType\":\"user_add_org\",\"UserId\":[\"04022527541521544736\"],\"OptStaffId\":\"190059053229069198\",\"TimeStamp\":\"1783990123767\"}";
|
||||
SpringUtils.getBean(DingCallBackUserAddOrgExchangeProcessor.class).exchange(JSONObject.parseObject(userStr));
|
||||
return AjaxResult.success("");
|
||||
}
|
||||
|
||||
/**
|
||||
* 清洗加班
|
||||
*/
|
||||
|
||||
@ -1,10 +1,5 @@
|
||||
package com.evo.system.controller;
|
||||
import com.evo.system.domain.vo.StaffNameDTO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import javax.annotation.Resource;
|
||||
import com.evo.system.service.ISysStaffService;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import com.evo.attendance.domain.vo.RzSalaryVo;
|
||||
import com.evo.common.annotation.Log;
|
||||
import com.evo.common.annotation.RepeatSubmit;
|
||||
@ -15,13 +10,14 @@ import com.evo.common.enums.BusinessType;
|
||||
import com.evo.common.utils.poi.ExcelUtil;
|
||||
import com.evo.system.domain.SysStaff;
|
||||
import com.evo.system.domain.vo.SysStaffVo;
|
||||
import com.evo.system.service.ISysStaffService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
|
||||
/**
|
||||
@ -38,8 +34,8 @@ public class SysStaffController extends BaseController
|
||||
private ISysStaffService sysStaffService;
|
||||
|
||||
@PostMapping("/checkName")
|
||||
public AjaxResult checkStaffName(@RequestBody StaffNameDTO dto) {
|
||||
boolean repeat = sysStaffService.checkNameRepeat(dto.getId(), dto.getName());
|
||||
public AjaxResult checkStaffName(@RequestBody SysStaff sysStaff) {
|
||||
boolean repeat = sysStaffService.checkNameRepeat(sysStaff.getUserId(), sysStaff.getName());
|
||||
return AjaxResult.success(repeat);
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,6 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import com.evo.system.domain.vo.StaffNameDTO;
|
||||
/**
|
||||
* 员工管理Service接口
|
||||
*
|
||||
|
||||
@ -321,9 +321,9 @@ public class SysStaffServiceImpl extends ServiceImpl<SysStaffMapper, SysStaff> i
|
||||
JSONObject deptObject = JSONObject.parseObject(deptResult).getJSONObject("result");
|
||||
String deptName = deptObject.getString("name");
|
||||
dept = deptMapper.selectByName(deptName);
|
||||
dept.setDingId(dingDeptId);
|
||||
deptMapper.updateById(dept);
|
||||
if(dept != null){
|
||||
dept.setDingId(dingDeptId);
|
||||
deptMapper.updateById(dept);
|
||||
return dept.getDeptId()+"_"+dept.getAncestors();
|
||||
}else{
|
||||
Long parentId = deptObject.getLong("parent_id");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user