体验预约人员导入功能
This commit is contained in:
parent
06f8a441c9
commit
e9e7a4f2fd
|
|
@ -53,4 +53,6 @@ public interface PersonnelLibraryDao {
|
|||
int getPersonNameBy(@Param("personName")String personName);
|
||||
|
||||
int getPhoneBy(@Param("personName")String personName,@Param("phone")String phone);
|
||||
|
||||
int getIdNumber(@Param("idNumber")String idNumber);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,6 +85,17 @@ public class ImportExcelServiceImpl implements ImportExcelService {
|
|||
bean.setDepartment(departmentName + "");
|
||||
}
|
||||
}
|
||||
|
||||
// 判断手机号码为空
|
||||
if (StringHelper.isEmpty(phone) || "0.0".equals(phone.trim())) {
|
||||
res += "第" + i + "行" + personName + "行手机号码为空;";
|
||||
team = 2;
|
||||
} else if (!isLegalMobileNumber(phone)) {
|
||||
res += "第" + i + "行" + personName + "行手机号码格式错误;";
|
||||
team = 2;
|
||||
}else{
|
||||
|
||||
}
|
||||
// if(!"".equals(specJob)) {
|
||||
// String specJobid = dao.getspecJobName(specJob);
|
||||
// if (StringUtils.isEmpty(specJobid )) {
|
||||
|
|
@ -97,16 +108,27 @@ public class ImportExcelServiceImpl implements ImportExcelService {
|
|||
// }
|
||||
// }
|
||||
personType = obj.getString("personType");
|
||||
String peronid = ChangepersonType(personType);
|
||||
if (!peronid.equals("0")) {
|
||||
bean.setPersonType(peronid);
|
||||
} else {
|
||||
System.out.println(res);
|
||||
res += "第" + i + "行" + personName + "用工形式有误,请检查";
|
||||
System.out.println(res);
|
||||
if (StringHelper.isEmpty(personType) || "0.0".equals(personType.trim())) {
|
||||
res += "第" + i + "行" + personName + "用工形式为空;";
|
||||
team = 2;
|
||||
}else{
|
||||
String peronid = ChangepersonType(personType);
|
||||
if (!peronid.equals("0")) {
|
||||
bean.setPersonType(peronid);
|
||||
} else {
|
||||
System.out.println(res);
|
||||
res += "第" + i + "行" + personName + "用工形式有误,请检查";
|
||||
team = 2;
|
||||
System.out.println(res);
|
||||
}
|
||||
}
|
||||
|
||||
//身份证校验
|
||||
int kk = dao.getIdNumber(idNumber);
|
||||
if(kk>0){
|
||||
res += "第" + i + "行" + personName + "行身份证重复,请检查";
|
||||
team = 2;
|
||||
}
|
||||
|
||||
bean.setPersonName(personName);
|
||||
bean.setPhone(phone);
|
||||
|
|
@ -385,7 +407,7 @@ public class ImportExcelServiceImpl implements ImportExcelService {
|
|||
if (personNameNum > 0) {
|
||||
|
||||
} else {
|
||||
res += "第" + i + "行" + personName + "行姓名有误,在职人员信息未找到。请检查";
|
||||
res += "第" + i + "行" + personName + "行姓名有误。请检查";
|
||||
team = 2;
|
||||
hasError = true;
|
||||
}
|
||||
|
|
@ -394,7 +416,7 @@ public class ImportExcelServiceImpl implements ImportExcelService {
|
|||
if (phoneNum > 0) {
|
||||
|
||||
}else{
|
||||
res += "第" + i + "行" + personName + "行手机号有误,在职人员信息未找到。请检查";
|
||||
res += "第" + i + "行" + personName + "行手机号有误。请检查";
|
||||
team = 2;
|
||||
hasError = true;
|
||||
}
|
||||
|
|
@ -405,7 +427,7 @@ public class ImportExcelServiceImpl implements ImportExcelService {
|
|||
// 获取预约人的id
|
||||
// bean.setId(beans.getId());
|
||||
} else {
|
||||
res += "第" + i + "行" + personName + "行身份证有误,在职人员信息未找到。请检查";
|
||||
res += "第" + i + "行" + personName + "行身份证有误。请检查";
|
||||
hasError = true;
|
||||
}
|
||||
|
||||
|
|
@ -414,7 +436,7 @@ public class ImportExcelServiceImpl implements ImportExcelService {
|
|||
// 获取预约人的id
|
||||
bean.setId(beans1.getId());
|
||||
} else {
|
||||
res += "第" + i + "行" + personName + "行高职与非高职有误,在职人员信息未找到。请检查";
|
||||
res += "第" + i + "行" + personName + "行高职与非高职有误。请检查";
|
||||
hasError = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,6 +192,10 @@
|
|||
where is_active = '1' and if_job = '1' and telep_number = #{phone} and phy_name = #{personName}
|
||||
</select>
|
||||
|
||||
<select id="getIdNumber" resultType="java.lang.Integer">
|
||||
select count(*) from pm_base_physical
|
||||
where is_active = '1' and idcard = #{idNumber}
|
||||
</select>
|
||||
|
||||
<update id="updateReservation">
|
||||
update pm_base_physical
|
||||
|
|
|
|||
Loading…
Reference in New Issue