Browse Source

修复拟超却岗位表查看增员详情错误

flh 3 years ago
parent
commit
7eee3e4e6a

+ 3 - 12
ruoyi-ahrs/src/main/java/com/ruoyi/ahrs/post/service/impl/AhrsPostServiceImpl.java

@@ -17,6 +17,7 @@ import com.ruoyi.ahrs.postPlanChange.service.IAhrsPostPlanChangeService;
 import com.ruoyi.common.enums.FlowTypeEnums;
 import com.ruoyi.common.exception.BusinessException;
 import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.bean.BeanUtils;
 import com.ruoyi.framework.util.ShiroUtils;
 import com.ruoyi.system.domain.SysDept;
 import com.ruoyi.system.domain.SysUser;
@@ -1347,18 +1348,8 @@ public class AhrsPostServiceImpl implements IAhrsPostService {
                     //如果flag==false 则说明为增员,添加
                     if (flag == false) {
                         Personnel personnel = new Personnel();
-                        personnel.setIdcard(ahrsPostChangeVos.get(i).getIdcard());
-                        personnel.setDeptId(ahrsPostChangeVos.get(i).getDeptId());
-                        personnel.setDeptName(ahrsPostChangeVos.get(i).getDeptName());
-                        personnel.setSonDept(ahrsPostChangeVos.get(i).getSonDept());
-                        personnel.setName(ahrsPostChangeVos.get(i).getName());
-                        personnel.setSex(ahrsPostChangeVos.get(i).getSex());
-                        personnel.setPersonnelStatus(ahrsPostChangeVos.get(i).getPersonnelStatus());
-                        personnel.setEnterWay(ahrsPostChangeVos.get(i).getEntWayValue());
-                        personnel.setCurrentPostType(ahrsPostChangeVos.get(i).getNewPostType());
-                        personnel.setCurrentPostGrades(ahrsPostChangeVos.get(i).getNewPostGrades());
-                        personnel.setAdditionalPostType(ahrsPostChangeVos.get(i).getNewAdditionalType());
-                        personnel.setAdditionalPostGrades(ahrsPostChangeVos.get(i).getNewAdditionalGrades());
+                        PersonnelLsb personnellsb = personnelLsbMapper.selectPersonnelLsbByIdcard(ahrsPostChangeVos.get(i).getIdcard());
+                        BeanUtils.copyProperties(personnellsb, personnel);
                         list.add(personnel);
                     }
                 }

+ 8 - 1
ruoyi-ahrs/src/main/resources/templates/ahrs/post/planPersonnelList.html

@@ -663,7 +663,14 @@
 	}
 
 	function onDblClickRow(row, $element){
-		$.modal.openTop("人员信息",ctx + "ahrs/personnel/viewSonDetail/" + row.personnelId,['关闭'],window.parent.document.body.clientWidth-50,window.parent.document.body.clientHeight-50);
+		//未聘说明该人员增员,应查询人员临时表
+		if(row.personnelStatus == "3" ){
+			$.modal.openTop("人员信息",ctx + "ahrs/personnel/personnelLsDetail/" + row.personnelId,['关闭'],window.parent.document.body.clientWidth-50,window.parent.document.body.clientHeight-50);
+		}
+		else{
+			$.modal.openTop("人员信息",ctx + "ahrs/personnel/viewSonDetail/" + row.personnelId,['关闭'],window.parent.document.body.clientWidth-50,window.parent.document.body.clientHeight-50);
+
+		}
 	}
 
 	function rowStyle(row, index) {