From 636192c1714d7f52e0839bb5c7183cb90e829774 Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期四, 06 二月 2025 13:53:41 +0800
Subject: [PATCH] bug修改

---
 medicalWaste-system/src/main/java/com/sinata/system/service/impl/SysDepartmentServiceImpl.java    |    3 +
 medicalWaste-system/src/main/resources/mapper/system/MwApplicationMapper.xml                      |    1 
 medicalWaste-system/src/main/java/com/sinata/system/service/impl/MwApplicationServiceImpl.java    |    8 ++++
 medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MedicalWasteProcessVO.java          |    3 +
 medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MwApplicationVO.java                |    6 +++
 medicalWaste-system/src/main/resources/mapper/system/MwCollectRecordMapper.xml                    |    6 ++-
 medicalWaste-admin/pom.xml                                                                        |    2 
 medicalWaste-framework/src/main/java/com/sinata/framework/config/SecurityConfig.java              |    2 
 medicalWaste-admin/src/main/resources/application-prod.yml                                        |   21 ++++++++--
 medicalWaste-system/src/main/resources/mapper/system/MwWarningRecordMapper.xml                    |    3 +
 medicalWaste-system/src/main/java/com/sinata/system/service/SysDepartmentService.java             |    8 ++++
 medicalWaste-admin/src/main/java/com/sinata/web/controller/applet/AppMwApplicationController.java |    6 --
 medicalWaste-admin/src/main/resources/application-dev.yml                                         |    4 +-
 medicalWaste-system/src/main/java/com/sinata/system/service/MwApplicationService.java             |    2 +
 medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MwCollectRecordVO.java              |   21 ++++++----
 15 files changed, 72 insertions(+), 24 deletions(-)

diff --git a/medicalWaste-admin/pom.xml b/medicalWaste-admin/pom.xml
index 5914784..21c0883 100644
--- a/medicalWaste-admin/pom.xml
+++ b/medicalWaste-admin/pom.xml
@@ -102,7 +102,7 @@
                 </configuration>   
            </plugin>   
         </plugins>
-        <finalName>${project.artifactId}</finalName>
+        <finalName>yifei-nanning-admin-1.0.0</finalName>
     </build>
 
 </project>
\ No newline at end of file
diff --git a/medicalWaste-admin/src/main/java/com/sinata/web/controller/applet/AppMwApplicationController.java b/medicalWaste-admin/src/main/java/com/sinata/web/controller/applet/AppMwApplicationController.java
index 1052bb6..2062b21 100644
--- a/medicalWaste-admin/src/main/java/com/sinata/web/controller/applet/AppMwApplicationController.java
+++ b/medicalWaste-admin/src/main/java/com/sinata/web/controller/applet/AppMwApplicationController.java
@@ -1,10 +1,7 @@
 package com.sinata.web.controller.applet;
 
 import com.sinata.common.core.domain.R;
-import com.sinata.common.entity.PageDTO;
 import com.sinata.system.domain.MwApplication;
-import com.sinata.system.domain.query.MwCollectRecordQuery;
-import com.sinata.system.domain.vo.MwCollectRecordVO;
 import com.sinata.system.service.MwApplicationService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -36,8 +33,7 @@
     @ApiOperation("提交入驻申请")
     @PostMapping("/set")
     public R pageList(@Valid @RequestBody MwApplication mwApplication) {
-        mwApplication.setAuditStatus(1);
-        mwApplicationService.save(mwApplication);
+        mwApplicationService.saveApplication(mwApplication);
         return R.ok();
     }
 }
diff --git a/medicalWaste-admin/src/main/resources/application-dev.yml b/medicalWaste-admin/src/main/resources/application-dev.yml
index bf3ff25..36be8ce 100644
--- a/medicalWaste-admin/src/main/resources/application-dev.yml
+++ b/medicalWaste-admin/src/main/resources/application-dev.yml
@@ -93,9 +93,9 @@
       # 主库数据源
       master:
 #        url: jdbc:mysql://localhost:3306/medical_waste?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-        url: jdbc:dm://192.168.110.188:5236/MEDICAL_WASTE?schema=MEDICAL_WASTE
