项目初始化
This commit is contained in:
@@ -0,0 +1 @@
|
||||
restart.include.json=/com.alibaba.fastjson2.*.jar
|
||||
61
ruoyi-admin/src/main/resources/application-druid.yml
Normal file
61
ruoyi-admin/src/main/resources/application-druid.yml
Normal file
@@ -0,0 +1,61 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:sqlserver://172.16.4.12:1433;databaseName=flrd-wms;encrypt=false;sendStringParametersAsUnicode=true
|
||||
username: sa
|
||||
password: Flrd0914.
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
enabled: false
|
||||
url:
|
||||
username:
|
||||
password:
|
||||
# 初始连接数
|
||||
initialSize: 5
|
||||
# 最小连接池数量
|
||||
minIdle: 10
|
||||
# 最大连接池数量
|
||||
maxActive: 20
|
||||
# 配置获取连接等待超时的时间
|
||||
maxWait: 60000
|
||||
# 配置连接超时时间
|
||||
connectTimeout: 30000
|
||||
# 配置网络超时时间
|
||||
socketTimeout: 60000
|
||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||
maxEvictableIdleTimeMillis: 900000
|
||||
# 配置检测连接是否有效
|
||||
validationQuery: SELECT 1 FROM sys_logininfor
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
webStatFilter:
|
||||
enabled: true
|
||||
statViewServlet:
|
||||
enabled: true
|
||||
# 设置白名单,不填则允许所有访问
|
||||
allow:
|
||||
url-pattern: /druid/*
|
||||
# 控制台管理用户名和密码
|
||||
login-username: ruoyi
|
||||
login-password: 123456
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
# 慢SQL记录
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
177
ruoyi-admin/src/main/resources/application.yml
Normal file
177
ruoyi-admin/src/main/resources/application.yml
Normal file
@@ -0,0 +1,177 @@
|
||||
# 项目相关配置
|
||||
ruoyi:
|
||||
# 名称
|
||||
name: RuoYi
|
||||
# 版本
|
||||
version: 3.9.2
|
||||
# 版权年份
|
||||
copyrightYear: 2026
|
||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||
profile: D:/ruoyi/uploadPath
|
||||
# 获取ip地址开关
|
||||
addressEnabled: false
|
||||
# 验证码类型 math 数字计算 char 字符验证
|
||||
captchaType: math
|
||||
|
||||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
port: 8080
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
tomcat:
|
||||
# tomcat的URI编码
|
||||
uri-encoding: UTF-8
|
||||
# 连接数满后的排队数,默认为100
|
||||
accept-count: 1000
|
||||
threads:
|
||||
# tomcat最大线程数,默认为200
|
||||
max: 800
|
||||
# Tomcat启动初始化的线程数,默认值10
|
||||
min-spare: 100
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
level:
|
||||
com.ruoyi: debug
|
||||
org.springframework: warn
|
||||
|
||||
# 用户配置
|
||||
user:
|
||||
password:
|
||||
# 密码最大错误次数
|
||||
maxRetryCount: 5
|
||||
# 密码锁定时间(默认10分钟)
|
||||
lockTime: 10
|
||||
|
||||
# Spring配置
|
||||
spring:
|
||||
# 资源信息
|
||||
messages:
|
||||
# 国际化资源文件路径
|
||||
basename: i18n/messages
|
||||
profiles:
|
||||
active: druid
|
||||
# 文件上传
|
||||
servlet:
|
||||
multipart:
|
||||
# 单个文件大小
|
||||
max-file-size: 10MB
|
||||
# 设置总上传的文件大小
|
||||
max-request-size: 20MB
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
# 服务模块
|
||||
devtools:
|
||||
restart:
|
||||
# 热部署开关
|
||||
enabled: false
|
||||
data:
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: 172.16.4.12
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 密码
|
||||
password: 123456
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
|
||||
# token配置
|
||||
token:
|
||||
# 令牌自定义标识
|
||||
header: Authorization
|
||||
# 令牌密钥
|
||||
secret: abcdefghijklmnopqrstuvwxyz
|
||||
# 令牌有效期(默认30分钟)
|
||||
expireTime: 30
|
||||
|
||||
# MyBatis配置
|
||||
mybatis:
|
||||
# 搜索指定包别名
|
||||
typeAliasesPackage: com.ruoyi.**.domain
|
||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 加载全局的配置文件
|
||||
configLocation: classpath:mybatis/mybatis-config.xml
|
||||
|
||||
# PageHelper分页插件
|
||||
pagehelper:
|
||||
helperDialect: sqlserver
|
||||
supportMethodsArguments: true
|
||||
params: count=countSql
|
||||
|
||||
# Springdoc配置
|
||||
springdoc:
|
||||
api-docs:
|
||||
path: /v3/api-docs
|
||||
swagger-ui:
|
||||
enabled: true
|
||||
path: /swagger-ui.html
|
||||
tags-sorter: alpha
|
||||
group-configs:
|
||||
- group: 'default'
|
||||
display-name: '测试模块'
|
||||
paths-to-match: '/**'
|
||||
packages-to-scan: com.ruoyi.web.controller.tool
|
||||
|
||||
# 防盗链配置
|
||||
referer:
|
||||
# 防盗链开关
|
||||
enabled: false
|
||||
# 允许的域名列表
|
||||
allowed-domains: localhost,127.0.0.1,ruoyi.vip,www.ruoyi.vip
|
||||
|
||||
# 防止XSS攻击
|
||||
xss:
|
||||
# 过滤开关
|
||||
enabled: true
|
||||
# 排除链接(多个用逗号分隔)
|
||||
excludes: /system/notice
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
# 外部系统配置
|
||||
external:
|
||||
systems:
|
||||
ERP:
|
||||
base-url: http://10.0.1.100:8080/api
|
||||
token: erp-token
|
||||
apis:
|
||||
syncMaterial: /material/sync
|
||||
reportInbound: /inbound/report
|
||||
reportOutbound: /outbound/report
|
||||
queryBatchStock: /batchStock/query
|
||||
MES:
|
||||
base-url: http://10.0.2.100:8080/api
|
||||
token: mes-token
|
||||
apis:
|
||||
receiveWorkOrders: /workOrder/receive
|
||||
reportCompletion: /completion/report
|
||||
reportMaterialConsume: /material/consume
|
||||
reportQualityCheck: /quality/check
|
||||
WCS:
|
||||
base-url: http://10.0.3.100:9000
|
||||
token: wcs-token
|
||||
apis:
|
||||
sendPutawayTask: /task/dispatch
|
||||
sendRetrieveTask: /task/dispatch
|
||||
queryDeviceStatus: /device/status
|
||||
sendCraneMove: /crane/move
|
||||
cancelTask: /task/cancel
|
||||
|
||||
24
ruoyi-admin/src/main/resources/banner.txt
Normal file
24
ruoyi-admin/src/main/resources/banner.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
Application Version: ${ruoyi.version}
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// _ooOoo_ //
|
||||
// o8888888o //
|
||||
// 88" . "88 //
|
||||
// (| ^_^ |) //
|
||||
// O\ = /O //
|
||||
// ____/`---'\____ //
|
||||
// .' \\| |// `. //
|
||||
// / \\||| : |||// \ //
|
||||
// / _||||| -:- |||||- \ //
|
||||
// | | \\\ - /// | | //
|
||||
// | \_| ''\---/'' | | //
|
||||
// \ .-\__ `-` ___/-. / //
|
||||
// ___`. .' /--.--\ `. . ___ //
|
||||
// ."" '< `.___\_<|>_/___.' >'"". //
|
||||
// | | : `- \`.;`\ _ /`;.`/ - ` : | | //
|
||||
// \ \ `-. \_ __\ /__ _/ .-` / / //
|
||||
// ========`-.____`-.___\_____/___.-`____.-'======== //
|
||||
// `=---=' //
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
|
||||
// 佛祖保佑 永不宕机 永无BUG //
|
||||
////////////////////////////////////////////////////////////////////
|
||||
38
ruoyi-admin/src/main/resources/i18n/messages.properties
Normal file
38
ruoyi-admin/src/main/resources/i18n/messages.properties
Normal file
@@ -0,0 +1,38 @@
|
||||
#错误消息
|
||||
not.null=* 必须填写
|
||||
user.jcaptcha.error=验证码错误
|
||||
user.jcaptcha.expire=验证码已失效
|
||||
user.not.exists=用户不存在/密码错误
|
||||
user.password.not.match=用户不存在/密码错误
|
||||
user.password.retry.limit.count=密码输入错误{0}次
|
||||
user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟
|
||||
user.password.delete=对不起,您的账号已被删除
|
||||
user.blocked=用户已封禁,请联系管理员
|
||||
role.blocked=角色已封禁,请联系管理员
|
||||
login.blocked=很遗憾,访问IP已被列入系统黑名单
|
||||
user.logout.success=退出成功
|
||||
|
||||
length.not.valid=长度必须在{min}到{max}个字符之间
|
||||
|
||||
user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
|
||||
user.password.not.valid=* 5-50个字符
|
||||
|
||||
user.email.not.valid=邮箱格式错误
|
||||
user.mobile.phone.number.not.valid=手机号格式错误
|
||||
user.login.success=登录成功
|
||||
user.register.success=注册成功
|
||||
user.notfound=请重新登录
|
||||
user.forcelogout=管理员强制退出,请重新登录
|
||||
user.unknown.error=未知错误,请重新登录
|
||||
|
||||
##文件上传消息
|
||||
upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB!
|
||||
upload.filename.exceed.length=上传的文件名最长{0}个字符
|
||||
|
||||
##权限
|
||||
no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
|
||||
93
ruoyi-admin/src/main/resources/logback.xml
Normal file
93
ruoyi-admin/src/main/resources/logback.xml
Normal file
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="/home/ruoyi/logs" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 用户访问日志输出 -->
|
||||
<appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-user.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 按天回滚 daily -->
|
||||
<fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.ruoyi" level="info" />
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
|
||||
<!--系统用户操作日志-->
|
||||
<logger name="sys-user" level="info">
|
||||
<appender-ref ref="sys-user"/>
|
||||
</logger>
|
||||
</configuration>
|
||||
@@ -0,0 +1,95 @@
|
||||
<?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.ruoyi.bas.barcode.data.mapper.BasBarcodeDataMapper">
|
||||
|
||||
<resultMap type="BasBarcodeData" id="BasBarcodeDataResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="formatId" column="format_id" />
|
||||
<result property="barcodeNo" column="barcode_no" />
|
||||
<result property="printNum" column="print_num" />
|
||||
<result property="status" column="status" />
|
||||
<result property="printTime" column="print_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasBarcodeDataVo">
|
||||
select id, format_id, barcode_no, print_num, status, print_time, remark from bas_barcode_data
|
||||
</sql>
|
||||
|
||||
<select id="selectBasBarcodeDataList" parameterType="BasBarcodeData" resultMap="BasBarcodeDataResult">
|
||||
<include refid="selectBasBarcodeDataVo"/>
|
||||
<where>
|
||||
<if test="formatId != null "> and format_id = #{formatId}</if>
|
||||
<if test="barcodeNo != null and barcodeNo != ''"> and barcode_no = #{barcodeNo}</if>
|
||||
<if test="printNum != null "> and print_num = #{printNum}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="printTime != null and printTime != ''"> and print_time = #{printTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasBarcodeDataById" parameterType="Long" resultMap="BasBarcodeDataResult">
|
||||
<include refid="selectBasBarcodeDataVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasBarcodeData" parameterType="BasBarcodeData">
|
||||
insert into bas_barcode_data
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="formatId != null">format_id,</if>
|
||||
<if test="barcodeNo != null">barcode_no,</if>
|
||||
<if test="printNum != null">print_num,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="printTime != null">print_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="formatId != null">#{formatId},</if>
|
||||
<if test="barcodeNo != null">#{barcodeNo},</if>
|
||||
<if test="printNum != null">#{printNum},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="printTime != null">#{printTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatchBasBarcodeData" parameterType="list">
|
||||
insert into bas_barcode_data (format_id, barcode_no, print_num, status, print_time, remark)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.formatId,jdbcType=BIGINT},
|
||||
#{item.barcodeNo,jdbcType=VARCHAR},
|
||||
#{item.printNum,jdbcType=INTEGER},
|
||||
#{item.status,jdbcType=VARCHAR},
|
||||
#{item.printTime,jdbcType=TIMESTAMP},
|
||||
#{item.remark,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasBarcodeData" parameterType="BasBarcodeData">
|
||||
update bas_barcode_data
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="formatId != null">format_id = #{formatId},</if>
|
||||
<if test="barcodeNo != null">barcode_no = #{barcodeNo},</if>
|
||||
<if test="printNum != null">print_num = #{printNum},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="printTime != null">print_time = #{printTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasBarcodeDataById" parameterType="Long">
|
||||
delete from bas_barcode_data where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasBarcodeDataByIds" parameterType="String">
|
||||
delete from bas_barcode_data where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,103 @@
|
||||
<?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.ruoyi.bas.barcode.format.mapper.BasBarcodeFormatMapper">
|
||||
|
||||
<resultMap type="BasBarcodeFormat" id="BasBarcodeFormatResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="formatName" column="format_name" />
|
||||
<result property="barcodeType" column="barcode_type" />
|
||||
<result property="width" column="width" />
|
||||
<result property="height" column="height" />
|
||||
<result property="showText" column="show_text" />
|
||||
<result property="fontSize" column="font_size" />
|
||||
<result property="prefix" column="prefix" />
|
||||
<result property="suffix" column="suffix" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasBarcodeFormatVo">
|
||||
select id, format_name, barcode_type, width, height, show_text, font_size, prefix, suffix, remark, create_time, update_time from bas_barcode_format
|
||||
</sql>
|
||||
|
||||
<select id="selectBasBarcodeFormatList" parameterType="BasBarcodeFormat" resultMap="BasBarcodeFormatResult">
|
||||
<include refid="selectBasBarcodeFormatVo"/>
|
||||
<where>
|
||||
<if test="formatName != null and formatName != ''"> and format_name like concat('%', #{formatName}, '%')</if>
|
||||
<if test="barcodeType != null and barcodeType != ''"> and barcode_type = #{barcodeType}</if>
|
||||
<if test="width != null "> and width = #{width}</if>
|
||||
<if test="height != null "> and height = #{height}</if>
|
||||
<if test="showText != null "> and show_text = #{showText}</if>
|
||||
<if test="fontSize != null "> and font_size = #{fontSize}</if>
|
||||
<if test="prefix != null and prefix != ''"> and prefix = #{prefix}</if>
|
||||
<if test="suffix != null and suffix != ''"> and suffix = #{suffix}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasBarcodeFormatById" parameterType="Long" resultMap="BasBarcodeFormatResult">
|
||||
<include refid="selectBasBarcodeFormatVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasBarcodeFormat" parameterType="BasBarcodeFormat" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bas_barcode_format
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="formatName != null">format_name,</if>
|
||||
<if test="barcodeType != null">barcode_type,</if>
|
||||
<if test="width != null">width,</if>
|
||||
<if test="height != null">height,</if>
|
||||
<if test="showText != null">show_text,</if>
|
||||
<if test="fontSize != null">font_size,</if>
|
||||
<if test="prefix != null">prefix,</if>
|
||||
<if test="suffix != null">suffix,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="formatName != null">#{formatName},</if>
|
||||
<if test="barcodeType != null">#{barcodeType},</if>
|
||||
<if test="width != null">#{width},</if>
|
||||
<if test="height != null">#{height},</if>
|
||||
<if test="showText != null">#{showText},</if>
|
||||
<if test="fontSize != null">#{fontSize},</if>
|
||||
<if test="prefix != null">#{prefix},</if>
|
||||
<if test="suffix != null">#{suffix},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasBarcodeFormat" parameterType="BasBarcodeFormat">
|
||||
update bas_barcode_format
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="formatName != null">format_name = #{formatName},</if>
|
||||
<if test="barcodeType != null">barcode_type = #{barcodeType},</if>
|
||||
<if test="width != null">width = #{width},</if>
|
||||
<if test="height != null">height = #{height},</if>
|
||||
<if test="showText != null">show_text = #{showText},</if>
|
||||
<if test="fontSize != null">font_size = #{fontSize},</if>
|
||||
<if test="prefix != null">prefix = #{prefix},</if>
|
||||
<if test="suffix != null">suffix = #{suffix},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasBarcodeFormatById" parameterType="Long">
|
||||
delete from bas_barcode_format where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasBarcodeFormatByIds" parameterType="String">
|
||||
delete from bas_barcode_format where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,190 @@
|
||||
<?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.ruoyi.bas.cargospace.mapper.BasCargoSpaceMapper">
|
||||
|
||||
<resultMap type="BasCargoSpace" id="BasCargoSpaceResult">
|
||||
<result property="cargoSpaceId" column="cargo_space_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="roadwayId" column="roadway_id" />
|
||||
<result property="cargoAreaId" column="cargo_area_id" />
|
||||
<result property="theType" column="the_type" />
|
||||
<result property="theTypeName" column="the_type_name" />
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="thePlatoon" column="the_platoon" />
|
||||
<result property="theColumn" column="the_column" />
|
||||
<result property="theFloor" column="the_floor" />
|
||||
<result property="status" column="status" />
|
||||
<result property="locked" column="locked" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="issDouble" column="iss_double" />
|
||||
<result property="groupCodingNo" column="group_coding_no" />
|
||||
<result property="groupCoding" column="group_coding" />
|
||||
<result property="cargoSpaceLogo" column="cargo_space_logo" />
|
||||
<result property="thisCargoArea" column="this_cargo_area" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="theWeight" column="the_weight" />
|
||||
<result property="theHeight" column="the_height" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasCargoSpaceVo">
|
||||
select cargo_space_id, warehouse_id, roadway_id, cargo_area_id, the_type, the_type_name, cargo_space_name, the_platoon, the_column, the_floor, status, locked, tray_code, iss_double, group_coding_no, group_coding, cargo_space_logo, this_cargo_area, dept_id, dept_name, the_weight, the_height from bas_cargo_space
|
||||
</sql>
|
||||
|
||||
<select id="selectBasCargoSpaceList" parameterType="BasCargoSpace" resultMap="BasCargoSpaceResult">
|
||||
<include refid="selectBasCargoSpaceVo"/>
|
||||
<where>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoAreaId != null and cargoAreaId != ''"> and cargo_area_id = #{cargoAreaId}</if>
|
||||
<if test="theType != null and theType != ''"> and the_type = #{theType}</if>
|
||||
<if test="theTypeName != null and theTypeName != ''"> and the_type_name like concat('%', #{theTypeName}, '%')</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||
<if test="thePlatoon != null "> and the_platoon = #{thePlatoon}</if>
|
||||
<if test="theColumn != null "> and the_column = #{theColumn}</if>
|
||||
<if test="theFloor != null "> and the_floor = #{theFloor}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="locked != null and locked != ''"> and locked = #{locked}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="issDouble != null and issDouble != ''"> and iss_double = #{issDouble}</if>
|
||||
<if test="groupCodingNo != null and groupCodingNo != ''"> and group_coding_no = #{groupCodingNo}</if>
|
||||
<if test="groupCoding != null and groupCoding != ''"> and group_coding = #{groupCoding}</if>
|
||||
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and cargo_space_logo = #{cargoSpaceLogo}</if>
|
||||
<if test="thisCargoArea != null and thisCargoArea != ''"> and this_cargo_area = #{thisCargoArea}</if>
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="theWeight != null "> and the_weight = #{theWeight}</if>
|
||||
<if test="theHeight != null "> and the_height = #{theHeight}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasCargoSpaceByCargoSpaceId" parameterType="String" resultMap="BasCargoSpaceResult">
|
||||
<include refid="selectBasCargoSpaceVo"/>
|
||||
where cargo_space_id = #{cargoSpaceId}
|
||||
</select>
|
||||
<select id="selectBasCargoSpaceListByGroupByStatus" resultType="com.ruoyi.kpi.domain.BasCargoSpaceStatus">
|
||||
select status, count(*) as count
|
||||
from bas_cargo_space
|
||||
<where>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
|
||||
</where>
|
||||
group by status
|
||||
</select>
|
||||
<select id="selectPlatListByPlatoon" resultType="java.lang.Integer">
|
||||
select distinct the_platoon
|
||||
from bas_cargo_space
|
||||
<where>
|
||||
<if test="warehouseId !=null and warehouseId != ''">
|
||||
and warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="roadwayId !=null and roadwayId != ''">
|
||||
and roadway_id = #{roadwayId}
|
||||
</if>
|
||||
</where>
|
||||
order by the_platoon
|
||||
</select>
|
||||
|
||||
<select id="selectByCoordinates" parameterType="BasCargoSpace" resultMap="BasCargoSpaceResult">
|
||||
<include refid="selectBasCargoSpaceVo"/>
|
||||
<where>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="thePlatoon != null"> and the_platoon = #{thePlatoon}</if>
|
||||
<if test="theColumn != null"> and the_column = #{theColumn}</if>
|
||||
<if test="theFloor != null"> and the_floor = #{theFloor}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertBasCargoSpace" parameterType="BasCargoSpace">
|
||||
insert into bas_cargo_space
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cargoSpaceId != null">cargo_space_id,</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id,</if>
|
||||
<if test="roadwayId != null and roadwayId != ''">roadway_id,</if>
|
||||
<if test="cargoAreaId != null">cargo_area_id,</if>
|
||||
<if test="theType != null">the_type,</if>
|
||||
<if test="theTypeName != null">the_type_name,</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''">cargo_space_name,</if>
|
||||
<if test="thePlatoon != null">the_platoon,</if>
|
||||
<if test="theColumn != null">the_column,</if>
|
||||
<if test="theFloor != null">the_floor,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="locked != null and locked != ''">locked,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="issDouble != null">iss_double,</if>
|
||||
<if test="groupCodingNo != null">group_coding_no,</if>
|
||||
<if test="groupCoding != null">group_coding,</if>
|
||||
<if test="cargoSpaceLogo != null">cargo_space_logo,</if>
|
||||
<if test="thisCargoArea != null">this_cargo_area,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="deptName != null">dept_name,</if>
|
||||
<if test="theWeight != null">the_weight,</if>
|
||||
<if test="theHeight != null">the_height,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">#{warehouseId},</if>
|
||||
<if test="roadwayId != null and roadwayId != ''">#{roadwayId},</if>
|
||||
<if test="cargoAreaId != null">#{cargoAreaId},</if>
|
||||
<if test="theType != null">#{theType},</if>
|
||||
<if test="theTypeName != null">#{theTypeName},</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''">#{cargoSpaceName},</if>
|
||||
<if test="thePlatoon != null">#{thePlatoon},</if>
|
||||
<if test="theColumn != null">#{theColumn},</if>
|
||||
<if test="theFloor != null">#{theFloor},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="locked != null and locked != ''">#{locked},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="issDouble != null">#{issDouble},</if>
|
||||
<if test="groupCodingNo != null">#{groupCodingNo},</if>
|
||||
<if test="groupCoding != null">#{groupCoding},</if>
|
||||
<if test="cargoSpaceLogo != null">#{cargoSpaceLogo},</if>
|
||||
<if test="thisCargoArea != null">#{thisCargoArea},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="deptName != null">#{deptName},</if>
|
||||
<if test="theWeight != null">#{theWeight},</if>
|
||||
<if test="theHeight != null">#{theHeight},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasCargoSpace" parameterType="BasCargoSpace">
|
||||
update bas_cargo_space
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id = #{warehouseId},</if>
|
||||
<if test="roadwayId != null and roadwayId != ''">roadway_id = #{roadwayId},</if>
|
||||
<if test="cargoAreaId != null">cargo_area_id = #{cargoAreaId},</if>
|
||||
<if test="theType != null">the_type = #{theType},</if>
|
||||
<if test="theTypeName != null">the_type_name = #{theTypeName},</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''">cargo_space_name = #{cargoSpaceName},</if>
|
||||
<if test="thePlatoon != null">the_platoon = #{thePlatoon},</if>
|
||||
<if test="theColumn != null">the_column = #{theColumn},</if>
|
||||
<if test="theFloor != null">the_floor = #{theFloor},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="locked != null and locked != ''">locked = #{locked},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="issDouble != null">iss_double = #{issDouble},</if>
|
||||
<if test="groupCodingNo != null">group_coding_no = #{groupCodingNo},</if>
|
||||
<if test="groupCoding != null">group_coding = #{groupCoding},</if>
|
||||
<if test="cargoSpaceLogo != null">cargo_space_logo = #{cargoSpaceLogo},</if>
|
||||
<if test="thisCargoArea != null">this_cargo_area = #{thisCargoArea},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="deptName != null">dept_name = #{deptName},</if>
|
||||
<if test="theWeight != null">the_weight = #{theWeight},</if>
|
||||
<if test="theHeight != null">the_height = #{theHeight},</if>
|
||||
</trim>
|
||||
where cargo_space_id = #{cargoSpaceId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasCargoSpaceByCargoSpaceId" parameterType="String">
|
||||
delete from bas_cargo_space where cargo_space_id = #{cargoSpaceId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasCargoSpaceByCargoSpaceIds" parameterType="String">
|
||||
delete from bas_cargo_space where cargo_space_id in
|
||||
<foreach item="cargoSpaceId" collection="array" open="(" separator="," close=")">
|
||||
#{cargoSpaceId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,82 @@
|
||||
<?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.ruoyi.bas.customer.mapper.BasCustomerMapper">
|
||||
|
||||
<resultMap type="BasCustomer" id="BasCustomerResult">
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="customerName" column="customer_name" />
|
||||
<result property="simpleName" column="simple_name" />
|
||||
<result property="useable" column="useable" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="contactName" column="contact_name" />
|
||||
<result property="contactNumber" column="contact_number" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasCustomerVo">
|
||||
select customer_id, customer_name, simple_name, useable, remark, contact_name, contact_number from bas_customer
|
||||
</sql>
|
||||
|
||||
<select id="selectBasCustomerList" parameterType="BasCustomer" resultMap="BasCustomerResult">
|
||||
<include refid="selectBasCustomerVo"/>
|
||||
<where>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="simpleName != null and simpleName != ''"> and simple_name like concat('%', #{simpleName}, '%')</if>
|
||||
<if test="useable != null and useable != ''"> and useable = #{useable}</if>
|
||||
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
|
||||
<if test="contactNumber != null and contactNumber != ''"> and contact_number = #{contactNumber}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasCustomerByCustomerId" parameterType="String" resultMap="BasCustomerResult">
|
||||
<include refid="selectBasCustomerVo"/>
|
||||
where customer_id = #{customerId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasCustomer" parameterType="BasCustomer">
|
||||
insert into bas_customer
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="customerId != null">customer_id,</if>
|
||||
<if test="customerName != null">customer_name,</if>
|
||||
<if test="simpleName != null">simple_name,</if>
|
||||
<if test="useable != null">useable,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="contactName != null">contact_name,</if>
|
||||
<if test="contactNumber != null">contact_number,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="customerId != null">#{customerId},</if>
|
||||
<if test="customerName != null">#{customerName},</if>
|
||||
<if test="simpleName != null">#{simpleName},</if>
|
||||
<if test="useable != null">#{useable},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="contactName != null">#{contactName},</if>
|
||||
<if test="contactNumber != null">#{contactNumber},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasCustomer" parameterType="BasCustomer">
|
||||
update bas_customer
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="customerName != null">customer_name = #{customerName},</if>
|
||||
<if test="simpleName != null">simple_name = #{simpleName},</if>
|
||||
<if test="useable != null">useable = #{useable},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="contactName != null">contact_name = #{contactName},</if>
|
||||
<if test="contactNumber != null">contact_number = #{contactNumber},</if>
|
||||
</trim>
|
||||
where customer_id = #{customerId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasCustomerByCustomerId" parameterType="String">
|
||||
delete from bas_customer where customer_id = #{customerId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasCustomerByCustomerIds" parameterType="String">
|
||||
delete from bas_customer where customer_id in
|
||||
<foreach item="customerId" collection="array" open="(" separator="," close=")">
|
||||
#{customerId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?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.ruoyi.bas.product.mapper.BasProductMapper">
|
||||
|
||||
<resultMap type="BasProduct" id="BasProductResult">
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="price" column="price" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasProductVo">
|
||||
select product_id, product_name, parent_id, price, cargo_no, unit, spec, remark from bas_product
|
||||
</sql>
|
||||
|
||||
<select id="selectBasProductList" parameterType="BasProduct" resultMap="BasProductResult">
|
||||
<include refid="selectBasProductVo"/>
|
||||
<where>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if>
|
||||
<if test="price != null and price != ''"> and price = #{price}</if>
|
||||
<if test="cargoNo != null and cargoNo != ''"> and cargo_no = #{cargoNo}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="spec != null and spec != ''"> and spec = #{spec}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasProductByProductId" parameterType="String" resultMap="BasProductResult">
|
||||
<include refid="selectBasProductVo"/>
|
||||
where product_id = #{productId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasProduct" parameterType="BasProduct">
|
||||
insert into bas_product
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
<if test="price != null">price,</if>
|
||||
<if test="cargoNo != null">cargo_no,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="spec != null">spec,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="cargoNo != null">#{cargoNo},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spec != null">#{spec},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasProduct" parameterType="BasProduct">
|
||||
update bas_product
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="spec != null">spec = #{spec},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where product_id = #{productId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasProductByProductId" parameterType="String">
|
||||
delete from bas_product where product_id = #{productId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasProductByProductIds" parameterType="String">
|
||||
delete from bas_product where product_id in
|
||||
<foreach item="productId" collection="array" open="(" separator="," close=")">
|
||||
#{productId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?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.ruoyi.bas.roadway.mapper.BasRoadwayMapper">
|
||||
|
||||
<resultMap type="BasRoadway" id="BasRoadwayResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="roadwayId" column="roadway_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="roadwayName" column="roadway_name" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="inLocked" column="in_locked" />
|
||||
<result property="outLocked" column="out_locked" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasRoadwayVo">
|
||||
select id, roadway_id, warehouse_id, roadway_name, device_id, in_locked, out_locked from bas_roadway
|
||||
</sql>
|
||||
|
||||
<select id="selectBasRoadwayList" parameterType="BasRoadway" resultMap="BasRoadwayResult">
|
||||
<include refid="selectBasRoadwayVo"/>
|
||||
<where>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="roadwayName != null and roadwayName != ''"> and roadway_name like concat('%', #{roadwayName}, '%')</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
<if test="inLocked != null and inLocked != ''"> and in_locked = #{inLocked}</if>
|
||||
<if test="outLocked != null and outLocked != ''"> and out_locked = #{outLocked}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasRoadwayById" parameterType="Long" resultMap="BasRoadwayResult">
|
||||
<include refid="selectBasRoadwayVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasRoadway" parameterType="BasRoadway" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bas_roadway
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="roadwayId != null and roadwayId != ''">roadway_id,</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id,</if>
|
||||
<if test="roadwayName != null">roadway_name,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="inLocked != null and inLocked != ''">in_locked,</if>
|
||||
<if test="outLocked != null">out_locked,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="roadwayId != null and roadwayId != ''">#{roadwayId},</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">#{warehouseId},</if>
|
||||
<if test="roadwayName != null">#{roadwayName},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="inLocked != null and inLocked != ''">#{inLocked},</if>
|
||||
<if test="outLocked != null">#{outLocked},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasRoadway" parameterType="BasRoadway">
|
||||
update bas_roadway
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="roadwayId != null and roadwayId != ''">roadway_id = #{roadwayId},</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id = #{warehouseId},</if>
|
||||
<if test="roadwayName != null">roadway_name = #{roadwayName},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="inLocked != null and inLocked != ''">in_locked = #{inLocked},</if>
|
||||
<if test="outLocked != null">out_locked = #{outLocked},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasRoadwayById" parameterType="Long">
|
||||
delete from bas_roadway where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasRoadwayByIds" parameterType="String">
|
||||
delete from bas_roadway where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
176
ruoyi-admin/src/main/resources/mapper/bas/BasStockMapper.xml
Normal file
176
ruoyi-admin/src/main/resources/mapper/bas/BasStockMapper.xml
Normal file
@@ -0,0 +1,176 @@
|
||||
<?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.ruoyi.bas.stock.mapper.BasStockMapper">
|
||||
|
||||
<resultMap type="BasStock" id="BasStockResult">
|
||||
<result property="stockId" column="stock_id" />
|
||||
<result property="cargoSpaceId" column="cargo_space_id" />
|
||||
<result property="stockStatus" column="stock_status" />
|
||||
<result property="productStatus" column="product_status" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="inDate" column="in_date" />
|
||||
<result property="backDate" column="back_date" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="jobId" column="job_id" />
|
||||
<result property="jobDetailId" column="job_detail_id" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="outQuantity" column="out_quantity" />
|
||||
<result property="stockinDetailId" column="stockin_detail_id" />
|
||||
<result property="stockinId" column="stockin_id" />
|
||||
<result property="inType" column="in_type" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="suplierId" column="suplier_id" />
|
||||
<result property="suplierName" column="suplier_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasStockVo">
|
||||
select stock_id, cargo_space_id, stock_status, product_status, lot_no, in_date, back_date, product_id, product_name, quantity, job_id, job_detail_id, tray_code, out_quantity, stockin_detail_id, stockin_id, in_type, warehouse_id, warehouse_name, user_id, user_name, dept_id, dept_name, suplier_id, suplier_name from bas_stock
|
||||
</sql>
|
||||
|
||||
<select id="selectBasStockList" parameterType="BasStock" resultMap="BasStockResult">
|
||||
select bs.stock_id, bs.cargo_space_id, bs.stock_status, bs.product_status,
|
||||
bs.lot_no, bs.in_date, bs.back_date, bs.product_id, bs.product_name,
|
||||
bs.quantity, bs.job_id, bs.job_detail_id, bs.tray_code, bs.out_quantity,
|
||||
bs.stockin_detail_id, bs.stockin_id, bs.in_type, bs.warehouse_id, bs.warehouse_name,
|
||||
bs.user_id, bs.user_name, bs.dept_id, bs.dept_name, bs.suplier_id, bs.suplier_name
|
||||
from bas_stock bs
|
||||
left join bas_cargo_space bcs on bs.cargo_space_id = bcs.cargo_space_id
|
||||
where
|
||||
bcs.status = '2'
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bs.cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="stockStatus != null and stockStatus != ''"> and bs.stock_status = #{stockStatus}</if>
|
||||
<if test="productStatus != null and productStatus != ''"> and bs.product_status = #{productStatus}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and bs.lot_no = #{lotNo}</if>
|
||||
<if test="params.beginInDate != null and params.beginInDate != '' and params.endInDate != null and params.endInDate != ''"> and bs.in_date between #{params.beginInDate} and #{params.endInDate}</if>
|
||||
<if test="params.beginBackDate != null and params.beginBackDate != '' and params.endBackDate != null and params.endBackDate != ''"> and bs.back_date between #{params.beginBackDate} and #{params.endBackDate}</if>
|
||||
<if test="productId != null and productId != ''"> and bs.product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and bs.product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null "> and bs.quantity = #{quantity}</if>
|
||||
<if test="jobId != null and jobId != ''"> and bs.job_id = #{jobId}</if>
|
||||
<if test="jobDetailId != null and jobDetailId != ''"> and bs.job_detail_id = #{jobDetailId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and bs.tray_code = #{trayCode}</if>
|
||||
<if test="outQuantity != null "> and bs.out_quantity = #{outQuantity}</if>
|
||||
<if test="stockinDetailId != null and stockinDetailId != ''"> and bs.stockin_detail_id = #{stockinDetailId}</if>
|
||||
<if test="stockinId != null and stockinId != ''"> and bs.stockin_id = #{stockinId}</if>
|
||||
<if test="inType != null and inType != ''"> and bs.in_type = #{inType}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and bs.warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="userName != null and userName != ''"> and bs.user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="deptName != null and deptName != ''"> and bs.dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="suplierName != null and suplierName != ''"> and bs.suplier_name like concat('%', #{suplierName}, '%')</if>
|
||||
${params.warehouseScope}
|
||||
</select>
|
||||
|
||||
<select id="selectBasStockByStockId" parameterType="String" resultMap="BasStockResult">
|
||||
<include refid="selectBasStockVo"/>
|
||||
where stock_id = #{stockId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasStock" parameterType="BasStock">
|
||||
insert into bas_stock
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockId != null">stock_id,</if>
|
||||
<if test="cargoSpaceId != null">cargo_space_id,</if>
|
||||
<if test="stockStatus != null">stock_status,</if>
|
||||
<if test="productStatus != null">product_status,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="inDate != null">in_date,</if>
|
||||
<if test="backDate != null">back_date,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="jobId != null">job_id,</if>
|
||||
<if test="jobDetailId != null">job_detail_id,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="outQuantity != null">out_quantity,</if>
|
||||
<if test="stockinDetailId != null">stockin_detail_id,</if>
|
||||
<if test="stockinId != null">stockin_id,</if>
|
||||
<if test="inType != null">in_type,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="warehouseName != null">warehouse_name,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null">user_name,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="deptName != null">dept_name,</if>
|
||||
<if test="suplierId != null">suplier_id,</if>
|
||||
<if test="suplierName != null">suplier_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockId != null">#{stockId},</if>
|
||||
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
||||
<if test="stockStatus != null">#{stockStatus},</if>
|
||||
<if test="productStatus != null">#{productStatus},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="inDate != null">#{inDate},</if>
|
||||
<if test="backDate != null">#{backDate},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="jobId != null">#{jobId},</if>
|
||||
<if test="jobDetailId != null">#{jobDetailId},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="outQuantity != null">#{outQuantity},</if>
|
||||
<if test="stockinDetailId != null">#{stockinDetailId},</if>
|
||||
<if test="stockinId != null">#{stockinId},</if>
|
||||
<if test="inType != null">#{inType},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="warehouseName != null">#{warehouseName},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null">#{userName},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="deptName != null">#{deptName},</if>
|
||||
<if test="suplierId != null">#{suplierId},</if>
|
||||
<if test="suplierName != null">#{suplierName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasStock" parameterType="BasStock">
|
||||
update bas_stock
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cargoSpaceId != null">cargo_space_id = #{cargoSpaceId},</if>
|
||||
<if test="stockStatus != null">stock_status = #{stockStatus},</if>
|
||||
<if test="productStatus != null">product_status = #{productStatus},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="inDate != null">in_date = #{inDate},</if>
|
||||
<if test="backDate != null">back_date = #{backDate},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="jobId != null">job_id = #{jobId},</if>
|
||||
<if test="jobDetailId != null">job_detail_id = #{jobDetailId},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="outQuantity != null">out_quantity = #{outQuantity},</if>
|
||||
<if test="stockinDetailId != null">stockin_detail_id = #{stockinDetailId},</if>
|
||||
<if test="stockinId != null">stockin_id = #{stockinId},</if>
|
||||
<if test="inType != null">in_type = #{inType},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="userName != null">user_name = #{userName},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="deptName != null">dept_name = #{deptName},</if>
|
||||
<if test="suplierId != null">suplier_id = #{suplierId},</if>
|
||||
<if test="suplierName != null">suplier_name = #{suplierName},</if>
|
||||
</trim>
|
||||
where stock_id = #{stockId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasStockByStockId" parameterType="String">
|
||||
delete from bas_stock where stock_id = #{stockId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasStockByStockIds" parameterType="String">
|
||||
delete from bas_stock where stock_id in
|
||||
<foreach item="stockId" collection="array" open="(" separator="," close=")">
|
||||
#{stockId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,123 @@
|
||||
<?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.ruoyi.bas.stockoper.mapper.BasStockOperRecordMapper">
|
||||
|
||||
<resultMap type="BasStockOperRecord" id="BasStockOperRecordResult">
|
||||
<result property="whGuid" column="wh_guid" />
|
||||
<result property="stockId" column="stock_id" />
|
||||
<result property="cargoSpaceId" column="cargo_space_id" />
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="srcStatus" column="src_status" />
|
||||
<result property="tarStatus" column="tar_status" />
|
||||
<result property="srcQuantity" column="src_quantity" />
|
||||
<result property="tarQuantity" column="tar_quantity" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasStockOperRecordVo">
|
||||
select wh_guid, stock_id, cargo_space_id, cargo_space_name, user_id, user_name, dept_id, dept_name, src_status, tar_status, src_quantity, tar_quantity, warehouse_id, warehouse_name, create_time from bas_stock_oper_record
|
||||
</sql>
|
||||
|
||||
<select id="selectBasStockOperRecordList" parameterType="BasStockOperRecord" resultMap="BasStockOperRecordResult">
|
||||
<include refid="selectBasStockOperRecordVo"/>
|
||||
<where>
|
||||
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="srcStatus != null and srcStatus != ''"> and src_status = #{srcStatus}</if>
|
||||
<if test="tarStatus != null and tarStatus != ''"> and tar_status = #{tarStatus}</if>
|
||||
<if test="srcQuantity != null "> and src_quantity = #{srcQuantity}</if>
|
||||
<if test="tarQuantity != null "> and tar_quantity = #{tarQuantity}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
${params.warehouseScope}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasStockOperRecordByWhGuid" parameterType="Long" resultMap="BasStockOperRecordResult">
|
||||
<include refid="selectBasStockOperRecordVo"/>
|
||||
where wh_guid = #{whGuid}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasStockOperRecord" parameterType="BasStockOperRecord">
|
||||
insert into bas_stock_oper_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="whGuid != null">wh_guid,</if>
|
||||
<if test="stockId != null">stock_id,</if>
|
||||
<if test="cargoSpaceId != null">cargo_space_id,</if>
|
||||
<if test="cargoSpaceName != null">cargo_space_name,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null">user_name,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="deptName != null">dept_name,</if>
|
||||
<if test="srcStatus != null">src_status,</if>
|
||||
<if test="tarStatus != null">tar_status,</if>
|
||||
<if test="srcQuantity != null">src_quantity,</if>
|
||||
<if test="tarQuantity != null">tar_quantity,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="warehouseName != null">warehouse_name,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="whGuid != null">#{whGuid},</if>
|
||||
<if test="stockId != null">#{stockId},</if>
|
||||
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
||||
<if test="cargoSpaceName != null">#{cargoSpaceName},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null">#{userName},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="deptName != null">#{deptName},</if>
|
||||
<if test="srcStatus != null">#{srcStatus},</if>
|
||||
<if test="tarStatus != null">#{tarStatus},</if>
|
||||
<if test="srcQuantity != null">#{srcQuantity},</if>
|
||||
<if test="tarQuantity != null">#{tarQuantity},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="warehouseName != null">#{warehouseName},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasStockOperRecord" parameterType="BasStockOperRecord">
|
||||
update bas_stock_oper_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockId != null">stock_id = #{stockId},</if>
|
||||
<if test="cargoSpaceId != null">cargo_space_id = #{cargoSpaceId},</if>
|
||||
<if test="cargoSpaceName != null">cargo_space_name = #{cargoSpaceName},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="userName != null">user_name = #{userName},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="deptName != null">dept_name = #{deptName},</if>
|
||||
<if test="srcStatus != null">src_status = #{srcStatus},</if>
|
||||
<if test="tarStatus != null">tar_status = #{tarStatus},</if>
|
||||
<if test="srcQuantity != null">src_quantity = #{srcQuantity},</if>
|
||||
<if test="tarQuantity != null">tar_quantity = #{tarQuantity},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where wh_guid = #{whGuid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasStockOperRecordByWhGuid" parameterType="Long">
|
||||
delete from bas_stock_oper_record where wh_guid = #{whGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasStockOperRecordByWhGuids" parameterType="String">
|
||||
delete from bas_stock_oper_record where wh_guid in
|
||||
<foreach item="whGuid" collection="array" open="(" separator="," close=")">
|
||||
#{whGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?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.ruoyi.bas.supplier.mapper.BasSupplierMapper">
|
||||
|
||||
<resultMap type="BasSupplier" id="BasSupplierResult">
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="supplierName" column="supplier_name" />
|
||||
<result property="simpleName" column="simple_name" />
|
||||
<result property="useable" column="useable" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="contactName" column="contact_name" />
|
||||
<result property="contactNumber" column="contact_number" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasSupplierVo">
|
||||
select supplier_id, supplier_name, simple_name, useable, remark, contact_name, contact_number from bas_supplier
|
||||
</sql>
|
||||
|
||||
<select id="selectBasSupplierList" parameterType="BasSupplier" resultMap="BasSupplierResult">
|
||||
<include refid="selectBasSupplierVo"/>
|
||||
<where>
|
||||
<if test="supplierId != null and supplierId != ''"> and supplier_id = #{supplierId}</if>
|
||||
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
||||
<if test="simpleName != null and simpleName != ''"> and simple_name like concat('%', #{simpleName}, '%')</if>
|
||||
<if test="useable != null and useable != ''"> and useable = #{useable}</if>
|
||||
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
|
||||
<if test="contactNumber != null and contactNumber != ''"> and contact_number = #{contactNumber}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasSupplierBySupplierId" parameterType="String" resultMap="BasSupplierResult">
|
||||
<include refid="selectBasSupplierVo"/>
|
||||
where supplier_id = #{supplierId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasSupplier" parameterType="BasSupplier">
|
||||
insert into bas_supplier
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id,</if>
|
||||
<if test="supplierName != null">supplier_name,</if>
|
||||
<if test="simpleName != null">simple_name,</if>
|
||||
<if test="useable != null and useable != ''">useable,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="contactName != null">contact_name,</if>
|
||||
<if test="contactNumber != null">contact_number,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="supplierId != null and supplierId != ''">#{supplierId},</if>
|
||||
<if test="supplierName != null">#{supplierName},</if>
|
||||
<if test="simpleName != null">#{simpleName},</if>
|
||||
<if test="useable != null and useable != ''">#{useable},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="contactName != null">#{contactName},</if>
|
||||
<if test="contactNumber != null">#{contactNumber},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasSupplier" parameterType="BasSupplier">
|
||||
update bas_supplier
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="supplierName != null">supplier_name = #{supplierName},</if>
|
||||
<if test="simpleName != null">simple_name = #{simpleName},</if>
|
||||
<if test="useable != null and useable != ''">useable = #{useable},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="contactName != null">contact_name = #{contactName},</if>
|
||||
<if test="contactNumber != null">contact_number = #{contactNumber},</if>
|
||||
</trim>
|
||||
where supplier_id = #{supplierId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasSupplierBySupplierId" parameterType="String">
|
||||
delete from bas_supplier where supplier_id = #{supplierId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasSupplierBySupplierIds" parameterType="String">
|
||||
delete from bas_supplier where supplier_id in
|
||||
<foreach item="supplierId" collection="array" open="(" separator="," close=")">
|
||||
#{supplierId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?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.ruoyi.bas.warehouse.mapper.BasWarehouseMapper">
|
||||
|
||||
<resultMap type="BasWarehouse" id="BasWarehouseResult">
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="address" column="address" />
|
||||
<result property="cDesc" column="c_desc" />
|
||||
<result property="warehouseKind" column="warehouse_kind" />
|
||||
<result property="warehouseType" column="warehouse_type" />
|
||||
<result property="isActive" column="is_active" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasWarehouseVo">
|
||||
select warehouse_id, warehouse_name, address, c_desc, warehouse_kind, warehouse_type, is_active from bas_warehouse
|
||||
</sql>
|
||||
|
||||
<select id="selectBasWarehouseList" parameterType="BasWarehouse" resultMap="BasWarehouseResult">
|
||||
<include refid="selectBasWarehouseVo"/>
|
||||
<where>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="cDesc != null and cDesc != ''"> and c_desc = #{cDesc}</if>
|
||||
<if test="warehouseKind != null and warehouseKind != ''"> and warehouse_kind = #{warehouseKind}</if>
|
||||
<if test="warehouseType != null and warehouseType != ''"> and warehouse_type = #{warehouseType}</if>
|
||||
<if test="isActive != null and isActive != ''"> and is_active = #{isActive}</if>
|
||||
${params.warehouseScope}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasWarehouseByWarehouseId" parameterType="String" resultMap="BasWarehouseResult">
|
||||
<include refid="selectBasWarehouseVo"/>
|
||||
where warehouse_id = #{warehouseId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasWarehouse" parameterType="BasWarehouse">
|
||||
insert into bas_warehouse
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">warehouse_name,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="cDesc != null">c_desc,</if>
|
||||
<if test="warehouseKind != null">warehouse_kind,</if>
|
||||
<if test="warehouseType != null and warehouseType != ''">warehouse_type,</if>
|
||||
<if test="isActive != null and isActive != ''">is_active,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">#{warehouseName},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="cDesc != null">#{cDesc},</if>
|
||||
<if test="warehouseKind != null">#{warehouseKind},</if>
|
||||
<if test="warehouseType != null and warehouseType != ''">#{warehouseType},</if>
|
||||
<if test="isActive != null and isActive != ''">#{isActive},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasWarehouse" parameterType="BasWarehouse">
|
||||
update bas_warehouse
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="warehouseName != null and warehouseName != ''">warehouse_name = #{warehouseName},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="cDesc != null">c_desc = #{cDesc},</if>
|
||||
<if test="warehouseKind != null">warehouse_kind = #{warehouseKind},</if>
|
||||
<if test="warehouseType != null and warehouseType != ''">warehouse_type = #{warehouseType},</if>
|
||||
<if test="isActive != null and isActive != ''">is_active = #{isActive},</if>
|
||||
</trim>
|
||||
where warehouse_id = #{warehouseId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasWarehouseByWarehouseId" parameterType="String">
|
||||
delete from bas_warehouse where warehouse_id = #{warehouseId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasWarehouseByWarehouseIds" parameterType="String">
|
||||
delete from bas_warehouse where warehouse_id in
|
||||
<foreach item="warehouseId" collection="array" open="(" separator="," close=")">
|
||||
#{warehouseId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
14
ruoyi-admin/src/main/resources/mapper/bas/JobIdMapper.xml
Normal file
14
ruoyi-admin/src/main/resources/mapper/bas/JobIdMapper.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?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.ruoyi.bas.id.job.mapper.BasJobIdMapper">
|
||||
|
||||
|
||||
<select id="getJobId" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call util_serial_job(
|
||||
#{v_param,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_serial,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
</mapper>
|
||||
15
ruoyi-admin/src/main/resources/mapper/bas/TaskNoMapper.xml
Normal file
15
ruoyi-admin/src/main/resources/mapper/bas/TaskNoMapper.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?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.ruoyi.bas.id.taskno.mapper.BasTaskNoMapper">
|
||||
|
||||
|
||||
<select id="getTaskNo" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call util_serial_task(
|
||||
#{v_param,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_serial,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,111 @@
|
||||
<?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.ruoyi.in.sotckindetail.mapper.InStockinDetailMapper">
|
||||
|
||||
<resultMap type="InStockinDetail" id="InStockinDetailResult">
|
||||
<result property="stockinDetailId" column="stockin_detail_id" />
|
||||
<result property="stockinId" column="stockin_id" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="scanNum" column="scan_num" />
|
||||
<result property="assignNum" column="assign_num" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInStockinDetailVo">
|
||||
select stockin_detail_id, stockin_id, lot_no, product_id, product_name, quantity, scan_num, assign_num, remark from in_stockin_detail
|
||||
</sql>
|
||||
<sql id="selectInStockinDetailFinishVo">
|
||||
select stockin_detail_id, stockin_id, lot_no, product_id, product_name, quantity, scan_num, assign_num, remark from in_stockin_detail_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectInStockinDetailList" parameterType="InStockinDetail" resultMap="InStockinDetailResult">
|
||||
<include refid="selectInStockinDetailVo"/>
|
||||
<where>
|
||||
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="scanNum != null "> and scan_num = #{scanNum}</if>
|
||||
<if test="assignNum != null "> and assign_num = #{assignNum}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInStockinDetailByStockinDetailId" parameterType="String" resultMap="InStockinDetailResult">
|
||||
<include refid="selectInStockinDetailVo"/>
|
||||
where stockin_detail_id = #{stockinDetailId}
|
||||
</select>
|
||||
<select id="inboundTaskList" resultMap="InStockinDetailResult">
|
||||
<include refid="selectInStockinDetailVo"/>
|
||||
where quantity > scan_num
|
||||
</select>
|
||||
<select id="selectInStockinDetailFinishList" parameterType="InStockinDetail" resultMap="InStockinDetailResult">
|
||||
<include refid="selectInStockinDetailFinishVo"/>
|
||||
<where>
|
||||
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="scanNum != null "> and scan_num = #{scanNum}</if>
|
||||
<if test="assignNum != null "> and assign_num = #{assignNum}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertInStockinDetail" parameterType="InStockinDetail">
|
||||
insert into in_stockin_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockinDetailId != null">stockin_detail_id,</if>
|
||||
<if test="stockinId != null and stockinId != ''">stockin_id,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="productId != null and productId != ''">product_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="scanNum != null">scan_num,</if>
|
||||
<if test="assignNum != null">assign_num,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockinDetailId != null">#{stockinDetailId},</if>
|
||||
<if test="stockinId != null and stockinId != ''">#{stockinId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="productId != null and productId != ''">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="scanNum != null">#{scanNum},</if>
|
||||
<if test="assignNum != null">#{assignNum},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInStockinDetail" parameterType="InStockinDetail">
|
||||
update in_stockin_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockinId != null and stockinId != ''">stockin_id = #{stockinId},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="productId != null and productId != ''">product_id = #{productId},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="scanNum != null">scan_num = #{scanNum},</if>
|
||||
<if test="assignNum != null">assign_num = #{assignNum},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where stockin_detail_id = #{stockinDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInStockinDetailByStockinDetailId" parameterType="String">
|
||||
delete from in_stockin_detail where stockin_detail_id = #{stockinDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInStockinDetailByStockinDetailIds" parameterType="String">
|
||||
delete from in_stockin_detail where stockin_detail_id in
|
||||
<foreach item="stockinDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{stockinDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
155
ruoyi-admin/src/main/resources/mapper/in/InStockinMapper.xml
Normal file
155
ruoyi-admin/src/main/resources/mapper/in/InStockinMapper.xml
Normal file
@@ -0,0 +1,155 @@
|
||||
<?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.ruoyi.in.stockin.mapper.InStockinMapper">
|
||||
|
||||
<resultMap type="InStockin" id="InStockinResult">
|
||||
<result property="stockinId" column="stockin_id" />
|
||||
<result property="inType" column="in_type" />
|
||||
<result property="stockSource" column="stock_source" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="startDate" column="start_date" />
|
||||
<result property="finishDate" column="finish_date" />
|
||||
<result property="erpBill" column="erp_bill" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="supplierName" column="supplier_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInStockinVo">
|
||||
select stockin_id, in_type, stock_source, status, create_date, start_date, finish_date, erp_bill, warehouse_id, warehouse_name, user_id, user_name, dept_id, dept_name, supplier_id, supplier_name from in_stockin
|
||||
</sql>
|
||||
<sql id="selectInStockinFinishVo">
|
||||
select stockin_id, in_type, stock_source, status, create_date, start_date, finish_date, erp_bill, warehouse_id, warehouse_name, user_id, user_name, dept_id, dept_name, supplier_id, supplier_name from in_stockin_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectInStockinList" parameterType="InStockin" resultMap="InStockinResult">
|
||||
<include refid="selectInStockinVo"/>
|
||||
<where>
|
||||
<if test="inType != null and inType != ''"> and in_type = #{inType}</if>
|
||||
<if test="stockSource != null and stockSource != ''"> and stock_source = #{stockSource}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="params.beginCreateDate != null and params.beginCreateDate != '' and params.endCreateDate != null and params.endCreateDate != ''"> and create_date between #{params.beginCreateDate} and #{params.endCreateDate}</if>
|
||||
<if test="params.beginStartDate != null and params.beginStartDate != '' and params.endStartDate != null and params.endStartDate != ''"> and start_date between #{params.beginStartDate} and #{params.endStartDate}</if>
|
||||
<if test="params.beginFinishDate != null and params.beginFinishDate != '' and params.endFinishDate != null and params.endFinishDate != ''"> and finish_date between #{params.beginFinishDate} and #{params.endFinishDate}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
||||
${params.warehouseScope}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInStockinByStockinId" parameterType="String" resultMap="InStockinResult">
|
||||
<include refid="selectInStockinVo"/>
|
||||
where stockin_id = #{stockinId}
|
||||
</select>
|
||||
<select id="selectInStockinFinishList" parameterType="InStockin" resultMap="InStockinResult">
|
||||
<include refid="selectInStockinFinishVo"/>
|
||||
<where>
|
||||
<if test="inType != null and inType != ''"> and in_type = #{inType}</if>
|
||||
<if test="stockSource != null and stockSource != ''"> and stock_source = #{stockSource}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="params.beginCreateDate != null and params.beginCreateDate != '' and params.endCreateDate != null and params.endCreateDate != ''"> and create_date between #{params.beginCreateDate} and #{params.endCreateDate}</if>
|
||||
<if test="params.beginStartDate != null and params.beginStartDate != '' and params.endStartDate != null and params.endStartDate != ''"> and start_date between #{params.beginStartDate} and #{params.endStartDate}</if>
|
||||
<if test="params.beginFinishDate != null and params.beginFinishDate != '' and params.endFinishDate != null and params.endFinishDate != ''"> and finish_date between #{params.beginFinishDate} and #{params.endFinishDate}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
||||
${params.warehouseScope}
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectTop5InStockinList" resultMap="InStockinResult">
|
||||
select TOP 5 stockin_id, in_type, stock_source, status, create_date, start_date, finish_date, erp_bill, warehouse_id, warehouse_name, user_id, user_name, dept_id, dept_name, supplier_id, supplier_name from in_stockin
|
||||
order by create_date desc
|
||||
</select>
|
||||
|
||||
<insert id="insertInStockin" parameterType="InStockin">
|
||||
insert into in_stockin
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockinId != null">stockin_id,</if>
|
||||
<if test="inType != null and inType != ''">in_type,</if>
|
||||
<if test="stockSource != null and stockSource != ''">stock_source,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="createDate != null">create_date,</if>
|
||||
<if test="startDate != null">start_date,</if>
|
||||
<if test="finishDate != null">finish_date,</if>
|
||||
<if test="erpBill != null">erp_bill,</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id,</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">warehouse_name,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="deptName != null and deptName != ''">dept_name,</if>
|
||||
<if test="supplierId != null">supplier_id,</if>
|
||||
<if test="supplierName != null">supplier_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockinId != null">#{stockinId},</if>
|
||||
<if test="inType != null and inType != ''">#{inType},</if>
|
||||
<if test="stockSource != null and stockSource != ''">#{stockSource},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="createDate != null">#{createDate},</if>
|
||||
<if test="startDate != null">#{startDate},</if>
|
||||
<if test="finishDate != null">#{finishDate},</if>
|
||||
<if test="erpBill != null">#{erpBill},</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">#{warehouseId},</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">#{warehouseName},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="deptName != null and deptName != ''">#{deptName},</if>
|
||||
<if test="supplierId != null">#{supplierId},</if>
|
||||
<if test="supplierName != null">#{supplierName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInStockin" parameterType="InStockin">
|
||||
update in_stockin
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="inType != null and inType != ''">in_type = #{inType},</if>
|
||||
<if test="stockSource != null and stockSource != ''">stock_source = #{stockSource},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="createDate != null">create_date = #{createDate},</if>
|
||||
<if test="startDate != null">start_date = #{startDate},</if>
|
||||
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
||||
<if test="erpBill != null">erp_bill = #{erpBill},</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id = #{warehouseId},</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">warehouse_name = #{warehouseName},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
|
||||
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
||||
<if test="supplierName != null">supplier_name = #{supplierName},</if>
|
||||
</trim>
|
||||
where stockin_id = #{stockinId}
|
||||
</update>
|
||||
<update id="updateInStockinByProc" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_update_inbill_status(
|
||||
#{v_stockin_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_status,mode=IN,jdbcType=INTEGER},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInStockinByStockinId" parameterType="String">
|
||||
delete from in_stockin where stockin_id = #{stockinId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInStockinByStockinIds" parameterType="String">
|
||||
delete from in_stockin where stockin_id in
|
||||
<foreach item="stockinId" collection="array" open="(" separator="," close=")">
|
||||
#{stockinId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
95
ruoyi-admin/src/main/resources/mapper/in/InTrayMsgMapper.xml
Normal file
95
ruoyi-admin/src/main/resources/mapper/in/InTrayMsgMapper.xml
Normal file
@@ -0,0 +1,95 @@
|
||||
<?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.ruoyi.in.bind.mapper.InTrayMsgMapper">
|
||||
|
||||
<resultMap type="InTrayMsg" id="InTrayMsgResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="stockinDetailId" column="stockin_detail_id" />
|
||||
<result property="productId" column="product_Id" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInTrayMsgVo">
|
||||
select id, tray_code, stockin_detail_id, product_Id, quantity, warehouse_id, user_id, dept_id, create_time from in_tray_msg
|
||||
</sql>
|
||||
|
||||
<select id="selectInTrayMsgList" parameterType="InTrayMsg" resultMap="InTrayMsgResult">
|
||||
<include refid="selectInTrayMsgVo"/>
|
||||
<where>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="stockinDetailId != null and stockinDetailId != ''"> and stockin_detail_id = #{stockinDetailId}</if>
|
||||
<if test="productId != null and productId != ''"> and product_Id = #{productId}</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInTrayMsgById" parameterType="Long" resultMap="InTrayMsgResult">
|
||||
<include refid="selectInTrayMsgVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectInTrayMsgCountByTrayCodeAndWarehouseId" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from in_tray_msg
|
||||
where tray_code = #{trayCode} and warehouse_id = #{warehouseId}
|
||||
</select>
|
||||
|
||||
<insert id="insertInTrayMsg" parameterType="InTrayMsg" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into in_tray_msg
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="stockinDetailId != null">stockin_detail_id,</if>
|
||||
<if test="productId != null">product_Id,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="stockinDetailId != null">#{stockinDetailId},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInTrayMsg" parameterType="InTrayMsg">
|
||||
update in_tray_msg
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="stockinDetailId != null">stockin_detail_id = #{stockinDetailId},</if>
|
||||
<if test="productId != null">product_Id = #{productId},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInTrayMsgById" parameterType="Long">
|
||||
delete from in_tray_msg where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInTrayMsgByIds" parameterType="String">
|
||||
delete from in_tray_msg where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
141
ruoyi-admin/src/main/resources/mapper/in/MydoJobDetailMapper.xml
Normal file
141
ruoyi-admin/src/main/resources/mapper/in/MydoJobDetailMapper.xml
Normal file
@@ -0,0 +1,141 @@
|
||||
<?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.ruoyi.in.jobdetail.mapper.MydoJobDetailMapper">
|
||||
|
||||
<resultMap type="MydoJobDetail" id="MydoJobDetailResult">
|
||||
<result property="jobDetailId" column="job_detail_id" />
|
||||
<result property="jobId" column="job_id" />
|
||||
<result property="stockId" column="stock_id" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="inDate" column="in_date" />
|
||||
<result property="inOrOutId" column="in_or_out_id" />
|
||||
<result property="inOrOutDId" column="in_or_out_d_id" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="inQuantity" column="in_quantity" />
|
||||
<result property="stockQuantity" column="stock_quantity" />
|
||||
<result property="outQuantity" column="out_quantity" />
|
||||
<result property="stockinId" column="stockin_id" />
|
||||
<result property="stockinDetailId" column="stockin_detail_id" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="customerName" column="customer_name" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="supplierName" column="supplier_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMydoJobDetailVo">
|
||||
select job_detail_id, job_id, stock_id, lot_no, in_date, in_or_out_id, in_or_out_d_id, product_id, product_name, in_quantity, stock_quantity, out_quantity, stockin_id, stockin_detail_id, customer_id, customer_name, supplier_id, supplier_name from mydo_job_detail
|
||||
</sql>
|
||||
<sql id="selectMydoJobDetailFinishVo">
|
||||
select job_detail_id, job_id, stock_id, lot_no, in_date, in_or_out_id, in_or_out_d_id, product_id, product_name, in_quantity, stock_quantity, out_quantity, stockin_id, stockin_detail_id, customer_id, customer_name, supplier_id, supplier_name from mydo_job_detail_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectMydoJobDetailList" parameterType="MydoJobDetail" resultMap="MydoJobDetailResult">
|
||||
<include refid="selectMydoJobDetailVo"/>
|
||||
<where>
|
||||
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
|
||||
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="inDate != null and inDate != ''"> and in_date = #{inDate}</if>
|
||||
<if test="inOrOutId != null and inOrOutId != ''"> and in_or_out_id = #{inOrOutId}</if>
|
||||
<if test="inOrOutDId != null and inOrOutDId != ''"> and in_or_out_d_id = #{inOrOutDId}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="inQuantity != null "> and in_quantity = #{inQuantity}</if>
|
||||
<if test="stockQuantity != null "> and stock_quantity = #{stockQuantity}</if>
|
||||
<if test="outQuantity != null "> and out_quantity = #{outQuantity}</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and supplier_id = #{supplierId}</if>
|
||||
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMydoJobDetailByJobDetailId" parameterType="String" resultMap="MydoJobDetailResult">
|
||||
<include refid="selectMydoJobDetailVo"/>
|
||||
where job_detail_id = #{jobDetailId}
|
||||
</select>
|
||||
<select id="selectMydoJobDetailFinishList" resultType="com.ruoyi.in.jobdetail.domain.MydoJobDetail" resultMap="MydoJobDetailResult">
|
||||
<include refid="selectMydoJobDetailFinishVo"/>
|
||||
where job_detail_id = #{jobDetailId}
|
||||
</select>
|
||||
<insert id="insertMydoJobDetail" parameterType="MydoJobDetail">
|
||||
insert into mydo_job_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="jobDetailId != null">job_detail_id,</if>
|
||||
<if test="jobId != null">job_id,</if>
|
||||
<if test="stockId != null">stock_id,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="inDate != null">in_date,</if>
|
||||
<if test="inOrOutId != null">in_or_out_id,</if>
|
||||
<if test="inOrOutDId != null">in_or_out_d_id,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="inQuantity != null">in_quantity,</if>
|
||||
<if test="stockQuantity != null">stock_quantity,</if>
|
||||
<if test="outQuantity != null">out_quantity,</if>
|
||||
<if test="stockinId != null">stockin_id,</if>
|
||||
<if test="stockinDetailId != null">stockin_detail_id,</if>
|
||||
<if test="customerId != null">customer_id,</if>
|
||||
<if test="customerName != null">customer_name,</if>
|
||||
<if test="supplierId != null">supplier_id,</if>
|
||||
<if test="supplierName != null">supplier_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="jobDetailId != null">#{jobDetailId},</if>
|
||||
<if test="jobId != null">#{jobId},</if>
|
||||
<if test="stockId != null">#{stockId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="inDate != null">#{inDate},</if>
|
||||
<if test="inOrOutId != null">#{inOrOutId},</if>
|
||||
<if test="inOrOutDId != null">#{inOrOutDId},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="inQuantity != null">#{inQuantity},</if>
|
||||
<if test="stockQuantity != null">#{stockQuantity},</if>
|
||||
<if test="outQuantity != null">#{outQuantity},</if>
|
||||
<if test="stockinId != null">#{stockinId},</if>
|
||||
<if test="stockinDetailId != null">#{stockinDetailId},</if>
|
||||
<if test="customerId != null">#{customerId},</if>
|
||||
<if test="customerName != null">#{customerName},</if>
|
||||
<if test="supplierId != null">#{supplierId},</if>
|
||||
<if test="supplierName != null">#{supplierName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMydoJobDetail" parameterType="MydoJobDetail">
|
||||
update mydo_job_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="jobId != null">job_id = #{jobId},</if>
|
||||
<if test="stockId != null">stock_id = #{stockId},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="inDate != null">in_date = #{inDate},</if>
|
||||
<if test="inOrOutId != null">in_or_out_id = #{inOrOutId},</if>
|
||||
<if test="inOrOutDId != null">in_or_out_d_id = #{inOrOutDId},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="inQuantity != null">in_quantity = #{inQuantity},</if>
|
||||
<if test="stockQuantity != null">stock_quantity = #{stockQuantity},</if>
|
||||
<if test="outQuantity != null">out_quantity = #{outQuantity},</if>
|
||||
<if test="stockinId != null">stockin_id = #{stockinId},</if>
|
||||
<if test="stockinDetailId != null">stockin_detail_id = #{stockinDetailId},</if>
|
||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
||||
<if test="customerName != null">customer_name = #{customerName},</if>
|
||||
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
||||
<if test="supplierName != null">supplier_name = #{supplierName},</if>
|
||||
</trim>
|
||||
where job_detail_id = #{jobDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMydoJobDetailByJobDetailId" parameterType="String">
|
||||
delete from mydo_job_detail where job_detail_id = #{jobDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMydoJobDetailByJobDetailIds" parameterType="String">
|
||||
delete from mydo_job_detail where job_detail_id in
|
||||
<foreach item="jobDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{jobDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
407
ruoyi-admin/src/main/resources/mapper/in/MydoJobMapper.xml
Normal file
407
ruoyi-admin/src/main/resources/mapper/in/MydoJobMapper.xml
Normal file
@@ -0,0 +1,407 @@
|
||||
<?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.ruoyi.in.job.mapper.MydoJobMapper">
|
||||
|
||||
<resultMap type="MydoJob" id="MydoJobResult">
|
||||
<result property="jobId" column="job_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="taskNo" column="task_no" />
|
||||
<result property="inOrOut" column="in_or_out" />
|
||||
<result property="executionPhase" column="execution_phase" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="roadwayId" column="roadway_id" />
|
||||
<result property="cargoSpaceId" column="cargo_space_id" />
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="targetRoadwayId" column="target_roadway_id" />
|
||||
<result property="targetCargoSpaceId" column="target_cargo_space_id" />
|
||||
<result property="targetCargoSpaceName" column="target_cargo_space_name" />
|
||||
<result property="lineType" column="line_type" />
|
||||
<result property="priority" column="priority" />
|
||||
<result property="height" column="height" />
|
||||
<result property="weight" column="weight" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="finishTime" column="finish_time" />
|
||||
<result property="entranceId" column="entrance_id" />
|
||||
<result property="exitId" column="exit_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="supplierName" column="supplier_name" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="customerName" column="customer_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMydoJobVo">
|
||||
select job_id, status, task_no, in_or_out, execution_phase, tray_code, warehouse_id, warehouse_name, roadway_id, cargo_space_id, cargo_space_name, target_roadway_id, target_cargo_space_id, target_cargo_space_name, line_type, priority, height, weight, create_time, start_time, finish_time, entrance_id, exit_id, dept_id, dept_name, user_id, user_name, supplier_id, supplier_name, customer_id, customer_name from mydo_job
|
||||
</sql>
|
||||
<sql id="selectMydoJobFinishVo">
|
||||
select job_id, status, task_no, in_or_out, execution_phase, tray_code, warehouse_id, warehouse_name, roadway_id, cargo_space_id, cargo_space_name, target_roadway_id, target_cargo_space_id, target_cargo_space_name, line_type, priority, height, weight, create_time, start_time, finish_time, entrance_id, exit_id, dept_id, dept_name, user_id, user_name, supplier_id, supplier_name, customer_id, customer_name from mydo_job_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectMydoJobList" parameterType="MydoJob" resultMap="MydoJobResult">
|
||||
<include refid="selectMydoJobVo"/>
|
||||
<where>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="taskNo != null and taskNo != ''"> and task_no = #{taskNo}</if>
|
||||
<if test="inOrOut != null "> and in_or_out = #{inOrOut}</if>
|
||||
<if test="executionPhase != null and executionPhase != ''"> and execution_phase = #{executionPhase}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||
<if test="lineType != null and lineType != ''"> and line_type = #{lineType}</if>
|
||||
<if test="priority != null "> and priority = #{priority}</if>
|
||||
<if test="height != null "> and height = #{height}</if>
|
||||
<if test="weight != null "> and weight = #{weight}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
<if test="entranceId != null and entranceId != ''"> and entrance_id = #{entranceId}</if>
|
||||
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
|
||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
${params.warehouseScope}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMydoJobByJobId" parameterType="String" resultMap="MydoJobResult">
|
||||
<include refid="selectMydoJobVo"/>
|
||||
where job_id = #{jobId}
|
||||
</select>
|
||||
<select id="completeJob" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_complete_in_job(
|
||||
#{job_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{dept_id,mode=IN,jdbcType=INTEGER},
|
||||
#{user_id,mode=IN,jdbcType=INTEGER},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
<select id="makeSure" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_out_makesure(
|
||||
#{v_job_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_dept_id,mode=IN,jdbcType=INTEGER},
|
||||
#{v_user_id,mode=IN,jdbcType=INTEGER},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
|
||||
<insert id="insertMydoJob" parameterType="MydoJob">
|
||||
insert into mydo_job
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="jobId != null">job_id,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="taskNo != null and taskNo != ''">task_no,</if>
|
||||
<if test="inOrOut != null">in_or_out,</if>
|
||||
<if test="executionPhase != null">execution_phase,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="warehouseName != null">warehouse_name,</if>
|
||||
<if test="roadwayId != null">roadway_id,</if>
|
||||
<if test="cargoSpaceId != null">cargo_space_id,</if>
|
||||
<if test="cargoSpaceName != null">cargo_space_name,</if>
|
||||
<if test="targetRoadwayId != null">target_roadway_id,</if>
|
||||
<if test="targetCargoSpaceId != null">target_cargo_space_id,</if>
|
||||
<if test="targetCargoSpaceName != null">target_cargo_space_name,</if>
|
||||
<if test="lineType != null">line_type,</if>
|
||||
<if test="priority != null">priority,</if>
|
||||
<if test="height != null">height,</if>
|
||||
<if test="weight != null">weight,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="startTime != null">start_time,</if>
|
||||
<if test="finishTime != null">finish_time,</if>
|
||||
<if test="entranceId != null">entrance_id,</if>
|
||||
<if test="exitId != null">exit_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="deptName != null">dept_name,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null">user_name,</if>
|
||||
<if test="supplierId != null">supplier_id,</if>
|
||||
<if test="supplierName != null">supplier_name,</if>
|
||||
<if test="customerId != null">customer_id,</if>
|
||||
<if test="customerName != null">customer_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="jobId != null">#{jobId},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="taskNo != null and taskNo != ''">#{taskNo},</if>
|
||||
<if test="inOrOut != null">#{inOrOut},</if>
|
||||
<if test="executionPhase != null">#{executionPhase},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="warehouseName != null">#{warehouseName},</if>
|
||||
<if test="roadwayId != null">#{roadwayId},</if>
|
||||
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
||||
<if test="cargoSpaceName != null">#{cargoSpaceName},</if>
|
||||
<if test="targetRoadwayId != null">#{targetRoadwayId},</if>
|
||||
<if test="targetCargoSpaceId != null">#{targetCargoSpaceId},</if>
|
||||
<if test="targetCargoSpaceName != null">#{targetCargoSpaceName},</if>
|
||||
<if test="lineType != null">#{lineType},</if>
|
||||
<if test="priority != null">#{priority},</if>
|
||||
<if test="height != null">#{height},</if>
|
||||
<if test="weight != null">#{weight},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="startTime != null">#{startTime},</if>
|
||||
<if test="finishTime != null">#{finishTime},</if>
|
||||
<if test="entranceId != null">#{entranceId},</if>
|
||||
<if test="exitId != null">#{exitId},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="deptName != null">#{deptName},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null">#{userName},</if>
|
||||
<if test="supplierId != null">#{supplierId},</if>
|
||||
<if test="supplierName != null">#{supplierName},</if>
|
||||
<if test="customerId != null">#{customerId},</if>
|
||||
<if test="customerName != null">#{customerName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMydoJob" parameterType="MydoJob">
|
||||
update mydo_job
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="taskNo != null and taskNo != ''">task_no = #{taskNo},</if>
|
||||
<if test="inOrOut != null">in_or_out = #{inOrOut},</if>
|
||||
<if test="executionPhase != null">execution_phase = #{executionPhase},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
|
||||
<if test="roadwayId != null">roadway_id = #{roadwayId},</if>
|
||||
<if test="cargoSpaceId != null">cargo_space_id = #{cargoSpaceId},</if>
|
||||
<if test="cargoSpaceName != null">cargo_space_name = #{cargoSpaceName},</if>
|
||||
<if test="targetRoadwayId != null">target_roadway_id = #{targetRoadwayId},</if>
|
||||
<if test="targetCargoSpaceId != null">target_cargo_space_id = #{targetCargoSpaceId},</if>
|
||||
<if test="targetCargoSpaceName != null">target_cargo_space_name = #{targetCargoSpaceName},</if>
|
||||
<if test="lineType != null">line_type = #{lineType},</if>
|
||||
<if test="priority != null">priority = #{priority},</if>
|
||||
<if test="height != null">height = #{height},</if>
|
||||
<if test="weight != null">weight = #{weight},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="startTime != null">start_time = #{startTime},</if>
|
||||
<if test="finishTime != null">finish_time = #{finishTime},</if>
|
||||
<if test="entranceId != null">entrance_id = #{entranceId},</if>
|
||||
<if test="exitId != null">exit_id = #{exitId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="deptName != null">dept_name = #{deptName},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="userName != null">user_name = #{userName},</if>
|
||||
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
||||
<if test="supplierName != null">supplier_name = #{supplierName},</if>
|
||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
||||
<if test="customerName != null">customer_name = #{customerName},</if>
|
||||
</trim>
|
||||
where job_id = #{jobId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMydoJobByJobId" parameterType="String">
|
||||
delete from mydo_job where job_id = #{jobId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMydoJobByJobIds" parameterType="String">
|
||||
delete from mydo_job where job_id in
|
||||
<foreach item="jobId" collection="array" open="(" separator="," close=")">
|
||||
#{jobId}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="cancelInJob" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_hand_delete_in_job(
|
||||
#{v_job_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
<select id="cancelOutJob" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_hand_delete_out_job(
|
||||
#{v_job_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
<select id="selectInMydoJobList" resultType="com.ruoyi.in.job.domain.MydoJob" resultMap="MydoJobResult">
|
||||
<include refid="selectMydoJobVo"/>
|
||||
where
|
||||
in_or_out < 20
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="taskNo != null and taskNo != ''"> and task_no = #{taskNo}</if>
|
||||
<if test="inOrOut != null "> and in_or_out = #{inOrOut}</if>
|
||||
<if test="executionPhase != null and executionPhase != ''"> and execution_phase = #{executionPhase}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||
<if test="lineType != null and lineType != ''"> and line_type = #{lineType}</if>
|
||||
<if test="priority != null "> and priority = #{priority}</if>
|
||||
<if test="height != null "> and height = #{height}</if>
|
||||
<if test="weight != null "> and weight = #{weight}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
<if test="entranceId != null and entranceId != ''"> and entrance_id = #{entranceId}</if>
|
||||
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
|
||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
${params.warehouseScope}
|
||||
</select>
|
||||
<select id="selectInMydoJobFinishList" resultType="com.ruoyi.in.job.domain.MydoJob" resultMap="MydoJobResult">
|
||||
<include refid="selectMydoJobFinishVo"/>
|
||||
where
|
||||
in_or_out < 20
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="taskNo != null and taskNo != ''"> and task_no = #{taskNo}</if>
|
||||
<if test="inOrOut != null "> and in_or_out = #{inOrOut}</if>
|
||||
<if test="executionPhase != null and executionPhase != ''"> and execution_phase = #{executionPhase}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||
<if test="lineType != null and lineType != ''"> and line_type = #{lineType}</if>
|
||||
<if test="priority != null "> and priority = #{priority}</if>
|
||||
<if test="height != null "> and height = #{height}</if>
|
||||
<if test="weight != null "> and weight = #{weight}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
<if test="entranceId != null and entranceId != ''"> and entrance_id = #{entranceId}</if>
|
||||
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
|
||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
${params.warehouseScope}
|
||||
</select>
|
||||
<select id="selectOutMydoJobFinishList" resultType="com.ruoyi.in.job.domain.MydoJob" resultMap="MydoJobResult">
|
||||
<include refid="selectMydoJobFinishVo"/>
|
||||
where
|
||||
in_or_out >= 20
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="taskNo != null and taskNo != ''"> and task_no = #{taskNo}</if>
|
||||
<if test="inOrOut != null "> and in_or_out = #{inOrOut}</if>
|
||||
<if test="executionPhase != null and executionPhase != ''"> and execution_phase = #{executionPhase}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||
<if test="lineType != null and lineType != ''"> and line_type = #{lineType}</if>
|
||||
<if test="priority != null "> and priority = #{priority}</if>
|
||||
<if test="height != null "> and height = #{height}</if>
|
||||
<if test="weight != null "> and weight = #{weight}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
<if test="entranceId != null and entranceId != ''"> and entrance_id = #{entranceId}</if>
|
||||
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
|
||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
${params.warehouseScope}
|
||||
|
||||
</select>
|
||||
<select id="selectOutMydoJobList" resultType="com.ruoyi.in.job.domain.MydoJob" resultMap="MydoJobResult">
|
||||
<include refid="selectMydoJobVo"/>
|
||||
where
|
||||
in_or_out >= 20
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="taskNo != null and taskNo != ''"> and task_no = #{taskNo}</if>
|
||||
<if test="inOrOut != null "> and in_or_out = #{inOrOut}</if>
|
||||
<if test="executionPhase != null and executionPhase != ''"> and execution_phase = #{executionPhase}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||
<if test="lineType != null and lineType != ''"> and line_type = #{lineType}</if>
|
||||
<if test="priority != null "> and priority = #{priority}</if>
|
||||
<if test="height != null "> and height = #{height}</if>
|
||||
<if test="weight != null "> and weight = #{weight}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
<if test="entranceId != null and entranceId != ''"> and entrance_id = #{entranceId}</if>
|
||||
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
|
||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
${params.warehouseScope}
|
||||
|
||||
</select>
|
||||
<select id="selectInMydoJobFinishListGroupByWarehouseId" resultType="com.ruoyi.kpi.domain.InAnalysisData">
|
||||
SELECT
|
||||
CONVERT(VARCHAR(10), create_time, 120) AS dateDay,
|
||||
warehouse_id as warehouseId,
|
||||
warehouse_name as warehouseName,
|
||||
roadway_id as roadwayId,
|
||||
COUNT(*) AS count
|
||||
FROM mydo_job_finish
|
||||
WHERE
|
||||
in_or_out < 20
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND create_time <= #{endTime}
|
||||
</if>
|
||||
<if test="warehouseId != null">
|
||||
AND warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
GROUP BY
|
||||
CONVERT(VARCHAR(10), create_time, 120),
|
||||
warehouse_id,
|
||||
warehouse_name,
|
||||
roadway_id
|
||||
ORDER BY dateDay
|
||||
</select>
|
||||
<select id="selectOutMydoJobFinishListGroupByWarehouseId" resultType="com.ruoyi.kpi.domain.OutAnalysisData">
|
||||
SELECT
|
||||
CONVERT(VARCHAR(10), create_time, 120) AS dateDay,
|
||||
warehouse_id as warehouseId,
|
||||
warehouse_name as warehouseName,
|
||||
roadway_id as roadwayId,
|
||||
COUNT(*) AS count
|
||||
FROM mydo_job_finish
|
||||
WHERE
|
||||
in_or_out >= 20
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND create_time <= #{endTime}
|
||||
</if>
|
||||
<if test="warehouseId != null">
|
||||
AND warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
GROUP BY
|
||||
CONVERT(VARCHAR(10), create_time, 120),
|
||||
warehouse_id,
|
||||
warehouse_name,
|
||||
roadway_id
|
||||
ORDER BY dateDay
|
||||
</select>
|
||||
<select id="getRoadwayAnalysisList" resultType="com.ruoyi.in.job.domain.RoadwayAnalysisData">
|
||||
SELECT
|
||||
roadway_id AS roadwayId,
|
||||
sum(CASE WHEN in_or_out < 20 THEN 1 ELSE 0 END) AS inCount,
|
||||
sum(CASE WHEN in_or_out >= 20 THEN 1 ELSE 0 END) AS outCount
|
||||
FROM mydo_job_finish
|
||||
<where>
|
||||
<if test="warehouseId != null and warehouseId != ''">
|
||||
and warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND create_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY roadway_id
|
||||
ORDER BY roadway_id
|
||||
</select>
|
||||
</mapper>
|
||||
75
ruoyi-admin/src/main/resources/mapper/kpi/KpiMapper.xml
Normal file
75
ruoyi-admin/src/main/resources/mapper/kpi/KpiMapper.xml
Normal file
@@ -0,0 +1,75 @@
|
||||
<?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.ruoyi.kpi.mapper.KpiMapper">
|
||||
|
||||
<!-- 入库趋势:in_or_out < 20,按日期+仓库分组 -->
|
||||
<select id="selectInboundTrend" parameterType="com.ruoyi.kpi.domain.KpiQuery" resultType="map">
|
||||
SELECT
|
||||
CONVERT(varchar(10), finish_time, 23) AS date,
|
||||
ISNULL(warehouse_name, '未分配') AS warehouseName,
|
||||
COUNT(*) AS quantity
|
||||
FROM mydo_job_finish
|
||||
<where>
|
||||
in_or_out < 20
|
||||
AND finish_time IS NOT NULL
|
||||
AND finish_time != ''
|
||||
<if test="warehouseId != null and warehouseId != ''">
|
||||
AND warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="params.beginDate != null and params.beginDate != ''">
|
||||
AND CONVERT(varchar(10), finish_time, 23) >= #{params.beginDate}
|
||||
</if>
|
||||
<if test="params.endDate != null and params.endDate != ''">
|
||||
AND CONVERT(varchar(10), finish_time, 23) <= #{params.endDate}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY CONVERT(varchar(10), finish_time, 23), warehouse_name
|
||||
ORDER BY CONVERT(varchar(10), finish_time, 23)
|
||||
</select>
|
||||
|
||||
<!-- 出库趋势:in_or_out >= 20,按日期+仓库分组 -->
|
||||
<select id="selectOutboundTrend" parameterType="com.ruoyi.kpi.domain.KpiQuery" resultType="map">
|
||||
SELECT
|
||||
CONVERT(varchar(10), finish_time, 23) AS date,
|
||||
ISNULL(warehouse_name, '未分配') AS warehouseName,
|
||||
COUNT(*) AS quantity
|
||||
FROM mydo_job_finish
|
||||
<where>
|
||||
in_or_out >= 20
|
||||
AND finish_time IS NOT NULL
|
||||
AND finish_time != ''
|
||||
<if test="warehouseId != null and warehouseId != ''">
|
||||
AND warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="params.beginDate != null and params.beginDate != ''">
|
||||
AND CONVERT(varchar(10), finish_time, 23) >= #{params.beginDate}
|
||||
</if>
|
||||
<if test="params.endDate != null and params.endDate != ''">
|
||||
AND CONVERT(varchar(10), finish_time, 23) <= #{params.endDate}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY CONVERT(varchar(10), finish_time, 23), warehouse_name
|
||||
ORDER BY CONVERT(varchar(10), finish_time, 23)
|
||||
</select>
|
||||
|
||||
<!-- 货位平面图:按仓库+巷道+排筛选 -->
|
||||
<select id="selectCargoSpacePlan" resultType="map">
|
||||
SELECT
|
||||
the_platoon AS thePlatoon,
|
||||
the_column AS theColumn,
|
||||
the_floor AS theFloor,
|
||||
status,
|
||||
locked,
|
||||
tray_code AS trayCode,
|
||||
cargo_space_id AS cargoSpaceId,
|
||||
cargo_space_name AS cargoSpaceName
|
||||
FROM bas_cargo_space
|
||||
WHERE warehouse_id = #{warehouseId}
|
||||
AND roadway_id = #{roadwayId}
|
||||
AND the_platoon = #{thePlatoon}
|
||||
ORDER BY the_floor, the_column
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,112 @@
|
||||
<?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.ruoyi.out.stockoutdetail.mapper.OutStockoutDetailMapper">
|
||||
|
||||
<resultMap type="OutStockoutDetail" id="OutStockoutDetailResult">
|
||||
<result property="stockoutDetailId" column="stockout_detail_id" />
|
||||
<result property="stockoutId" column="stockout_id" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="allotNum" column="allot_num" />
|
||||
<result property="assignNum" column="assign_num" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutDetailVo">
|
||||
select stockout_detail_id, stockout_id, lot_no, product_id, product_name, quantity, allot_num, assign_num, remark from out_stockout_detail
|
||||
</sql>
|
||||
<sql id="selectOutStockoutDetailFinishVo">
|
||||
select stockout_detail_id, stockout_id, lot_no, product_id, product_name, quantity, allot_num, assign_num, remark from out_stockout_detail_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutDetailList" parameterType="OutStockoutDetail" resultMap="OutStockoutDetailResult">
|
||||
<include refid="selectOutStockoutDetailVo"/>
|
||||
<where>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="allotNum != null "> and allot_num = #{allotNum}</if>
|
||||
<if test="assignNum != null "> and assign_num = #{assignNum}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOutStockoutDetailByStockoutDetailId" parameterType="String" resultMap="OutStockoutDetailResult">
|
||||
<include refid="selectOutStockoutDetailVo"/>
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</select>
|
||||
<select id="selectOutStockoutDetailListByStockoutId" parameterType="String" resultMap="OutStockoutDetailResult">
|
||||
<include refid="selectOutStockoutDetailVo"/>
|
||||
where stockout_id = #{stockoutDetailId}
|
||||
</select>
|
||||
<select id="selectOutStockoutDetailFinishList" parameterType="OutStockoutDetail" resultMap="OutStockoutDetailResult">
|
||||
<include refid="selectOutStockoutDetailFinishVo"/>
|
||||
<where>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="allotNum != null "> and allot_num = #{allotNum}</if>
|
||||
<if test="assignNum != null "> and assign_num = #{assignNum}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertOutStockoutDetail" parameterType="OutStockoutDetail">
|
||||
insert into out_stockout_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null">stockout_detail_id,</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="productId != null and productId != ''">product_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="allotNum != null">allot_num,</if>
|
||||
<if test="assignNum != null">assign_num,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null">#{stockoutDetailId},</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">#{stockoutId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="productId != null and productId != ''">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="allotNum != null">#{allotNum},</if>
|
||||
<if test="assignNum != null">#{assignNum},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutStockoutDetail" parameterType="OutStockoutDetail">
|
||||
update out_stockout_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id = #{stockoutId},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="productId != null and productId != ''">product_id = #{productId},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="allotNum != null">allot_num = #{allotNum},</if>
|
||||
<if test="assignNum != null">assign_num = #{assignNum},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOutStockoutDetailByStockoutDetailId" parameterType="String">
|
||||
delete from out_stockout_detail where stockout_detail_id = #{stockoutDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOutStockoutDetailByStockoutDetailIds" parameterType="String">
|
||||
delete from out_stockout_detail where stockout_detail_id in
|
||||
<foreach item="stockoutDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{stockoutDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
168
ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml
Normal file
168
ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml
Normal file
@@ -0,0 +1,168 @@
|
||||
<?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.ruoyi.out.stockout.mapper.OutStockoutMapper">
|
||||
|
||||
<resultMap type="OutStockout" id="OutStockoutResult">
|
||||
<result property="stockoutId" column="stockout_id" />
|
||||
<result property="outType" column="out_type" />
|
||||
<result property="stockSource" column="stock_source" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="startDate" column="start_date" />
|
||||
<result property="finishDate" column="finish_date" />
|
||||
<result property="erpBill" column="erp_bill" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="customerName" column="customer_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutVo">
|
||||
select stockout_id, out_type, stock_source, status, create_date, start_date, finish_date, erp_bill, warehouse_id, warehouse_name, user_id, user_name, dept_id, dept_name, customer_id, customer_name from out_stockout
|
||||
</sql>
|
||||
<sql id="selectOutStockoutFinishVo">
|
||||
select stockout_id, out_type, stock_source, status, create_date, start_date, finish_date, erp_bill, warehouse_id, warehouse_name, user_id, user_name, dept_id, dept_name, customer_id, customer_name from out_stockout_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutList" parameterType="OutStockout" resultMap="OutStockoutResult">
|
||||
<include refid="selectOutStockoutVo"/>
|
||||
<where>
|
||||
<if test="outType != null and outType != ''"> and out_type = #{outType}</if>
|
||||
<if test="stockSource != null and stockSource != ''"> and stock_source = #{stockSource}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="params.beginCreateDate != null and params.beginCreateDate != '' and params.endCreateDate != null and params.endCreateDate != ''"> and create_date between #{params.beginCreateDate} and #{params.endCreateDate}</if>
|
||||
<if test="params.beginStartDate != null and params.beginStartDate != '' and params.endStartDate != null and params.endStartDate != ''"> and start_date between #{params.beginStartDate} and #{params.endStartDate}</if>
|
||||
<if test="params.beginFinishDate != null and params.beginFinishDate != '' and params.endFinishDate != null and params.endFinishDate != ''"> and finish_date between #{params.beginFinishDate} and #{params.endFinishDate}</if>
|
||||
<if test="erpBill != null and erpBill != ''"> and erp_bill = #{erpBill}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
${params.warehouseScope}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOutStockoutByStockoutId" parameterType="String" resultMap="OutStockoutResult">
|
||||
<include refid="selectOutStockoutVo"/>
|
||||
where stockout_id = #{stockoutId}
|
||||
</select>
|
||||
<select id="selectOutStockoutFinishList" parameterType="OutStockout" resultMap="OutStockoutResult">
|
||||
<include refid="selectOutStockoutFinishVo"/>
|
||||
<where>
|
||||
<if test="outType != null and outType != ''"> and out_type = #{outType}</if>
|
||||
<if test="stockSource != null and stockSource != ''"> and stock_source = #{stockSource}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="params.beginCreateDate != null and params.beginCreateDate != '' and params.endCreateDate != null and params.endCreateDate != ''"> and create_date between #{params.beginCreateDate} and #{params.endCreateDate}</if>
|
||||
<if test="params.beginStartDate != null and params.beginStartDate != '' and params.endStartDate != null and params.endStartDate != ''"> and start_date between #{params.beginStartDate} and #{params.endStartDate}</if>
|
||||
<if test="params.beginFinishDate != null and params.beginFinishDate != '' and params.endFinishDate != null and params.endFinishDate != ''"> and finish_date between #{params.beginFinishDate} and #{params.endFinishDate}</if>
|
||||
<if test="erpBill != null and erpBill != ''"> and erp_bill = #{erpBill}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
${params.warehouseScope}
|
||||
</where>
|
||||
</select>
|
||||
<select id="autoAssignOutStockoutByProc" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_out_auto_allocation(
|
||||
#{v_stockout_detail_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
|
||||
<insert id="insertOutStockout" parameterType="OutStockout">
|
||||
insert into out_stockout
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutId != null">stockout_id,</if>
|
||||
<if test="outType != null and outType != ''">out_type,</if>
|
||||
<if test="stockSource != null and stockSource != ''">stock_source,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="createDate != null">create_date,</if>
|
||||
<if test="startDate != null">start_date,</if>
|
||||
<if test="finishDate != null">finish_date,</if>
|
||||
<if test="erpBill != null">erp_bill,</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id,</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">warehouse_name,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="deptName != null and deptName != ''">dept_name,</if>
|
||||
<if test="customerId != null">customer_id,</if>
|
||||
<if test="customerName != null">customer_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutId != null">#{stockoutId},</if>
|
||||
<if test="outType != null and outType != ''">#{outType},</if>
|
||||
<if test="stockSource != null and stockSource != ''">#{stockSource},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="createDate != null">#{createDate},</if>
|
||||
<if test="startDate != null">#{startDate},</if>
|
||||
<if test="finishDate != null">#{finishDate},</if>
|
||||
<if test="erpBill != null">#{erpBill},</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">#{warehouseId},</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">#{warehouseName},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="deptName != null and deptName != ''">#{deptName},</if>
|
||||
<if test="customerId != null">#{customerId},</if>
|
||||
<if test="customerName != null">#{customerName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutStockout" parameterType="OutStockout">
|
||||
update out_stockout
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="outType != null and outType != ''">out_type = #{outType},</if>
|
||||
<if test="stockSource != null and stockSource != ''">stock_source = #{stockSource},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="createDate != null">create_date = #{createDate},</if>
|
||||
<if test="startDate != null">start_date = #{startDate},</if>
|
||||
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
||||
<if test="erpBill != null">erp_bill = #{erpBill},</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id = #{warehouseId},</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">warehouse_name = #{warehouseName},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
|
||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
||||
<if test="customerName != null">customer_name = #{customerName},</if>
|
||||
</trim>
|
||||
where stockout_id = #{stockoutId}
|
||||
</update>
|
||||
<select id="updateOutStockOutByProc" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_update_outbill_status(
|
||||
#{v_stockout_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_status,mode=IN,jdbcType=INTEGER},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
<select id="manualAssignOutStockoutByProc" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_out_hand_allocation(
|
||||
#{v_stockout_detail_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_stock_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
|
||||
<delete id="deleteOutStockoutByStockoutId" parameterType="String">
|
||||
delete from out_stockout where stockout_id = #{stockoutId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOutStockoutByStockoutIds" parameterType="String">
|
||||
delete from out_stockout where stockout_id in
|
||||
<foreach item="stockoutId" collection="array" open="(" separator="," close=")">
|
||||
#{stockoutId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,100 @@
|
||||
<?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.ruoyi.pd.commit.mapper.PdCommitRecordMapper">
|
||||
|
||||
<resultMap type="PdCommitRecord" id="PdCommitRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="stockId" column="stock_id" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="oldQuantity" column="old_quantity" />
|
||||
<result property="pdQuantity" column="pd_quantity" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="depeId" column="depe_id" />
|
||||
<result property="stockpdDetailId" column="stockpd_detail_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPdCommitRecordVo">
|
||||
select id, warehouse_id, tray_code, stock_id, product_id, old_quantity, pd_quantity, user_id, depe_id, stockpd_detail_id, create_time from pd_commit_record
|
||||
</sql>
|
||||
|
||||
<select id="selectPdCommitRecordList" parameterType="PdCommitRecord" resultMap="PdCommitRecordResult">
|
||||
<include refid="selectPdCommitRecordVo"/>
|
||||
<where>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="oldQuantity != null "> and old_quantity = #{oldQuantity}</if>
|
||||
<if test="pdQuantity != null "> and pd_quantity = #{pdQuantity}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="depeId != null "> and depe_id = #{depeId}</if>
|
||||
<if test="stockpdDetailId != null and stockpdDetailId != ''"> and stockpd_detail_id = #{stockpdDetailId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPdCommitRecordById" parameterType="Long" resultMap="PdCommitRecordResult">
|
||||
<include refid="selectPdCommitRecordVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertPdCommitRecord" parameterType="PdCommitRecord" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into pd_commit_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="stockId != null">stock_id,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="oldQuantity != null">old_quantity,</if>
|
||||
<if test="pdQuantity != null">pd_quantity,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="depeId != null">depe_id,</if>
|
||||
<if test="stockpdDetailId != null">stockpd_detail_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="stockId != null">#{stockId},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="oldQuantity != null">#{oldQuantity},</if>
|
||||
<if test="pdQuantity != null">#{pdQuantity},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="depeId != null">#{depeId},</if>
|
||||
<if test="stockpdDetailId != null">#{stockpdDetailId},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePdCommitRecord" parameterType="PdCommitRecord">
|
||||
update pd_commit_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="stockId != null">stock_id = #{stockId},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="oldQuantity != null">old_quantity = #{oldQuantity},</if>
|
||||
<if test="pdQuantity != null">pd_quantity = #{pdQuantity},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="depeId != null">depe_id = #{depeId},</if>
|
||||
<if test="stockpdDetailId != null">stockpd_detail_id = #{stockpdDetailId},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deletePdCommitRecordById" parameterType="Long">
|
||||
delete from pd_commit_record where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePdCommitRecordByIds" parameterType="String">
|
||||
delete from pd_commit_record where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,125 @@
|
||||
<?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.ruoyi.pd.diff.mapper.PdDifferenceRecordMapper">
|
||||
|
||||
<resultMap type="PdDifferenceRecord" id="PdDifferenceRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="oldQuantity" column="old_quantity" />
|
||||
<result property="pdQuantity" column="pd_quantity" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="depeId" column="depe_id" />
|
||||
<result property="depeName" column="depe_name" />
|
||||
<result property="stockpdDetailId" column="stockpd_detail_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="recordType" column="record_type" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPdDifferenceRecordVo">
|
||||
select id, warehouse_id, warehouse_name, tray_code, product_id, product_name, old_quantity, pd_quantity, user_id, user_name, depe_id, depe_name, stockpd_detail_id, status, record_type, create_time from pd_difference_record
|
||||
</sql>
|
||||
|
||||
<select id="selectPdDifferenceRecordList" parameterType="PdDifferenceRecord" resultMap="PdDifferenceRecordResult">
|
||||
<include refid="selectPdDifferenceRecordVo"/>
|
||||
<where>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="oldQuantity != null "> and old_quantity = #{oldQuantity}</if>
|
||||
<if test="pdQuantity != null "> and pd_quantity = #{pdQuantity}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="depeId != null "> and depe_id = #{depeId}</if>
|
||||
<if test="depeName != null and depeName != ''"> and depe_name like concat('%', #{depeName}, '%')</if>
|
||||
<if test="stockpdDetailId != null and stockpdDetailId != ''"> and stockpd_detail_id = #{stockpdDetailId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="recordType != null and recordType != ''"> and record_type = #{recordType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPdDifferenceRecordById" parameterType="Long" resultMap="PdDifferenceRecordResult">
|
||||
<include refid="selectPdDifferenceRecordVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertPdDifferenceRecord" parameterType="PdDifferenceRecord" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into pd_difference_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="warehouseName != null">warehouse_name,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="oldQuantity != null">old_quantity,</if>
|
||||
<if test="pdQuantity != null">pd_quantity,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null">user_name,</if>
|
||||
<if test="depeId != null">depe_id,</if>
|
||||
<if test="depeName != null">depe_name,</if>
|
||||
<if test="stockpdDetailId != null">stockpd_detail_id,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="recordType != null">record_type,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="warehouseName != null">#{warehouseName},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="oldQuantity != null">#{oldQuantity},</if>
|
||||
<if test="pdQuantity != null">#{pdQuantity},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null">#{userName},</if>
|
||||
<if test="depeId != null">#{depeId},</if>
|
||||
<if test="depeName != null">#{depeName},</if>
|
||||
<if test="stockpdDetailId != null">#{stockpdDetailId},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="recordType != null">#{recordType},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePdDifferenceRecord" parameterType="PdDifferenceRecord">
|
||||
update pd_difference_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="oldQuantity != null">old_quantity = #{oldQuantity},</if>
|
||||
<if test="pdQuantity != null">pd_quantity = #{pdQuantity},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="userName != null">user_name = #{userName},</if>
|
||||
<if test="depeId != null">depe_id = #{depeId},</if>
|
||||
<if test="depeName != null">depe_name = #{depeName},</if>
|
||||
<if test="stockpdDetailId != null">stockpd_detail_id = #{stockpdDetailId},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="recordType != null">record_type = #{recordType},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deletePdDifferenceRecordById" parameterType="Long">
|
||||
delete from pd_difference_record where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePdDifferenceRecordByIds" parameterType="String">
|
||||
delete from pd_difference_record where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,116 @@
|
||||
<?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.ruoyi.pd.stockpddetail.mapper.PdStockpdDetailMapper">
|
||||
|
||||
<resultMap type="PdStockpdDetail" id="PdStockpdDetailResult">
|
||||
<result property="stockpdDetailId" column="stockpd_detail_id" />
|
||||
<result property="stockpdId" column="stockpd_id" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="allotNum" column="allot_num" />
|
||||
<result property="assignNum" column="assign_num" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPdStockpdDetailVo">
|
||||
select stockpd_detail_id, stockpd_id, tray_code, product_id, product_name, quantity, allot_num, assign_num, remark from pd_stockpd_detail
|
||||
</sql>
|
||||
<sql id="selectPdStockpdDetailFinishVo">
|
||||
select stockpd_detail_id,
|
||||
stockpd_id,
|
||||
tray_code,
|
||||
product_id,
|
||||
product_name,
|
||||
quantity,
|
||||
allot_num,
|
||||
assign_num,
|
||||
remark
|
||||
from pd_stockpd_detail_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectPdStockpdDetailList" parameterType="PdStockpdDetail" resultMap="PdStockpdDetailResult">
|
||||
<include refid="selectPdStockpdDetailVo"/>
|
||||
<where>
|
||||
<if test="stockpdId != null and stockpdId != ''"> and stockpd_id = #{stockpdId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="allotNum != null "> and allot_num = #{allotNum}</if>
|
||||
<if test="assignNum != null "> and assign_num = #{assignNum}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPdStockpdDetailByStockpdDetailId" parameterType="String" resultMap="PdStockpdDetailResult">
|
||||
<include refid="selectPdStockpdDetailVo"/>
|
||||
where stockpd_detail_id = #{stockpdDetailId}
|
||||
</select>
|
||||
<select id="selectPdStockpdDetailFinishList" parameterType="PdStockpdDetail" resultMap="PdStockpdDetailResult">
|
||||
<include refid="selectPdStockpdDetailFinishVo"/>
|
||||
<where>
|
||||
<if test="stockpdId != null and stockpdId != ''"> and stockpd_id = #{stockpdId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="allotNum != null "> and allot_num = #{allotNum}</if>
|
||||
<if test="assignNum != null "> and assign_num = #{assignNum}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertPdStockpdDetail" parameterType="PdStockpdDetail">
|
||||
insert into pd_stockpd_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockpdDetailId != null">stockpd_detail_id,</if>
|
||||
<if test="stockpdId != null and stockpdId != ''">stockpd_id,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="productId != null and productId != ''">product_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="allotNum != null">allot_num,</if>
|
||||
<if test="assignNum != null">assign_num,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockpdDetailId != null">#{stockpdDetailId},</if>
|
||||
<if test="stockpdId != null and stockpdId != ''">#{stockpdId},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="productId != null and productId != ''">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="allotNum != null">#{allotNum},</if>
|
||||
<if test="assignNum != null">#{assignNum},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePdStockpdDetail" parameterType="PdStockpdDetail">
|
||||
update pd_stockpd_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockpdId != null and stockpdId != ''">stockpd_id = #{stockpdId},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="productId != null and productId != ''">product_id = #{productId},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="allotNum != null">allot_num = #{allotNum},</if>
|
||||
<if test="assignNum != null">assign_num = #{assignNum},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where stockpd_detail_id = #{stockpdDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePdStockpdDetailByStockpdDetailId" parameterType="String">
|
||||
delete from pd_stockpd_detail where stockpd_detail_id = #{stockpdDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePdStockpdDetailByStockpdDetailIds" parameterType="String">
|
||||
delete from pd_stockpd_detail where stockpd_detail_id in
|
||||
<foreach item="stockpdDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{stockpdDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
161
ruoyi-admin/src/main/resources/mapper/pd/PdStockpdMapper.xml
Normal file
161
ruoyi-admin/src/main/resources/mapper/pd/PdStockpdMapper.xml
Normal file
@@ -0,0 +1,161 @@
|
||||
<?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.ruoyi.pd.stockpd.mapper.PdStockpdMapper">
|
||||
|
||||
<resultMap type="PdStockpd" id="PdStockpdResult">
|
||||
<result property="stockpdId" column="stockpd_id" />
|
||||
<result property="pdType" column="pd_type" />
|
||||
<result property="stockSource" column="stock_source" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="startDate" column="start_date" />
|
||||
<result property="finishDate" column="finish_date" />
|
||||
<result property="erpBill" column="erp_bill" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPdStockpdVo">
|
||||
select stockpd_id, pd_type, stock_source, status, create_date, start_date, finish_date, erp_bill, warehouse_id, warehouse_name, user_id, user_name, dept_id, dept_name from pd_stockpd
|
||||
</sql>
|
||||
|
||||
<select id="selectPdStockpdList" parameterType="PdStockpd" resultMap="PdStockpdResult">
|
||||
<include refid="selectPdStockpdVo"/>
|
||||
<where>
|
||||
<if test="pdType != null and pdType != ''"> and pd_type = #{pdType}</if>
|
||||
<if test="stockSource != null and stockSource != ''"> and stock_source = #{stockSource}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="params.beginCreateDate != null and params.beginCreateDate != '' and params.endCreateDate != null and params.endCreateDate != ''"> and create_date between #{params.beginCreateDate} and #{params.endCreateDate}</if>
|
||||
<if test="params.beginStartDate != null and params.beginStartDate != '' and params.endStartDate != null and params.endStartDate != ''"> and start_date between #{params.beginStartDate} and #{params.endStartDate}</if>
|
||||
<if test="params.beginFinishDate != null and params.beginFinishDate != '' and params.endFinishDate != null and params.endFinishDate != ''"> and finish_date between #{params.beginFinishDate} and #{params.endFinishDate}</if>
|
||||
<if test="erpBill != null and erpBill != ''"> and erp_bill = #{erpBill}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPdStockpdByStockpdId" parameterType="String" resultMap="PdStockpdResult">
|
||||
<include refid="selectPdStockpdVo"/>
|
||||
where stockpd_id = #{stockpdId}
|
||||
</select>
|
||||
|
||||
<insert id="insertPdStockpd" parameterType="PdStockpd">
|
||||
insert into pd_stockpd
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockpdId != null">stockpd_id,</if>
|
||||
<if test="pdType != null and pdType != ''">pd_type,</if>
|
||||
<if test="stockSource != null and stockSource != ''">stock_source,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="createDate != null ">create_date,</if>
|
||||
<if test="startDate != null">start_date,</if>
|
||||
<if test="finishDate != null">finish_date,</if>
|
||||
<if test="erpBill != null">erp_bill,</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id,</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">warehouse_name,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="deptName != null and deptName != ''">dept_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockpdId != null">#{stockpdId},</if>
|
||||
<if test="pdType != null and pdType != ''">#{pdType},</if>
|
||||
<if test="stockSource != null and stockSource != ''">#{stockSource},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="createDate != null ">#{createDate},</if>
|
||||
<if test="startDate != null">#{startDate},</if>
|
||||
<if test="finishDate != null">#{finishDate},</if>
|
||||
<if test="erpBill != null">#{erpBill},</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">#{warehouseId},</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">#{warehouseName},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="deptName != null and deptName != ''">#{deptName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePdStockpd" parameterType="PdStockpd">
|
||||
update pd_stockpd
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="pdType != null and pdType != ''">pd_type = #{pdType},</if>
|
||||
<if test="stockSource != null and stockSource != ''">stock_source = #{stockSource},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="createDate != null and createDate != ''">create_date = #{createDate},</if>
|
||||
<if test="startDate != null">start_date = #{startDate},</if>
|
||||
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
||||
<if test="erpBill != null">erp_bill = #{erpBill},</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id = #{warehouseId},</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">warehouse_name = #{warehouseName},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
|
||||
</trim>
|
||||
where stockpd_id = #{stockpdId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePdStockpdByStockpdId" parameterType="String">
|
||||
delete from pd_stockpd where stockpd_id = #{stockpdId}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePdStockpdByStockpdIds" parameterType="String">
|
||||
delete from pd_stockpd where stockpd_id in
|
||||
<foreach item="stockpdId" collection="array" open="(" separator="," close=")">
|
||||
#{stockpdId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 存储过程:更新盘点单据状态(作废/审核/完成)-->
|
||||
<select id="updatePdStockpdByProc" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_update_pdbill_status(
|
||||
#{v_stockpd_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_status,mode=IN,jdbcType=INTEGER},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
|
||||
<!-- 存储过程:自动分配盘点单据 -->
|
||||
<select id="autoAssignPdStockpdByProc" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_pd_auto_allocation(
|
||||
#{v_stockpd_detail_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
|
||||
<!-- 已完成盘点单据列表(查pd_stockpd_finish表) -->
|
||||
<sql id="selectPdStockpdFinishVo">
|
||||
select stockpd_id, pd_type, stock_source, status, create_date, start_date, finish_date, erp_bill, warehouse_id, warehouse_name, user_id, user_name, dept_id, dept_name from pd_stockpd_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectPdStockpdFinishList" parameterType="PdStockpd" resultMap="PdStockpdResult">
|
||||
<include refid="selectPdStockpdFinishVo"/>
|
||||
<where>
|
||||
<if test="pdType != null and pdType != ''"> and pd_type = #{pdType}</if>
|
||||
<if test="stockSource != null and stockSource != ''"> and stock_source = #{stockSource}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="params.beginCreateDate != null and params.beginCreateDate != '' and params.endCreateDate != null and params.endCreateDate != ''"> and create_date between #{params.beginCreateDate} and #{params.endCreateDate}</if>
|
||||
<if test="params.beginStartDate != null and params.beginStartDate != '' and params.endStartDate != null and params.endStartDate != ''"> and start_date between #{params.beginStartDate} and #{params.endStartDate}</if>
|
||||
<if test="params.beginFinishDate != null and params.beginFinishDate != '' and params.endFinishDate != null and params.endFinishDate != ''"> and finish_date between #{params.beginFinishDate} and #{params.endFinishDate}</if>
|
||||
<if test="erpBill != null and erpBill != ''"> and erp_bill = #{erpBill}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
25
ruoyi-admin/src/main/resources/mapper/pda/PdaMapper.xml
Normal file
25
ruoyi-admin/src/main/resources/mapper/pda/PdaMapper.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?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.ruoyi.pda.mapper.PdaMapper">
|
||||
<insert id="addInJob" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_add_in_job(
|
||||
#{v_tray_code,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_dept_id,mode=IN,jdbcType=INTEGER},
|
||||
#{v_user_id,mode=IN,jdbcType=INTEGER},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</insert>
|
||||
|
||||
<select id="bindTray" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_bind_tray_msg(
|
||||
#{v_tray_code,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_stockin_detail_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_quantity,mode=IN,jdbcType=INTEGER},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?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.ruoyi.system.wr.mapper.SysRoleWarehouseMapper">
|
||||
|
||||
<resultMap type="SysRoleWarehouse" id="SysRoleWarehouseResult">
|
||||
<result property="roleId" column="role_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysRoleWarehouseVo">
|
||||
select role_id, warehouse_id from sys_role_warehouse
|
||||
</sql>
|
||||
|
||||
<select id="selectSysRoleWarehouseList" parameterType="SysRoleWarehouse" resultMap="SysRoleWarehouseResult">
|
||||
<include refid="selectSysRoleWarehouseVo"/>
|
||||
<where>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysRoleWarehouseByRoleId" parameterType="Long" resultMap="SysRoleWarehouseResult">
|
||||
<include refid="selectSysRoleWarehouseVo"/>
|
||||
where role_id = #{roleId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysRoleWarehouse" parameterType="SysRoleWarehouse">
|
||||
insert into sys_role_warehouse
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="roleId != null">role_id,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="roleId != null">#{roleId},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysRoleWarehouse" parameterType="SysRoleWarehouse">
|
||||
update sys_role_warehouse
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
</trim>
|
||||
where role_id = #{roleId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysRoleWarehouseByRoleId" parameterType="Long">
|
||||
delete from sys_role_warehouse where role_id = #{roleId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysRoleWarehouseByRoleIds" parameterType="String">
|
||||
delete from sys_role_warehouse where role_id in
|
||||
<foreach item="roleId" collection="array" open="(" separator="," close=")">
|
||||
#{roleId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectWarehouseIdsByRoleId" parameterType="Long" resultType="String">
|
||||
select warehouse_id from sys_role_warehouse where role_id = #{roleId}
|
||||
</select>
|
||||
|
||||
<insert id="batchInsertRoleWarehouse">
|
||||
insert into sys_role_warehouse (role_id, warehouse_id) values
|
||||
<foreach item="item" collection="list" separator=",">
|
||||
(#{item.roleId}, #{item.warehouseId})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
122
ruoyi-admin/src/main/resources/mapper/wms/WmsIndexMapper.xml
Normal file
122
ruoyi-admin/src/main/resources/mapper/wms/WmsIndexMapper.xml
Normal file
@@ -0,0 +1,122 @@
|
||||
<?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.ruoyi.system.index.mapper.WmsIndexMapper">
|
||||
|
||||
<!-- ===================== 核心统计指标 ===================== -->
|
||||
|
||||
<!-- 今日入库单数 -->
|
||||
<select id="countTodayInbound" resultType="int">
|
||||
SELECT COUNT(1) FROM in_stockin_finish
|
||||
WHERE CONVERT(varchar(10), create_date, 23) = CONVERT(varchar(10), GETDATE(), 23)
|
||||
</select>
|
||||
|
||||
<!-- 今日出库单数 -->
|
||||
<select id="countTodayOutbound" resultType="int">
|
||||
SELECT COUNT(1) FROM out_stockout_finish
|
||||
WHERE CONVERT(varchar(10), create_date, 23) = CONVERT(varchar(10), GETDATE(), 23)
|
||||
</select>
|
||||
|
||||
<!-- 在库 SKU 数(distinct product_id) -->
|
||||
<select id="countTotalSku" resultType="int">
|
||||
SELECT COUNT(DISTINCT product_id) FROM bas_stock
|
||||
WHERE stock_status = '1'
|
||||
</select>
|
||||
|
||||
<!-- 临期预警数:入库时间 + 90天 < 30天内到期,按 product 维度去重 -->
|
||||
<select id="countNearExpire" resultType="int">
|
||||
SELECT COUNT(DISTINCT product_id) FROM bas_stock
|
||||
WHERE stock_status = '1'
|
||||
AND DATEDIFF(day, GETDATE(), DATEADD(day, 90, in_date)) BETWEEN 0 AND 30
|
||||
</select>
|
||||
|
||||
<!-- 本月入库单数 -->
|
||||
<select id="countMonthInboundOrders" resultType="int">
|
||||
SELECT COUNT(1) FROM in_stockin_finish
|
||||
WHERE YEAR(create_date) = YEAR(GETDATE())
|
||||
AND MONTH(create_date) = MONTH(GETDATE())
|
||||
</select>
|
||||
|
||||
<!-- 本月待处理入库(status = '0') -->
|
||||
<select id="countPendingInboundOrders" resultType="int">
|
||||
SELECT COUNT(1) FROM in_stockin_finish
|
||||
WHERE status = '0'
|
||||
</select>
|
||||
|
||||
<!-- 本月出库单数 -->
|
||||
<select id="countMonthOutboundOrders" resultType="int">
|
||||
SELECT COUNT(1) FROM out_stockout_finish
|
||||
WHERE YEAR(create_date) = YEAR(GETDATE())
|
||||
AND MONTH(create_date) = MONTH(GETDATE())
|
||||
</select>
|
||||
|
||||
<!-- 本月待处理出库(status = '0') -->
|
||||
<select id="countPendingOutboundOrders" resultType="int">
|
||||
SELECT COUNT(1) FROM out_stockout_finish
|
||||
WHERE status = '0'
|
||||
</select>
|
||||
|
||||
<!-- ===================== 近7日入出库趋势 ===================== -->
|
||||
|
||||
<!-- 近7日每日入库单数 -->
|
||||
<select id="selectInboundTrend7Days" resultType="map">
|
||||
SELECT
|
||||
CONVERT(varchar(10), create_date, 23) AS theDate,
|
||||
COUNT(1) AS cnt
|
||||
FROM in_stockin_finish
|
||||
WHERE create_date >= DATEADD(day, -6, CONVERT(date, GETDATE()))
|
||||
GROUP BY CONVERT(varchar(10), create_date, 23)
|
||||
ORDER BY theDate
|
||||
</select>
|
||||
|
||||
<!-- 近7日每日出库单数 -->
|
||||
<select id="selectOutboundTrend7Days" resultType="map">
|
||||
SELECT
|
||||
CONVERT(varchar(10), create_date, 23) AS theDate,
|
||||
COUNT(1) AS cnt
|
||||
FROM out_stockout_finish
|
||||
WHERE create_date >= DATEADD(day, -6, CONVERT(date, GETDATE()))
|
||||
GROUP BY CONVERT(varchar(10), create_date, 23)
|
||||
ORDER BY theDate
|
||||
</select>
|
||||
|
||||
<!-- ===================== 库区占用率 ===================== -->
|
||||
|
||||
<!-- 各仓库总货位数 -->
|
||||
<select id="selectWarehouseTotalSpace" resultType="map">
|
||||
SELECT bcs.warehouse_id AS warehouseId, bw.warehouse_name AS warehouseName, COUNT(1) AS total
|
||||
FROM bas_cargo_space bcs
|
||||
left join bas_warehouse bw on bw.warehouse_id = bcs.warehouse_id
|
||||
GROUP BY bcs.warehouse_id, bw.warehouse_name
|
||||
ORDER BY warehouseName
|
||||
</select>
|
||||
|
||||
<!-- 各仓库已占用货位数(status = '2' 表示有货) -->
|
||||
<select id="selectWarehouseUsedSpace" resultType="map">
|
||||
SELECT warehouse_id AS warehouseId, COUNT(1) AS used
|
||||
FROM bas_cargo_space
|
||||
WHERE status = '2'
|
||||
GROUP BY warehouse_id
|
||||
</select>
|
||||
|
||||
<!-- ===================== 今日入库单据(最新10条,含数量汇总) ===================== -->
|
||||
|
||||
<select id="selectTodayInboundOrders" resultType="map">
|
||||
SELECT TOP 10
|
||||
s.stockin_id AS stockinId,
|
||||
s.supplier_name AS supplier,
|
||||
ISNULL(d.qty, 0) AS qty,
|
||||
s.status,
|
||||
s.create_date AS createTime
|
||||
FROM in_stockin s
|
||||
LEFT JOIN (
|
||||
SELECT stockin_id, SUM(quantity) AS qty
|
||||
FROM in_stockin_detail
|
||||
GROUP BY stockin_id
|
||||
) d ON d.stockin_id = s.stockin_id
|
||||
WHERE CONVERT(varchar(10), s.create_date, 23) = CONVERT(varchar(10), GETDATE(), 23)
|
||||
ORDER BY s.create_date DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
20
ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml
Normal file
20
ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE configuration
|
||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<configuration>
|
||||
<!-- 全局参数 -->
|
||||
<settings>
|
||||
<!-- 使全局的映射器启用或禁用缓存 -->
|
||||
<setting name="cacheEnabled" value="true" />
|
||||
<!-- 允许JDBC 支持自动生成主键 -->
|
||||
<setting name="useGeneratedKeys" value="true" />
|
||||
<!-- 配置默认的执行器.SIMPLE就是普通执行器;REUSE执行器会重用预处理语句(prepared statements);BATCH执行器将重用语句并执行批量更新 -->
|
||||
<setting name="defaultExecutorType" value="SIMPLE" />
|
||||
<!-- 指定 MyBatis 所用日志的具体实现 -->
|
||||
<setting name="logImpl" value="SLF4J" />
|
||||
<!-- 使用驼峰命名法转换字段 -->
|
||||
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
|
||||
</settings>
|
||||
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user