瀏覽代碼

[bug-4719] 员工建议调查 部门不对

huangws 11 月之前
父節點
當前提交
da7e4adb46

+ 13 - 1
ibps-provider-root/modules/provider-platform/src/main/java/com/lc/ibps/platform/plan/job/TenMinutesJob.java

@@ -59,7 +59,8 @@ public class TenMinutesJob extends AbstractJob{
                 data.put("id_", id);
                 data.put("parent_id_",map.get("id_"));
                 data.put("di_dian_",map.get("di_dian_"));
-                data.put("bian_zhi_bu_men_",map.get("bian_zhi_bu_men_"));
+//                data.put("bian_zhi_bu_men_",map.get("bian_zhi_bu_men_"));
+                data.put("bian_zhi_bu_men_",getDepartmentByUserId(bian_zhi_ren_));
                 data.put("bian_zhi_ren_",bian_zhi_ren_);
                 data.put("create_by_",bian_zhi_ren_);
                 data.put("bian_zhi_shi_jian", formattedNow);
@@ -86,4 +87,15 @@ public class TenMinutesJob extends AbstractJob{
         commonDao.execute(updSql);
     }
 
+    public String getDepartmentByUserId(String userId){
+        String retVal = "";
+        if (StringUtils.isBlank(userId)) return retVal;
+        String sqlStr = "select * from ibps_party_employee where id_='"+userId+"'";
+        List<Map<String, Object>> list = (List<Map<String, Object>>) commonDao.query(sqlStr);
+        for (Map<String, Object> map : list) {
+            if (BeanUtils.isEmpty(map.get("POSITIONS_"))) continue;
+            retVal = map.get("POSITIONS_").toString();
+        }
+        return retVal;
+    }
 }