+        url: jdbc:dm://47.108.162.242:5326/MEDICAL_WASTE?schema=MEDICAL_WASTE
         username: SYSDBA
-        password: SYSDBA
+        password: NanNingYiFei2025@
       # 从库数据源
       slave:
         # 从数据源开关/默认关闭
diff --git a/medicalWaste-admin/src/main/resources/application-prod.yml b/medicalWaste-admin/src/main/resources/application-prod.yml
index 4fcf00c..5fdc033 100644
--- a/medicalWaste-admin/src/main/resources/application-prod.yml
+++ b/medicalWaste-admin/src/main/resources/application-prod.yml
@@ -16,7 +16,7 @@
 # 开发环境配置
 server:
   # 服务器的HTTP端口,默认为8080
-  port: 8080
+  port: 8090
   servlet:
     # 应用的访问路径
     context-path: /
@@ -71,7 +71,7 @@
     # 数据库索引
     database: 0
     # 密码
-    password: 123456
+    #    password: 123456
     # 连接超时时间
     timeout: 10s
     lettuce:
@@ -93,9 +93,9 @@
       # 主库数据源
       master:
 #        url: jdbc:mysql://localhost:3306/medical_waste?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-        url: jdbc:dm://192.168.110.188:5236/MEDICAL_WASTE?schema=MEDICAL_WASTE
+        url: jdbc:dm://47.108.162.242:5326/MEDICAL_WASTE?schema=MEDICAL_WASTE
         username: SYSDBA
-        password: SYSDBA
+        password: NanNingYiFei2025@
       # 从库数据源
       slave:
         # 从数据源开关/默认关闭
@@ -237,3 +237,16 @@
   debug: false
   loginTemplateCode: SMS_246140477
   auditTemplateCode: SMS_476730213
