feat:qms阶段性提交:检验流程调整、报告、样品库等

This commit is contained in:
FCL
2025-11-25 09:34:25 +08:00
parent 82934c153d
commit 5657f8cf09
119 changed files with 3617 additions and 974 deletions

View File

@@ -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.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAssessmentProjectMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

View File

@@ -9,4 +9,83 @@
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
<select id="selectPageForDispatch" resultType="com.zt.plat.module.qms.business.bus.controller.vo.BusinessSubSampleExtendRespVO">
select
smp.ID,
smp.TENANT_ID as tenantId,
smp.BSN_BSE_SMP_ID as businessBaseSampleId,
smp.BSN_SB_PRN_SMP_ID as businessSubParentSampleId,
smp.CFG_SB_SMP_ID as configSubSampleId,
smp.DIC_BSN_ID as dictionaryBusinessId,
smp.CFG_WRH_LOC_INF_ID as configWarehouseLocationInfomationId,
smp.SMP_ID as sampleId,
smp.GRP_ID as groupId,
smp.SMP_NAME as sampleName,
smp.SMP_CD as sampleCode,
smp.SMP_ASY_CD as sampleAssayCode,
smp.SMP_RTN_CD as sampleReturnCode,
smp.IS_GEN_RTN_CD as isGenerateReturnCode,
smp.IS_WG as isWeighing,
smp.LST_SMP_WGT as lastSampleWeight,
smp.LST_BAL_CD as lastBalanceCode,
smp.CFG_SMP_FLW_ID as configSampleFlowId,
smp.SMP_FLW_NDE_KY as sampleFlowNodeKey,
smp.SMP_FLW_NDE_TM as sampleFlowNodeTime,
smp.NXT_SMP_FLW_NDE as nextSampleFlowNode,
smp.SMP_STS as sampleStatus,
smp.ASY_OPTR as sampleOperator,
smp.IS_ASN_TSKD as isAssignTasked,
smp.ASN_TSK_TM as assignTaskTime,
smp.IS_RPOD as isReported,
smp.RPTR as reporter,
smp.RPT_TM as reportTime,
smp.RTN_TM as returnTime,
smp.RTN_STS as returnStatus,
smp.DST_STS as dispatchStatus,
smp.RTN_CD_PRNT_CNT as returnCodePrintCount,
smp.PRNT_LST_TM as printLastTime,
smp.UP_SMP_RCD_ID as upSampleRecordId,
smp.ANL_RMK as analysisRemark,
smp.IS_ENBD as isEnabled,
smp.SYS_DEPT_CD as systemDepartmentCode,
smp.UPD_CNT as updateCount,
smp.RMK as remark,
loc.CD as warehouseLocationCode,
wrh.CD as warehouseCode
from t_bsn_sb_smp smp
left join t_cfg_wrh_loc loc on smp.CFG_WRH_LOC_INF_ID = loc.id
left join t_cfg_wrh_loc wrh on loc.PRN_ID = wrh.id
<where>
<if test="param.sampleFlowNodeKey != null and param.sampleFlowNodeKey != ''">
and smp.SMP_FLW_NDE_KY = #{param.sampleFlowNodeKey}
</if>
<if test="param.sampleReturnCode != null and param.sampleReturnCode != ''">
and smp.SMP_RTN_CD = #{param.sampleReturnCode}
</if>
<if test="param.returnStatus != null and param.returnStatus != ''">
and smp.RTN_STS = #{param.returnStatus}
</if>
<if test="param.dispatchStatus != null and param.dispatchStatus != ''">
and smp.DST_STS = #{param.dispatchStatus}
</if>
<if test="param.warehouseLocationCode != null and param.warehouseLocationCode != ''">
and loc.CD = #{param.warehouseLocationCode}
</if>
<if test="param.warehouseCode != null and param.warehouseCode != ''">
and wrh.CD = #{param.warehouseCode}
</if>
<if test="param.hideDispatchData != null and param.hideDispatchData == '1'">
and not exists(
select 1 from T_BSN_SMP_DST_DTL d left join T_BSN_SMP_DST m on d.PRN_ID = m.ID
where d.BSN_SB_SMP_ID = smp.ID
and d.deleted = 0
and m.FIN_STS in ('0', 'pending')
and m.CNL_STS = 0
and m.deleted = 0
)
</if>
</where>
</select>
</mapper>

View File

@@ -49,7 +49,7 @@ spring:
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
redis:
host: 172.16.46.63 # 地址
host: 172.16.46.163 # 地址
port: 30379 # 端口
database: 0 # 数据库索引
# password: 123456 # 密码,建议生产环境开启

View File

@@ -0,0 +1,97 @@
spring:
# 数据源配置项
autoconfigure:
# noinspection SpringBootApplicationYaml
exclude:
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
datasource:
druid: # Druid 【监控】相关的全局配置
web-stat-filter:
enabled: true
stat-view-servlet:
enabled: true
allow: # 设置白名单,不填则允许所有访问
url-pattern: /druid/*
login-username: # 控制台管理用户名和密码
login-password:
filter:
stat:
enabled: true
log-slow-sql: true # 慢 SQL 记录
slow-sql-millis: 100
merge-sql: true
wall:
config:
multi-statement-allow: true
dynamic: # 多数据源配置
druid: # Druid 【连接池】相关的全局配置
initial-size: 1 # 初始连接数
min-idle: 1 # 最小连接池数量
max-active: 20 # 最大连接池数量
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
test-while-idle: true
test-on-borrow: false
test-on-return: false
primary: master
datasource:
master:
url: jdbc:dm://172.16.46.247:1050?schema=ZGTY-QMS-DEV
username: SYSDBA
password: pgbsci6ddJ6Sqj@e
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:dm://172.16.46.247:1050?schema=ZGTY-QMS-DEV
username: SYSDBA
password: pgbsci6ddJ6Sqj@e
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
redis:
host: 172.16.46.163 # 地址
port: 30379 # 端口
database: 0 # 数据库索引
# password: 123456 # 密码,建议生产环境开启
xxl:
job:
admin:
addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
# Lock4j 配置项
lock4j:
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
# Actuator 监控端点的配置项
management:
endpoints:
web:
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
exposure:
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
# 日志文件配置
logging:
level:
# 配置自己写的 MyBatis Mapper 打印日志
com.zt.plat.module.jybusiness.dal.mysql: debug
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 芋道配置项,设置当前项目所有自定义的配置
zt:
env: # 多环境的配置项
tag: ${HOSTNAME}
security:
mock-enable: true
access-log: # 访问日志的配置项
enable: true

View File

@@ -24,7 +24,7 @@ spring:
config:
import:
- optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
# - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
# Servlet 配置