From d0eccd0f277f02e65fcfc40fb14a7f247515b9f7 Mon Sep 17 00:00:00 2001 From: wyb <1977763549@qq.com> Date: Mon, 27 May 2024 12:40:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E6=97=B6=E9=97=B4=E7=B1=BB=E5=9E=8B=EF=BC=8C=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E6=95=B0=E6=8D=AEjzh=E5=88=A4=E6=96=AD=E8=A7=84?= =?UTF-8?q?=E5=88=99=EF=BC=8C=E7=94=A8=E6=88=B7=E3=80=81=E7=A7=91=E5=AE=A4?= =?UTF-8?q?=E6=8F=92=E5=85=A5=E5=92=8C=E4=BF=AE=E6=94=B9=E7=9A=84List?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/docus/server/AppRunBootstrap.java | 49 ------------------- .../impl/ZqDyRyDeptInfoSyncServiceImpl.java | 4 +- .../ZqDyRyPatientInfoSyncServiceImpl.java | 2 +- .../impl/ZqDyRyUserInfoSyncServiceImpl.java | 4 +- src/main/resources/mapper/PowerDeptMapper.xml | 1 + .../mapper/ZqDyRyPatientInfoViewMapper.xml | 2 +- 6 files changed, 7 insertions(+), 55 deletions(-) diff --git a/src/main/java/com/docus/server/AppRunBootstrap.java b/src/main/java/com/docus/server/AppRunBootstrap.java index 48c1270..432cef6 100644 --- a/src/main/java/com/docus/server/AppRunBootstrap.java +++ b/src/main/java/com/docus/server/AppRunBootstrap.java @@ -1,19 +1,12 @@ package com.docus.server; -import cn.hutool.extra.spring.SpringUtil; -import com.docus.server.archive.entity.TBasic; -import com.docus.server.archive.mapper.TBasicMapper; -import com.docus.server.archive.utils.PinYinUtil; import lombok.extern.slf4j.Slf4j; import org.mybatis.spring.annotation.MapperScan; -import org.springframework.beans.BeanUtils; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.openfeign.EnableFeignClients; -import java.util.Arrays; -import java.util.Date; import java.util.Properties; @@ -35,49 +28,7 @@ public class AppRunBootstrap { } static void testMysql(){ - TBasicMapper mapper = SpringUtil.getBean(TBasicMapper.class); - long currentTimeMillis = System.currentTimeMillis(); - TBasic tBasic1 = new TBasic(); - tBasic1.setPatientId("FS-TEST-1"); - tBasic1.setJzh("jzh"+ currentTimeMillis); - tBasic1.setInpatientNo(currentTimeMillis +""); - tBasic1.setAdmissTimes(1); - tBasic1.setName("佛山测试1"); - tBasic1.setNameSpell(PinYinUtil.getFirstSpell("佛山测试1")); - tBasic1.setSex("1"); - tBasic1.setSexName("男"); - tBasic1.setAdmissDate(new Date()); - tBasic1.setAdmissDept("221"); - tBasic1.setAdmissDeptName("神经内科"); - tBasic1.setBedNo("神经内科1-1"); - tBasic1.setAttending("wyb"); - tBasic1.setAttendingName("文永斌"); - tBasic1.setAge(50); - tBasic1.setAgeMonth(12); - tBasic1.setAgeDay(3); - tBasic1.setIdCard("xxxxxx"); - tBasic1.setTelphone("666"); - tBasic1.setDisDate(new Date()); - tBasic1.setDisDept("221"); - tBasic1.setDisDeptName("神经内科"); - tBasic1.setTotalCost("28.8"); - tBasic1.setIsDead(0); - tBasic1.setJzCardNo("kh1998"); - tBasic1.setFileSource(1); - tBasic1.setCreateTime(new Date()); - tBasic1.setUpdateTime(new Date()); - TBasic tBasic2 = new TBasic(); - BeanUtils.copyProperties(tBasic1,tBasic2); - tBasic2.setPatientId("FS-TEST-2"); - tBasic2.setAdmissTimes(2); - tBasic2.setJzh("jzh"+(currentTimeMillis+555)); - mapper.insertBatch(Arrays.asList(tBasic1,tBasic2)); - System.out.println("插入后:"+mapper.getByJzh(Arrays.asList(tBasic1.getJzh(),tBasic2.getJzh()))); - tBasic1.setIdCard("modify-1"); - tBasic2.setIdCard("modify-2"); - mapper.updateBatch(Arrays.asList(tBasic1,tBasic2)); - System.out.println("修改后:"+mapper.getByJzh(Arrays.asList(tBasic1.getJzh(),tBasic2.getJzh()))); } } diff --git a/src/main/java/com/docus/server/archive/service/impl/ZqDyRyDeptInfoSyncServiceImpl.java b/src/main/java/com/docus/server/archive/service/impl/ZqDyRyDeptInfoSyncServiceImpl.java index fd7094a..372f323 100644 --- a/src/main/java/com/docus/server/archive/service/impl/ZqDyRyDeptInfoSyncServiceImpl.java +++ b/src/main/java/com/docus/server/archive/service/impl/ZqDyRyDeptInfoSyncServiceImpl.java @@ -81,11 +81,11 @@ public class ZqDyRyDeptInfoSyncServiceImpl implements DeptInfoSyncService { iuPowerDept.setSort(0); insertDeptList.add(iuPowerDept); } - if (Func.isEmpty(insertDeptList)) { + if (Func.isNotEmpty(insertDeptList)) { powerDeptMapper.insertBatch(insertDeptList); } - if (Func.isEmpty(updateDeptList)) { + if (Func.isNotEmpty(updateDeptList)) { powerDeptMapper.updateBatch(updateDeptList); } diff --git a/src/main/java/com/docus/server/archive/service/impl/ZqDyRyPatientInfoSyncServiceImpl.java b/src/main/java/com/docus/server/archive/service/impl/ZqDyRyPatientInfoSyncServiceImpl.java index e02fe30..9b0e68e 100644 --- a/src/main/java/com/docus/server/archive/service/impl/ZqDyRyPatientInfoSyncServiceImpl.java +++ b/src/main/java/com/docus/server/archive/service/impl/ZqDyRyPatientInfoSyncServiceImpl.java @@ -82,7 +82,7 @@ public class ZqDyRyPatientInfoSyncServiceImpl implements PatientInfoSyncService List insertBasicList = new ArrayList<>(); List updateBasicList = new ArrayList<>(); for (TBasic iuBasic : iuBasicList) { - String maybeJzh = iuBasic.getJzh().trim() + "@" + iuBasic.getAdmissTimes(); + String maybeJzh = iuBasic.getInpatientNo().trim() + "@" + iuBasic.getAdmissTimes(); if (existsJzhBasicMap.containsKey(iuBasic.getJzh()) || existsJzhBasicMap.containsKey(maybeJzh)) { TBasic basic1 = existsJzhBasicMap.get(iuBasic.getJzh()); TBasic basic2 = existsJzhBasicMap.get(maybeJzh); diff --git a/src/main/java/com/docus/server/archive/service/impl/ZqDyRyUserInfoSyncServiceImpl.java b/src/main/java/com/docus/server/archive/service/impl/ZqDyRyUserInfoSyncServiceImpl.java index cd3f64a..62c26b1 100644 --- a/src/main/java/com/docus/server/archive/service/impl/ZqDyRyUserInfoSyncServiceImpl.java +++ b/src/main/java/com/docus/server/archive/service/impl/ZqDyRyUserInfoSyncServiceImpl.java @@ -128,11 +128,11 @@ public class ZqDyRyUserInfoSyncServiceImpl implements UserInfoSyncService { insertUserList.add(iuPowerUser); } - if (Func.isEmpty(insertUserList)) { + if (Func.isNotEmpty(insertUserList)) { powerUserMapper.insertBatch(insertUserList); } - if (Func.isEmpty(updateUserList)) { + if (Func.isNotEmpty(updateUserList)) { powerUserMapper.updateBatch(updateUserList); } } diff --git a/src/main/resources/mapper/PowerDeptMapper.xml b/src/main/resources/mapper/PowerDeptMapper.xml index e018162..652583a 100644 --- a/src/main/resources/mapper/PowerDeptMapper.xml +++ b/src/main/resources/mapper/PowerDeptMapper.xml @@ -4,6 +4,7 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + INSERT INTO docus_system.power_dept (dept_id, dept_code, dept_name, dict_id, effective, create_date, creater, update_date, updater, remark, sort, `type`) diff --git a/src/main/resources/mapper/ZqDyRyPatientInfoViewMapper.xml b/src/main/resources/mapper/ZqDyRyPatientInfoViewMapper.xml index e691d90..0ebfa9f 100644 --- a/src/main/resources/mapper/ZqDyRyPatientInfoViewMapper.xml +++ b/src/main/resources/mapper/ZqDyRyPatientInfoViewMapper.xml @@ -11,7 +11,7 @@ SELECT t.*, ROWNUM rn FROM MDIP.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 TO_DATE(LAST_MODIFIC_TIME, 'YYYY-MM-DD HH24:MI:SS') 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}