소스 검색

【深爱-4A】【永洪】

DINGYL 3 달 전
부모
커밋
3443dfe5a1
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      src/main/java/com/uas/eis/serviceImpl/UasSyncService.java
  2. 1 1
      src/main/java/com/uas/eis/serviceImpl/YongHService.java

+ 2 - 2
src/main/java/com/uas/eis/serviceImpl/UasSyncService.java

@@ -37,11 +37,11 @@ public class UasSyncService {
 
     public List<Employee> getYongHDelUserList() {
         return  baseDao.query("select em_code,em_name,em_class,em_yonghongid,em_mobile,em_email from employee"+
-                        " where EM_YONGHONGID is not null and (EM_ISYONGHONG=0 or em_class='离职') order by em_id asc" ,Employee.class);
+                        " where em_yonghongsynced=-1 and (EM_ISYONGHONG=0 or em_class='离职') order by em_id asc" ,Employee.class);
     }
     public List<Employee> getYongHAddUserList() {
         return  baseDao.query("select em_code,em_name,em_class,em_yonghongid,em_mobile,em_email from employee "+
-                        " where nvl(EM_YONGHONGID,' ')=' ' and  em_class<>'离职' and EM_ISYONGHONG=-1 order by em_id asc"  , Employee.class);
+                        " where (nvl(EM_YONGHONGID,' ')=' ' or em_yonghongsynced=0 ) and  em_class<>'离职' and EM_ISYONGHONG=-1 order by em_id asc"  , Employee.class);
     }
 
 }

+ 1 - 1
src/main/java/com/uas/eis/serviceImpl/YongHService.java

@@ -76,7 +76,7 @@ public class YongHService {
             System.out.println(res);
             YongHResp resp= FlexJsonUtil.fromJson(res, YongHResp.class);
             if("1".equals(resp.getResults().getResult().getLevel())){
-                baseDao.updateByCondition("employee","em_isyonghong=0,EM_YONGHONGID=''","em_code='"+employee.getEm_code()+"'");
+                baseDao.updateByCondition("employee","em_yonghongsynced=0,em_isyonghong=0,EM_YONGHONGID=''","em_code='"+employee.getEm_code()+"'");
                 return true;
             }else{
                 logger.info("yonghong删除用户失败,token:{},message:{}",token,resp.getResults().getResult().getMessage());