Commit a3215fb8 by 邓实川 Committed by 284718418@qq.com

员工列表优化,电子合同创建个人账户身份类型更新

parent 487bae9a
......@@ -10,7 +10,6 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
......
......@@ -210,10 +210,10 @@ public class DzhtController2 {
// List<Integer> orgCodeList = Lists.transform(list, newList -> newList.getOrgCode());
List<String> orgIds = new ArrayList<String>();
// for (Integer orgCode : orgCodeList) {
DzhtAssoQyzc qyzc = DzhtAssoQyzc.builder().build().selectOne(new QueryWrapper<DzhtAssoQyzc>().lambda()
.eq(DzhtAssoQyzc::getOrgCode, userBean.getOrgCode()).select(DzhtAssoQyzc::getOrgId));
if (qyzc != null)
orgIds.add(qyzc.getOrgId());
DzhtAssoQyzc qyzc = DzhtAssoQyzc.builder().build().selectOne(new QueryWrapper<DzhtAssoQyzc>().lambda()
.eq(DzhtAssoQyzc::getOrgCode, userBean.getOrgCode()).select(DzhtAssoQyzc::getOrgId));
if (qyzc != null)
orgIds.add(qyzc.getOrgId());
// }
JSONObject j = null;
List<JSONObject> result = new ArrayList<JSONObject>();
......@@ -276,7 +276,7 @@ public class DzhtController2 {
@GetMapping("/qryOrgSeal")
@ApiOperation(value = "查询机构模板印章", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> qryOrgSeal(@CurrentUser UserBean userBean, @RequestParam Integer offset,
@RequestParam Integer size) {
@RequestParam Integer size) {
JSONObject a = null;
try {
TokenHelper.getTokenData();// 获取鉴权
......@@ -298,7 +298,7 @@ public class DzhtController2 {
@PostMapping("/addComponents/{templateId}")
@ApiOperation(value = "添加输入项组件", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> addComponents(@PathVariable String templateId,
@RequestBody List<StructComponent> structComponents) {
@RequestBody List<StructComponent> structComponents) {
List<String> l = new ArrayList<String>();
for (StructComponent structComponent : structComponents) {
......@@ -867,7 +867,7 @@ public class DzhtController2 {
@GetMapping("/qrySignArea")
@ApiOperation(value = "查询签署区列表", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> qrySignArea(@RequestParam String flowId, @RequestParam(required = false) String accountId,
@RequestParam(required = false) String signfieldIds) {
@RequestParam(required = false) String signfieldIds) {
JSONObject json = null;
try {
TokenHelper.getTokenData();// 获取鉴权
......@@ -932,7 +932,7 @@ public class DzhtController2 {
@GetMapping("/qrySignUrl")
@ApiOperation(value = "获取签署地址", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> qrySignUrl(@CurrentUser UserBean userBean, @RequestParam String flowId,
@RequestParam(required = false) String organizeId, @RequestParam(required = false) String urlType) {
@RequestParam(required = false) String organizeId, @RequestParam(required = false) String urlType) {
JSONObject json = null;
try {
QueryWrapper<DzhtAssoGrzc> queryWrapper = new QueryWrapper<DzhtAssoGrzc>();
......@@ -954,8 +954,8 @@ public class DzhtController2 {
@PutMapping("/rushsign")
@ApiOperation(value = "流程签署人催签", httpMethod = "PUT", notes = "接口发布说明")
public Result<Object> rushsign(@CurrentUser UserBean userBean, @RequestParam String flowId,
@RequestParam(required = false) String noticeTypes,
@RequestParam(required = false) String rushsignAccountId) {
@RequestParam(required = false) String noticeTypes,
@RequestParam(required = false) String rushsignAccountId) {
try {
TokenHelper.getTokenData();// 获取鉴权
......@@ -974,7 +974,7 @@ public class DzhtController2 {
@PutMapping("/revoke")
@ApiOperation(value = "撤回签署流程", httpMethod = "PUT", notes = "接口发布说明")
public Result<Object> revoke(@CurrentUser UserBean userBean, @RequestParam String flowId,
@RequestParam(required = false) String revokeReason) {
@RequestParam(required = false) String revokeReason) {
String operatorId = null;
try {
TokenHelper.getTokenData();// 获取鉴权
......@@ -1027,16 +1027,16 @@ public class DzhtController2 {
/**
* 获取当前用户发起的签署流程
*
*
* @param flowId
* @return
*/
@GetMapping("/getFqlc")
@ApiOperation(value = "当前用户发起的签署流程", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> getFqlc(@CurrentUser UserBean userBean,
@RequestParam(required = false, defaultValue = "1") Integer currPage,
@RequestParam(required = false, defaultValue = "10") Integer pageSize,
@RequestParam(required = false) String query) {
@RequestParam(required = false, defaultValue = "1") Integer currPage,
@RequestParam(required = false, defaultValue = "10") Integer pageSize,
@RequestParam(required = false) String query) {
com.github.pagehelper.Page<Object> page = PageHelper.startPage(currPage, pageSize);
List<DzhtAssoCjlc> cjlcs = DzhtAssoCjlc.builder().build()
.selectList(new QueryWrapper<DzhtAssoCjlc>().like(query != null, "business_scene", query)
......@@ -1089,18 +1089,18 @@ public class DzhtController2 {
/**
* 获取当前用户收到的签署流程
*
*
* @param currPage
*
*
* @param flowId
* @return
*/
@GetMapping("/getSdlc")
@ApiOperation(value = "当前用户收到的签署流程", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> getSdlc(@CurrentUser UserBean userBean,
@RequestParam(required = false, defaultValue = "1") Integer currPage,
@RequestParam(required = false, defaultValue = "10") Integer pageSize,
@RequestParam(required = false) String query) {
@RequestParam(required = false, defaultValue = "1") Integer currPage,
@RequestParam(required = false, defaultValue = "10") Integer pageSize,
@RequestParam(required = false) String query) {
List<JSONObject> json = new ArrayList<JSONObject>();
com.github.pagehelper.Page<Object> page = PageHelper.startPage(currPage, pageSize);
......
/**
* @date 2019年11月15日
* @date 2019年11月15日
* @author 翁东州
* @方法中文名称:
*/
......@@ -179,7 +179,7 @@ public class YgglController {
/**
* 获取员工档案
*
*
* @param
* @return
*/
......@@ -215,7 +215,7 @@ public class YgglController {
/**
* 根据岗位id获取员工档案部门岗位名称
*
*
* @param
* @return
*/
......@@ -245,20 +245,20 @@ public class YgglController {
return ResultUtil.data(bmgw);
}
@Autowired
private RealTimeUpdate realtimeupdate;
@Autowired
private KqglAssoKqzdkfsMapper kqglassokqzdkfsmapper;
@Value("${config-8timer.machine8timerUrl}")
public String mac_command; // 回调地址
@Autowired
private UserEquiRelationMapper userequirelationmapper;
/**
* 添加员工档案
*
*
* @param userBean
* @param addygdaDto
* @return
......@@ -277,26 +277,26 @@ public class YgglController {
Integer attgroupid = addygdaDto.getAttgroupid();//考勤组id
boolean isvalid = true;
switch (zjType) {
case 0:
isvalid = IdcardUtil.isValidCard15(zjNum) || IdcardUtil.isValidCard18(zjNum);
break;
case 1:
String[] strs = IdcardUtil.isValidCard10(zjNum);
if (strs == null) {
isvalid = false;
case 0:
isvalid = IdcardUtil.isValidCard15(zjNum) || IdcardUtil.isValidCard18(zjNum);
break;
case 1:
String[] strs = IdcardUtil.isValidCard10(zjNum);
if (strs == null) {
isvalid = false;
break;
}
String str2 = strs != null && strs.length > 2 ? strs[2] : "false";
isvalid = "澳门/香港".contains(strs[0]) && "true".equals(str2);
break;
case 2:
isvalid = IdcardUtil.isValidTWCard(zjNum);
break;
case 3:
isvalid = ReUtil.isMatch(Regular.PASSPORT1, zjNum) || ReUtil.isMatch(Regular.PASSPORT2, zjNum);
break;
default:
break;
}
String str2 = strs != null && strs.length > 2 ? strs[2] : "false";
isvalid = "澳门/香港".contains(strs[0]) && "true".equals(str2);
break;
case 2:
isvalid = IdcardUtil.isValidTWCard(zjNum);
break;
case 3:
isvalid = ReUtil.isMatch(Regular.PASSPORT1, zjNum) || ReUtil.isMatch(Regular.PASSPORT2, zjNum);
break;
default:
break;
}
// if (!isvalid) {
// return ResultUtil.error("证件格式不对!");
......@@ -307,7 +307,7 @@ public class YgglController {
Integer syq = addygdaDto.getSyq();
Integer sex = addygdaDto.getSex();
Integer bmgwId = addygdaDto.getBmgwId();
QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
.eq(!StrUtil.hasBlank(phone), QyzxEmpLogin::getPhone, phone).one();
......@@ -330,58 +330,58 @@ public class YgglController {
ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum).jobType(jobType)
.jobStatus(jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq).sex(sex)
.empNum(login.getId()).orgCode(orgCode).bmgwId(bmgwId).customNum(customNum).build();
if(addygdaDto.getAttgroupid() != null) {
KqglAssoYhkqz.builder().kqzid(attgroupid).userid(login.getId()).qyid(userBean.getOrgCode()).build().insert();
List<KqglAssoKqzdkfs> kqjs = kqglassokqzdkfsmapper.selectList(new QueryWrapper<KqglAssoKqzdkfs>().lambda().eq(KqglAssoKqzdkfs::getKqzId, addygdaDto.getAttgroupid()).eq(KqglAssoKqzdkfs::getType, 1));
for(KqglAssoKqzdkfs abp:kqjs) {
KqglAssoKqj kqj = KqglAssoKqj.builder().id(abp.getDkfsid()).build().selectById();
KqglAssoYhsb kqjry = KqglAssoYhsb.builder().build().selectOne(new QueryWrapper<KqglAssoYhsb>().lambda().eq(KqglAssoYhsb::getUserId, login.getId()).eq(KqglAssoYhsb::getKqjid, kqj.getId()));
if(kqjry == null) {
// YgglMainEmp yggluser = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).eq(YgglMainEmp::getEmpNum, login.getId()));
String url = mac_command+"/addUserName";
HttpHeaders headers = new HttpHeaders();
MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
params.add("devId", kqj.getCode());
params.add("userId", login.getId());
params.add("userName", ygglMainEmp.getName());
RestTemplate restTemplate = new RestTemplate();
HttpEntity httpEntity = new HttpEntity(params, headers);
ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class);
KqglAssoYhsb.builder().build().delete(new QueryWrapper<KqglAssoYhsb>().lambda().eq(KqglAssoYhsb::getUserId, login.getId()).eq(KqglAssoYhsb::getKqjid, kqj.getId()));
HttpHeaders headers = new HttpHeaders();
MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
params.add("devId", kqj.getCode());
params.add("userId", login.getId());
params.add("userName", ygglMainEmp.getName());
RestTemplate restTemplate = new RestTemplate();
HttpEntity httpEntity = new HttpEntity(params, headers);
ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class);
KqglAssoYhsb.builder().build().delete(new QueryWrapper<KqglAssoYhsb>().lambda().eq(KqglAssoYhsb::getUserId, login.getId()).eq(KqglAssoYhsb::getKqjid, kqj.getId()));
KqglAssoYhsb uskqj = KqglAssoYhsb.builder().userId(login.getId()).kqjid(kqj.getId()).type(1).build();
UserEquiRelation isgly = userequirelationmapper.selectByuserId(login.getId());
if(isgly != null) {
uskqj.setIsGly(isgly.getIsGly());
}else {
uskqj.setIsGly(0);
}
if (!uskqj.insert())
if (!uskqj.insert())
return ResultUtil.error("操作失败--新增用户与设备关系");
}
}
}
if(syq == 0) {
ygglMainEmp.setZzTime(rzTime);
}else {
String sdf = new SimpleDateFormat("yyyy-MM-dd").format(rzTime);
String zztime = ClockInTool.requires_extra_times(sdf, syq, 4, 1);
ygglMainEmp.setZzTime(ClockInTool.strToDateLong(zztime));
}
ygglMainEmp.insert();
//假期规则初始化
String current_time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
List<KqglAssoLeaveRules> rul = KqglAssoLeaveRules.builder().build().selectList(new QueryWrapper<KqglAssoLeaveRules>().lambda().eq(KqglAssoLeaveRules::getOrgCode, orgCode));
......@@ -392,14 +392,14 @@ public class YgglController {
KqglAssoLeaveEmployeeBalance.builder().leaveRulesId(r.getId()).userid(ygglMainEmp.getEmpNum()).balanceDays(0.0).modifyUserid(userBean.getEmpNum()).modifyTimer(current_time).orgCode(userBean.getOrgCode()).build().insert();
}
}
try {
realtimeupdate.AttendanceTask(userBean.getOrgCode(), ygglMainEmp.getEmpNum(), 2,null);
} catch (ParseException e) {
e.printStackTrace();
}
return ResultUtil.data(ygglMainEmp, "添加员工成功!");
} else {
return ResultUtil.error("该手机号已被使用,请输入正确手机号");
......@@ -409,7 +409,7 @@ public class YgglController {
/**
* 修改员工档案
*
*
* @param
* @return
*/
......@@ -436,7 +436,7 @@ public class YgglController {
/**
* 员工搜索
*
*
* @param
* @return
*/
......@@ -469,13 +469,13 @@ public class YgglController {
return ResultUtil.data(ygglMainEmpPage);
}
@Autowired
private ZzglBmgwMService zzglBmgwMService;
/**
* 员工列表-分页
*
*
* @param
* @return
*/
......@@ -487,7 +487,7 @@ public class YgglController {
Integer bmgwId = empQuery.getBmgwid();
Page<YgglMainEmp> page = new Page<YgglMainEmp>(empQuery.getCurrentPage(), empQuery.getTotalPage());
List<Integer> empNums = CollUtil.toList();
if (bmgwId != null) {
List<YgglMainEmp> usersQuery = zzglBmgwMService.selectOtherlistent(userBean.getOrgCode(), bmgwId);
if (CollectionUtil.isNotEmpty(usersQuery)) {
......@@ -495,7 +495,7 @@ public class YgglController {
}else {
return ResultUtil.data(null);
}
if (CollectionUtil.isEmpty(empNums)) {
return ResultUtil.data(null);
}
......@@ -505,7 +505,7 @@ public class YgglController {
IPage<YgglMainEmp> ygglMainEmpPage = ygglMainEmpMapper.selectME(page, empQuery);
List<YgglMainEmp> ygglMainEmps = ygglMainEmpPage.getRecords();
return ResultUtil.data(page, ygglMainEmps);
}
......@@ -516,7 +516,7 @@ public class YgglController {
@ApiOperation(value = "7.导入员工档案", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 7)
public Result<JSONObject> importEmpRecord(@CurrentUser UserBean userBean,
@Validated @RequestBody ValidList<AddygdaDto> listAddygdaDto) throws Exception {
@Validated @RequestBody ValidList<AddygdaDto> listAddygdaDto) throws Exception {
Integer orgCode = userBean.getOrgCode();
// 查询所有员工手机号
......@@ -542,7 +542,7 @@ public class YgglController {
// List<AddygdaDto> list = listAddygdaDto.stream()
// .filter(o -> o != null && !listPhone.contains(o.getPhone()) && !listzjNum.contains(o.getZjNum()))
// .collect(Collectors.toList());
// 过滤掉 导入数据中, listPhone已存在 的 phone 的对象集合
List<AddygdaDto> list = listAddygdaDto.stream()
.filter(o -> o != null && !listPhone.contains(o.getPhone())).collect(Collectors.toList());
......@@ -566,26 +566,26 @@ public class YgglController {
String zjNum = ad.getZjNum();
boolean isvalid = true;
switch (zjType) {
case 0:
isvalid = IdcardUtil.isValidCard15(zjNum) || IdcardUtil.isValidCard18(zjNum);
break;
case 1:
String[] strs = IdcardUtil.isValidCard10(zjNum);
if (strs == null) {
isvalid = false;
case 0:
isvalid = IdcardUtil.isValidCard15(zjNum) || IdcardUtil.isValidCard18(zjNum);
break;
case 1:
String[] strs = IdcardUtil.isValidCard10(zjNum);
if (strs == null) {
isvalid = false;
break;
}
String str2 = strs != null && strs.length > 2 ? strs[2] : "false";
isvalid = "澳门/香港".contains(strs[0]) && "true".equals(str2);
break;
case 2:
isvalid = IdcardUtil.isValidTWCard(zjNum);
break;
case 3:
isvalid = ReUtil.isMatch(Regular.PASSPORT1, zjNum) || ReUtil.isMatch(Regular.PASSPORT2, zjNum);
break;
default:
break;
}
String str2 = strs != null && strs.length > 2 ? strs[2] : "false";
isvalid = "澳门/香港".contains(strs[0]) && "true".equals(str2);
break;
case 2:
isvalid = IdcardUtil.isValidTWCard(zjNum);
break;
case 3:
isvalid = ReUtil.isMatch(Regular.PASSPORT1, zjNum) || ReUtil.isMatch(Regular.PASSPORT2, zjNum);
break;
default:
break;
}
if (!isvalid) {
return ResultUtil.error("证件格式不对!");
......@@ -619,9 +619,9 @@ public class YgglController {
// 存放 插入失败的 数据
insertErrors.add(yme);
}
//假期规则初始化
String current_time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
List<KqglAssoLeaveRules> rul = KqglAssoLeaveRules.builder().build().selectList(new QueryWrapper<KqglAssoLeaveRules>().lambda().eq(KqglAssoLeaveRules::getOrgCode, orgCode));
......@@ -632,8 +632,8 @@ public class YgglController {
KqglAssoLeaveEmployeeBalance.builder().leaveRulesId(r.getId()).userid(login.getId()).balanceDays(0.0).modifyUserid(userBean.getEmpNum()).modifyTimer(current_time).orgCode(userBean.getOrgCode()).build().insert();
}
}
}
JSONObject obj = JSONUtil.createObj();
......@@ -649,7 +649,7 @@ public class YgglController {
/**
* 获取导入模板
*
*
* @param
* @return
* @throws IOException
......@@ -706,7 +706,7 @@ public class YgglController {
/**
* 导出员工
*
*
* @param
* @return
*/
......@@ -721,7 +721,7 @@ public class YgglController {
/**
* 获取员工教育经历表
*
*
* @param
* @return
*/
......@@ -748,7 +748,7 @@ public class YgglController {
/**
* 添加/修改员工教育经历表
*
*
* @param
* @return
*/
......@@ -764,7 +764,7 @@ public class YgglController {
/**
* 删除员工教育经历表
*
*
* @param
* @return
*/
......@@ -779,7 +779,7 @@ public class YgglController {
/**
* 获取员工培训经历信息表
*
*
* @param
* @return
*/
......@@ -807,7 +807,7 @@ public class YgglController {
/**
* 添加/修改员工培训经历信息表
*
*
* @param
* @return
*/
......@@ -815,7 +815,7 @@ public class YgglController {
@ApiOperation(value = "16.添加/修改员工培训经历信息表", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 16)
public Result<YgglAttaPxjlxxb> addpxjlxxb(@CurrentUser UserBean userBean,
@RequestBody YgglAttaPxjlxxb ygglAttaPxjlxxb) {
@RequestBody YgglAttaPxjlxxb ygglAttaPxjlxxb) {
ygglAttaPxjlxxb.setEmpNum(ygglAttaPxjlxxb.getEmpNum());
ygglAttaPxjlxxb.setOrgCode(userBean.getOrgCode());
ygglAttaPxjlxxb.insertOrUpdate();
......@@ -824,7 +824,7 @@ public class YgglController {
/**
* 删除员工培训经历信息表
*
*
* @param
* @return
*/
......@@ -839,7 +839,7 @@ public class YgglController {
/**
* 获取员工工作经历表
*
*
* @param
* @return
*/
......@@ -866,7 +866,7 @@ public class YgglController {
/**
* 添加/修改员工工作经历表
*
*
* @param
* @return
*/
......@@ -882,7 +882,7 @@ public class YgglController {
/**
* 删除员工工作经历表
*
*
* @param
* @return
*/
......@@ -897,7 +897,7 @@ public class YgglController {
/**
* 获取员工职称信息表
*
*
* @param
* @return
*/
......@@ -924,7 +924,7 @@ public class YgglController {
/**
* 添加/修改员工职称信息表
*
*
* @param
* @return
*/
......@@ -940,7 +940,7 @@ public class YgglController {
/**
* 删除员工职称信息表
*
*
* @param
* @return
*/
......@@ -955,7 +955,7 @@ public class YgglController {
/**
* 获取员工证书证件表
*
*
* @param
* @return
*/
......@@ -982,7 +982,7 @@ public class YgglController {
/**
* 添加/修改员工证书证件表
*
*
* @param
* @return
*/
......@@ -998,7 +998,7 @@ public class YgglController {
/**
* 删除员工证书证件表
*
*
* @param
* @return
*/
......@@ -1013,7 +1013,7 @@ public class YgglController {
/**
* 获取员工联系信息表
*
*
* @param
* @return
*/
......@@ -1040,7 +1040,7 @@ public class YgglController {
/**
* 添加/修改员工联系信息表
*
*
* @param
* @return
*/
......@@ -1056,7 +1056,7 @@ public class YgglController {
/**
* 删除员工联系信息表
*
*
* @param
* @return
*/
......@@ -1071,7 +1071,7 @@ public class YgglController {
/**
* 获取员工紧急联系人表
*
*
* @param
* @return
*/
......@@ -1098,7 +1098,7 @@ public class YgglController {
/**
* 添加/修改员工紧急联系人表
*
*
* @param
* @return
*/
......@@ -1114,7 +1114,7 @@ public class YgglController {
/**
* 删除员工紧急联系人表
*
*
* @param
* @return
*/
......@@ -1130,7 +1130,7 @@ public class YgglController {
// 获取工资卡信息
/**
* 获取员工工资卡信息
*
*
* @param
* @return
*/
......@@ -1156,7 +1156,7 @@ public class YgglController {
/**
* 添加/修改工资卡信息
*
*
* @param
* @return
*/
......@@ -1172,7 +1172,7 @@ public class YgglController {
/**
* 删除工资卡信息
*
*
* @param
* @return
*/
......@@ -1187,7 +1187,7 @@ public class YgglController {
/**
* 获取员工合同信息表
*
*
* @param
* @return
*/
......@@ -1214,7 +1214,7 @@ public class YgglController {
/**
* 添加/修改员工合同信息表
*
*
* @param
* @return
*/
......@@ -1230,7 +1230,7 @@ public class YgglController {
/**
* 删除员工合同信息表
*
*
* @param
* @return
*/
......@@ -1245,7 +1245,7 @@ public class YgglController {
/**
* 获取员工材料附件表
*
*
* @param
* @return
*/
......@@ -1272,7 +1272,7 @@ public class YgglController {
/**
* 添加/修改员工材料附件表
*
*
* @param
* @return
*/
......@@ -1288,7 +1288,7 @@ public class YgglController {
/**
* 删除员工材料附件表
*
*
* @param
* @return
*/
......@@ -1303,7 +1303,7 @@ public class YgglController {
/**
* 获取成长记录表
*
*
* @param
* @return
*/
......@@ -1330,7 +1330,7 @@ public class YgglController {
/**
* 添加/修改成长记录表
*
*
* @param
* @return
*/
......@@ -1346,7 +1346,7 @@ public class YgglController {
/**
* 获取单个离职员工信息(管)
*
*
* @param
* @return
*/
......@@ -1361,7 +1361,7 @@ public class YgglController {
/**
* 员工转正 0-1
*
*
* @param
* @return
*/
......@@ -1378,7 +1378,7 @@ public class YgglController {
/**
* 计划离职 type1-2
*
*
* @param
* @return
*/
......@@ -1392,11 +1392,11 @@ public class YgglController {
YgglMainEmp ygglMainEmp = ygglMainEmpMapper.selectOne(new QueryWrapper<YgglMainEmp>().lambda()
.eq(YgglMainEmp::getEmpNum, empNum)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
if (ygglMainEmp.getJobStatus() == jobStatus.LIZHIZHONG.getType()) {
return ResultUtil.success("你已在离职中");
}
YgglMainLzb ygglMainLzb = YgglMainLzb.builder().empNum(lzygQueryDto.getEmpNum()).build();
// 移动员工表数据到离职表
BeanUtil.copyProperties(ygglMainEmp, ygglMainLzb, "before_leaving_sts");
......@@ -1407,7 +1407,7 @@ public class YgglController {
.update(new UpdateWrapper<YgglMainEmp>().lambda()
.eq(YgglMainEmp::getEmpNum, empNum)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
YgglMainLzb.builder().jobStatus(jobStatus.LIZHIZHONG.getType()).lzTime(lzygQueryDto.getLzTime())
.lzyy(lzygQueryDto.getLzyy()).lzbz(lzygQueryDto.getLzbz()).build()
.update(new UpdateWrapper<YgglMainLzb>().lambda()
......@@ -1419,7 +1419,7 @@ public class YgglController {
/**
* 确认离职 type2-3
*
*
* @param
* @return
*/
......@@ -1435,8 +1435,8 @@ public class YgglController {
YgglMainLzb.builder().empNum(empNum).jobStatus(YgEnumInterface.jobStatus.YILIZHI.getType()).sjlzTime(new Date())
.build().update(new UpdateWrapper<YgglMainLzb>().lambda()
.eq(YgglMainLzb::getEmpNum, empNum)
.eq(YgglMainLzb::getOrgCode, userBean.getOrgCode()));
.eq(YgglMainLzb::getEmpNum, empNum)
.eq(YgglMainLzb::getOrgCode, userBean.getOrgCode()));
LambdaQueryWrapper<QyzxEmpEntAsso> queryWrapper = new QueryWrapper<QyzxEmpEntAsso>().lambda()
.eq(QyzxEmpEntAsso::getEmpNum, empNum)
......@@ -1448,8 +1448,8 @@ public class YgglController {
// 初始化 部门主管
zzglBmgwMMapper.update(ZzglBmgwM.builder().leader(null).build(),
new UpdateWrapper<ZzglBmgwM>().lambda()
.eq(ZzglBmgwM::getOrgCode, userBean.getOrgCode())
.eq(ZzglBmgwM::getLeader, empNum));
.eq(ZzglBmgwM::getOrgCode, userBean.getOrgCode())
.eq(ZzglBmgwM::getLeader, empNum));
// 更新当前企业
List<QyzxEmpEntAsso> listEEA = qyzxEmpEntAssoMapper.selectList(new QueryWrapper<QyzxEmpEntAsso>().lambda()
......@@ -1457,11 +1457,11 @@ public class YgglController {
if (listEEA != null && listEEA.size() > 0) {
QyzxEmpLogin.builder().id(empNum).orgId(CollUtil.getFirst(listEEA).getOrgCode()).build().updateById();
}
QyzxEmpLogin.builder().build().delete(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getOrgId, userBean.getOrgCode()).eq(QyzxEmpLogin::getId, empNum));
KqglAssoYhkqz.builder().build().delete(new QueryWrapper<KqglAssoYhkqz>().lambda().eq(KqglAssoYhkqz::getUserid, empNum).eq(KqglAssoYhkqz::getQyid, userBean.getOrgCode()));
try {
realtimeupdate.AttendanceTask(userBean.getOrgCode(), empNum, 2,null);
......@@ -1469,13 +1469,13 @@ public class YgglController {
} catch (ParseException e) {
e.printStackTrace();
}
return ResultUtil.success("确认离职员工成功");
}
/**
* 放弃离职 type 2-1
*
*
* @param
* @return
*/
......@@ -1514,7 +1514,7 @@ public class YgglController {
/**
* 查询离职员工列表
*
*
* @param
* @return
*/
......@@ -1533,7 +1533,7 @@ public class YgglController {
/**
* 展示民族/展示所有民族
*
*
* @param
* @return
*/
......@@ -1554,7 +1554,7 @@ public class YgglController {
/**
* 籍贯树
*
*
* @param
* @return
*/
......@@ -1570,7 +1570,7 @@ public class YgglController {
/**
* 查询员工列表
*
*
* @param
* @return
*/
......@@ -1590,7 +1590,7 @@ public class YgglController {
/*************** 统计图 ***************/
/**
* 查询统计图
*
*
* @return 成功信息
*/
@GetMapping("/yggl")
......@@ -1633,7 +1633,7 @@ public class YgglController {
/**
* 员工信息统计图
*
*
* @return 成功信息(weng)
*/
@GetMapping("/Cartogram")
......@@ -1711,7 +1711,7 @@ public class YgglController {
/**
* 获取员工社保公积金
*
*
* @param
* @return
*/
......@@ -1727,7 +1727,7 @@ public class YgglController {
/**
* 获取员工社保公积金
*
*
* @param
* @return
*/
......@@ -1744,7 +1744,7 @@ public class YgglController {
/**
* 添加/修改员工社保公积金
*
*
* @param
* @return
*/
......@@ -1769,7 +1769,7 @@ public class YgglController {
/**
* 删除员工社保公积金
*
*
* @param
* @return
*/
......@@ -1811,7 +1811,7 @@ public class YgglController {
/**
* 获取登录人的相关信息
*
*
* @param
* @return
*/
......@@ -1846,22 +1846,22 @@ public class YgglController {
loginInfo.setGwId(gw);
loginInfo.setGwName(gwObj != null ? gwObj.getName() : "");
loginInfo.setEntryTime(ygglMainEmp.getRzTime());
if(ygglMainEmp.getSyq()!=null) {
// System.out.println(ygglMainEmp.getSyq());
Date expireDate = DateUtil.offsetMonth(ygglMainEmp.getRzTime(), ygglMainEmp.getSyq()); // 时间偏移
loginInfo.setRegularTime(expireDate);
loginInfo.setRegularTime(expireDate);
}else {
loginInfo.setRegularTime(new Date());
loginInfo.setRegularTime(new Date());
}
}
return ResultUtil.data(loginInfo);
}
/**
* 获取登录人和上级主管的empNum和名称
*
*
* @param
* @return
*/
......@@ -1869,16 +1869,16 @@ public class YgglController {
@ApiOperation(value = "70.获取登录人和上级主管的empNum和名称", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 70)
public Result<List<LoginerChargeDto>> loginerChargers(@CurrentUser UserBean userBean) {
List<LoginerChargeDto> loginerChargeDtos = new ArrayList<LoginerChargeDto>();
Integer orgCode = userBean.getOrgCode();
ArrayList<Integer> list = new ArrayList<Integer>();
Integer empNum = userBean.getEmpNum();
Integer gw = empNumConfirm(orgCode, empNum).getBmgwId();
if(gw != null && gw > 0) {
ZzglBmgwM buid = ZzglBmgwM.builder().id(gw).build().selectById();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.eq(ZzglBmgwM::getOrgCode, orgCode).eq(ZzglBmgwM::getType, 0).list();
// 获取该员工的上级部门id 的数组list
......@@ -1894,7 +1894,7 @@ public class YgglController {
}
List<YgglMainEmp> ygglMainEmps = empNumsConfirm(orgCode, leaderList);
// List<LoginerChargeDto> loginerChargeDtos = new ArrayList<LoginerChargeDto>();
for (Integer leaderId : leaderList) {
for (YgglMainEmp m : ygglMainEmps) {
if(leaderId.equals(m.getEmpNum())) {
......@@ -1904,10 +1904,10 @@ public class YgglController {
loginerChargeDtos.add(new LoginerChargeDto(m.getEmpNum(), m.getName(), m.getHeadUrl()));
}
}
}
Collections.reverse(loginerChargeDtos);
if(loginerChargeDtos.size()>0) {
if((userBean.getEmpNum()).equals(loginerChargeDtos.get(loginerChargeDtos.size()-1).getLeaderEmpNum())) {
......@@ -1917,7 +1917,7 @@ public class YgglController {
return ResultUtil.data(loginerChargeDtos);
}
return ResultUtil.data(loginerChargeDtos);
}
// 根据传来的empNum获取该人员信息,没有则传全部
......@@ -1947,7 +1947,7 @@ public class YgglController {
/**
* 获取用户头像
*
*
* @param
* @return
*/
......@@ -1969,52 +1969,52 @@ public class YgglController {
}
return ResultUtil.data(yglList);
}
@Autowired
private KqglAssoLeaveBalanceMapper kqglassoleavebalancemapper;
@GetMapping(value = "/address_book")
@ApiOperation(value = "APP 获取通讯录", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 70)
public Result<Object> Getaddressbook(@CurrentUser UserBean userBean) {
List<AdditionalDto> userlist = kqglassoleavebalancemapper.selectAdditionalList(userBean.getOrgCode());
return ResultUtil.data(userlist);
}
@PostMapping(value = "/modify_avatar")
@ApiOperation(value = "APP_修改头像", httpMethod = "POST", notes = "接口发布说明")
public Result<YgglAttaSbgjj> Modify_Avatar(@CurrentUser UserBean userBean, @RequestBody ModifyAvatarDto modifyavatardto) {
YgglMainEmp.builder().headUrl(modifyavatardto.getAvatar_path()).build().update(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())
.eq(YgglMainEmp::getEmpNum, userBean.getEmpNum()));
QyzxEmpLogin.builder().headUrl(modifyavatardto.getAvatar_path()).build().update(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getOrgId, userBean.getOrgCode())
.eq(QyzxEmpLogin::getPhone, userBean.getQyzxEmpLogin().getPhone()));
return ResultUtil.success("上传成功");
}
@PostMapping(value = "/new_account")
@ApiOperation(value = "修改账号", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> New_account(@CurrentUser UserBean userBean, @RequestBody UserInfo userinfo) {
YgglMainEmp sjhpd = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getPhone, userinfo.getPhone())
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
if(sjhpd == null) {
YgglMainEmp.builder().phone(userinfo.getPhone()).build().update(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, userinfo.getName()).eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
QyzxEmpLogin.builder().phone(userinfo.getPhone()).build().update(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getId,userinfo.getName()).eq(QyzxEmpLogin::getOrgId, userBean.getOrgCode()));
return ResultUtil.success("修改成功");
}else {
return ResultUtil.error("该号码已存在");
}
}
}
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