Pārlūkot izejas kodu

Merge branch 'master' into 淮海科技

lighter 2 mēneši atpakaļ
vecāks
revīzija
8ea6cfb429

+ 3 - 16
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>web-server</artifactId>
-    <version>13.2.9</version>
+    <version>13.3.2</version>
     <name>web-server</name>
     <description>server for yibao-web</description>
     <properties>
@@ -231,17 +231,6 @@
             <artifactId>logstash-logback-encoder</artifactId>
             <version>7.0.1</version>
         </dependency>
-<!--        <dependency>-->
-<!--            <groupId>com.taobao</groupId>-->
-<!--            <artifactId>taobao-sdk-auto</artifactId>-->
-<!--            <version>1.0.0</version>-->
-<!--        </dependency>-->
-<!--        <dependency>-->
-<!--            <groupId>com.taobao</groupId>-->
-<!--            <artifactId>taobao-sdk-source</artifactId>-->
-<!--            <version>1.0.0</version>-->
-<!--        </dependency>-->
-
         <dependency>
             <groupId>com.taobao</groupId>
             <artifactId>taobao-sdk-auto</artifactId>
@@ -255,7 +244,8 @@
             <artifactId>taobao-sdk-source</artifactId>
             <version>1.0.0</version>
             <scope>system</scope>
-            <systemPath>${pom.basedir}/src/main/resources/taobao/taobao-sdk-source/taobao-sdk-source-1.0.0.jar</systemPath>
+            <systemPath>${pom.basedir}/src/main/resources/taobao/taobao-sdk-source/taobao-sdk-source-1.0.0.jar
+            </systemPath>
         </dependency>
 
     </dependencies>
@@ -278,9 +268,6 @@
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
                 <configuration>
-<!--                    <arguments>-->
-<!--                        <argument>${project.basedir}\lib</argument>-->
-<!--                    </arguments>-->
                     <executable>true</executable>
                     <includeSystemScope>true</includeSystemScope>
                     <excludes>

+ 2 - 3
src/main/java/thyyxxk/webserver/dao/his/medicaladvice/patientinfo/AdjustBedDao.java

@@ -72,10 +72,9 @@ public interface AdjustBedDao {
             "gender=case when sex='1' then N'男' when sex='2' then N'女' else N'未知' end, " +
             "wardName=(select rtrim(d.name) from zd_unit_code d where d.code=ward), " +
             "smallDeptName=(select rtrim(d.name) from zd_unit_code d where d.code=small_dept) " +
-            "from zy_prepatient where ward=#{ward} ")
+            "from zy_actpatient where ward=#{ward} and bed_status='0' ")
     List<ZyActpatient> getPreAdmPatients(String ward);
 
-    @Update("insert into zy_actpatient select * from zy_prepatient d where d.inpatient_no=#{patNo};" +
-            "delete from zy_prepatient where inpatient_no=#{patNo}")
+    @Update("update zy_actpatient set bed_status='1' where inpatient_no=#{patNo}")
     void updateBedStatus(String patNo);
 }

+ 6 - 0
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiZyDao.java

@@ -245,4 +245,10 @@ public interface SiZyDao {
             "and status=1")
     Date selectDisdate(String patNo, int times, int ledgerSn);
 
+    @Select("select sign_no from t_si_sign_in where id='medInsurSignIn'")
+    String getSignInNo();
+
+    @Update("update t_si_sign_in set sign_no=#{signNo}, " +
+            "sign_date=getdate() where id='medInsurSignIn'")
+    void updateSignNo(String signNo);
 }

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/settings/SettingsDao.java

