init:基础数据同步服务初始化;开发肇庆第一人医用户,科室,患者基础数据同步
commit
17f073f522
@ -0,0 +1,35 @@
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
docus-services/docus-services-system1/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
*.log
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
mvnw*
|
||||
*.cmd
|
||||
*.mvn
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
logs*
|
@ -0,0 +1,73 @@
|
||||
<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.0.0.xsd">
|
||||
|
||||
<id>exe</id>
|
||||
<formats>
|
||||
<format>dir</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
|
||||
<fileSets>
|
||||
|
||||
<fileSet>
|
||||
<outputDirectory>/lib</outputDirectory>
|
||||
<directory>${basedir}/target/lib</directory>
|
||||
</fileSet>
|
||||
|
||||
<fileSet>
|
||||
<outputDirectory>/config</outputDirectory>
|
||||
<directory>${basedir}/target/resources</directory>
|
||||
<fileMode>0755</fileMode>
|
||||
<includes>
|
||||
<include>*.xml</include>
|
||||
<include>*.yml</include>
|
||||
<include>*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet>
|
||||
<outputDirectory>/dataConfig</outputDirectory>
|
||||
<directory>${basedir}/target/dataConfig</directory>
|
||||
<fileMode>0755</fileMode>
|
||||
<includes>
|
||||
<include>*.json</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<directory>${basedir}/target/resources/bin</directory>
|
||||
<fileMode>0755</fileMode>
|
||||
<includes>
|
||||
<include>*.bat</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<directory>${basedir}/target/resources/bin</directory>
|
||||
<fileMode>0755</fileMode>
|
||||
<includes>
|
||||
<include>*.xml</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<directory>${basedir}</directory>
|
||||
<fileMode>0755</fileMode>
|
||||
<includes>
|
||||
<include>*.exe</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<!-- 将项目启动jar打包到boot目录中 -->
|
||||
<fileSet>
|
||||
<directory>${basedir}/target</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<fileMode>0755</fileMode>
|
||||
<includes>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
@ -0,0 +1 @@
|
||||
{"startDate": "2024-01-01", "pageNumber": 1, "pageSize": 100}
|
@ -0,0 +1,18 @@
|
||||
package com.docus.server.archive.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author YongBin Wen
|
||||
* @date 2024/5/23 15:47
|
||||
*/
|
||||
@Component
|
||||
@Data
|
||||
public class DocusProperties {
|
||||
@Value("${docus.sync-service-prefix}")
|
||||
private String syncServicePrefix;
|
||||
@Value("${docus.default-user-pwd:fd29cd53ec12616e5f36b77d4afffbff}")
|
||||
private String defaultUserPwd;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.docus.server.archive.constans;
|
||||
|
||||
/**
|
||||
* @author YongBin Wen
|
||||
* @date 2024/5/23 15:42
|
||||
*/
|
||||
public interface SyncConstant {
|
||||
|
||||
String PATIENT_INFO_SYNC_SERVICE_SUFFIX = "PatientInfoSyncService";
|
||||
|
||||
String USER_INFO_SYNC_SERVICE_SUFFIX = "UserInfoSyncService";
|
||||
|
||||
String DEPT_INFO_SYNC_SERVICE_SUFFIX = "DeptInfoSyncService";
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.docus.server.archive.converter;
|
||||
|
||||
import com.docus.server.archive.entity.PowerDept;
|
||||
import com.docus.server.zqdyry.entity.ZqDyRyDeptInfoView;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author YongBin Wen
|
||||
* @date 2024/5/24 14:17
|
||||
*/
|
||||
public class ZqDyRyDeptInfoConverter {
|
||||
public static PowerDept convertDeptInfo(ZqDyRyDeptInfoView view) {
|
||||
if (view == null) {
|
||||
return null;
|
||||
}
|
||||
PowerDept powerDept = new PowerDept();
|
||||
powerDept.setDeptCode(view.getID());
|
||||
powerDept.setDeptName(view.getFDEPTNAME());
|
||||
powerDept.setEffective(Objects.isNull(view.getSTATUS()) ? 1 : Integer.parseInt(view.getSTATUS()));
|
||||
return powerDept;
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.docus.server.archive.converter;
|
||||
|
||||
import com.docus.server.archive.entity.TBasic;
|
||||
import com.docus.server.archive.utils.PinYinUtil;
|
||||
import com.docus.server.zqdyry.entity.ZqDyRyPatientInfoView;
|
||||
|
||||
/**
|
||||
* @author YongBin Wen
|
||||
* @date 2024/5/24 14:17
|
||||
*/
|
||||
public class ZqDyRyPatientInfoConverter {
|
||||
public static TBasic convertPatientInfo(ZqDyRyPatientInfoView view) {
|
||||
if (view == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
TBasic tBasic = new TBasic();
|
||||
tBasic.setJzh(view.getJZH());
|
||||
tBasic.setInpatientNo(view.getZYH());
|
||||
tBasic.setAdmissTimes(view.getZYCS());
|
||||
tBasic.setName(view.getXM());
|
||||
tBasic.setNameSpell(getPinyinFirstSpell(view.getXM()));
|
||||
tBasic.setSex(getSexCodeBySexName(view.getXB()));
|
||||
tBasic.setSexName(view.getXB());
|
||||
tBasic.setAdmissDate(view.getRYRQ());
|
||||
tBasic.setAdmissDept(view.getRYBQ());
|
||||
tBasic.setAdmissDeptName(view.getRYKS());
|
||||
tBasic.setBedNo(view.getCWDM());
|
||||
tBasic.setAttending(view.getDQYS());
|
||||
tBasic.setAttendingName(view.getDQXM());
|
||||
tBasic.setAge(view.getNL());
|
||||
tBasic.setAgeMonth(0);
|
||||
tBasic.setAgeDay(0);
|
||||
tBasic.setIdCard(view.getSFZH());
|
||||
tBasic.setTelphone(view.getLXDH());
|
||||
tBasic.setDisDate(view.getCYRQ());
|
||||
tBasic.setDisDept(view.getDQBQ());
|
||||
tBasic.setDisDeptName(view.getDQKS());
|
||||
tBasic.setTotalCost(view.getZJINE());
|
||||
tBasic.setIsDead(view.getSFSW());
|
||||
tBasic.setFileSource(1);
|
||||
return tBasic;
|
||||
}
|
||||
|
||||
public static String getPinyinFirstSpell(String str) {
|
||||
try {
|
||||
return PinYinUtil.getFirstSpell(str);
|
||||
} catch (Exception ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static String getSexCodeBySexName(String sexName) {
|
||||
if ("男".equals(sexName)) {
|
||||
return "1";
|
||||
}
|
||||
if ("女".equals(sexName)) {
|
||||
return "2";
|
||||
}
|
||||
return "3";
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.docus.server.archive.converter;
|
||||
|
||||
import com.docus.server.archive.entity.PowerUser;
|
||||
import com.docus.server.zqdyry.entity.ZqDyRyUserInfoView;
|
||||
|
||||
/**
|
||||
* @author YongBin Wen
|
||||
* @date 2024/5/24 14:17
|
||||
*/
|
||||
public class ZqDyRyUserInfoConverter {
|
||||
public static PowerUser convertUserInfo(ZqDyRyUserInfoView view) {
|
||||
if (view == null) {
|
||||
return null;
|
||||
}
|
||||
Long roleId = ("1".equals(view.getFL()) || "3".equals(view.getFL())) ? 1L : 2L;
|
||||
Integer enable = "1".equals(view.getFISAVAILABLE()) ? 1 : 0;
|
||||
PowerUser user = new PowerUser();
|
||||
user.setUserName(view.getFEMPCODE());
|
||||
user.setName(view.getFEMPNAME());
|
||||
user.setDeptId(view.getFIP_DEPTID());
|
||||
user.setEffective(enable);
|
||||
user.setEnabled(enable);
|
||||
user.setRoleId(roleId);
|
||||
user.setPowerDept(user.getDeptId());
|
||||
// 医生默认管辖医生为自己
|
||||
if (roleId.equals(1L)) {
|
||||
user.setPowerAttending(user.getUserName());
|
||||
}
|
||||
return user;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.docus.server.archive.service;
|
||||
|
||||
/**
|
||||
* 科室同步服务
|
||||
*
|
||||
* @author YongBin Wen
|
||||
* @date 2024/3/27 16:25
|
||||
*/
|
||||
public interface DeptInfoSyncService {
|
||||
/**
|
||||
* 全量同步
|
||||
* @date 2024/5/23 15:45
|
||||
* @author YongBin Wen
|
||||
*/
|
||||
void fullSync();
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.docus.server.archive.service;
|
||||
|
||||
/**
|
||||
* 用户信息同步
|
||||
*
|
||||
* @author YongBin Wen
|
||||
* @date 2024/3/27 16:25
|
||||
*/
|
||||
public interface UserInfoSyncService {
|
||||
/**
|
||||
* 全量同步
|
||||
*
|
||||
* @date 2024/5/23 15:45
|
||||
* @author YongBin Wen
|
||||
*/
|
||||
void fullSync();
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.docus.server.zqdyry.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author YongBin Wen
|
||||
* @date 2024/5/23 16:35
|
||||
*/
|
||||
@ApiModel("肇庆第一人医患者信息视图")
|
||||
@Data
|
||||
public class ZqDyRyPatientInfoView {
|
||||
@ApiModelProperty("id号码 唯一标识")
|
||||
private String JZH;
|
||||
@ApiModelProperty("住院号")
|
||||
private String ZYH;
|
||||
@ApiModelProperty("住院次数")
|
||||
private Integer ZYCS;
|
||||
@ApiModelProperty("病人姓名")
|
||||
private String XM;
|
||||
@ApiModelProperty("性别 男女")
|
||||
private String XB;
|
||||
@ApiModelProperty("入院时间")
|
||||
private Date RYRQ;
|
||||
@ApiModelProperty("入院科室id")
|
||||
private String RYBQ;
|
||||
@ApiModelProperty("入院科室名称")
|
||||
private String RYKS;
|
||||
@ApiModelProperty("床位号码")
|
||||
private String CWDM;
|
||||
@ApiModelProperty("主治医师编码")
|
||||
private String DQYS;
|
||||
@ApiModelProperty("主治医师名称")
|
||||
private String DQXM;
|
||||
@ApiModelProperty("nl")
|
||||
private Integer NL;
|
||||
@ApiModelProperty("最后修改时间")
|
||||
private String LAST_MODIFIC_TIME;
|
||||
@ApiModelProperty("身份证件号码")
|
||||
private String SFZH;
|
||||
@ApiModelProperty("联系人电话")
|
||||
private String LXDH;
|
||||
@ApiModelProperty("出院时间")
|
||||
private Date CYRQ;
|
||||
@ApiModelProperty("出院科室编码")
|
||||
private String DQBQ;
|
||||
@ApiModelProperty("出院科室名称")
|
||||
private String DQKS;
|
||||
@ApiModelProperty("是否死亡 1死亡 0非死亡")
|
||||
private Integer SFSW;
|
||||
@ApiModelProperty("出院方式")
|
||||
private String CYQK;
|
||||
@ApiModelProperty("患者本次住院总费用")
|
||||
private String ZJINE;
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.docus.server.zqdyry.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.docus.server.zqdyry.entity.ZqDyRyDeptInfoView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author YongBin Wen
|
||||
* @date 2024/3/27 15:55
|
||||
*/
|
||||
@DS("zqdyry")
|
||||
public interface ZqDyRyDeptInfoViewMapper {
|
||||
/**
|
||||
* 获取视图科室信息
|
||||
*
|
||||
* @return 科室信息数据
|
||||
*/
|
||||
List<ZqDyRyDeptInfoView> list();
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.docus.server.zqdyry.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.docus.server.zqdyry.entity.ZqDyRyUserInfoView;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author YongBin Wen
|
||||
* @date 2024/3/27 15:55
|
||||
*/
|
||||
@DS("zqdyry")
|
||||
public interface ZqDyRyUserInfoViewMapper {
|
||||
|
||||
/**
|
||||
* 分页获取用户员工数据
|
||||
*
|
||||
* @param startRow oracle ROWNUM 起始 1
|
||||
* @param endRow oracle ROWNUM 结束(包含)
|
||||
* @return 员工用户数据
|
||||
*/
|
||||
List<ZqDyRyUserInfoView> page(@Param("startRow") int startRow, @Param("endRow") int endRow);
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.docus.server.zqdyry.mapper.ZqDyRyDeptInfoViewMapper">
|
||||
|
||||
|
||||
<select id="list" resultType="com.docus.server.zqdyry.entity.ZqDyRyDeptInfoView">
|
||||
SELECT ID, FDEPTCODE,FDEPTNAME,STATUS,CREATE_DEPT_TIME
|
||||
FROM V_JSWZH_EMR_DEPT_KS
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.docus.server.zqdyry.mapper.ZqDyRyPatientInfoViewMapper">
|
||||
|
||||
|
||||
<select id="pageByModifyTime" resultType="com.docus.server.zqdyry.entity.ZqDyRyPatientInfoView">
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT t.*,
|
||||
ROWNUM rn
|
||||
FROM V_JSWZH_BASE_ZL t
|
||||
WHERE LAST_MODIFIC_TIME BETWEEN TO_DATE(#{timeBegin}, 'YYYY-MM-DD HH24:MI:SS') AND TO_DATE(#{timeEnd}, 'YYYY-MM-DD HH24:MI:SS')
|
||||
) WHERE rn BETWEEN ${startRow} AND ${endRow}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.docus.server.zqdyry.mapper.ZqDyRyUserInfoViewMapper">
|
||||
|
||||
|
||||
<select id="page" resultType="com.docus.server.zqdyry.entity.ZqDyRyUserInfoView">
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT t.*,
|
||||
ROWNUM rn
|
||||
FROM V_JSWZH_EMR_EMPLOYEE t
|
||||
) where rn BETWEEN ${startRow} AND ${endRow}
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue