Browse Source

人事档案开发

Signed-off-by: anderx <312518615@qq.com>
anderx 5 years ago
parent
commit
14250f0d1f

+ 4 - 4
src/main/java/com/goafanti/common/mapper/PersonnelDossierMapper.xml

@@ -795,8 +795,8 @@
   </select>
   
   <select id="selectPersonnelByList" resultType="com.goafanti.personnel.bo.OutPersonnelListBo">
- 		 select a.id,a.door_id doorId,a.name,a.status,a.`system`,a.company,dep.name depName,a.marriage,
-	b.jobs_name jobsName,a.lvl,b.lvl_name starName,date_format(a.entry_time,'%Y-%m-%d')entryTimes,
+ 	select a.id,a.door_id doorId,a.name,a.status,a.`system`,a.company,dep.name depName,a.marriage,a.job_nature jobNature,
+	a.job_nature_remarks jobNatureRemarks,b.jobs_name jobsName,a.lvl,b.lvl_name starName,date_format(a.entry_time,'%Y-%m-%d')entryTimes,
 	date_format(a.promotion_time,'%Y-%m-%d')promotionTimes,date_format(a.birthday,'%Y-%m-%d')birthdays,
 	a.entry_time entryTime, a.sex,a.son,a.girl,a.political_outlook politicalOutlook,d.education,
 	d.school,d.major,d.title,e.promotion_remarks promotionRemarks,a.mobile,a.fixed_tel fixedTel,
@@ -945,8 +945,8 @@
 	</if>
   </select>
   <select id="selectBypdId" resultType="com.goafanti.personnel.bo.OutPersonnelBo">
-  	select a.id,a.door_id doorId,a.name,a.status,a.`system`,a.company,dep.name depName,a.nation,
-	b.jobs_name jobsName,a.lvl,b.lvl_name starName,date_format(a.entry_time,'%Y-%m-%d')entryTimes,
+  	select a.id,a.door_id doorId,a.name,a.status,a.`system`,a.company,dep.name depName,a.nation,a.marriage,a.job_nature jobNature,
+	a.job_nature_remarks jobNatureRemarks, b.jobs_name jobsName,a.lvl,b.lvl_name starName,date_format(a.entry_time,'%Y-%m-%d')entryTimes,
 	date_format(a.promotion_time,'%Y-%m-%d')promotionTimes,date_format(a.birthday,'%Y-%m-%d')birthdays,
 	a.entry_time entryTime, a.sex,a.son,a.girl,a.political_outlook politicalOutlook,d.education,
 	d.school,d.major,d.title,e.promotion_remarks promotionRemarks,a.mobile,a.fixed_tel fixedTel,

+ 35 - 1
src/main/java/com/goafanti/personnel/bo/OutPersonnelListBo.java

@@ -14,6 +14,8 @@ public class OutPersonnelListBo {
 	private String jobsName;
 	private Integer lvl;
 	private String starName;
+	private String jobNature;
+	private String jobNatureRemarks;
 	private String entryTimes;
 	private String promotionTimes;
 	private Date birthday;
@@ -52,7 +54,9 @@ public class OutPersonnelListBo {
 	private Integer workingYear;
 	private Integer age;
 	private Integer month;
-	
+	private String residenceName;
+	private String nativePlaceName;
+	private String nowName;
 	
 	public Integer getId() {
 		return id;
@@ -467,6 +471,36 @@ public class OutPersonnelListBo {
 	public void setEmergencyMobile(String emergencyMobile) {
 		this.emergencyMobile = emergencyMobile;
 	}
+	public String getResidenceName() {
+		return residenceName;
+	}
+	public void setResidenceName(String residenceName) {
+		this.residenceName = residenceName;
+	}
+	public String getNativePlaceName() {
+		return nativePlaceName;
+	}
+	public void setNativePlaceName(String nativePlaceName) {
+		this.nativePlaceName = nativePlaceName;
+	}
+	public String getNowName() {
+		return nowName;
+	}
+	public void setNowName(String nowName) {
+		this.nowName = nowName;
+	}
+	public String getJobNature() {
+		return jobNature;
+	}
+	public void setJobNature(String jobNature) {
+		this.jobNature = jobNature;
+	}
+	public String getJobNatureRemarks() {
+		return jobNatureRemarks;
+	}
+	public void setJobNatureRemarks(String jobNatureRemarks) {
+		this.jobNatureRemarks = jobNatureRemarks;
+	}
 	
 	
 }

+ 25 - 9
src/main/java/com/goafanti/personnel/service/impl/PersonnelServiceImpl.java

@@ -179,13 +179,34 @@ public class PersonnelServiceImpl  extends BaseMybatisDao<PersonnelDossierMapper
 		if (TokenManager.hasRole(AFTConstants.SALESMAN_ADMIN)) {
 			params.put("aid", TokenManager.getAdminId());	
 		}
-		return (Pagination<OutPersonnelListBo>) findPage("selectPersonnelByList", "selectPersonnelByCount",
+		Pagination<OutPersonnelListBo>p=(Pagination<OutPersonnelListBo>) findPage("selectPersonnelByList", "selectPersonnelByCount",
 				params, i.getPageNo(), i.getPageSize());
+		//处理省市区的转换
+		for (OutPersonnelListBo ob : (List<OutPersonnelListBo>)p.getList()) {
+			String residenceName=districtTransformation(ob.getResidenceProvince(),ob.getResidenceCity(),ob.getResidenceArea(),
+					ob.getResidenceAddress(), "");
+			String nativePlaceName =districtTransformation(ob.getNativePlaceProvince(),ob.getNativePlaceCity(),null,null, "");
+			String nowName=districtTransformation(ob.getNowProvince(),ob.getNowCity(),ob.getNowArea(),
+					ob.getNowAddress(), "");
+			ob.setResidenceName(residenceName);
+			ob.setNativePlaceName(nativePlaceName);
+			ob.setNowName(nowName);
+		}
+			
+		return p;
 	}
 
 	@Override
 	public OutPersonnelBo selectBypdId(Integer id) {
 		OutPersonnelBo op=	personnelDossierMapper.selectBypdId(id);
+		String residenceName=districtTransformation(op.getResidenceProvince(),op.getResidenceCity(),op.getResidenceArea(),
+				op.getResidenceAddress(), "");
+		String nativePlaceName =districtTransformation(op.getNativePlaceProvince(),op.getNativePlaceCity(),null,null, "");
+		String nowName=districtTransformation(op.getNowProvince(),op.getNowCity(),op.getNowArea(),
+				op.getNowAddress(), "");
+		op.setResidenceName(residenceName);
+		op.setNativePlaceName(nativePlaceName);
+		op.setNowName(nowName);
 		op.setContactList(personnelContactMapper.selectBypdId(id));
 		PersonnelEntry pe=personnelEntryMapper.selectByPrimaryKey(id);
 		op.setPersonnelEntry(pe);
@@ -212,11 +233,6 @@ public class PersonnelServiceImpl  extends BaseMybatisDao<PersonnelDossierMapper
     		//根据列表编写文档
     		XSSFSheet sheet =wb.getSheetAt(0);
     		for (OutPersonnelListBo ob : (List<OutPersonnelListBo>)list) {
-    			//处理省市区的转换
-    			String residenceName=districtTransformation(ob.getResidenceProvince(),ob.getResidenceCity(),ob.getResidenceArea(),
-    									ob.getResidenceAddress(), "");
-    			String nowName=districtTransformation(ob.getNowProvince(),ob.getNowCity(),ob.getNowArea(),
-											ob.getNowAddress(), "");
     			//新增一行
     			XSSFRow r = sheet.createRow(sheet.getLastRowNum()+1);
     			
@@ -263,8 +279,8 @@ public class PersonnelServiceImpl  extends BaseMybatisDao<PersonnelDossierMapper
     				case "出生月份": o = ob.getMonth().toString(); break;
     				case "身份证号码": o = ob.getIdCard(); break;
     				case "身份证发证地": o = ob.getCertificationAuthority(); break;
-    				case "户籍所在地": o = residenceName; break;
-    				case "现住址": o = nowName; break;
+    				case "户籍所在地": o = ob.getResidenceName(); break;
+    				case "现住址": o = ob.getNowName(); break;
     				case "紧急联系人": o = ob.getEmergencyContact(); break;
     				case "紧急联系人电话": o = ob.getEmergencyMobile(); break;
     				default: o = ""; break;
@@ -295,7 +311,7 @@ public class PersonnelServiceImpl  extends BaseMybatisDao<PersonnelDossierMapper
 		if (p!=null) {
 			for (ProvinceBo pb : plist) {
 				if (pb.getId().equals(p)) {
-					residenceName+=pb.getName();
+					residenceName+=pb.getName()+"省";
 					break;
 				}
 			}

+ 2 - 2
src/main/resources/props/config_local.properties

@@ -60,12 +60,12 @@ template.cacheable=false
 portal.host=//sf.jishutao.com/portal/2.0.6
 avatar.upload.host=//sb.jishutao.com/upload
 #连接开发
-#static.host=//sb.jishutao.com/1.1.39
+#static.host=//sb.jishutao.com/1.1.40
 #avatar.host=//sb.jishutao.com
 
 #连测试
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.1.39
+static.host=//static.jishutao.com/1.1.40
 
 upload.path=F:/data/public/upload
 upload.private.path=F:/data/private/upload

+ 1 - 1
src/main/resources/props/config_test.properties

@@ -54,7 +54,7 @@ session.validate.timespan=18000000
 app.name=AFT
 template.cacheable=false
 
-static.host=//static.jishutao.com/1.1.39
+static.host=//static.jishutao.com/1.1.40
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 avatar.upload.host=//static.jishutao.com/upload