人员库功能变更
This commit is contained in:
parent
96538cb264
commit
f99c80395a
|
|
@ -86,6 +86,7 @@ public class PersonnelLibraryController {
|
|||
UnifyTask unifyTask = new UnifyTask();
|
||||
if (cb != 3 && cb != 5){
|
||||
String token = login();
|
||||
if(token!=null && token.length()>0 ){
|
||||
String isActive = addUser(bean.getPersonName(), bean.getPhone(),token);
|
||||
if(isActive.equals("1")){
|
||||
ks = 1;
|
||||
|
|
@ -105,6 +106,7 @@ public class PersonnelLibraryController {
|
|||
userService.updateUnify(Long.valueOf(bean.getHospId()));
|
||||
ar.setFailMsg(GlobalConst.INIT_SUCCEED);
|
||||
}
|
||||
}
|
||||
}else {
|
||||
ar.setFailMsg(GlobalConst.DATA_FAIL);
|
||||
}
|
||||
|
|
@ -267,7 +269,10 @@ public class PersonnelLibraryController {
|
|||
JSONObject object = JSON.parseObject(params);
|
||||
String result = HttpClientUtils.doHttpPost(AddressConfiguration.UNIFICATION_URL + "/ynuw/sys/api/putUser", object, token);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
String code = jsonObject.getString("code");
|
||||
String code = "00";
|
||||
if(jsonObject != null && jsonObject.containsKey("code")){
|
||||
code = jsonObject.getString("code");
|
||||
}
|
||||
System.err.println("新增code="+code);
|
||||
if("200".equals(code)){
|
||||
JSONArray data = jsonObject.getJSONArray("data");
|
||||
|
|
|
|||
|
|
@ -97,4 +97,25 @@ public class importExcelController {
|
|||
return ar;
|
||||
}
|
||||
|
||||
@LogAnnotation
|
||||
@PostMapping("/reservationNew")
|
||||
@ApiOperation(value = "体检人员库导入")
|
||||
public AjaxRes reservationNew(@RequestParam("file") MultipartFile file, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
int result = 1;
|
||||
AjaxRes ar = new AjaxRes();
|
||||
try {
|
||||
List<JSONObject> lstObj = (List<JSONObject>) ImportNoPhotoExcelHelper.readExcel(file, PersonnelReservationBean.class);
|
||||
String code = service.reservationNew(lstObj);
|
||||
if ("导入成功".equals(code)){
|
||||
ar.setSucceedMsg("导入成功");
|
||||
}else{
|
||||
ar.setFailMsg(code);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
ar.setFailMsg(e.getMessage());
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,4 +55,6 @@ public interface PersonnelLibraryDao {
|
|||
int getPhoneBy(@Param("personName")String personName,@Param("phone")String phone);
|
||||
|
||||
int getIdNumber(@Param("idNumber")String idNumber);
|
||||
|
||||
PersonnelReservationBean getMealNameNew(@Param("setMeal")String setMeal);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,4 +116,14 @@ public class PersonnelLibraryBean extends HospitalBean{
|
|||
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 套餐名称
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 套餐名称id
|
||||
*/
|
||||
private String baseNameId;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,4 +13,6 @@ public interface ImportExcelService {
|
|||
String savenegativeResult(List<JSONObject> lstObj);
|
||||
|
||||
String reservation(List<JSONObject> lstObj);
|
||||
|
||||
String reservationNew(List<JSONObject> lstObj);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -460,6 +460,207 @@ public class ImportExcelServiceImpl implements ImportExcelService {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String reservationNew(List<JSONObject> lstObj) {
|
||||
|
||||
List<PersonnelReservationBean> validBeans = new ArrayList<>(); // 用于存储通过验证的数据
|
||||
String res = "";
|
||||
int team = 1;
|
||||
int i = 0;
|
||||
String personName = "";
|
||||
String phone = "";
|
||||
String idNumber = "";
|
||||
String department = "";
|
||||
String hospital = "";
|
||||
String sex = "";
|
||||
String setMeal = "";
|
||||
boolean hasError = false; // 标志位,用于记录是否有错误
|
||||
|
||||
try {
|
||||
if (lstObj != null && lstObj.size() > 0) {
|
||||
for (JSONObject obj : lstObj) {
|
||||
i++;
|
||||
PersonnelReservationBean bean = new PersonnelReservationBean(); // 每个对象创建一个新的Bean
|
||||
personName = obj.getString("personName").trim();
|
||||
idNumber = obj.getString("idNumber").trim();
|
||||
sex = obj.getString("sex").trim();
|
||||
department = obj.getString("department").trim();
|
||||
hospital = obj.getString("hospital").trim();
|
||||
setMeal = obj.getString("setMeal").trim();
|
||||
phone = obj.getString("phone").trim();
|
||||
|
||||
// 判断姓名为空
|
||||
if (StringHelper.isEmpty(personName)) {
|
||||
res += "第" + i + "行姓名为空;";
|
||||
hasError = true;
|
||||
}
|
||||
bean.setPersonName(personName);
|
||||
|
||||
// 判断身份证为空
|
||||
if (StringHelper.isEmpty(idNumber) || "0.0".equals(idNumber.trim())) {
|
||||
res += "第" + i + "行" + personName + "行身份证为空;";
|
||||
team = 2;
|
||||
hasError = true;
|
||||
} else if (idNumber.length() != 18) {
|
||||
res += "第" + i + "行" + personName + "行身份证格式错误;";
|
||||
team = 2;
|
||||
hasError = true;
|
||||
}
|
||||
bean.setIdNumber(idNumber);
|
||||
|
||||
// 判断性别为空
|
||||
if (StringHelper.isEmpty(sex)) {
|
||||
res += "第" + i + "行" + personName + "行性别为空;";
|
||||
team = 2;
|
||||
hasError = true;
|
||||
} else {
|
||||
String a = getSexByIdcard(idNumber);
|
||||
String b = "";
|
||||
if (sex.equals("男")) {
|
||||
b = "0";
|
||||
} else {
|
||||
b = "1";
|
||||
}
|
||||
if (!a.equals(b)) {
|
||||
res += "第" + i + "行" + personName + "行身份证与性别不匹配;";
|
||||
hasError = true;
|
||||
} else {
|
||||
bean.setSex(b);
|
||||
}
|
||||
}
|
||||
|
||||
// // 判断部门名称为空
|
||||
// if (!department.isEmpty()) {
|
||||
// String departmentName = dao.getdepartmentName(department);
|
||||
// if (StringHelper.isEmpty(departmentName) || "0.0".equals(departmentName.trim())) {
|
||||
// team = 2;
|
||||
// res += "第" + i + "行" + personName + "部门名称有误,请检查";
|
||||
// hasError = true;
|
||||
// } else {
|
||||
// bean.setDepartment(departmentName + "");
|
||||
// }
|
||||
// } else {
|
||||
// team = 2;
|
||||
// res += "第" + i + "行" + personName + "部门名称为空";
|
||||
// hasError = true;
|
||||
// }
|
||||
|
||||
// 判断医院名称为空
|
||||
if (StringHelper.isEmpty(hospital)) {
|
||||
res += "第" + i + "行" + personName + "行医院名称为空;";
|
||||
team = 2;
|
||||
hasError = true;
|
||||
} else {
|
||||
if (hospital.equals("1")) {
|
||||
bean.setHospital("33");
|
||||
} else if (hospital.equals("2")) {
|
||||
bean.setHospital("34");
|
||||
} else if (hospital.equals("3")) {
|
||||
bean.setHospital("35");
|
||||
} else {
|
||||
res += "第" + i + "行" + personName + "行医院名称有误,请检查";
|
||||
hasError = true;
|
||||
}
|
||||
}
|
||||
|
||||
String ifHighee = null; // 判断是否为高职
|
||||
// 判断体检套餐为空
|
||||
if (StringHelper.isEmpty(setMeal)) {
|
||||
res += "第" + i + "行" + personName + "行体检套餐为空;";
|
||||
team = 2;
|
||||
hasError = true;
|
||||
} else {
|
||||
// PersonnelReservationBean bean1 = dao.getMealName(setMeal);
|
||||
PersonnelReservationBean bean1 = dao.getMealNameNew(setMeal);
|
||||
if(bean1!=null){
|
||||
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;
|
||||
res += "第" + i + "行" + personName + "体检套餐有误,请检查";
|
||||
hasError = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 判断手机号码为空
|
||||
if (StringHelper.isEmpty(phone) || "0.0".equals(phone.trim())) {
|
||||
res += "第" + i + "行" + personName + "行手机号码为空;";
|
||||
team = 2;
|
||||
hasError = true;
|
||||
} else if (!isLegalMobileNumber(phone)) {
|
||||
res += "第" + i + "行" + personName + "行手机号码格式错误;";
|
||||
team = 2;
|
||||
hasError = true;
|
||||
}
|
||||
bean.setPhone(phone);
|
||||
|
||||
// 查询通过身份证、姓名、电话去查询
|
||||
int personNameNum = dao.getPersonNameBy(personName);
|
||||
if (personNameNum > 0) {
|
||||
|
||||
} else {
|
||||
res += "第" + i + "行" + personName + "行姓名有误。请检查";
|
||||
team = 2;
|
||||
hasError = true;
|
||||
}
|
||||
|
||||
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,"");
|
||||
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) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private String ChangepersonType(String personType) {
|
||||
String team;
|
||||
if (personType.equals("在职")) {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class PackageTypeServiceImpl implements PackageTypeService {
|
|||
|
||||
@Override
|
||||
public int addInfo(BaseTypePackageBean bean) {
|
||||
int num = utilDao.determineIfExists("pm_base_type_package","type_name",bean.getTypeName(),"");
|
||||
int num = utilDao.determineIfExists("pm_base_type_package_name","type_name",bean.getTypeName(),"");
|
||||
if(num > 0){
|
||||
num = 3;
|
||||
}else {
|
||||
|
|
@ -43,7 +43,7 @@ public class PackageTypeServiceImpl implements PackageTypeService {
|
|||
|
||||
@Override
|
||||
public int updateInfo(BaseTypePackageBean bean) {
|
||||
int num = utilDao.determineIfExists("pm_base_type_package","type_name",bean.getTypeName(),bean.getId()+"");
|
||||
int num = utilDao.determineIfExists("pm_base_type_package_name","type_name",bean.getTypeName(),bean.getId()+"");
|
||||
if(num > 0){
|
||||
num = 3;
|
||||
}else {
|
||||
|
|
|
|||
|
|
@ -350,9 +350,13 @@ public class UserController {
|
|||
// String result = HttpClientUtils.doHttpPost("http://112.29.103.165:1616/ynuw/sys/api/userLogin", object, null);
|
||||
String result = HttpClientUtils.doHttpPost(AddressConfiguration.UNIFICATION_URL + "/ynuw/sys/api/userLogin", object, null);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
if(jsonObject == null || jsonObject.isEmpty()){
|
||||
return "";
|
||||
}else{
|
||||
String string = JSONObject.parseObject(jsonObject.getString("data")).getString("token");
|
||||
return string;
|
||||
}
|
||||
}
|
||||
|
||||
//统一平台后台新增接口 获取token
|
||||
public String addUser(String userName, String phone, String token) throws Exception {
|
||||
|
|
|
|||
|
|
@ -107,5 +107,13 @@ public class UtilController {
|
|||
List<MapBean> list = service.getSetMeal(o);
|
||||
return R.okTable(list, list.size());
|
||||
}
|
||||
|
||||
@LogAnnotation
|
||||
@PostMapping(value = "/getPackageTypeName")
|
||||
@ApiOperation(value = "套餐类型select列表")
|
||||
public List<MapBean> getPackageTypeName() {
|
||||
List<MapBean> result = service.getPackageTypeName();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,4 +62,6 @@ public interface UtilDao {
|
|||
List<MapBean> getExaminationHospital();
|
||||
|
||||
List<MapBean> getNewHospitalSelect(MapBean bean);
|
||||
|
||||
List<MapBean> getPackageTypeName();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,4 +44,6 @@ public interface UtilService {
|
|||
List<MapBean> getExaminationHospital();
|
||||
|
||||
List<MapBean> getNewHospitalSelect(MapBean o);
|
||||
|
||||
List<MapBean> getPackageTypeName();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,4 +75,9 @@ public class UtilServiceImpl implements UtilService {
|
|||
bean.setHospitalId(hospiral);
|
||||
return utilDao.getNewHospitalSelect(bean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MapBean> getPackageTypeName() {
|
||||
return utilDao.getPackageTypeName();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,25 +2,24 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.boot.manager.basic.dao.PackageTypeDao">
|
||||
<insert id="addInfo">
|
||||
insert into pm_base_type_package (type_name,package_descri,is_active)
|
||||
values (#{typeName},#{packageDescri},'1')
|
||||
insert into pm_base_type_package_name (type_name,is_active)
|
||||
values (#{typeName},'1')
|
||||
</insert>
|
||||
|
||||
<update id="updateInfo">
|
||||
update pm_base_type_package set type_name = #{typeName},package_descri = #{packageDescri}
|
||||
update pm_base_type_package_name set type_name = #{typeName}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="delById">
|
||||
update pm_base_type_package set is_active = '0' where id = #{id}
|
||||
update pm_base_type_package_name set is_active = '0' where id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="getList" resultType="com.bonus.boot.manager.basic.entity.BaseTypePackageBean">
|
||||
select
|
||||
id,
|
||||
case when type_name = '1' then '标准套餐' when type_name = '2' then '个性化套餐' when type_name = '3' then '职业健康套餐' end as typeName,
|
||||
package_descri as packageDescri
|
||||
from pm_base_type_package
|
||||
type_name as typeName
|
||||
from pm_base_type_package_name
|
||||
where is_active = '1'
|
||||
<if test="typeName != null and typeName != ''">
|
||||
AND type_name LIKE concat ('%',#{typeName},'%')
|
||||
|
|
@ -30,9 +29,8 @@
|
|||
<select id="getListById" resultType="com.bonus.boot.manager.basic.entity.BaseTypePackageBean">
|
||||
select
|
||||
id,
|
||||
type_name as typeName,
|
||||
package_descri as packageDescri
|
||||
from pm_base_type_package
|
||||
type_name as typeName
|
||||
from pm_base_type_package_name
|
||||
where is_active = '1' and id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
<insert id="addInfo" keyProperty="hospId" useGeneratedKeys="true">
|
||||
<!-- 插入到pm_base_physical表 -->
|
||||
insert into
|
||||
pm_base_physical(phy_name,idcard,age,depart_id,sex,if_higher,telep_number,if_job,special_job,phy_password,is_active,status,nosocomium,set_meal,personnel_type,pushStatus)
|
||||
pm_base_physical(phy_name,idcard,age,depart_id,sex,if_higher,telep_number,if_job,special_job,phy_password,is_active,status,nosocomium,personnel_type,pushStatus,base_name_id)
|
||||
values
|
||||
(#{personName},#{idNumber},#{age},#{departmentId},#{sex},#{higherJob},#{phone},#{personType},#{specialPost},#{password},'1','1',#{hospital},#{setMeal},#{personnelType},'1')
|
||||
(#{personName},#{idNumber},#{age},#{departmentId},#{sex},#{higherJob},#{phone},#{personType},#{specialPost},#{password},'1','1',#{hospital},#{personnelType},'1',#{baseNameId})
|
||||
</insert>
|
||||
<insert id="addresult">
|
||||
insert into pm_physical_result(physical_id)
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
special_job = #{specialPost},
|
||||
nosocomium = #{hospital},
|
||||
personnel_type = #{personnelType},
|
||||
set_meal = #{setMeal}
|
||||
base_name_id = #{baseNameId}
|
||||
where id = #{id}
|
||||
and is_active = '1'
|
||||
</update>
|
||||
|
|
@ -92,12 +92,14 @@
|
|||
when '2' then '肿瘤'
|
||||
when '3' then '综合'
|
||||
else ''
|
||||
end as setMeal
|
||||
end as setMeal,
|
||||
pn.type_name as typeName
|
||||
from pm_base_physical pbp
|
||||
left join pm_base_hospital pbh on pbh.id = pbp.nosocomium
|
||||
left join sys_dic_detail sdd on sdd.id = pbp.if_job
|
||||
left join pm_base_special_job pbsj on pbsj.id = pbp.special_job and pbsj.is_active = '1'
|
||||
left join pm_phy_organization po on po.id = pbp.depart_id
|
||||
left join pm_organization po on po.id = pbp.depart_id
|
||||
LEFT JOIN pm_base_type_package_name pn on pn.id = pbp.base_name_id
|
||||
where pbp.is_active = '1'
|
||||
<if test="personName != null and personName != ''">
|
||||
AND pbp.phy_name LIKE concat ('%',#{personName},'%')
|
||||
|
|
@ -124,10 +126,13 @@
|
|||
pbsj.job_name as specialPostName,
|
||||
pbp.nosocomium as hospital,
|
||||
pbp.personnel_type as personnelType,
|
||||
pbp.set_meal as setMeal
|
||||
pbp.set_meal as setMeal,
|
||||
pbp.base_name_id as baseNameId,
|
||||
pn.type_name as typeName
|
||||
from pm_base_physical pbp
|
||||
left join pm_base_special_job pbsj on pbsj.id = pbp.special_job and pbsj.is_active = '1'
|
||||
left join pm_phy_organization po on po.id = pbp.depart_id
|
||||
left join pm_organization po on po.id = pbp.depart_id
|
||||
LEFT JOIN pm_base_type_package_name pn on pn.id = pbp.base_name_id
|
||||
where pbp.is_active = '1'
|
||||
and pbp.id = #{id}
|
||||
</select>
|
||||
|
|
@ -147,7 +152,7 @@
|
|||
</select>
|
||||
<select id="getdepartmentName" resultType="java.lang.String">
|
||||
select id
|
||||
from pm_phy_organization
|
||||
from pm_organization
|
||||
where `name` = #{department}
|
||||
and is_active = '1' limit 1
|
||||
</select>
|
||||
|
|
@ -197,12 +202,16 @@
|
|||
where is_active = '1' and idcard = #{idNumber}
|
||||
</select>
|
||||
|
||||
<select id="getMealNameNew" resultType="com.bonus.boot.manager.basic.entity.PersonnelReservationBean">
|
||||
SELECT id as setMealId FROM `pm_base_type_package_name`
|
||||
WHERE type_name LIKE concat ('%',#{setMeal},'%')
|
||||
</select>
|
||||
|
||||
<update id="updateReservation">
|
||||
update pm_base_physical
|
||||
set
|
||||
depart_id=#{department},
|
||||
nosocomium=#{hospital},
|
||||
set_meal = #{checkType}
|
||||
base_name_id = #{setMeal}
|
||||
where is_active = '1' and id=#{id}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -70,6 +70,10 @@ select count(1) from pm_base_physical where telep_number=#{0} and is_active='1'
|
|||
select id as `key`,hospital as `value` from pm_base_hospital where is_active ='1'
|
||||
</select>
|
||||
|
||||
<select id="getPackageTypeName" resultType="com.bonus.boot.manager.basic.entity.MapBean">
|
||||
select id as `key`,type_name AS `value` from pm_base_type_package_name where is_active ='1'
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
SELECT a.phy_appont_time as `key`,COUNT(a.id) as `value`
|
||||
FROM pm_base_phy_appont a
|
||||
LEFT JOIN pm_base_physical b on b.id = a.user_id
|
||||
WHERE a.if_cancel ='2' and b.is_active = '1' and a.if_career_appoint = '2'
|
||||
WHERE a.if_cancel ='2' and b.is_active = '1'
|
||||
|
||||
<if test="hospitalId !=null and hospitalId !='null'">
|
||||
<if test="type == 1">
|
||||
|
|
@ -44,15 +44,17 @@
|
|||
a.phy_name AS personName,
|
||||
a.idcard AS idNumber,
|
||||
a.age,
|
||||
CASE
|
||||
WHEN check_content_id = 1 THEN
|
||||
'心血管'
|
||||
WHEN check_content_id = 2 THEN
|
||||
'肿瘤'
|
||||
WHEN check_content_id = 3 THEN
|
||||
'综合'
|
||||
ELSE
|
||||
'' end AS checkContentId,
|
||||
case when check_content_id != "" THEN '常规体检'
|
||||
else '职业体检' END AS checkContentId,
|
||||
-- CASE
|
||||
-- WHEN check_content_id = 1 THEN
|
||||
-- '心血管'
|
||||
-- WHEN check_content_id = 2 THEN
|
||||
-- '肿瘤'
|
||||
-- WHEN check_content_id = 3 THEN
|
||||
-- '综合'
|
||||
-- ELSE
|
||||
-- '' end AS checkContentId,
|
||||
IF (a.sex = '0', '男', '女') AS sex,
|
||||
# IF (b.if_edu = '0', '否', '是') AS ifEdu,
|
||||
IF(a.if_higher = '0', '否', '是') AS higherJob,
|
||||
|
|
@ -75,7 +77,7 @@
|
|||
WHERE
|
||||
if_cancel = '2' AND (check_content_id != "" OR check_content_id IS NOT NULL)
|
||||
) b ON a.id = b.user_id and a.is_active ='1'
|
||||
LEFT JOIN pm_phy_organization pmo ON pmo.ID = a.depart_id and pmo.IS_ACTIVE ='1'
|
||||
LEFT JOIN pm_organization pmo ON pmo.ID = a.depart_id and pmo.IS_ACTIVE ='1'
|
||||
LEFT JOIN pm_base_hospital pbh ON pbh.id = b.hospital_id and pbh.is_active = '1'
|
||||
LEFT JOIN sys_user sysu ON sysu.id = b.appoint_name_id and sysu.is_active ='1'
|
||||
WHERE
|
||||
|
|
|
|||
|
|
@ -224,3 +224,30 @@ function getHazard(form,hazard) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function getPackageTypeName(form,baseNameId) {
|
||||
$("#baseNameId").html("");
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: ctxPath + '/utilConnection/getPackageTypeName',
|
||||
data: {
|
||||
},
|
||||
async: false,
|
||||
success: function (data) {
|
||||
var html = '<option value="">--请选择套餐类型--</option>';
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
if (baseNameId == data[i].key) {
|
||||
html += '<option selected="selected" value=\'' + data[i].key + '\'>' + data[i].value + '</option>';
|
||||
} else {
|
||||
html += '<option value=\'' + data[i].key + '\'>' + data[i].value + '</option>';
|
||||
}
|
||||
}
|
||||
$("#baseNameId").html(html);
|
||||
layui.form.render('select'); //这里就是我们要渲染的地方了
|
||||
},
|
||||
error: function (err) {
|
||||
console.log("获取套餐类型下拉列表出错:", err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -16,8 +16,7 @@ layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function () {
|
|||
field: 'number', width:120,title: '序号', align: 'center', type: 'numbers'
|
||||
}
|
||||
, {field: 'typeName', align: 'center', title: '类型名称'}
|
||||
, {field: 'packageDescri', align: 'center', title: '套餐描述'}
|
||||
, {fixed: 'right', title: '操作', width: 200, align: 'center', toolbar: '#toolsBar'}
|
||||
, {fixed: 'right', title: '操作', align: 'center', toolbar: '#toolsBar'}
|
||||
]]
|
||||
, id: 'menuTable'
|
||||
, page: true //开启分页
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function () {
|
|||
, {field: 'personnelType', width: 120, align: 'center', title: '人员类型'}
|
||||
, {field: 'specialPost', width: 150, align: 'center', title: '是否特殊岗位'}
|
||||
, {field: 'hospital', width: 150, align: 'center', title: '体检医院'}
|
||||
, {field: 'setMeal', width: 150, align: 'center', title: '体检套餐'}
|
||||
, {field: 'typeName', width: 150, align: 'center', title: '体检套餐'}
|
||||
, {fixed: 'right',width: 270, title: '操作', align: 'center', toolbar: '#toolsBar'}
|
||||
]]
|
||||
, id: 'menuTable'
|
||||
|
|
@ -262,3 +262,58 @@ function importExcelYu() {
|
|||
});
|
||||
$("#articleImageFileYu").val("");
|
||||
}
|
||||
|
||||
|
||||
|
||||
function fetchExcelNew(){
|
||||
window.location.href = ctxPath + "/download/download?filename=预约体检模版.xlsx"
|
||||
}
|
||||
|
||||
function importExcelNew() {
|
||||
var formData = new FormData($('form')[0]);
|
||||
var name = $("#articleImageFileNew").val();
|
||||
if (name == null || name == "") {
|
||||
layer.msg("请上传Excel表格(.xlsx)");
|
||||
return;
|
||||
}
|
||||
if (!(name.endsWith(".xlsx"))) {
|
||||
layer.msg("请上传正确的Excel表格(.xlsx)!");
|
||||
$("#articleImageFileNew").val("");
|
||||
return;
|
||||
}
|
||||
formData.append("file", $("#articleImageFileNew")[0].files[0]);
|
||||
console.log(formData)
|
||||
var idx = layer.msg('正在提交数据,请稍等...', {
|
||||
icon: 16
|
||||
, shade: 0.01
|
||||
, time: '-1'
|
||||
});
|
||||
$.ajax({
|
||||
url: ctxPath + "/export/reservationNew",
|
||||
type: 'POST',
|
||||
async: true,
|
||||
data: formData,
|
||||
timeout: 60 * 1000 * 10,
|
||||
// 告诉jQuery不要去处理发送的数据
|
||||
processData: false,
|
||||
// 告诉jQuery不要去设置Content-Type请求头
|
||||
contentType: false,
|
||||
success: function (data) {
|
||||
if (data.resMsg == '导入成功') {
|
||||
showMessages('导入成功!', true);
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 30001)
|
||||
} else {
|
||||
showMessage(data.resMsg, false);
|
||||
}
|
||||
|
||||
console.log(data)
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||
console.log(JSON.stringify(errorThrown));
|
||||
layer.close(idx);
|
||||
}
|
||||
});
|
||||
$("#articleImageFileNew").val("");
|
||||
}
|
||||
|
|
@ -35,10 +35,19 @@ layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function () {
|
|||
, {field: 'higherJob', width: 240, align: 'center', title: '是否高职'}
|
||||
, {field: 'reservationTime', width: 200, align: 'center', title: '预约体检时间'}
|
||||
, {field: 'name', width: 200, align: 'center', title: '预约医院'}
|
||||
, {field: 'checkContentId', width: 200, align: 'center', title: '预约套餐'}
|
||||
, {field: 'checkContentId', width: 200, align: 'center', title: '预约体检',
|
||||
// templet:function(res){
|
||||
// var checkContentId = res.checkContentId;
|
||||
// if(checkContentId){
|
||||
// return "常规体检";
|
||||
// }else{
|
||||
// return "职业体检";
|
||||
// }
|
||||
// }
|
||||
}
|
||||
, {field: 'combName', width: 200, align: 'center', title: '套餐名称'}
|
||||
, {field: 'operateTime', width: 130, align: 'center', title: '操作时间'}
|
||||
, {field: 'operatePerson', width: 120, align: 'center', title: '操作人员'}
|
||||
// , {field: 'operatePerson', width: 120, align: 'center', title: '操作人员'}
|
||||
]]
|
||||
,done: function (res, curr, count) {
|
||||
var state = "";
|
||||
|
|
|
|||
|
|
@ -44,22 +44,16 @@
|
|||
<div class="layui-form-item" style="margin-top: 10%;">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label"><i class="tip-required" style="color: red;font-size: 20px">*</i>类型名称:</label>
|
||||
<!-- <input type="text" name="typeName" minlength="2" maxlength="10" title="字数2-10" lay-verify="required" id="typeName" required class="layui-input">-->
|
||||
<select class="layui-select" id="typeName" lay-verify="required" name="typeName">
|
||||
<option value="">--请选择类型名称--</option>
|
||||
<option value="1">标准套餐</option>
|
||||
<option value="2">个性化套餐</option>
|
||||
<option value="3">职业健康套餐</option>
|
||||
</select>
|
||||
<input type="text" name="typeName" maxlength="40" lay-verify="required" id="typeName" required class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-top: 20px;">
|
||||
<!--<div class="layui-form-item" style="margin-top: 20px;">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label"><i class="tip-required" style="color: red;font-size: 20px">*</i>套餐描述:</label>
|
||||
<input type="text" name="packageDescri" minlength="4" maxlength="30" title="字数4-30"
|
||||
lay-verify="required" id="packageDescri" required class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="layui-form-item" style="display: none">
|
||||
<div class="layui-input-block">
|
||||
<button type="submit" class="layui-btn subBtn" id="commit" lay-submit lay-filter="formDemo">提交
|
||||
|
|
@ -196,8 +190,7 @@
|
|||
var resMsg = data.resMsg;
|
||||
if ("数据获取成功" == resMsg) {
|
||||
let info = data.obj.BaseTypePackageBean;
|
||||
$("#typeName").find('option[value=\'' + info.typeName + '\']').prop("selected", "selected");
|
||||
$("#packageDescri").val(info.packageDescri);
|
||||
$("#typeName").val(info.typeName);
|
||||
form.render();
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -145,20 +145,17 @@
|
|||
|
||||
<div class="layui-form-item" style="margin-top: 20px;">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">体检医院:</label>
|
||||
<select id="hospital" class="layui-select" name="hospital">
|
||||
<label class="layui-form-label"><i class="tip-required" style="color: red;font-size: 20px">*</i>体检医院:</label>
|
||||
<select id="hospital" class="layui-select" name="hospital" lay-verify="required">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" style="margin-top: 20px;">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">体检套餐:</label>
|
||||
<select id="setMeal" name="setMeal">
|
||||
<option value="">选择套餐</option>
|
||||
<option value="1">心血管</option>
|
||||
<option value="2">肿瘤</option>
|
||||
<option value="3">综合</option>
|
||||
<label class="layui-form-label"><i class="tip-required" style="color: red;font-size: 20px">*</i>体检套餐:</label>
|
||||
<select id="baseNameId" name="baseNameId" lay-verify="required">
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -221,6 +218,12 @@
|
|||
* 部门下拉树
|
||||
*/
|
||||
loadOrgTree();
|
||||
|
||||
/**
|
||||
* 体检套餐下拉框
|
||||
*/
|
||||
getPackageTypeName(form,null)
|
||||
|
||||
/**
|
||||
* 修改方法调用数据回显
|
||||
*/
|
||||
|
|
@ -370,7 +373,10 @@
|
|||
$("#idNumber").prop("readonly", true);
|
||||
$("#phone").prop("readonly", true);
|
||||
getExaminationHospital(form, info.hospital);
|
||||
$("#setMeal").find('option[value=\'' + info.setMeal + '\']').prop("selected", "selected");
|
||||
|
||||
getPackageTypeName(form, info.baseNameId)
|
||||
|
||||
// $("#setMeal").find('option[value=\'' + info.setMeal + '\']').prop("selected", "selected");
|
||||
form.render();
|
||||
// isSpecial('higherJob');
|
||||
if (info.higherJob == '1'){
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@
|
|||
</div>
|
||||
|
||||
<div class="layui-input-inline" style="width: 20%;">
|
||||
<label class="layui-form-label" style="width: 30%;;padding: 12px 0px">高职人员:</label>
|
||||
<label class="layui-form-label" style="width: 30%;padding: 12px 0px">高职人员:</label>
|
||||
<select class="layui-select" id="higherJob" name="higherJob">
|
||||
<option value="">--请选择是否高职人员--</option>
|
||||
<option value="1">是</option>
|
||||
|
|
@ -148,5 +148,14 @@
|
|||
<button id="importExcelYu" style="margin-bottom: 3px" onclick="importExcelYu()" class="layui-btn layui-btn-sm" ><i class="layui-icon"></i>导入预约</button>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline" style="width: 6%;margin-top: 4px">
|
||||
<button id="exportBtnNew" class="layui-btn layui-btn-sm" onclick="fetchExcelNew()" ><i class="layui-icon"></i>导出预约模板-新</button>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline" >
|
||||
<input id="articleImageFileNew" name="excelFile" type="file" class="form-control" style="width: 200px; padding-top: 8px;margin-left: 70px;" />
|
||||
<button id="importExcelNew" style="margin-bottom: 3px" onclick="importExcelNew()" class="layui-btn layui-btn-sm" ><i class="layui-icon"></i>导入预约-新</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</script>
|
||||
Loading…
Reference in New Issue