|
@@ -741,8 +741,8 @@ public class WeixinUserImpl implements IWeixinUserService{
|
|
|
now.add(Calendar.DAY_OF_MONTH, -30);
|
|
|
startDate2 = now.getTime().getTime()/1000;
|
|
|
stDate2 = now.getTime();
|
|
|
- list.addAll(WeixinVacationList(String.valueOf(startDate), String.valueOf(endDate),"5",""));
|
|
|
- list.addAll(WeixinVacationList(String.valueOf(startDate2), String.valueOf(startDate),"5",""));
|
|
|
+ list.addAll(WeixinVacationList(String.valueOf(startDate), String.valueOf(endDate),"","Bs7yC3swLeNVwa2WyLsSXVL5XV6kVJmnEQTwW4cFS"));
|
|
|
+ list.addAll(WeixinVacationList(String.valueOf(startDate2), String.valueOf(startDate),"","Bs7yC3swLeNVwa2WyLsSXVL5XV6kVJmnEQTwW4cFS"));
|
|
|
for (String ls:list){//循环审批id
|
|
|
workOvertime workOvertime = WeixinWorks(ls);
|
|
|
if (workOvertime!=null) {
|
|
@@ -805,20 +805,18 @@ public class WeixinUserImpl implements IWeixinUserService{
|
|
|
@Override
|
|
|
public Map<String, Object> UserQuits() throws IOException, ParseException {
|
|
|
Calendar now = Calendar.getInstance();//获取系统时间实列
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
- Date stDate =null;
|
|
|
- Date enDate = now.getTime();
|
|
|
- now.add(Calendar.DAY_OF_MONTH, -30);
|
|
|
- now.add(Calendar.DAY_OF_MONTH, -30);
|
|
|
- stDate=now.getTime();
|
|
|
- List<UserQuit> lists = userQuitService.lists(sdf.format(stDate), sdf.format(enDate));
|
|
|
+ List<UserQuit> lists = userQuitService.lists(DateUtils.getDate("yyyy-MM-dd HH:mm:ss"));
|
|
|
+ List<String>userids=new ArrayList<>();
|
|
|
if (lists!=null&&lists.size()>0){
|
|
|
lists.forEach(str->{
|
|
|
SysUser user =new SysUser();
|
|
|
user.setId(str.getUserId());
|
|
|
user.setEmploymentStatus(30);
|
|
|
sysUserService.updateById(user);
|
|
|
+ userids.add(str.getUserId());
|
|
|
});
|
|
|
+ }if (userids!=null&&userids.size()>0){
|
|
|
+ userQuitService.updateByUserid(userids);
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
@@ -869,13 +867,8 @@ public class WeixinUserImpl implements IWeixinUserService{
|
|
|
@Override
|
|
|
public Map<String, Object> editUserChange() throws IOException, ParseException {
|
|
|
Calendar now = Calendar.getInstance();//获取系统时间实列
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
- Date stDate =null;
|
|
|
- Date enDate = now.getTime();
|
|
|
- now.add(Calendar.DAY_OF_MONTH, -30);
|
|
|
- now.add(Calendar.DAY_OF_MONTH, -30);
|
|
|
- stDate=now.getTime();
|
|
|
- List<UserChage> userChages = userChageService.listDate(sdf.format(stDate), sdf.format(enDate));
|
|
|
+ List<UserChage> userChages = userChageService.listDate(DateUtils.getDate("yyyy-MM-dd HH:mm:ss"));
|
|
|
+ List<String>userids=new ArrayList<>();
|
|
|
if (userChages!=null&&userChages.size()>0){
|
|
|
userChages.forEach(str->{
|
|
|
SysUser sysUser=new SysUser();
|
|
@@ -899,7 +892,10 @@ public class WeixinUserImpl implements IWeixinUserService{
|
|
|
}
|
|
|
}
|
|
|
sysUserService.updateById(sysUser);
|
|
|
+ userids.add(str.getUserId());
|
|
|
});
|
|
|
+ }if (userids!=null&&userids.size()>0){
|
|
|
+ userChageService.updateByUserids(userids);
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
@@ -934,9 +930,9 @@ public class WeixinUserImpl implements IWeixinUserService{
|
|
|
now.add(Calendar.DAY_OF_MONTH, -30);
|
|
|
startDate2 = now.getTime().getTime()/1000;
|
|
|
stDate2 = now.getTime();
|
|
|
- list.addAll(WeixinVacationList(String.valueOf(startDate), String.valueOf(endDate),"2",""));
|
|
|
- list.addAll(WeixinVacationList(String.valueOf(startDate2), String.valueOf(startDate),"2",""));
|
|
|
- makeUpCardService.deleteDate(sdf.format(startDate2));
|
|
|
+ list.addAll(WeixinVacationList(String.valueOf(startDate), String.valueOf(endDate),"","3TmB1h5HqrhwHanzxLTSX1x44zz7djoVyWTbQHWn"));
|
|
|
+ list.addAll(WeixinVacationList(String.valueOf(startDate2), String.valueOf(startDate),"","3TmB1h5HqrhwHanzxLTSX1x44zz7djoVyWTbQHWn"));
|
|
|
+ //makeUpCardService.deleteDate(sdf.format(startDate2));
|
|
|
List<MakeUpCard>ls=new ArrayList<>();
|
|
|
list.forEach(str->{
|
|
|
try {
|
|
@@ -980,10 +976,13 @@ public class WeixinUserImpl implements IWeixinUserService{
|
|
|
if (weixinApproval != null&&weixinApproval.getSp_status().equals("2")) {//获取数据库字段所需的数据
|
|
|
work=new MakeUpCard();
|
|
|
work.setCode(weixinApproval.getSp_no());
|
|
|
+ work.setId(weixinApproval.getSp_no());
|
|
|
String us = weixinApproval.getApplyer().toString();
|
|
|
mapTypes = JSON.parseObject(us);
|
|
|
work.setUserId(mapTypes.get("userid").toString());
|
|
|
- work.setDept(mapTypes.get("partyid").toString());
|
|
|
+ if (mapTypes.get("partyid")!=null&&!"".equals(mapTypes.get("partyid"))) {
|
|
|
+ work.setDept(mapTypes.get("partyid").toString());
|
|
|
+ }
|
|
|
work.setCommitDate(new Date(Long.valueOf(weixinApproval.getApply_time()) * 1000));
|
|
|
List<Object> apply_data = weixinApproval.getApply_data();
|
|
|
String o = apply_data.get(0).toString();
|
|
@@ -1115,9 +1114,9 @@ public class WeixinUserImpl implements IWeixinUserService{
|
|
|
});
|
|
|
for (Map ll : tl) {
|
|
|
Object s = ll.get("control");
|
|
|
+ Map value = null;
|
|
|
+ Map types = null;
|
|
|
if (s.equals("Vacation")) {
|
|
|
- Map value = null;
|
|
|
- Map types = null;
|
|
|
value = (Map) ll.get("value");
|
|
|
value = (Map) value.get("vacation");
|
|
|
types = (Map) value.get("selector");
|
|
@@ -1138,6 +1137,9 @@ public class WeixinUserImpl implements IWeixinUserService{
|
|
|
long countDa = countD / 3600;
|
|
|
|
|
|
vacation.setHolidayCount(countDa + "");
|
|
|
+ }else if (s.equals("Textarea")){
|
|
|
+ value = (Map) ll.get("value");
|
|
|
+ vacation.setDemo(value.get("text").toString());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1178,7 +1180,9 @@ public class WeixinUserImpl implements IWeixinUserService{
|
|
|
String us = weixinApproval.getApplyer().toString();
|
|
|
mapTypes = JSON.parseObject(us);
|
|
|
work.setPerson(mapTypes.get("userid").toString());
|
|
|
- work.setDept(mapTypes.get("partyid").toString());
|
|
|
+ if(mapTypes.get("partyid")!=null&&!"".equals(mapTypes.get("partyid"))) {
|
|
|
+ work.setDept(mapTypes.get("partyid").toString());
|
|
|
+ }
|
|
|
work.setCommitDate(new Date(Long.valueOf(weixinApproval.getApply_time()) * 1000));
|
|
|
List<Object> apply_data = weixinApproval.getApply_data();
|
|
|
String o = apply_data.get(0).toString();
|
|
@@ -1468,8 +1472,8 @@ public class WeixinUserImpl implements IWeixinUserService{
|
|
|
now.add(Calendar.DAY_OF_MONTH, -30);
|
|
|
startDate2 = now.getTime().getTime()/1000;
|
|
|
stDate2 = now.getTime();
|
|
|
- list.addAll(WeixinVacationList(String.valueOf(startDate), String.valueOf(endDate),"1",""));
|
|
|
- list.addAll(WeixinVacationList(String.valueOf(startDate2), String.valueOf(startDate),"1",""));
|
|
|
+ list.addAll(WeixinVacationList(String.valueOf(startDate), String.valueOf(endDate),"","Bs7yC3swLeNVwa2WyLsSXVL5XV6kVDd3Zpjq3Tycy"));
|
|
|
+ list.addAll(WeixinVacationList(String.valueOf(startDate2), String.valueOf(startDate),"","Bs7yC3swLeNVwa2WyLsSXVL5XV6kVDd3Zpjq3Tycy"));
|
|
|
for (String ls:list){//循环审批id
|
|
|
Vacation vacation = WeixinVacationdetail(ls);
|
|
|
if (vacation!=null) {
|