+
+medical:
+  crons:
+    checkout-over-time: 0 0/60 * * * ? # 每小时执行一次
+    staging-room-capacity: 0 * */3 * * ? # 每三小时执行一次
+    contract-expire: 0 0 0 * * ? # 每日0点执行
+    health-vaccine-record: 0 0 1 * * ? # 每日1点执行
+    protection-equipment-use-stock: 0 0 2 * * ? # 每日2点执行
+    medical-institution-waste-day: 0 0 3 * * ? # 每日3点执行
+    medical-institution-waste-month: 0 30 0 1 * ? # 每月1日0点30分执行
+    medical-institution-waste-storage: 0 0 4 * * ?  # 每日4点执行
+    transit-car: 0 0 0/1 * * ? # 每小时执行一次
+    disposal-unit-storage: 0 0 5 * * ?
diff --git a/medicalWaste-framework/src/main/java/com/sinata/framework/config/SecurityConfig.java b/medicalWaste-framework/src/main/java/com/sinata/framework/config/SecurityConfig.java
index 4771853..f9b99db 100644
--- a/medicalWaste-framework/src/main/java/com/sinata/framework/config/SecurityConfig.java
+++ b/medicalWaste-framework/src/main/java/com/sinata/framework/config/SecurityConfig.java
@@ -111,7 +111,7 @@
             .authorizeHttpRequests((requests) -> {
                 permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll());
                 // 对于登录login 注册register 验证码captchaImage 允许匿名访问
-                requests.antMatchers("/backend/login","/applet/mwApplication/set","/applet/file/upload","/applet/sysDepartment/departmentSearchTree","/applet/getCode","/applet/login", "/register", "/captchaImage").permitAll()
+                requests.antMatchers("/backend/login", "/applet/mwApplication/set", "/applet/file/upload", "/applet/sysDepartment/departmentSearchTree", "/applet/getCode", "/applet/login", "/register", "/captchaImage", "/applet/sysAgreement/get", "/applet/sysAgreement/primary/get").permitAll()
                     // 静态资源,可匿名访问
                         .antMatchers(HttpMethod.GET, "/", "/msg", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
                     .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
diff --git a/medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MedicalWasteProcessVO.java b/medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MedicalWasteProcessVO.java
index ee3fca2..0c488b8 100644
--- a/medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MedicalWasteProcessVO.java
+++ b/medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MedicalWasteProcessVO.java
@@ -48,6 +48,9 @@
     @ApiModelProperty("运输-医院签名")
     private String hospitalSignature;
 
+    @ApiModelProperty("运输-车牌号")
+    private String licensePlateNumber;
+
     @ApiModelProperty("入库-入库时间")
     private Date receiveTime;
 
diff --git a/medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MwApplicationVO.java b/medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MwApplicationVO.java
index fd1d161..f99dfd9 100644
--- a/medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MwApplicationVO.java
+++ b/medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MwApplicationVO.java
@@ -21,6 +21,9 @@
     private Long departmentId;
 
     @ApiModelProperty("所属区域")
+    private String departmentName;
+
+    @ApiModelProperty("所属区域")
     private String region;
 
     @ApiModelProperty("单位类型 1:医疗机构 2:处置单位")
@@ -55,4 +58,7 @@
 
     @ApiModelProperty(value = "申请时间")
     private Date createTime;
+
+    @ApiModelProperty("层级关系")
+    private String relation;
 }
diff --git a/medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MwCollectRecordVO.java b/medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MwCollectRecordVO.java
index 5ac3d51..3a2193d 100644
--- a/medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MwCollectRecordVO.java
+++ b/medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MwCollectRecordVO.java
@@ -2,6 +2,9 @@
 
 import cn.idev.excel.annotation.ExcelIgnore;
 import cn.idev.excel.annotation.ExcelProperty;
+import com.sinata.system.annotation.FastExcel;
+import com.sinata.system.conveter.EConverter;
+import com.sinata.system.enums.MedicalWasteStatusEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -26,7 +29,7 @@
     private Long departmentId;
 
     @ApiModelProperty("医院名称")
-    @ExcelProperty(value = "医院", index = 2)
+    @ExcelProperty(value = "医院", index = 1)
     private String hospitalName;
 
     @ApiModelProperty("暂存间id")
@@ -34,7 +37,7 @@
     private Long stagingRoomId;
 
     @ApiModelProperty("医废编号")
-    @ExcelProperty(value = "医废编号", index = 3)
+    @ExcelProperty(value = "医废编号", index = 2)
     private String medicalWasteNumber;
 
     @ApiModelProperty("转运箱id")
@@ -42,18 +45,19 @@
     private Long boxId;
 
     @ApiModelProperty("箱子编号")
-    @ExcelProperty(value = "箱子编号", index = 4)
+    @ExcelProperty(value = "箱子编号", index = 3)
     private String boxNumber;
 
     @ApiModelProperty("医废类型(数据字典id)")
+    @ExcelIgnore
     private Long wasteType;
 
     @ApiModelProperty("医废类型名称")
-    @ExcelProperty(value = "医废类型", index = 5)
+    @ExcelProperty(value = "医废类型", index = 4)
     private String wasteTypeStr;
 
     @ApiModelProperty("医废重量")
-    @ExcelProperty(value = "医废重量", index = 6)
+    @ExcelProperty(value = "医废重量", index = 5)
     private BigDecimal weight;
 
     @ApiModelProperty("出库人员id")
@@ -69,7 +73,8 @@
     private Date checkoutTime;
 
     @ApiModelProperty("医废状态 1:暂存中 2:运输中 3:已接收 4:已处置")
-    @ExcelProperty(value = "医废状态", index = 8)
+    @ExcelProperty(value = "医废状态", index = 7, converter = EConverter.class)
+    @FastExcel(type = MedicalWasteStatusEnum.class)
     private Integer status;
 
     @ApiModelProperty("封箱时间")
@@ -81,10 +86,10 @@
     private Long collectUserId;
 
     @ApiModelProperty("收集人姓名")
-    @ExcelProperty(value = "收集人", index = 7)
+    @ExcelProperty(value = "收集人", index = 6)
     private String collectUserName;
 
     @ApiModelProperty("收集时间")
-    @ExcelProperty(value = "收集时间", index = 1)
+    @ExcelProperty(value = "收集时间", index = 0)
     private Date collectTime;
 }
