体验预约人员导入功能

This commit is contained in:
lSun 2025-04-22 14:10:29 +08:00
parent ed63971fa5
commit 06f8a441c9
8 changed files with 218 additions and 128 deletions

View File

@ -50,6 +50,7 @@ public class importExcelController {
ar.setFailMsg(code); ar.setFailMsg(code);
} }
} catch (Exception e) { } catch (Exception e) {
ar.setFailMsg(e.getMessage());
e.printStackTrace(); e.printStackTrace();
} }
return ar; return ar;
@ -91,6 +92,7 @@ public class importExcelController {
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
ar.setFailMsg(e.getMessage());
} }
return ar; return ar;
} }

View File

@ -46,7 +46,11 @@ public interface PersonnelLibraryDao {
PersonnelReservationBean getMealName(@Param("setMeal")String setMeal); PersonnelReservationBean getMealName(@Param("setMeal")String setMeal);
PersonnelReservationBean getInfoById(@Param("personName")String personName,@Param("idNumber") String idNumber, @Param("phone")String phone); PersonnelReservationBean getInfoById(@Param("personName")String personName,@Param("idNumber") String idNumber, @Param("phone")String phone,@Param("ifHighee")String ifHighee);
int updateReservation(PersonnelReservationBean bean); int updateReservation(PersonnelReservationBean bean);
int getPersonNameBy(@Param("personName")String personName);
int getPhoneBy(@Param("personName")String personName,@Param("phone")String phone);
} }

View File

@ -122,4 +122,9 @@ public class PersonnelReservationBean extends HospitalBean{
*/ */
private String checkType; private String checkType;
/**
* 是否高职1是0不是 3 是展示空
*/
private String ifHighee;
} }

View File