@@ -91,7 +91,7 @@ public interface SettingsDao {
             "                                                                   where zy_part_time_dept.dept_code = zd_unit_code.code) " +
             "                                                     from zy_part_time_dept " +
             "                                                     where zy_part_time_dept.code = a.code " +
-            "                                                     for xml path('')), 1, 1, ''), doctor_zy, doctor_yp_zl, dualchnl_flag,practice_certificate " +
+            "                                                     for xml path('')), 1, 1, ''), doctor_zy, doctor_yp_zl, dualchnl_flag,practice_certificate,isnull(auto_daily,'0') auto_daily " +
             "from a_employee_mi a  " +
             " ${ew.customSqlSegment} ")
     IPage<UserInfo> selectAllUsers(IPage<UserInfo> page,

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/zygl/ZyBedMiDao.java

@@ -38,7 +38,7 @@ public interface ZyBedMiDao {
      * @param bedNo
      * @return
      */
-    @Select("SELECT * FROM zy_bed_mi WHERE  dept_code =#{deptCode} AND ward_code =#{wardCode} AND bed_no =#{bedNo}")
+    @Select("SELECT bed_status,bed_no FROM zy_bed_mi WHERE  dept_code =#{deptCode} AND ward_code =#{wardCode} AND bed_no =#{bedNo}")
     ZyBedMi selectZyBedMi(@Param("deptCode") String deptCode, @Param("wardCode") String wardCode, @Param("bedNo") String bedNo);
 
     /**

+ 0 - 2
src/main/java/thyyxxk/webserver/entity/inpatient/ZyActpatient.java

@@ -23,8 +23,6 @@ public class ZyActpatient implements Serializable {
     public static final String ZY_INACTPATIENT = "zy_inactpatient";
     //在院表
     public static final String ZY_ACTPATIENT = "zy_actpatient";
-    //待接收
-    public static final String ZY_PREPATIENT = "zy_prepatient";
 
     /**
      * 自费病人身份

+ 3 - 1
src/main/java/thyyxxk/webserver/entity/login/UserInfo.java

@@ -2,7 +2,6 @@ package thyyxxk.webserver.entity.login;
 
 import com.alibaba.fastjson.JSONObject;
 import lombok.Data;
-import lombok.experimental.Accessors;
 import thyyxxk.webserver.config.ColumnName;
 import thyyxxk.webserver.constants.RestrictedDrugLevels;
 import thyyxxk.webserver.constants.Ysjb;
@@ -181,6 +180,9 @@ public class UserInfo implements Serializable {
 
     @ColumnName
     private String practiceCertificate;
+    //自动日结 0 否 1 是
+    @ColumnName
+    private String autoDaily;
 
     public JSONObject getUserConfigJson() {
         return StringUtil.isBlank(userConfig) ? new JSONObject() : JSONObject.parseObject(userConfig);

+ 2 - 5
src/main/java/thyyxxk/webserver/entity/medicaladvice/medicamanage/patientinfo/ZyBedMi.java

@@ -1,7 +1,5 @@
 package thyyxxk.webserver.entity.medicaladvice.medicamanage.patientinfo;
 
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -16,7 +14,6 @@ import java.util.Date;
  * @date 2023-06-01 17:16:48
  */
 @Data
-@TableName("zy_bed_mi")
 public class ZyBedMi implements Serializable {
 	private static final long serialVersionUID = 1L;
 
@@ -36,7 +33,6 @@ public class ZyBedMi implements Serializable {
 	/**
 	 * $column.comments
 	 */
-	@TableId
 	private String icuFlag;
 	/**
 	 * $column.comments
@@ -165,7 +161,8 @@ public class ZyBedMi implements Serializable {
 	private Date admissDate;
 
 	public String getSexName(){
-		switch (this.sex) {
+		if(sex == null) return "";
+		switch (sex) {
 			case "1":
                 return "男";
             case "2":

+ 8 - 0
src/main/java/thyyxxk/webserver/service/medicalinsurance/ExecService.java

@@ -66,6 +66,12 @@ public class ExecService {
     }
 
     public synchronized void signIn() {
+        String dbSignNo = dao.getSignInNo();
+        if (StrUtil.isNotBlank(dbSignNo)) {
+            signNo = dbSignNo;
+            log.info("获取历史签到号成功:{}", dbSignNo);
+            return;
+        }
         JSONObject input = makeSignHeader(SiFunction.SIGN_IN);
         JSONObject signIn = new JSONObject();
         signIn.put("opter_no", "99999");
@@ -77,6 +83,7 @@ public class ExecService {
             try {
                 JSONObject output = result.getJSONObject(OUTPUT);
                 signNo = output.getJSONObject("signinoutb").getString("sign_no");
+                dao.updateSignNo(signNo);
                 log.info("签到成功,签到号:{}", signNo);
             } catch (Exception e) {
                 throw new BizException();
@@ -95,6 +102,7 @@ public class ExecService {
             if (null != result && result.getIntValue(RESULT_CODE) == 0) {
                 log.info("医保签退成功。");
                 signNo = null;
+                dao.updateSignNo(signNo);
             }
         }
     }

+ 1 - 3
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/YiZhuLuRuServer.java

@@ -1510,7 +1510,7 @@ public class YiZhuLuRuServer {
                 vo.setCode(i.getGroupNo());
                 vo.setName(i.getGroupName());
                 vo.setIsDefault(false);
-                if (i.getStartTime() != null && i.getEndTime() != null) {
+                if (StrUtil.isNotBlank(i.getStartTime()) && StrUtil.isNotBlank(i.getEndTime())) {
                     vo.setIsDefault(DateUtil.isInTimeRange(now, i.getStartTime(), i.getEndTime()));
                 }
                 map.computeIfAbsent(item.getKey(), (k) -> new ArrayList<>()).add(vo);
@@ -1518,6 +1518,4 @@ public class YiZhuLuRuServer {
         }
         return map;
     }
-
-
 }

+ 5 - 5
src/main/java/thyyxxk/webserver/service/zygl/AdmissionRegistrationService.java

@@ -272,14 +272,14 @@ public class AdmissionRegistrationService {
         if (NumberEnum.ONE.getCode().equals(InpatientNoAuto)) {
             if (StrUtil.isBlank(aPatientMiVo.getInpatientNo())) {
                 //住院号为空,需要自动生成住院号
-                if (YesOrNo.NO.getCode().equals(aPatientMiVo.getInpatientNoType())) {
-                    //自动的住院号
-                    int inpatientNo = zyConfigService.getInpatientNo();
-                    aPatientMiVo.setInpatientNo(String.valueOf(inpatientNo));
-                } else if (YesOrNo.YES.getCode().equals(aPatientMiVo.getInpatientNoType())) {
+                 if (YesOrNo.YES.getCode().equals(aPatientMiVo.getInpatientNoType())) {
                     //家床住院号
                     String jcNo = zyConfigService.getJcNo();
                     aPatientMiVo.setInpatientNo(jcNo);
+                }else {
+                    //自动的住院号
+                    int inpatientNo = zyConfigService.getInpatientNo();
+                    aPatientMiVo.setInpatientNo(String.valueOf(inpatientNo));
                 }
             }
         } else {

+ 3 - 1
src/main/java/thyyxxk/webserver/service/zygl/ZyActpatientService.java

@@ -101,6 +101,7 @@ public class ZyActpatientService {
      **/
     @Transactional(rollbackFor = Exception.class)
     public int saveZyActpatientFull(ZyActpatient zyActpatient)  {
+        BeanUtil.trimStrFields(zyActpatient);
         AssertUtil.isnotBlank(zyActpatient.getInpatientNo(),"住院号不能为空");
         AssertUtil.isnotBlank(zyActpatient.getAdmissDate(),"入院日期不能为空");
         AssertUtil.isnotBlank(zyActpatient.getAdmissPhysician(),"入院医生不能为空");
@@ -136,6 +137,7 @@ public class ZyActpatientService {
         Integer lastTimes = getLastadmissTimes(aPatientMiDb.getLastadmissTimes(),zyActpatient.getInpatientNo());
         aPatientMiDb.setLastadmissTimes(lastTimes + 1);
         aPatientMiService.updateLastadmissTimes(aPatientMiDb);
+        zyActpatient.setMzNo(aPatientMiDb.getMzNo());
         zyActpatient.setChargeType(YesOrNo.YES.getCode().toString());
         zyActpatient.setInpatientNo(aPatientMiDb.getInpatientNo());
         zyActpatient.setAdmissTimes(aPatientMiDb.getLastadmissTimes());
@@ -184,7 +186,7 @@ public class ZyActpatientService {
         zyActpatient.setSex(aPatientMiDb.getSex());
         zyActpatient.setInputDate(now);
         zyActpatient.setZkWard(zyActpatient.getSmallDept());
-        zyActpatient.setTableName(ZyActpatient.ZY_PREPATIENT);
+        zyActpatient.setTableName(ZyActpatient.ZY_ACTPATIENT);
         int num = zyActpatientMapper.insertZyActpatient(zyActpatient);
         if (num > 0) {
             //修改门诊住院申请单

+ 7 - 0
update/2025-06-18.md

@@ -0,0 +1,7 @@
+-----新增自动日结字段
+alter table a_employee_mi
+	add auto_daily varchar(1) default '0'
+go
+
+exec sp_addextendedproperty 'MS_Description', '是否自助日结 0 否 1 是', 'SCHEMA', 'dbo', 'TABLE', 'a_employee_mi', 'COLUMN', 'auto_daily'
+go