diff --git a/medicalWaste-system/src/main/java/com/sinata/system/service/MwApplicationService.java b/medicalWaste-system/src/main/java/com/sinata/system/service/MwApplicationService.java
index 5e83a3c..ab81785 100644
--- a/medicalWaste-system/src/main/java/com/sinata/system/service/MwApplicationService.java
+++ b/medicalWaste-system/src/main/java/com/sinata/system/service/MwApplicationService.java
@@ -39,4 +39,6 @@
      * @return
      */
     void audit(MwApplicationDTO dto);
+
+    void saveApplication(MwApplication mwApplication);
 }
diff --git a/medicalWaste-system/src/main/java/com/sinata/system/service/SysDepartmentService.java b/medicalWaste-system/src/main/java/com/sinata/system/service/SysDepartmentService.java
index 25a1244..9e0c981 100644
--- a/medicalWaste-system/src/main/java/com/sinata/system/service/SysDepartmentService.java
+++ b/medicalWaste-system/src/main/java/com/sinata/system/service/SysDepartmentService.java
@@ -137,6 +137,14 @@
     List<DisposalUnitVO> getDisposalUnitListByParentId(Long id);
 
     /**
+     * 获取完整区域
+     *
+     * @param department
+     * @return
+     */
+    String getRegionName(SysDepartment department);
+
+    /**
      * 删除医疗机构
      *
      * @param id
diff --git a/medicalWaste-system/src/main/java/com/sinata/system/service/impl/MwApplicationServiceImpl.java b/medicalWaste-system/src/main/java/com/sinata/system/service/impl/MwApplicationServiceImpl.java
index 5fbc8c7..e63f1db 100644
--- a/medicalWaste-system/src/main/java/com/sinata/system/service/impl/MwApplicationServiceImpl.java
+++ b/medicalWaste-system/src/main/java/com/sinata/system/service/impl/MwApplicationServiceImpl.java
@@ -81,4 +81,12 @@
         //发送短信通知
         aliSmsService.sendAuditResult(mwApplication.getPhone(), dto.getAuditStatus() == 1 ? "已通过" : "未通过");
     }
+
+    @Override
+    public void saveApplication(MwApplication mwApplication) {
+        mwApplication.setAuditStatus(1);
+        if (Objects.nonNull(mwApplication.getDepartmentId())) {
+            mwApplication.setRegion(sysDepartmentService.getRegionName(sysDepartmentService.getById(mwApplication.getDepartmentId())));
+        }
+    }
 }
diff --git a/medicalWaste-system/src/main/java/com/sinata/system/service/impl/SysDepartmentServiceImpl.java b/medicalWaste-system/src/main/java/com/sinata/system/service/impl/SysDepartmentServiceImpl.java
index aac9f1f..9db5211 100644
--- a/medicalWaste-system/src/main/java/com/sinata/system/service/impl/SysDepartmentServiceImpl.java
+++ b/medicalWaste-system/src/main/java/com/sinata/system/service/impl/SysDepartmentServiceImpl.java
@@ -515,7 +515,8 @@
      * @param department
      * @return
      */
