Commit 10522ed2 by ilal Committed by chenzg

提交

parent 40dd6715
......@@ -1428,6 +1428,19 @@ public class AttController {
for(AttGroupBinPunchMode abp:kqjs) {
AttendanceMachine kqj = attendancemachineservice.selectByPrimaryKey(abp.getDkfsid());//查询考勤机“序列号”
YgglMainEmp yggluser = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).eq(YgglMainEmp::getEmpNum, attser[u]));
String url = mac_command+"/addUserName";
HttpHeaders headers = new HttpHeaders();
MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
params.add("devId", kqj.getCode());
params.add("userId", attser[u]);
params.add("userName", yggluser.getName());
RestTemplate restTemplate = new RestTemplate();
HttpEntity httpEntity = new HttpEntity(params, headers);
ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class);
System.err.print(request.getBody());
UserEquiRelation kqjry = userequirelationmapper.selectByuserIdkqjid(Integer.valueOf(attser[u]), kqj.getId());
if(kqjry == null) {
KqglAssoYhsb.builder().build().delete(new QueryWrapper<KqglAssoYhsb>().lambda().eq(KqglAssoYhsb::getUserId, attser[u]).eq(KqglAssoYhsb::getKqjid, kqj.getId()));
......@@ -1444,21 +1457,6 @@ public class AttController {
}
userequirelationmapper.insert(uskqj);
}
YgglMainEmp yggluser = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).eq(YgglMainEmp::getEmpNum, attser[u]));
String url = mac_command+"/addUserName";
HttpHeaders headers = new HttpHeaders();
MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
params.add("devId", kqj.getCode());
params.add("userId", attser[u]);
params.add("userName", yggluser.getName());
RestTemplate restTemplate = new RestTemplate();
HttpEntity httpEntity = new HttpEntity(params, headers);
ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class);
System.err.print(request.getBody());
}
/*****************************************************************************/
}
......
......@@ -1342,6 +1342,18 @@ public class TimeCardController {
KqglAssoYhsb kqjry = KqglAssoYhsb.builder().build().selectOne(new QueryWrapper<KqglAssoYhsb>().lambda().eq(KqglAssoYhsb::getUserId, Integer.valueOf(attser[u])).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, attser[u]));
String url = mac_command+"/addUserName";
HttpHeaders headers = new HttpHeaders();
MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
params.add("devId", kqj.getCode());
params.add("userId", attser[u]);
params.add("userName", yggluser.getName());
RestTemplate restTemplate = new RestTemplate();
HttpEntity httpEntity = new HttpEntity(params, headers);
ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class);
System.err.print(request.getBody());
KqglAssoYhsb.builder().build().delete(new QueryWrapper<KqglAssoYhsb>().lambda().eq(KqglAssoYhsb::getUserId, attser[u]).eq(KqglAssoYhsb::getKqjid, kqj.getId()));
KqglAssoYhsb uskqj = KqglAssoYhsb.builder().userId(Integer.valueOf(attser[u])).kqjid(kqj.getId()).type(1).build();
......@@ -1354,19 +1366,6 @@ public class TimeCardController {
}
if (!uskqj.insert())
return ResultUtil.error("操作失败--新增用户与设备关系");
YgglMainEmp yggluser = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).eq(YgglMainEmp::getEmpNum, attser[u]));
String url = mac_command+"/addUserName";
HttpHeaders headers = new HttpHeaders();
MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
params.add("devId", kqj.getCode());
params.add("userId", attser[u]);
params.add("userName", yggluser.getName());
RestTemplate restTemplate = new RestTemplate();
HttpEntity httpEntity = new HttpEntity(params, headers);
ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class);
System.err.print(request.getBody());
}
}
}
......
......@@ -268,9 +268,9 @@ public class YgglController {
default:
break;
}
if (!isvalid) {
return ResultUtil.error("证件格式不对!");
}
// if (!isvalid) {
// return ResultUtil.error("证件格式不对!");
// }
Integer jobType = addygdaDto.getJobType();
Date rzTime = addygdaDto.getRzTime() == null ? new Date() : addygdaDto.getRzTime();
......@@ -1846,7 +1846,7 @@ public class YgglController {
@ApiOperationSupport(order = 71)
public Result<List<YgglMainEmp>> headphotos(@CurrentUser UserBean userBean, @RequestBody List<Integer> empNumList) {
if (empNumList == null || empNumList.size() == 0) {
return ResultUtil.error("请输入empNum数组");
return ResultUtil.error("存在未设置的审批人");
}
List<YgglMainEmp> yglList = YgglMainEmp.builder().build()
.selectList(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())
......
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