体检人员数据推送
This commit is contained in:
parent
20c985145b
commit
83c31970f7
|
|
@ -0,0 +1,8 @@
|
|||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ApifoxUploaderProjectSetting">
|
||||
<option name="apiAccessToken" value="APS-h4ROYYi43uqldEPrj5G7hINj2wmcHX1E" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="true" />
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="YSpeaManager" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||
<module name="YSpeaManager" options="-parameters" />
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="UTF-8" addBOMForNewFiles="with BOM">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="AliAccessStaticViaInstance" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAbstractClassShouldStartWithAbstractNaming" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidApacheBeanUtilsCopy" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidCallStaticSimpleDateFormat" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidComplexCondition" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidNewDateGetTime" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidPatternCompileInMethod" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidUseTimer" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaClassMustHaveAuthor" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaConcurrentExceptionWithModifyOriginSubList" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaLockShouldWithTryFinally" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaMethodReturnWrapperType" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaMethodTooLong" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaPackageNaming" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaTestClassShouldEndWithTestNaming" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaTransactionMustHaveRollback" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaUseRightCaseForDateFormat" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||
</project>
|
||||
|
|
@ -17,4 +17,5 @@ public class MapBean {
|
|||
private String reservationTime;
|
||||
private String personName;
|
||||
private String phone;
|
||||
private String userId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,4 +114,6 @@ public class PersonnelLibraryBean extends HospitalBean{
|
|||
*/
|
||||
private String personnelType;
|
||||
|
||||
private String userId;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -342,25 +342,27 @@ public class UserController {
|
|||
public static String login() throws Exception {
|
||||
String phone = "15955081965";
|
||||
String phones = AESCBCUtils.encrypt(phone, AESCBCUtils.sKey);
|
||||
String password = "CCW1998@yyt";
|
||||
String password = "ccw1998@YYT";
|
||||
String passwords = AESCBCUtils.encrypt(password, AESCBCUtils.sKey);
|
||||
String user = "{'phone':'" + phones + "','pd':'" + passwords + "'}";
|
||||
JSONObject object = JSON.parseObject(user);
|
||||
String result = HttpClientUtils.doHttpPost("http://112.29.103.165:1616/ynuw/sys/api/userLogin", object, null);
|
||||
// String result = HttpClientUtils.doHttpPost("http://112.29.103.165:1616/ynuw/sys/api/userLogin", object, null);
|
||||
String result = HttpClientUtils.doHttpPost("http://192.168.0.14:27018/ynuw/sys/api/userLogin", object, null);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
String string = JSONObject.parseObject(jsonObject.getString("data")).getString("token");
|
||||
return string;
|
||||
}
|
||||
|
||||
//统一平台新增接口 获取token
|
||||
public static String addUser(String userName , String phone,String token) throws Exception {
|
||||
//统一平台后台新增接口 获取token
|
||||
public String addUser(String userName, String phone, String token) throws Exception {
|
||||
String isActive = "";
|
||||
List<UnifyBean> list = new ArrayList<>();
|
||||
UnifyBean userVo = new UnifyBean();
|
||||
userVo.setUserName(userName);
|
||||
userVo.setPhone(phone);
|
||||
userVo.setSystemName("健康体检");
|
||||
userVo.setAuth("后台");
|
||||
String permissionQuery = userService.getPermissionQuery(userVo);
|
||||
userVo.setAuth(permissionQuery);
|
||||
userVo.setIsBlacklist("0");
|
||||
userVo.setAccountStatus("1");
|
||||
list.add(userVo);
|
||||
|
|
@ -368,11 +370,12 @@ public class UserController {
|
|||
String encrypt = AESCBCUtils.encrypt(s, AESCBCUtils.sKey);
|
||||
String params = "{'params':'" + encrypt + "'}";
|
||||
JSONObject object = JSON.parseObject(params);
|
||||
String result = HttpClientUtils.doHttpPost("http://112.29.103.165:1616/ynuw/sys/api/putUser", object, token);
|
||||
// String result = HttpClientUtils.doHttpPost("http://112.29.103.165:1616/ynuw/sys/api/putUser", object, token);
|
||||
String result = HttpClientUtils.doHttpPost("http://192.168.0.14:27018/ynuw/sys/api/putUser", object, token);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
String code = jsonObject.getString("code");
|
||||
System.err.println("新增code="+code);
|
||||
if(code.equals("200")){
|
||||
if("200".equals(code)){
|
||||
JSONArray data = jsonObject.getJSONArray("data");
|
||||
System.err.println("新增data="+data);
|
||||
if(data.size() == 0){
|
||||
|
|
@ -432,7 +435,8 @@ public class UserController {
|
|||
String encrypt = AESCBCUtils.encrypt(s, AESCBCUtils.sKey);
|
||||
String params = "{'params':'" + encrypt + "'}";
|
||||
JSONObject object = JSON.parseObject(params);
|
||||
String result = HttpClientUtils.doHttpPost("http://112.29.103.165:1616/ynuw/sys/api/delUser", object, token);
|
||||
// String result = HttpClientUtils.doHttpPost("http://112.29.103.165:1616/ynuw/sys/api/delUser", object, token);
|
||||
String result = HttpClientUtils.doHttpPost("http://192.168.0.14:27018/ynuw/sys/api/delUser", object, token);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
String code = jsonObject.getString("code");
|
||||
System.err.println("删除code="+code);
|
||||
|
|
|
|||
|
|
@ -45,6 +45,13 @@ public class UtilController {
|
|||
List<MapBean> list = service.getHospitalSelect(o);
|
||||
return list.size() > 0 ? R.okTable(list, list.size()):R.failTable("暂无数据");
|
||||
}
|
||||
@LogAnnotation
|
||||
@PostMapping("getNewHospitalSelect")
|
||||
@ApiOperation(value = "医院select列表")
|
||||
public R getNewHospitalSelectv(MapBean o){
|
||||
List<MapBean> list = service.getNewHospitalSelect(o);
|
||||
return list.size() > 0 ? R.okTable(list, list.size()):R.failTable("暂无数据");
|
||||
}
|
||||
|
||||
@LogAnnotation
|
||||
@PostMapping(value = "/getPackageType")
|
||||
|
|
|
|||
|
|
@ -72,6 +72,12 @@ public interface UserDao {
|
|||
|
||||
int updateRoleUser(SysUser bean);
|
||||
|
||||
List<UnifyBean> getPhysicalExamination();
|
||||
|
||||
int updateUserPushStatus(@Param("list") List<UnifyBean> list);
|
||||
|
||||
String getPermissionQuery(UnifyBean userVo);
|
||||
|
||||
//统一权限新增
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -60,4 +60,6 @@ public interface UtilDao {
|
|||
|
||||
|
||||
List<MapBean> getExaminationHospital();
|
||||
|
||||
List<MapBean> getNewHospitalSelect(MapBean bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,5 +33,7 @@ public class UnifyBean {
|
|||
private String description;
|
||||
private String createDate;
|
||||
private String result;
|
||||
private int status;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.boot.manager.manager.service;
|
||||
|
||||
import com.bonus.boot.manager.basic.entity.PersonnelLibraryBean;
|
||||
import com.bonus.boot.manager.manager.entity.UnifyBean;
|
||||
import com.bonus.boot.manager.manager.entity.UserDto;
|
||||
import com.bonus.boot.manager.manager.model.SysUser;
|
||||
|
||||
|
|
@ -31,4 +32,6 @@ public interface UserService {
|
|||
int resetPasswordForOne(SysUser bean);
|
||||
|
||||
void updateUnify(Long id);
|
||||
|
||||
String getPermissionQuery(UnifyBean userVo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,4 +42,6 @@ public interface UtilService {
|
|||
List<MapBean> getHazard();
|
||||
|
||||
List<MapBean> getExaminationHospital();
|
||||
|
||||
List<MapBean> getNewHospitalSelect(MapBean o);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
|
||||
import com.bonus.boot.manager.basic.entity.PersonnelLibraryBean;
|
||||
import com.bonus.boot.manager.manager.dao.UtilDao;
|
||||
import com.bonus.boot.manager.manager.entity.UnifyBean;
|
||||
import com.bonus.boot.manager.manager.utils.StringHelper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
@ -162,4 +163,13 @@ public class UserServiceImpl implements UserService {
|
|||
userDao.updateUnify(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param userVo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getPermissionQuery(UnifyBean userVo) {
|
||||
return userDao.getPermissionQuery(userVo);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,4 +64,13 @@ public class UtilServiceImpl implements UtilService {
|
|||
public List<MapBean> getExaminationHospital() {
|
||||
return utilDao.getExaminationHospital();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<MapBean> getNewHospitalSelect(MapBean bean) {
|
||||
return utilDao.getNewHospitalSelect(bean);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ public class ResStatisticsServiceImpl implements ResStatisticsService {
|
|||
|
||||
@Override
|
||||
public List<MapBean> getList(MapBean bean) {
|
||||
|
||||
String userId = String.valueOf(UserUtil.getLoginUser().getId());
|
||||
bean.setUserId(userId);
|
||||
return dao.getList(bean);
|
||||
}
|
||||
|
||||
|
|
@ -37,6 +38,8 @@ public class ResStatisticsServiceImpl implements ResStatisticsService {
|
|||
LoginUser loginUser = UserUtil.getLoginUser();
|
||||
String hospid = UserUtil.getLoginUser().getHospitalId();
|
||||
bean.setHospId(hospid);
|
||||
String userId = String.valueOf(UserUtil.getLoginUser().getId());
|
||||
bean.setUserId(userId);
|
||||
return dao.getChildList(bean);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.boot.manager.task;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.bonus.boot.manager.basic.controller.AESCBCUtils;
|
||||
import com.bonus.boot.manager.manager.controller.HttpClientUtils;
|
||||
|
|
@ -13,6 +14,7 @@ import org.springframework.scheduling.annotation.Async;
|
|||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
|
|
@ -112,4 +114,62 @@ public class UnifyTask {
|
|||
String result = HttpClientUtils.doHttpPost("http://112.29.103.165:1616/ynuw/sys/api/putOperaLog", object, token);
|
||||
log.info("操作日志数据="+result);
|
||||
}
|
||||
|
||||
// @Scheduled(fixedRate = 1000*60*60)
|
||||
@PostConstruct
|
||||
@Async
|
||||
public void physicalExaminationPersonnel() throws Exception {
|
||||
log.info("--------定时统一体检人员数据扫描器启动------");
|
||||
//查询某日登录日志数据
|
||||
List<UnifyBean> list = userDao.getPhysicalExamination();
|
||||
if (!list.isEmpty()) {
|
||||
//获取登录的token
|
||||
String token = UserController.login();
|
||||
// 每组的大小
|
||||
int groupSize = 20;
|
||||
// 总的分组数
|
||||
int totalGroups = (int) Math.ceil((double) list.size() / groupSize);
|
||||
// 遍历分组
|
||||
for (int i = 0; i < totalGroups; i++) {
|
||||
// 计算当前分组元素的起始索引
|
||||
int fromIndex = i * groupSize;
|
||||
// 计算当前分组元素的结束索引,确保不超过总元素数
|
||||
int toIndex = Math.min((i + 1) * groupSize, list.size());
|
||||
// 根据索引范围获取当前分组的元素,并调用接口处理分组数据
|
||||
List<UnifyBean> group = list.subList(fromIndex, toIndex);
|
||||
|
||||
physicalExaminationPush(group,token);
|
||||
}
|
||||
} else {
|
||||
log.info("无体检人员数据");
|
||||
}
|
||||
}
|
||||
|
||||
private void physicalExaminationPush(List<UnifyBean> list, String token) throws Exception {
|
||||
String s = JSON.toJSONString(list);
|
||||
String encrypt = AESCBCUtils.encrypt(s, AESCBCUtils.sKey);
|
||||
String params = "{'params':'" + encrypt + "'}";
|
||||
JSONObject object = JSON.parseObject(params);
|
||||
// String result = HttpClientUtils.doHttpPost("http://112.29.103.165:1616/ynuw/sys/api/putOperaLog", object, token);
|
||||
String result = HttpClientUtils.doHttpPost("http://192.168.0.14:27018/ynuw/sys/api/putUser", object, token);
|
||||
//推送成功改推送状态
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
String code = jsonObject.getString("code");
|
||||
System.err.println("新增code="+code);
|
||||
if(code.equals("200")){
|
||||
JSONArray data = jsonObject.getJSONArray("data");
|
||||
System.err.println("新增data="+data);
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
String phone = data.getString(i);
|
||||
for (int j = 0; j < list.size(); j++) {
|
||||
if (phone.equals(list.get(j).getPhone())) {
|
||||
list.get(j).setStatus(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
int i = userDao.updateUserPushStatus(list);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,17 +8,17 @@ server.port=18088
|
|||
#\u8BBF\u95EE\u8DEF\u5F84
|
||||
server.servlet.context-path=/YSpeaManager
|
||||
#\u6B63\u5F0F\u5E93
|
||||
spring.datasource.url=jdbc:mysql://192.168.1.8:23342/yn_tj_appoint?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=Bonus@yntj123!
|
||||
#spring.datasource.url=jdbc:mysql://192.168.1.8:23342/yn_tj_appoint?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
|
||||
#spring.datasource.username=root
|
||||
#spring.datasource.password=Bonus@yntj123!
|
||||
#\u6D4B\u8BD5\u5E93
|
||||
#spring.datasource.url=jdbc:mysql://192.168.0.14:1115/cs_yn?useSSL=false&allowMultiQueries=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
#spring.datasource.username=root
|
||||
#spring.datasource.password=xbzadmin@szedu14!
|
||||
spring.datasource.url=jdbc:mysql://192.168.0.14:1115/yn_tj_appoint?useSSL=false&allowMultiQueries=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=xbzadmin@szedu14!
|
||||
#\u672C\u5730\u5E93
|
||||
#spring.datasource.url=jdbc:mysql://192.168.0.14:1115/yn_tj_appoint?useSSL=false&allowMultiQueries=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/yn_tj_appoint?useSSL=false&allowMultiQueries=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
#spring.datasource.username=root
|
||||
#spring.datasource.password=xbzadmin@szedu14!
|
||||
#spring.datasource.password=ljj@bonus
|
||||
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
spring.datasource.max-idle=10
|
||||
|
|
@ -36,13 +36,13 @@ mybatis.type-aliases-package=com.bonus.boot.manager.*.entity
|
|||
#spring.redis.port=6379
|
||||
#spring.redis.password=Ynsmz@186redis!
|
||||
#\u6D4B\u8BD5
|
||||
spring.redis.host=192.168.1.8
|
||||
spring.redis.port=23347
|
||||
spring.redis.password=Bonus@yntj123!
|
||||
#spring.redis.host=192.168.1.8
|
||||
#spring.redis.port=23347
|
||||
#spring.redis.password=Bonus@yntj123!
|
||||
#\u672C\u5730
|
||||
#spring.redis.host=127.0.0.1
|
||||
#spring.redis.port=6379
|
||||
#spring.redis.password=
|
||||
spring.redis.host=127.0.0.1
|
||||
spring.redis.port=6379
|
||||
spring.redis.password=
|
||||
|
||||
#spring.redis.password=Ynsmz@186redis!
|
||||
# \u65E5\u5FD7
|
||||
|
|
|
|||
|
|
@ -66,6 +66,9 @@ select count(1) from pm_base_physical where telep_number=#{0} and is_active='1'
|
|||
<select id="getExaminationHospital" resultType="com.bonus.boot.manager.basic.entity.MapBean">
|
||||
select id as `key`,hospital as `value` from pm_base_hospital where is_active = '1'
|
||||
</select>
|
||||
<select id="getNewHospitalSelect" resultType="com.bonus.boot.manager.basic.entity.MapBean">
|
||||
select id as `key`,hospital as `value` from pm_base_hospital where is_active ='1'
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,10 @@
|
|||
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'
|
||||
|
||||
<if test="hospitalId !=null and hospitalId !='null'">
|
||||
<if test="type == 1">
|
||||
<if test="userId != 1">
|
||||
<if test="hospitalId == 35">
|
||||
and a.hospital_id = '35' AND (check_content_id != "" OR check_content_id IS NOT NULL)
|
||||
|
||||
|
|
@ -17,6 +19,7 @@
|
|||
and a.hospital_id = #{hospitalId}
|
||||
</if>
|
||||
</if>
|
||||
</if>
|
||||
<if test="type == 2">
|
||||
and a.hospital_id = '35' AND a.is_special != '0'
|
||||
</if>
|
||||
|
|
@ -92,9 +95,11 @@
|
|||
<if test="phyTimeEnd !=null and phyTimeEnd !=''">
|
||||
and b.phy_appont_time between #{phyTimeStart} and #{phyTimeEnd}
|
||||
</if>
|
||||
<if test="userId != 1">
|
||||
<if test="hospId !=null and hospId !=''">
|
||||
and b.hospital_id = #{hospId}
|
||||
</if>
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="getHospitalId" resultType="java.lang.String">
|
||||
|
|
|
|||
|
|
@ -187,6 +187,33 @@
|
|||
AND l.module NOT LIKE '%退出%'
|
||||
|
||||
</select>
|
||||
<select id="getPhysicalExamination" resultType="com.bonus.boot.manager.manager.entity.UnifyBean">
|
||||
SELECT
|
||||
phy_name AS userName,
|
||||
telep_number AS phone,
|
||||
'健康体检' AS systemName,
|
||||
CASE
|
||||
WHEN EXISTS (SELECT 1 FROM pm_base_physical WHERE telep_number = #{phone} AND is_active = '1')
|
||||
AND EXISTS (SELECT 1 FROM sys_user WHERE phone = #{phone} AND is_active = '1') THEN '后台, 移动端'
|
||||
WHEN EXISTS (SELECT 1 FROM sys_user WHERE phone = #{phone} AND is_active = '1') THEN '后台'
|
||||
WHEN EXISTS (SQL:1 FROM pm_base_physical WHERE telep_number = #{phone} AND is_active = '1') THEN '移动端'
|
||||
ELSE '不存在'
|
||||
END AS auth,
|
||||
'0' AS isBlacklist,
|
||||
'1' AS accountStatus,
|
||||
'1' AS status
|
||||
FROM pm_base_physical
|
||||
WHERE is_active = '1' AND pushStatus != 1
|
||||
</select>
|
||||
<select id="getPermissionQuery" resultType="java.lang.String">
|
||||
SELECT
|
||||
CASE
|
||||
WHEN EXISTS (SELECT 1 FROM pm_base_physical WHERE telep_number = #{phone} AND is_active = '1') AND EXISTS (SELECT 1 FROM sys_user WHERE phone = #{phone} AND is_active = '1') THEN '后台, 移动端'
|
||||
WHEN EXISTS (SELECT 1 FROM sys_user WHERE phone = #{phone} AND is_active = '1') THEN '后台'
|
||||
WHEN EXISTS (SELECT 1 FROM pm_base_physical WHERE telep_number = #{phone} AND is_active = '1') THEN '移动端'
|
||||
ELSE '不存在'
|
||||
END AS source;
|
||||
</select>
|
||||
|
||||
<insert id="addInfo" keyProperty="userId" useGeneratedKeys="true">
|
||||
insert into sys_user(username,password,id_card,phone,sex,age,department,role,is_active,hospital_id)
|
||||
|
|
@ -246,5 +273,10 @@
|
|||
<update id="updateUnify">
|
||||
UPDATE sys_user SET is_push = '0' WHERE id = #{id}
|
||||
</update>
|
||||
<update id="updateUserPushStatus">
|
||||
<foreach collection="list" item="user" separator=";">
|
||||
UPDATE pm_base_physical SET `pushStatus`= #{user.status} WHERE telep_number = #{user.phone} and is_active = '1'
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -174,7 +174,7 @@ function gethospital(form,hospitalId) {
|
|||
$("#hospitalId").html("");
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: ctxPath + '/utilConnection/getHospitalSelect',
|
||||
url: ctxPath + '/utilConnection/getNewHospitalSelect',
|
||||
data: {
|
||||
value:hospitalId
|
||||
},
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function () {
|
|||
case "searchBt":
|
||||
personName = $("#personName").val();
|
||||
oldStatus = $("#name").val();
|
||||
hospitalName = $("#name").val();
|
||||
// hospitalName = $("#name").val();
|
||||
timeStart = $("#phyTimeStart").val();
|
||||
timeEnd = $("#phyTimeEnd").val();
|
||||
table.reload('menuTable', {
|
||||
|
|
@ -129,9 +129,9 @@ layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function () {
|
|||
} //设定异步数据接口的额外参数
|
||||
});
|
||||
initTime();
|
||||
console.log(hospitalName)
|
||||
// console.log(hospitalName)
|
||||
$("#personName").val(personName);
|
||||
$("#oldStatus").val(hospitalName);
|
||||
$("#name").val(oldStatus);
|
||||
$("#phyTimeStart").val(timeStart);
|
||||
$("#phyTimeEnd").val(timeEnd);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -165,7 +165,8 @@
|
|||
form.verify({});
|
||||
/**
|
||||
* 人员角色下拉框
|
||||
*/hospitalId
|
||||
*/
|
||||
// hospitalId
|
||||
getRole(form, null);
|
||||
/**
|
||||
* 选择医院
|
||||
|
|
|
|||
Loading…
Reference in New Issue