-    private String getRegionName(SysDepartment department) {
+    @Override
+    public String getRegionName(SysDepartment department) {
         String region = department.getDepartmentName();
         SysDepartment sysDepartment = this.lambdaQuery().eq(SysDepartment::getId, department.getParentId()).ne(SysDepartment::getId, -1).one();
         if (Objects.nonNull(sysDepartment)) {
diff --git a/medicalWaste-system/src/main/resources/mapper/system/MwApplicationMapper.xml b/medicalWaste-system/src/main/resources/mapper/system/MwApplicationMapper.xml
index a756d77..66b5861 100644
--- a/medicalWaste-system/src/main/resources/mapper/system/MwApplicationMapper.xml
+++ b/medicalWaste-system/src/main/resources/mapper/system/MwApplicationMapper.xml
@@ -84,6 +84,7 @@
         MA.AUDIT_OPINION,
         MA.CREATE_TIME,
         MA.REGION,
+        MA.RELATION,
         SD.DEPARTMENT_NAME
         FROM MW_APPLICATION MA
         LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MA.DEPARTMENT_ID
diff --git a/medicalWaste-system/src/main/resources/mapper/system/MwCollectRecordMapper.xml b/medicalWaste-system/src/main/resources/mapper/system/MwCollectRecordMapper.xml
index 0a3e466..eae866a 100644
--- a/medicalWaste-system/src/main/resources/mapper/system/MwCollectRecordMapper.xml
+++ b/medicalWaste-system/src/main/resources/mapper/system/MwCollectRecordMapper.xml
@@ -132,6 +132,7 @@
         mcr2.CHECKOUT_TIME,
         su2.NICK_NAME AS DRIVER_NAME,
         mcr2.HOSPITAL_SIGNATURE,
+        mtc.LICENSE_PLATE_NUMBER,
         mdr.RECEIVE_TIME,
         su3.NICK_NAME AS RECEIVER_NAME,
         mdr.DISPOSAL_UNIT_NAME,
@@ -148,6 +149,7 @@
         LEFT JOIN MW_DISPOSAL_HANDLE_RECORD mdhr ON mdhr.ID= mdhri.DISPOSAL_HANDLE_RECORD_ID
         LEFT JOIN SYS_USER su3 ON su3.USER_ID = mdr.RECEIVER_ID
         LEFT JOIN SYS_USER su4 ON su4.USER_ID = mdr.DISPOSAL_USER_ID
+        LEFT JOIN MW_TRANSIT_CAR mtc ON mtc.ID = mcr2.CAR_ID
         <where>
             mcr.ID = #{id}
         </where>
@@ -200,9 +202,9 @@
             <if test="query.collectTimeStart != null and query.collectTimeEnd != null">
                 and mcr.COLLECT_TIME between #{query.collectTimeStart} and #{query.collectTimeEnd}
             </if>
-            <if test="collectRecordIds != null and collectRecordIds.size() > 0">
+            <if test="query.collectRecordIds != null and query.collectRecordIds.size() > 0">
                 and mcr.ID in
-                <foreach collection="collectRecordIds" item="id" open="(" separator="," close=")">
+                <foreach collection="query.collectRecordIds" item="id" open="(" separator="," close=")">
                     #{id}
                 </foreach>
             </if>
diff --git a/medicalWaste-system/src/main/resources/mapper/system/MwWarningRecordMapper.xml b/medicalWaste-system/src/main/resources/mapper/system/MwWarningRecordMapper.xml
index a723afa..fb32eb4 100644
--- a/medicalWaste-system/src/main/resources/mapper/system/MwWarningRecordMapper.xml
+++ b/medicalWaste-system/src/main/resources/mapper/system/MwWarningRecordMapper.xml
@@ -57,6 +57,9 @@
             <if test="query.status != null">
                 AND MWR.STATUS = #{query.status}
             </if>
+            <if test="query.startTime != null and query.endTime !=null">
+                AND MWR.WARN_TIME BETWEEN #{query.startTime} AND #{query.endTime}
+            </if>
         </where>
         ORDER BY MWR.CREATE_TIME DESC
     </select>

--
Gitblit v1.7.1