@ -26,8 +26,6 @@ import java.util.List;
import java.util.UUID; import java.util.UUID;
/** /**
*
*
* @author makejava * @author makejava
* @since 2023-16-19 13:57:46 * @since 2023-16-19 13:57:46
*/ */
@ -44,9 +42,9 @@ public class ImportExcelServiceImpl implements ImportExcelService {
@Override @Override
public String saveExcelInfo(List<JSONObject> lstObj) { public String saveExcelInfo(List<JSONObject> lstObj) {
PersonnelLibraryBean bean=new PersonnelLibraryBean(); PersonnelLibraryBean bean = new PersonnelLibraryBean();
String res = ""; String res = "";
int team =1; int team = 1;
int i = 1; int i = 1;
String personName = ""; String personName = "";
String phone = ""; String phone = "";
@ -65,21 +63,21 @@ public class ImportExcelServiceImpl implements ImportExcelService {
department = obj.getString("department").trim(); department = obj.getString("department").trim();
// specJob = obj.getString("specJob").trim(); // specJob = obj.getString("specJob").trim();
//通过部门名称寻找部门id //通过部门名称寻找部门id
if (StringHelper.isEmpty(idNumber) || "0.0".equals(idNumber.trim())) { if (StringHelper.isEmpty(idNumber) || "0.0".equals(idNumber.trim())) {
res += "" + i + "" + personName + "行身份证为空;"; res += "" + i + "" + personName + "行身份证为空;";
team = 2; team = 2;
} else if (idNumber.length() != 18) { } else if (idNumber.length() != 18) {
res += "" + i + "" + personName + "行身份证格式错误;"; res += "" + i + "" + personName + "行身份证格式错误;";
team = 2; team = 2;
}else { } else {
sex=getSexByIdcard(idNumber); sex = getSexByIdcard(idNumber);
bean.setSex(sex); bean.setSex(sex);
int age = countAge(idNumber); int age = countAge(idNumber);
bean.setAge(age); bean.setAge(age);
} }
if(!department.isEmpty()) { if (!department.isEmpty()) {
String departmentName = dao.getdepartmentName(department); String departmentName = dao.getdepartmentName(department);
if (StringHelper.isEmpty(departmentName) || "0.0".equals(departmentName.trim())) { if (StringHelper.isEmpty(departmentName) || "0.0".equals(departmentName.trim())) {
team = 2; team = 2;
res += "" + i + "" + personName + "部门名称有误,请检查"; res += "" + i + "" + personName + "部门名称有误,请检查";
System.out.println(res); System.out.println(res);
@ -99,12 +97,12 @@ public class ImportExcelServiceImpl implements ImportExcelService {
// } // }
// } // }
personType = obj.getString("personType"); personType = obj.getString("personType");
String peronid= ChangepersonType(personType); String peronid = ChangepersonType(personType);
if(!peronid.equals("0")){ if (!peronid.equals("0")) {
bean.setPersonType(peronid); bean.setPersonType(peronid);
}else{ } else {
System.out.println(res); System.out.println(res);
res += "" + i + "" + personName+"用工形式有误,请检查" ; res += "" + i + "" + personName + "用工形式有误,请检查";
System.out.println(res); System.out.println(res);
} }
@ -114,15 +112,15 @@ public class ImportExcelServiceImpl implements ImportExcelService {
bean.setPhone(phone); bean.setPhone(phone);
bean.setIdNumber(idNumber); bean.setIdNumber(idNumber);
bean.setPassword(passwordEncoder.encode("YNsbd@123456")); bean.setPassword(passwordEncoder.encode("YNsbd@123456"));
if(bean.getSpecialPost()=="" ||bean.getSpecialPost()==null){ if (bean.getSpecialPost() == "" || bean.getSpecialPost() == null) {
bean.setSpecialPost(0+""); bean.setSpecialPost(0 + "");
} }
if(team!=2){ if (team != 2) {
// 查询通过身份证去查询 // 查询通过身份证去查询
int sum = dao.getinfoByidcard(phone); int sum = dao.getinfoByidcard(phone);
if(sum>0){ if (sum > 0) {
dao.updatephyInfo(bean); dao.updatephyInfo(bean);
} else{ } else {
dao.updatePersonExport(bean); dao.updatePersonExport(bean);
} }
res = "导入成功"; res = "导入成功";
@ -146,7 +144,7 @@ public class ImportExcelServiceImpl implements ImportExcelService {
try { try {
if (lstObj != null && lstObj.size() > 0) { if (lstObj != null && lstObj.size() > 0) {
for (JSONObject obj : lstObj) { for (JSONObject obj : lstObj) {
NegativeResultBean bean = new NegativeResultBean(); NegativeResultBean bean = new NegativeResultBean();
bean.setPhyNumber(obj.getString("phyNumber")); bean.setPhyNumber(obj.getString("phyNumber"));
bean.setPhyName(obj.getString("phyName")); bean.setPhyName(obj.getString("phyName"));
bean.setProfilePosition(obj.getString("profilePosition")); bean.setProfilePosition(obj.getString("profilePosition"));
@ -163,23 +161,23 @@ public class ImportExcelServiceImpl implements ImportExcelService {
bean.setGenerRecom(obj.getString("generRecom")); bean.setGenerRecom(obj.getString("generRecom"));
bean.setDataYear(DateTimeHelper.getYear(new Date())); bean.setDataYear(DateTimeHelper.getYear(new Date()));
bean.setHospitalId(UserUtil.getLoginUser().getHospitalId()); bean.setHospitalId(UserUtil.getLoginUser().getHospitalId());
bean.setId(UUID.randomUUID().toString().replace("-","")); bean.setId(UUID.randomUUID().toString().replace("-", ""));
if(StringHelper.isEmpty(obj.getString("phyNumber")) if (StringHelper.isEmpty(obj.getString("phyNumber"))
||StringHelper.isEmpty(obj.getString("phyName")) || StringHelper.isEmpty(obj.getString("phyName"))
||StringHelper.isEmpty(obj.getString("profilePosition")) || StringHelper.isEmpty(obj.getString("profilePosition"))
||StringHelper.isEmpty(obj.getString("phySex")) || StringHelper.isEmpty(obj.getString("phySex"))
||StringHelper.isEmpty(obj.getString("phyOle")) || StringHelper.isEmpty(obj.getString("phyOle"))
||StringHelper.isEmpty(obj.getString("phyUnit")) || StringHelper.isEmpty(obj.getString("phyUnit"))
||StringHelper.isEmpty(obj.getString("teamId")) || StringHelper.isEmpty(obj.getString("teamId"))
||StringHelper.isEmpty(obj.getString("teamName")) || StringHelper.isEmpty(obj.getString("teamName"))
||StringHelper.isEmpty(obj.getString("teamDepart")) || StringHelper.isEmpty(obj.getString("teamDepart"))
||StringHelper.isEmpty(obj.getString("signDate")) || StringHelper.isEmpty(obj.getString("signDate"))
||containsChineseCharacters(obj.getString("signDate")) || containsChineseCharacters(obj.getString("signDate"))
||StringHelper.isEmpty(obj.getString("masResult")) || StringHelper.isEmpty(obj.getString("masResult"))
||StringHelper.isEmpty(obj.getString("concWord")) || StringHelper.isEmpty(obj.getString("concWord"))
||StringHelper.isEmpty(obj.getString("generRecom")) || StringHelper.isEmpty(obj.getString("generRecom"))
||((obj.getString("signDate")+"").indexOf("1900")!=-1) || ((obj.getString("signDate")+"").indexOf("1899")!=-1)){ || ((obj.getString("signDate") + "").indexOf("1900") != -1) || ((obj.getString("signDate") + "").indexOf("1899") != -1)) {
res.append("行号:"+obj.getString("id")+"数据,"+obj.getString("phyName")+"数据异常或为空,导入失败!<br>"); res.append("行号:" + obj.getString("id") + "数据," + obj.getString("phyName") + "数据异常或为空,导入失败!<br>");
continue; continue;
} }
@ -192,20 +190,20 @@ public class ImportExcelServiceImpl implements ImportExcelService {
b.setTeamId(obj.getString("teamId")); b.setTeamId(obj.getString("teamId"));
b.setDataYear(dataYear); b.setDataYear(dataYear);
b.setHospitalId(UserUtil.getLoginUser().getHospitalId()); b.setHospitalId(UserUtil.getLoginUser().getHospitalId());
b.setId(UUID.randomUUID().toString().replace("-","")); b.setId(UUID.randomUUID().toString().replace("-", ""));
for (SysType bb : getIllnessType) { for (SysType bb : getIllnessType) {
String[] arrays = bb.getIllnessKeyword().split(";"); String[] arrays = bb.getIllnessKeyword().split(";");
String illId = bb.getId()+""; String illId = bb.getId() + "";
String illType = bb.getIllnessType(); String illType = bb.getIllnessType();
b.setIllnessType(illId); b.setIllnessType(illId);
b.setIllnessName(illType); b.setIllnessName(illType);
System.err.println("illId="+illId); System.err.println("illId=" + illId);
System.err.println("illType="+illType); System.err.println("illType=" + illType);
for (String aa : arrays){ for (String aa : arrays) {
boolean result = concWord.contains(aa); boolean result = concWord.contains(aa);
System.err.println("aa="+aa); System.err.println("aa=" + aa);
System.err.println("result="+result); System.err.println("result=" + result);
if(result){ if (result) {
negativeResultDao.addCountResultMessage(b); negativeResultDao.addCountResultMessage(b);
continue; continue;
} }
@ -225,22 +223,22 @@ public class ImportExcelServiceImpl implements ImportExcelService {
// } // }
// } // }
int num = negativeResultDao.addDataInfo(bean); int num = negativeResultDao.addDataInfo(bean);
if(num <=0){ if (num <= 0) {
res.append(""+obj.getString("id")+"数据,"+obj.getString("phyName")+"新增失败!'\\n"); res.append("" + obj.getString("id") + "数据," + obj.getString("phyName") + "新增失败!'\\n");
} }
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
return res.toString().length()<=0?"导入成功":res.toString(); return res.toString().length() <= 0 ? "导入成功" : res.toString();
} }
@Override @Override
public String reservation(List<JSONObject> lstObj) { public String reservation(List<JSONObject> lstObj) {
PersonnelReservationBean bean=new PersonnelReservationBean(); List<PersonnelReservationBean> validBeans = new ArrayList<>(); // 用于存储通过验证的数据
String res = ""; String res = "";
int team =1; int team = 1;
int i = 0; int i = 0;
String personName = ""; String personName = "";
String phone = ""; String phone = "";
@ -249,147 +247,207 @@ public class ImportExcelServiceImpl implements ImportExcelService {
String hospital = ""; String hospital = "";
String sex = ""; String sex = "";
String setMeal = ""; String setMeal = "";
boolean hasError = false; // 标志位用于记录是否有错误
try { try {
if (lstObj != null && lstObj.size() > 0) { if (lstObj != null && lstObj.size() > 0) {
for (JSONObject obj : lstObj) { for (JSONObject obj : lstObj) {
i++; i++;
PersonnelReservationBean bean = new PersonnelReservationBean(); // 每个对象创建一个新的Bean
personName = obj.getString("personName").trim(); personName = obj.getString("personName").trim();
idNumber = obj.getString("idNumber").trim(); idNumber = obj.getString("idNumber").trim();
sex = obj.getString("sex").trim(); sex = obj.getString("sex").trim();
department = obj.getString("department").trim(); department = obj.getString("department").trim();
hospital = obj.getString("hospital").trim(); hospital = obj.getString("hospital").trim();
setMeal = obj.getString("setMeal").trim(); setMeal = obj.getString("setMeal").trim();
phone = obj.getString("phone").trim(); phone = obj.getString("phone").trim();
// 判断姓名为空
//判断姓名为空 if (StringHelper.isEmpty(personName)) {
if(StringHelper.isEmpty(personName)){
res += "" + i + "行姓名为空;"; res += "" + i + "行姓名为空;";
hasError = true;
} }
bean.setPersonName(personName); bean.setPersonName(personName);
//判断身份证为空 // 判断身份证为空
if (StringHelper.isEmpty(idNumber) || "0.0".equals(idNumber.trim())) { if (StringHelper.isEmpty(idNumber) || "0.0".equals(idNumber.trim())) {
res += "" + i + "" + personName + "行身份证为空;"; res += "" + i + "" + personName + "行身份证为空;";
team = 2; team = 2;
hasError = true;
} else if (idNumber.length() != 18) { } else if (idNumber.length() != 18) {
res += "" + i + "" + personName + "行身份证格式错误;"; res += "" + i + "" + personName + "行身份证格式错误;";
team = 2; team = 2;
hasError = true;
} }
bean.setIdNumber(idNumber); bean.setIdNumber(idNumber);
//判断性别为空 // 判断性别为空
if (StringHelper.isEmpty(sex) ) { if (StringHelper.isEmpty(sex)) {
res += "" + i + "" + personName + "行性别为空;"; res += "" + i + "" + personName + "行性别为空;";
team = 2; team = 2;
}else { hasError = true;
String a=getSexByIdcard(idNumber); } else {
String b= ""; String a = getSexByIdcard(idNumber);
if(sex.equals("")){ String b = "";
b="0"; if (sex.equals("")) {
}else{ b = "0";
b="1"; } else {
b = "1";
} }
if(!a.equals(b)){ if (!a.equals(b)) {
res += "" + i + "" + personName + "行身份证与性别不匹配;"; res += "" + i + "" + personName + "行身份证与性别不匹配;";
}else { hasError = true;
} else {
bean.setSex(b); bean.setSex(b);
} }
} }
//判断部门名称为空 // 判断部门名称为空
if(!department.isEmpty()) { if (!department.isEmpty()) {
String departmentName = dao.getdepartmentName(department); String departmentName = dao.getdepartmentName(department);
if (StringHelper.isEmpty(departmentName) || "0.0".equals(departmentName.trim())) { if (StringHelper.isEmpty(departmentName) || "0.0".equals(departmentName.trim())) {
team = 2; team = 2;
res += "" + i + "" + personName + "部门名称有误,请检查"; res += "" + i + "" + personName + "部门名称有误,请检查";
System.out.println(res); hasError = true;
} else { } else {
bean.setDepartment(departmentName + ""); bean.setDepartment(departmentName + "");
} }
}else{ } else {
team = 2; team = 2;
res += "" + i + "" + personName + "部门名称为空"; res += "" + i + "" + personName + "部门名称为空";
hasError = true;
} }
//判断医院名称为空 // 判断医院名称为空
if (StringHelper.isEmpty(hospital) ) { if (StringHelper.isEmpty(hospital)) {
res += "" + i + "" + personName + "行医院名称为空;"; res += "" + i + "" + personName + "行医院名称为空;";
team = 2; team = 2;
}else{ hasError = true;
if(hospital.equals("A")){ } else {
if (hospital.equals("A")) {
bean.setHospital("33"); bean.setHospital("33");
}else if(hospital.equals("B")) { } else if (hospital.equals("B")) {
bean.setHospital("34"); bean.setHospital("34");
}else if(hospital.equals("C")) { } else if (hospital.equals("C")) {
bean.setHospital("35"); bean.setHospital("35");
}else { } else {
res += "" + i + "" + personName + "行医院名称有误,请检查"; res += "" + i + "" + personName + "行医院名称有误,请检查";
hasError = true;
} }
} }
//判断体检套餐为空 String ifHighee = null; // 判断是否为高职
if (StringHelper.isEmpty(setMeal) ) { // 判断体检套餐为空
if (StringHelper.isEmpty(setMeal)) {
res += "" + i + "" + personName + "行体检套餐为空;"; res += "" + i + "" + personName + "行体检套餐为空;";
team = 2; team = 2;
}else if(!setMeal.contains(sex)){ hasError = true;
} else if (!setMeal.contains(sex)) {
res += "" + i + "" + personName + "行体检套餐内容与性别不符合;"; res += "" + i + "" + personName + "行体检套餐内容与性别不符合;";
team = 2; team = 2;
hasError = true;
} else { } else {
PersonnelReservationBean bean1 = dao.getMealName(setMeal); PersonnelReservationBean bean1 = dao.getMealName(setMeal);
String setMealName = bean1.getSetMealId(); if(bean1!=null){
if (StringHelper.isEmpty(setMealName) || "0.0".equals(setMealName.trim())) { String setMealName = bean1.getSetMealId();
ifHighee = bean1.getIfHighee();
if (StringHelper.isEmpty(setMealName) || "0.0".equals(setMealName.trim())) {
team = 2;
res += "" + i + "" + personName + "体检套餐有误,请检查";
hasError = true;
} else {
bean.setSetMeal(setMealName + "");
bean.setCheckType(bean1.getCheckType());
bean.setCombName(setMeal);
}
}else{
team = 2; team = 2;
res += "" + i + "" + personName + "体检套餐有误,请检查"; res += "" + i + "" + personName + "体检套餐有误,请检查";
System.out.println(res); hasError = true;
} else {
bean.setSetMeal(setMealName + "");
bean.setCheckType(bean1.getCheckType());
bean.setCombName(setMeal);
} }
} }
//判断手机号码为空 // 判断手机号码为空
if (StringHelper.isEmpty(phone) || "0.0".equals(phone.trim())) { if (StringHelper.isEmpty(phone) || "0.0".equals(phone.trim())) {
res += "" + i + "" + personName + "行手机号码为空;"; res += "" + i + "" + personName + "行手机号码为空;";
team = 2; team = 2;
hasError = true;
} else if (!isLegalMobileNumber(phone)) { } else if (!isLegalMobileNumber(phone)) {
res += "" + i + "" + personName + "行手机号码格式错误;"; res += "" + i + "" + personName + "行手机号码格式错误;";
team = 2; team = 2;
hasError = true;
} }
bean.setPhone(phone); bean.setPhone(phone);
if(team!=2){ // 查询通过身份证姓名电话去查询
// 查询通过身份证姓名电话去查询 int personNameNum = dao.getPersonNameBy(personName);
PersonnelReservationBean beans = dao.getInfoById(personName,idNumber,phone); if (personNameNum > 0) {
if(beans!=null){
//获取预约人的id } else {
bean.setId(beans.getId()); res += "" + i + "" + personName + "行姓名有误,在职人员信息未找到。请检查";
int k = dao.updateReservation(bean); team = 2;
res = "导入成功"; hasError = true;
}else{ }
res += "" + i + "" + personName + "行数据有误,在职人员信息未找到。请检查";
int phoneNum = dao.getPhoneBy(personName,phone);
if (phoneNum > 0) {
}else{
res += "" + i + "" + personName + "行手机号有误,在职人员信息未找到。请检查";
team = 2;
hasError = true;
}
if (team != 2) {
PersonnelReservationBean beans = dao.getInfoById(personName, idNumber, phone,"");
if (beans != null) {
// 获取预约人的id
// bean.setId(beans.getId());
} else {
res += "" + i + "" + personName + "行身份证有误,在职人员信息未找到。请检查";
hasError = true;
}
PersonnelReservationBean beans1 = dao.getInfoById(personName, idNumber, phone,ifHighee);
if (beans1 != null) {
// 获取预约人的id
bean.setId(beans1.getId());
} else {
res += "" + i + "" + personName + "行高职与非高职有误,在职人员信息未找到。请检查";
hasError = true;
} }
} }
// 只有在没有错误的情况下才执行新增操作
if (!hasError) {
validBeans.add(bean);
}
}
// 只有在没有错误的情况下才执行批量导入操作
if (!hasError) {
for (PersonnelReservationBean bean : validBeans) {
int k = dao.updateReservation(bean);
}
res = "导入成功";
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
return res; return res;
} }
private String ChangepersonType(String personType) { private String ChangepersonType(String personType) {
String team; String team;
if(personType.equals("在职")){ if (personType.equals("在职")) {
team="1"; team = "1";
}else if(personType.equals("离退休")){ } else if (personType.equals("离退休")) {
team="2"; team = "2";
}else if(personType.equals("劳务派遣")){ } else if (personType.equals("劳务派遣")) {
team="3"; team = "3";
}else{ } else {
team="0"; team = "0";
} }
return team; return team;
} }
@ -403,10 +461,10 @@ public class ImportExcelServiceImpl implements ImportExcelService {
} }
private String changeView(String srt){ private String changeView(String srt) {
if(StringHelper.isEmpty(srt)){ if (StringHelper.isEmpty(srt)) {
return ""; return "";
}else{ } else {
return srt; return srt;
} }
} }
@ -417,14 +475,17 @@ public class ImportExcelServiceImpl implements ImportExcelService {
} }
return mobile.matches(MOBILE_RULE); return mobile.matches(MOBILE_RULE);
} }
/** /**
* 验证身份证真假 * 验证身份证真假
* @param carNumber 身份证号 *
* @return boolean*/ * @param carNumber 身份证号
* @return boolean
*/
public static boolean isCard(String carNumber) { public static boolean isCard(String carNumber) {
//判断输入身份证号长度是否合法 //判断输入身份证号长度是否合法
if (carNumber.length() != 18) { if (carNumber.length() != 18) {
return false; return false;
} }
//校验身份证真假 //校验身份证真假
int sum = 0; int sum = 0;
@ -460,6 +521,7 @@ public class ImportExcelServiceImpl implements ImportExcelService {
/** /**
* 根据身份证号计算持有者年龄 * 根据身份证号计算持有者年龄
*
* @param idCard * @param idCard
* @return * @return
*/ */
@ -470,8 +532,8 @@ public class ImportExcelServiceImpl implements ImportExcelService {
String year; String year;
String monthDay; String monthDay;
if (idCard.length() == 18) { if (idCard.length() == 18) {
year = idCard.substring(6,10); year = idCard.substring(6, 10);
monthDay = idCard.substring(10,14); monthDay = idCard.substring(10, 14);
} else { } else {
year = "19" + idCard.substring(6, 8); year = "19" + idCard.substring(6, 8);
monthDay = idCard.substring(8, 12); monthDay = idCard.substring(8, 12);

Binary file not shown.

View File

@ -169,13 +169,29 @@
from pm_base_physical from pm_base_physical
where is_active = '1' and if_job = '1' and phy_name = #{personName} and idcard = #{idNumber} where is_active = '1' and if_job = '1' and phy_name = #{personName} and idcard = #{idNumber}
and telep_number = #{phone} and telep_number = #{phone}
<if test="ifHighee!=null and ifHighee !='' and ifHighee !='null' ">
and if_higher = #{ifHighee}
</if>
</select> </select>
<select id="getPersonNameBy" resultType="java.lang.Integer">
SELECT count(1)
from pm_base_physical
where is_active = '1' and if_job = '1' and phy_name = #{personName}
</select>
<select id="getMealName" resultType="com.bonus.boot.manager.basic.entity.PersonnelReservationBean"> <select id="getMealName" resultType="com.bonus.boot.manager.basic.entity.PersonnelReservationBean">
select id as setMealId,check_id as checkType select id as setMealId,check_id as checkType,if_highee as ifHighee
from pm_base_combination from pm_base_combination
where `comb_name` = #{setMeal} where `comb_name` = #{setMeal}
and is_active = '1' LIMIT 1 and is_active = '1' LIMIT 1
</select> </select>
<select id="getPhoneBy" resultType="java.lang.Integer">
SELECT count(1)
from pm_base_physical
where is_active = '1' and if_job = '1' and telep_number = #{phone} and phy_name = #{personName}
</select>
<update id="updateReservation"> <update id="updateReservation">
update pm_base_physical update pm_base_physical

View File

@ -115,9 +115,6 @@ layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function () {
case "exportBtn": case "exportBtn":
//导出 //导出
break; break;
case "exportBtnYu":
download()
break;
} }
}); });
}); });
@ -189,7 +186,7 @@ function importExcel() {
contentType: false, contentType: false,
success: function (data) { success: function (data) {
if (data.resMsg == '导入成功') { if (data.resMsg == '导入成功') {
showMessage('导入成功!', true); showMessages('导入成功!', true);
} else { } else {
showMessage(data.resMsg, false); showMessage(data.resMsg, false);
} }
@ -208,9 +205,13 @@ function showMessage(message, isSuccess) {
layer.msg(message, { time: 10000, icon: isSuccess ? 1 : 2 }); layer.msg(message, { time: 10000, icon: isSuccess ? 1 : 2 });
} }
function showMessages(message, isSuccess) {
layer.msg(message, { time: 3000, icon: isSuccess ? 1 : 2 });
}
function download(){
window.location.href = ctxPath + "/download/download?filename=体检人员名单导入.xlsx" function fetchExcelYu(){
window.location.href = ctxPath + "/download/download?filename=预约体检模版.xlsx"
} }
function importExcelYu() { function importExcelYu() {
@ -244,10 +245,10 @@ function importExcelYu() {
contentType: false, contentType: false,
success: function (data) { success: function (data) {
if (data.resMsg == '导入成功') { if (data.resMsg == '导入成功') {
showMessage('导入成功!', true); showMessages('导入成功!', true);
setTimeout(() => { setTimeout(() => {
window.location.reload(); window.location.reload();
}, 10001) }, 30001)
} else { } else {
showMessage(data.resMsg, false); showMessage(data.resMsg, false);
} }

View File

@ -140,7 +140,7 @@
</div> </div>
<div class="layui-inline" style="width: 6%;margin-top: 4px"> <div class="layui-inline" style="width: 6%;margin-top: 4px">
<button id="exportBtnYu" class="layui-btn layui-btn-sm" onclick="fetchExcel()"><i class="layui-icon">&#xe67d;</i>导出预约模板</button> <button id="exportBtnYu" class="layui-btn layui-btn-sm" onclick="fetchExcelYu()" ><i class="layui-icon">&#xe67d;</i>导出预约模板</button>
</div> </div>
<div class="layui-inline" > <div class="layui-inline" >