1
This commit is contained in:
75
mosty-rwzx/src/main/resources/application.yml
Normal file
75
mosty-rwzx/src/main/resources/application.yml
Normal file
@ -0,0 +1,75 @@
|
||||
ribbon:
|
||||
ReadTimeout: 600000
|
||||
ConnectTimeout: 600000
|
||||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 100MB
|
||||
max-request-size: 100MB
|
||||
jackson:
|
||||
serialization:
|
||||
write-dates-as-timestamps: false
|
||||
# # 格式化返回时间 yyyy-MM-dd HH:mm:ss
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
time-zone: GMT+8
|
||||
datasource:
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://192.168.200.131:3306/mosty_rwzx?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: mosty888
|
||||
hikari:
|
||||
minimum-idle: 10 # ??????????10???0???maximum-pool-size??????maximum-pool-size
|
||||
maximum-pool-size: 20 # ??????????0????????10??????1?????minimum-idle??
|
||||
idle-timeout: 500000 # ????????????600000?10????????max-lifetime?max-lifetime>0??????0????0???10???????10??
|
||||
max-lifetime: 540000 # ????????????0???30??????????30??.?????mysql????????
|
||||
connection-timeout: 60000 # ????????????250????????????30?
|
||||
connection-test-query: SELECT 1 # ???????????????
|
||||
# Redis数据库索引(默认为0)
|
||||
redis:
|
||||
database: 8
|
||||
# Redis服务器地址
|
||||
host: 192.168.200.131
|
||||
# Redis服务器连接端口
|
||||
port: 6379
|
||||
# Redis服务器连接密码(默认为空)
|
||||
password: mosty888
|
||||
# 连接超时时间(毫秒)
|
||||
timeout: 2000
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 50
|
||||
|
||||
swagger:
|
||||
host: 80.155.0.84
|
||||
port: 8010
|
||||
|
||||
mybatis-plus:
|
||||
global-config:
|
||||
db-config:
|
||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
magic-api:
|
||||
web: /magic/web
|
||||
#配置文件存储位置。当以classpath开头时,为只读模式
|
||||
resource:
|
||||
# location: /data/magic-api
|
||||
type: database
|
||||
table-name: magic_api # 数据库中的表名
|
||||
prefix: /magic-api # 前缀
|
||||
datasource:
|
||||
response-code:
|
||||
success: 10000
|
||||
exclude:
|
||||
pathPatterns:
|
||||
swagger:
|
||||
- /swagger-resources/**
|
||||
- /webjars/**
|
||||
- /v2/**
|
||||
- /swagger-ui.html/**
|
||||
- /docs.html/**
|
||||
|
||||
config:
|
||||
orgCode: 510600000000
|
39
mosty-rwzx/src/main/resources/bootstrap.yml
Normal file
39
mosty-rwzx/src/main/resources/bootstrap.yml
Normal file
@ -0,0 +1,39 @@
|
||||
server:
|
||||
port: 8020
|
||||
servlet:
|
||||
context-path: /mosty-rwzx/
|
||||
spring:
|
||||
application:
|
||||
name: mosty-rwzx
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
namespace: 657d1843-b590-41ac-b5e7-5d261bf00de9
|
||||
server-addr: 192.168.200.131:8848
|
||||
register-enabled: true # 是否将自己注册到配置中心,让其他服务发现调用(本地调试使用)
|
||||
|
||||
|
||||
# 开启健康监控
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
auditevents:
|
||||
enabled: true
|
||||
|
||||
#swagger:
|
||||
# enable: true
|
||||
# title: 基础微服务
|
||||
# version: 1.0.0
|
||||
# name: 基础微服务
|
||||
# url: ''
|
||||
# email: ''
|
||||
|
||||
# 日志
|
||||
#logging:
|
||||
# file: /application/applogs/admin.log
|
||||
|
114
mosty-rwzx/src/main/resources/logback-spring.xml
Normal file
114
mosty-rwzx/src/main/resources/logback-spring.xml
Normal file
@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<jmxConfigurator/>
|
||||
<property name="PROJECT_NAME" value="msxf-retail-sort" />
|
||||
<property name="LOG_FILE_INFO" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/msxf-retail-sort-info.log" />
|
||||
<property name="LOG_FILE_WARN" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/msxf-retail-sort-warn.log" />
|
||||
<property name="LOG_FILE_ERR" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/msxf-retail-sort-error.log" />
|
||||
<property name="LOG_BUSINESS" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/business/business-2de.log"/>
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
|
||||
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />
|
||||
<contextName>${PROJECT_NAME}</contextName>
|
||||
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
<appender name="LOG_FILE_INFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>INFO</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
<file>${LOG_FILE_INFO}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_FILE_INFO}-7de.%d{yyyy-MM-dd}.%i</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>1024MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
<appender name="LOG_FILE_WARN"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>WARN</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
<file>${LOG_FILE_WARN}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_FILE_WARN}-30de.%d{yyyy-MM-dd}.%i</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>1024MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
<appender name="LOG_FILE_ERROR"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>ERROR</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
<file>${LOG_FILE_ERR}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_FILE_ERR}.%d{yyyy-MM-dd}.%i</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>512MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
<!--添加监控日志 -->
|
||||
<appender name="business-log-appender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>info</level>
|
||||
</filter>
|
||||
<file>${LOG_BUSINESS}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_BUSINESS}.%d{yyyy-MM-dd}.%i
|
||||
</fileNamePattern>
|
||||
<maxFileSize>1024MB</maxFileSize>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="business-log" additivity="false" level="info">
|
||||
<appender-ref ref="business-log-appender"/>
|
||||
<appender-ref ref="CONSOLE" />
|
||||
</logger>
|
||||
<!-- show parameters for hibernate sql 专为 Hibernate 定制 -->
|
||||
<logger name="logging.level.jdbc" level="INFO" />
|
||||
<logger name="logging.level.jdbc.sqlonly" level="INFO" />
|
||||
<logger name="org.springframework" level="INFO" additivity="true" />
|
||||
<Logger name="jdbc.sqlonly" level="info" />
|
||||
<Logger name="jdbc.sqltiming" level="warn" />
|
||||
<Logger name="jdbc.audit" level="warn" />
|
||||
<Logger name="jdbc.resultset" level="warn" />
|
||||
<Logger name="jdbc.resultsettable" level="warn" />
|
||||
<logger name="jdbc.connection" level="warn" />
|
||||
<Logger name="log4jdbc.debug" level="warn" />
|
||||
<Logger name="org.apache.kafka.clients.NetworkClient" level="ERROR" />
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="CONSOLE" />
|
||||
<appender-ref ref="LOG_FILE_INFO" />
|
||||
<appender-ref ref="LOG_FILE_WARN" />
|
||||
<appender-ref ref="LOG_FILE_ERROR" />
|
||||
</root>
|
||||
</configuration>
|
78
mosty-rwzx/src/main/resources/mapper/TbRwTaskLogMapper.xml
Normal file
78
mosty-rwzx/src/main/resources/mapper/TbRwTaskLogMapper.xml
Normal file
@ -0,0 +1,78 @@
|
||||
<?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.mosty.rwzx.mapper.TbRwTaskLogMapper">
|
||||
<resultMap type="com.mosty.base.model.entity.rwzx.TbRwTaskLog" id="tbRwTaskLog">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="rwid" column="sjlyid" jdbcType="VARCHAR"/>
|
||||
<result property="rzlx" column="jkdbgbh" jdbcType="VARCHAR"/>
|
||||
<result property="rznr" column="sbbh" jdbcType="VARCHAR"/>
|
||||
<result property="jd" column="jd" jdbcType="NUMERIC"/>
|
||||
<result property="wd" column="wd" jdbcType="NUMERIC"/>
|
||||
<result property="zb" column="zb" typeHandler="com.mosty.base.feign.handle.PointTypeHandler"/>
|
||||
<result property="zbhash" column="zbhash" jdbcType="VARCHAR"/>
|
||||
<result property="bgsj" column="bgsj" jdbcType="TIMESTAMP"/>
|
||||
<result property="bgrid" column="xzqhdm" jdbcType="VARCHAR"/>
|
||||
<result property="bgrxm" column="dzmc" jdbcType="VARCHAR"/>
|
||||
<result property="bgrsfzh" column="sblxdm" jdbcType="VARCHAR"/>
|
||||
<result property="bgrdhhm" column="sjlxdm" jdbcType="VARCHAR"/>
|
||||
<result property="ssbm" column="ssbm" jdbcType="VARCHAR"/>
|
||||
<result property="ssbmdm" column="ssbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="ssbmid" column="ssbmid" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgaj" column="ssxgaj" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgajdm" column="ssxgajdm" jdbcType="VARCHAR"/>
|
||||
<result property="ssxgajid" column="ssxgajid" jdbcType="VARCHAR"/>
|
||||
<result property="sssgaj" column="sssgaj" jdbcType="VARCHAR"/>
|
||||
<result property="sssgajdm" column="sssgajdm" jdbcType="VARCHAR"/>
|
||||
<result property="sssgajid" column="sssgajid" jdbcType="VARCHAR"/>
|
||||
<result property="xtSjly" column="xt_sjly" jdbcType="VARCHAR"/>
|
||||
<result property="xtSjzt" column="xt_sjzt" jdbcType="VARCHAR"/>
|
||||
<result property="xtScbz" column="xt_scbz" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjip" column="xt_cjip" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjsj" column="xt_cjsj" jdbcType="TIMESTAMP"/>
|
||||
<result property="xtCjrId" column="xt_cjr_id" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjr" column="xt_cjr" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjbmdm" column="xt_cjbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="xtCjbmmc" column="xt_cjbmmc" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxip" column="xt_zhgxip" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxsj" column="xt_zhgxsj" jdbcType="TIMESTAMP"/>
|
||||
<result property="xtZhgxrid" column="xt_zhgxrid" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxr" column="xt_zhgxr" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxbmdm" column="xt_zhgxbmdm" jdbcType="VARCHAR"/>
|
||||
<result property="xtZhgxbm" column="xt_zhgxbm" jdbcType="VARCHAR"/>
|
||||
<result property="bz" column="bz" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="base_column_list">
|
||||
|
||||
id,rwid,rzlx,rznr,jd,wd,zbhash,bgsj,bgrid,bgrxm,bgrsfzh,bgrdhhm,ssbmid,ssxgajid,sssgajid,
|
||||
ssbm, ssbmdm, ssxgaj, ssxgajdm, sssgaj, sssgajdm, xt_sjly, xt_sjzt, xt_scbz,
|
||||
xt_cjip, xt_cjsj, xt_cjr_id, xt_cjr, xt_cjbmdm, xt_cjbmmc, xt_zhgxip, xt_zhgxsj, xt_zhgxrid,
|
||||
xt_zhgxr, xt_zhgxbmdm, xt_zhgxbm, bz
|
||||
|
||||
</sql>
|
||||
|
||||
<sql id="zb_sql">
|
||||
|
||||
ST_ASWKT
|
||||
(zb) as zb
|
||||
|
||||
</sql>
|
||||
|
||||
<insert id="insertEntity" parameterType="com.mosty.base.model.entity.rwzx.TbRwTaskLog">
|
||||
|
||||
insert into tb_rw_task_log(
|
||||
id,rwid,rzlx,rznr,jd,wd,zb,zbhash,bgsj,bgrid,bgrxm,bgrsfzh,bgrdhhm,ssbmid,ssxgajid,sssgajid,
|
||||
ssbm, ssbmdm, ssxgaj, ssxgajdm, sssgaj, sssgajdm, xt_sjly, xt_sjzt, xt_scbz,
|
||||
xt_cjip, xt_cjsj, xt_cjr_id, xt_cjr, xt_cjbmdm, xt_cjbmmc, xt_zhgxip, xt_zhgxsj, xt_zhgxrid,
|
||||
xt_zhgxr, xt_zhgxbmdm, xt_zhgxbm, bz
|
||||
)values (
|
||||
#{id},#{rwid},#{rzlx},#{rznr},#{jd},#{wd},
|
||||
ST_GEOMFROMTEXT(#{zb,typeHandler = com.mosty.base.feign.handle.PointTypeHandler}),
|
||||
#{zbhash},#{bgsj},#{bgrid},#{bgrxm},#{bgrsfzh},#{bgrdhhm},#{ssbmid},#{ssxgajid},#{sssgajid},
|
||||
#{ssbm}, #{ssbmdm}, #{ssxgaj}, #{ssxgajdm}, #{sssgaj}, #{sssgajdm}, #{xtSjly}, #{xtSjzt}, #{xtScbz},
|
||||
#{xtCjip}, #{xtCjsj}, #{xtCjrId}, #{xtCjr}, #{xtCjbmdm}, #{xtCjbmmc}, #{xtZhgxip}, #{xtZhgxsj},
|
||||
#{xtZhgxrid},#{xtZhgxr}, #{xtZhgxbmdm}, #{xtZhgxbm}, #{bz}
|
||||
)
|
||||
|
||||
</insert>
|
||||
</mapper>
|
354
mosty-rwzx/src/main/resources/mapper/TbRwTaskMapper.xml
Normal file
354
mosty-rwzx/src/main/resources/mapper/TbRwTaskMapper.xml
Normal file
@ -0,0 +1,354 @@
|
||||
<?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.mosty.rwzx.mapper.TbRwTaskMapper">
|
||||
<select id="selectDict" resultType="com.mosty.common.config.entity.SysDictItem">
|
||||
select *
|
||||
from mosty_base.sys_dict_item
|
||||
where zdbh = #{dictName}
|
||||
and xt_zxbz = '0'
|
||||
</select>
|
||||
|
||||
<select id="getTaskRanking" parameterType="com.mosty.base.model.dto.rwzx.TbRwTaskStatisticsDto"
|
||||
resultType="com.mosty.base.model.vo.rwzx.TbRwTaskRankingVo">
|
||||
select userinfo.jsrsfzh,
|
||||
userinfo.jsrmc,
|
||||
ssbm,
|
||||
IFNULL(YTable.YS, '0') YS,
|
||||
IFNULL(NTable.NS, '0') NS,
|
||||
(IFNULL( YTable.YS,0) / ( IFNULL( YTable.YS,0) + IFNULL( NTable.NS,0) )) rate
|
||||
from (select jsrsfzh, jsrmc, ssbm
|
||||
from mosty_rwzx.tb_rw_task_user
|
||||
WHERE xt_sjzt = '1' and xt_scbz = '0'
|
||||
<if test="ssbmid != null and ssbmid != ''">
|
||||
and ssbmid = #{ssbmid}
|
||||
</if>
|
||||
|
||||
GROUP BY jsrsfzh, jsrmc, ssbm) userinfo
|
||||
LEFT JOIN (SELECT jsrsfzh,
|
||||
sum(s) YS
|
||||
FROM (SELECT i.dm, u.jsrsfzh, count(u.id) s
|
||||
FROM mosty_base.sys_dict_item i
|
||||
left JOIN (select *
|
||||
from mosty_rwzx.tb_rw_task_user
|
||||
where xt_sjzt = '1' and xt_scbz = '0') u on i.dm = u.rwzt
|
||||
where i.zdbh = 'D_BZ_GRRWZT'
|
||||
and i.xt_zxbz = '0'
|
||||
GROUP BY i.dm, u.jsrsfzh
|
||||
ORDER BY i.dm) g
|
||||
WHERE dm = '2'
|
||||
GROUP BY jsrsfzh) YTable on userinfo.jsrsfzh = YTable.jsrsfzh
|
||||
LEFT JOIN (SELECT jsrsfzh,
|
||||
sum(s) NS
|
||||
FROM (SELECT i.dm, u.jsrsfzh, count(u.id) s
|
||||
FROM mosty_base.sys_dict_item i
|
||||
left JOIN (select *
|
||||
from mosty_rwzx.tb_rw_task_user
|
||||
where xt_sjzt = '1' and xt_scbz = '0') u on i.dm = u.rwzt
|
||||
where i.zdbh = 'D_BZ_GRRWZT'
|
||||
and i.xt_zxbz = '0'
|
||||
GROUP BY i.dm, u.jsrsfzh
|
||||
ORDER BY i.dm) g
|
||||
WHERE dm != '2'
|
||||
GROUP BY
|
||||
jsrsfzh) NTable on userinfo.jsrsfzh = NTable.jsrsfzh
|
||||
order by rate DESC LIMIT 0,10
|
||||
</select>
|
||||
|
||||
<!--获取我的任务列表-->
|
||||
<select id="getMyRwList" resultType="com.mosty.base.model.entity.rwzx.TbRwTaskUser">
|
||||
select * from tb_rw_task_user a where a.xt_scbz = '0' and a.xt_sjzt = '1'
|
||||
<if test="dto.kssj != null and dto.jssj != null and dto.kssj != '' and dto.jssj != ''">
|
||||
and a.rwfqsj > #{kssj}
|
||||
and a.rwfqsj < #{jssj}
|
||||
</if>
|
||||
<if test="dto.rwxl != null and dto.rwxl != ''">
|
||||
and a.rwxl = #{dto.rwxl}
|
||||
</if>
|
||||
<if test="dto.rwmc != null and dto.rwmc != ''">
|
||||
and a.rwmc like concat('%',#{dto.rwmc},'%')
|
||||
</if>
|
||||
<if test="dto.rwnr != null and dto.rwnr != ''">
|
||||
and a.rwnr like concat('%',#{dto.rwnr},'%')
|
||||
</if>
|
||||
<if test="dto.rwlx != null and dto.rwlx != ''">
|
||||
and a.rwlx = #{dto.rwlx}
|
||||
</if>
|
||||
<if test="dto.rwjjcd != null and dto.rwjjcd != ''">
|
||||
and a.rwjjcd = #{dto.rwjjcd}
|
||||
</if>
|
||||
<if test="dto.rwzt != null and dto.rwzt != ''">
|
||||
and a.rwzt = #{dto.rwzt}
|
||||
</if>
|
||||
and case
|
||||
when a.rwjsdx = '01' then a.jsrsfzh = #{sfzh}
|
||||
|
||||
when a.rwjsdx = '02' then a.jsbmdm = #{ssbmid}
|
||||
|
||||
when a.rwjsdx = '03' then
|
||||
a.jsxzid in (select c.id from mosty_qwgl.tb_qw_xfbb c,mosty_qwgl.tb_qw_jl d where c.id = d.ywid and
|
||||
c.xt_sjzt = '1' and c.xt_scbz = '0' and d.xt_sjzt = '1' and d.xt_scbz = '0' and
|
||||
(c.fzr_sfzh = #{sfzh} or d.sfzh = #{sfzh}))
|
||||
end
|
||||
<if test="dto.grrwzt != null and dto.grrwzt != ''">
|
||||
and a.grrwzt = #{dto.grrwzt}
|
||||
</if>
|
||||
order by a.rwfqsj desc
|
||||
limit #{pageIndex},#{pageSize}
|
||||
</select>
|
||||
|
||||
<!--获取我的任务的数量-->
|
||||
<select id="getMyRwCount" resultType="java.lang.Integer">
|
||||
select count(1) from tb_rw_task a where a.xt_scbz = '0' and a.xt_sjzt = '1'
|
||||
<if test="dto.kssj != null and dto.jssj != null and dto.kssj != '' and dto.jssj != ''">
|
||||
and a.rwfqsj > #{kssj}
|
||||
and a.rwfqsj < #{jssj}
|
||||
</if>
|
||||
<if test="dto.rwmc != null and dto.rwmc != ''">
|
||||
and a.rwmc like concat('%',#{dto.rwmc},'%')
|
||||
</if>
|
||||
<if test="dto.rwnr != null and dto.rwnr != ''">
|
||||
and a.rwnr like concat('%',#{dto.rwnr},'%')
|
||||
</if>
|
||||
<if test="dto.rwxl != null and dto.rwxl != ''">
|
||||
and a.rwxl = #{dto.rwxl}
|
||||
</if>
|
||||
<if test="dto.rwlx != null and dto.rwlx != ''">
|
||||
and a.rwlx = #{dto.rwlx}
|
||||
</if>
|
||||
<if test="dto.rwjjcd != null and dto.rwjjcd != ''">
|
||||
and a.rwjjcd = #{dto.rwjjcd}
|
||||
</if>
|
||||
<if test="dto.rwzt != null and dto.rwzt != ''">
|
||||
and a.rwzt = #{dto.rwzt}
|
||||
</if>
|
||||
and a.id in (
|
||||
select rwid from tb_rw_task_user b where b.xt_scbz = '0' and b.xt_sjzt = '1'
|
||||
and case
|
||||
when b.rwjsdx = '01' then b.jsrsfzh = #{sfzh}
|
||||
|
||||
when b.rwjsdx = '02' then b.jsbmdm = #{ssbmid}
|
||||
|
||||
when b.rwjsdx = '03' then
|
||||
b.jsxzid in (select c.id from mosty_qwgl.tb_qw_xfbb c,mosty_qwgl.tb_qw_jl d where c.id = d.ywid and
|
||||
c.xt_sjzt = '1' and c.xt_scbz = '0' and d.xt_sjzt = '1' and d.xt_scbz = '0' and
|
||||
(c.fzr_sfzh = #{sfzh} or d.sfzh = #{sfzh}))
|
||||
end
|
||||
<if test="dto.grrwzt != null and dto.grrwzt != ''">
|
||||
and b.rwzt = #{dto.grrwzt}
|
||||
</if>
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="getCount" resultType="java.lang.Integer">
|
||||
select count(1) from tb_rw_task a where a.xt_scbz = '0' and a.xt_sjzt = '1'
|
||||
<if test="rwjxzt != null and rwjxzt != ''">
|
||||
and a.rwjxzt = #{rwjxzt}
|
||||
</if>
|
||||
<if test="time != null">
|
||||
and DATE_FORMAT(a.rwfqsj,'%Y-%m-%d')
|
||||
between DATE_FORMAT(#{time},'%Y-%m-%d')
|
||||
and DATE_FORMAT(now(),'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="sfzh != null and sfzh != ''">
|
||||
and a.id in (
|
||||
select rwid from tb_rw_task_user b where b.jsrsfzh = #{sfzh}
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getTaskByDept" resultType="Map">
|
||||
select ssbmdm, ssbm, count(ssbmdm) as count
|
||||
from tb_rw_task_user a
|
||||
where a.xt_scbz = '0'
|
||||
and a.xt_sjzt = '1'
|
||||
and a.ssbmdm is not null
|
||||
group by ssbmdm, ssbm
|
||||
order by count(ssbmdm) desc;
|
||||
</select>
|
||||
|
||||
<select id="getCountByDept" resultType="Integer">
|
||||
select count(1) from tb_rw_task_user b where b.xt_scbz = '0' and b.xt_sjzt = '1'
|
||||
and ssbmdm = #{ssbmdm}
|
||||
<if test='type == "1"'>
|
||||
and rwzt = '2'
|
||||
</if>
|
||||
<if test='type == "2"'>
|
||||
and rwzt != '2'
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="myRwCount" resultType="Map">
|
||||
select count(1) count, rwxl
|
||||
from tb_rw_task_user b
|
||||
where b.xt_scbz = '0'
|
||||
and b.xt_sjzt = '1'
|
||||
and case
|
||||
when b.rwjsdx = '01' then b.jsrsfzh = #{sfzh}
|
||||
|
||||
when b.rwjsdx = '02' then b.jsbmdm = #{ssbmid}
|
||||
|
||||
when b.rwjsdx = '03' then
|
||||
b.jsxzid in (select c.id
|
||||
from mosty_qwgl.tb_qw_xfbb c,
|
||||
mosty_qwgl.tb_qw_jl d
|
||||
where c.id = d.ywid
|
||||
and c.xt_sjzt = '1'
|
||||
and c.xt_scbz = '0'
|
||||
and d.xt_sjzt = '1'
|
||||
and d.xt_scbz = '0'
|
||||
and (c.fzr_sfzh = #{sfzh} or d.sfzh = #{sfzh}))
|
||||
end
|
||||
group by rwxl
|
||||
</select>
|
||||
|
||||
<select id="rwCountByState" resultType="java.util.Map">
|
||||
select count(1) count, rwjxzt from tb_rw_task a where a.xt_scbz = '0' and a.xt_sjzt = '1'
|
||||
<if test="dto.kssj != null and dto.jssj != null and dto.kssj != '' and dto.jssj != ''">
|
||||
and a.rwfqsj > #{dto.kssj}
|
||||
and a.rwfqsj < #{dto.jssj}
|
||||
</if>
|
||||
<if test="dto.rwnr != null and dto.rwnr != ''">
|
||||
and a.rwnr like concat('%',#{dto.rwnr},'%')
|
||||
</if>
|
||||
<if test="rwxlList != null and rwxlList.size() != 0">
|
||||
and a.rwxl in
|
||||
<foreach collection="rwxlList" open="(" separator="," close=")" item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="rwjsdxList != null and rwjsdxList.size() != 0">
|
||||
and a.rwjsdx in
|
||||
<foreach collection="rwjsdxList" open="(" separator="," close=")" item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.rwzt != null and dto.rwzt != ''">
|
||||
and a.rwzt = #{dto.rwzt}
|
||||
</if>
|
||||
group by rwjxzt
|
||||
</select>
|
||||
|
||||
<select id="getYclTask" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from tb_rw_task_user_all b
|
||||
where b.xt_scbz = '0'
|
||||
and b.xt_sjzt = '1'
|
||||
and case
|
||||
when b.rwjsdx = '01' then b.jsrsfzh = #{sfzh}
|
||||
|
||||
when b.rwjsdx = '02' then b.jsbmdm = #{ssbmid}
|
||||
|
||||
when b.rwjsdx = '03' then
|
||||
b.jsxzid in (select c.id
|
||||
from mosty_qwgl.tb_qw_xfbb c,
|
||||
mosty_qwgl.tb_qw_jl d
|
||||
where c.id = d.ywid
|
||||
and c.xt_sjzt = '1'
|
||||
and c.xt_scbz = '0'
|
||||
and d.xt_sjzt = '1'
|
||||
and d.xt_scbz = '0'
|
||||
and (c.fzr_sfzh = #{sfzh} or d.sfzh = #{sfzh}))
|
||||
end
|
||||
and (grrwzt = '2' or rwjxzt = '3' or rwjxzt = '4')
|
||||
</select>
|
||||
|
||||
<select id="getMyRwListYwc" resultType="com.mosty.base.model.entity.rwzx.TbRwTaskUserAll">
|
||||
select * from tb_rw_task_user_all a where a.xt_scbz = '0' and a.xt_sjzt = '1'
|
||||
<if test="dto.kssj != null and dto.jssj != null and dto.kssj != '' and dto.jssj != ''">
|
||||
and a.rwfqsj > #{kssj}
|
||||
and a.rwfqsj < #{jssj}
|
||||
</if>
|
||||
<if test="dto.rwxl != null and dto.rwxl != ''">
|
||||
and a.rwxl = #{dto.rwxl}
|
||||
</if>
|
||||
<if test="dto.rwmc != null and dto.rwmc != ''">
|
||||
and a.rwmc like concat('%',#{dto.rwmc},'%')
|
||||
</if>
|
||||
<if test="dto.rwnr != null and dto.rwnr != ''">
|
||||
and a.rwnr like concat('%',#{dto.rwnr},'%')
|
||||
</if>
|
||||
<if test="dto.rwlx != null and dto.rwlx != ''">
|
||||
and a.rwlx = #{dto.rwlx}
|
||||
</if>
|
||||
<if test="dto.rwjjcd != null and dto.rwjjcd != ''">
|
||||
and a.rwjjcd = #{dto.rwjjcd}
|
||||
</if>
|
||||
<if test="dto.rwzt != null and dto.rwzt != ''">
|
||||
and a.rwzt = #{dto.rwzt}
|
||||
</if>
|
||||
and case
|
||||
when a.rwjsdx = '01' then a.jsrsfzh = #{sfzh}
|
||||
|
||||
when a.rwjsdx = '02' then a.jsbmdm = #{ssbmid}
|
||||
|
||||
when a.rwjsdx = '03' then
|
||||
a.jsxzid in (select c.id from mosty_qwgl.tb_qw_xfbb c,mosty_qwgl.tb_qw_jl d where c.id = d.ywid and
|
||||
c.xt_sjzt = '1' and c.xt_scbz = '0' and d.xt_sjzt = '1' and d.xt_scbz = '0' and
|
||||
(c.fzr_sfzh = #{sfzh} or d.sfzh = #{sfzh}))
|
||||
end
|
||||
and (grrwzt = '2' or rwjxzt = '3' or rwjxzt = '4')
|
||||
order by a.rwfqsj desc
|
||||
limit #{pageIndex},#{pageSize}
|
||||
</select>
|
||||
|
||||
<select id="getMyRwCountYwc" resultType="integer">
|
||||
select count(1) from tb_rw_task_user_all a where a.xt_scbz = '0' and a.xt_sjzt = '1'
|
||||
<if test="dto.kssj != null and dto.jssj != null and dto.kssj != '' and dto.jssj != ''">
|
||||
and a.rwfqsj > #{kssj}
|
||||
and a.rwfqsj < #{jssj}
|
||||
</if>
|
||||
<if test="dto.rwxl != null and dto.rwxl != ''">
|
||||
and a.rwxl = #{dto.rwxl}
|
||||
</if>
|
||||
<if test="dto.rwmc != null and dto.rwmc != ''">
|
||||
and a.rwmc like concat('%',#{dto.rwmc},'%')
|
||||
</if>
|
||||
<if test="dto.rwnr != null and dto.rwnr != ''">
|
||||
and a.rwnr like concat('%',#{dto.rwnr},'%')
|
||||
</if>
|
||||
<if test="dto.rwlx != null and dto.rwlx != ''">
|
||||
and a.rwlx = #{dto.rwlx}
|
||||
</if>
|
||||
<if test="dto.rwjjcd != null and dto.rwjjcd != ''">
|
||||
and a.rwjjcd = #{dto.rwjjcd}
|
||||
</if>
|
||||
<if test="dto.rwzt != null and dto.rwzt != ''">
|
||||
and a.rwzt = #{dto.rwzt}
|
||||
</if>
|
||||
and case
|
||||
when a.rwjsdx = '01' then a.jsrsfzh = #{sfzh}
|
||||
|
||||
when a.rwjsdx = '02' then a.jsbmdm = #{ssbmid}
|
||||
|
||||
when a.rwjsdx = '03' then
|
||||
a.jsxzid in (select c.id from mosty_qwgl.tb_qw_xfbb c,mosty_qwgl.tb_qw_jl d where c.id = d.ywid and
|
||||
c.xt_sjzt = '1' and c.xt_scbz = '0' and d.xt_sjzt = '1' and d.xt_scbz = '0' and
|
||||
(c.fzr_sfzh = #{sfzh} or d.sfzh = #{sfzh}))
|
||||
end
|
||||
and (grrwzt = '2' or rwjxzt = '3' or rwjxzt = '4')
|
||||
</select>
|
||||
|
||||
<select id="checkHasNewTask" resultType="int">
|
||||
select count(1)
|
||||
from tb_rw_task_user b
|
||||
where b.xt_scbz = '0'
|
||||
and b.xt_sjzt = '1'
|
||||
and case
|
||||
when b.rwjsdx = '01' then b.jsrsfzh = #{sfzh}
|
||||
|
||||
when b.rwjsdx = '02' then b.jsbmdm = #{ssbmid}
|
||||
|
||||
when b.rwjsdx = '03' then
|
||||
b.jsxzid in (select c.id
|
||||
from mosty_qwgl.tb_qw_xfbb c,
|
||||
mosty_qwgl.tb_qw_jl d
|
||||
where c.id = d.ywid
|
||||
and c.xt_sjzt = '1'
|
||||
and c.xt_scbz = '0'
|
||||
and d.xt_sjzt = '1'
|
||||
and d.xt_scbz = '0'
|
||||
and (c.fzr_sfzh = #{sfzh} or d.sfzh = #{sfzh}))
|
||||
end
|
||||
and date_format(rwfqsj, '%Y-%m-%d %H:%i:%s') >= #{time}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,29 @@
|
||||
<?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.mosty.rwzx.mapper.TbRwTaskUserAllMapper">
|
||||
|
||||
<select id="selectByRwId" resultType="com.mosty.base.model.entity.rwzx.TbRwTaskUserAll">
|
||||
select *
|
||||
from tb_rw_task_user_all a
|
||||
where a.xt_scbz = '0'
|
||||
and a.xt_sjzt = '1'
|
||||
and a.rwid = #{rwid}
|
||||
and case
|
||||
when a.rwjsdx = '01' then a.jsrsfzh = #{sfzh}
|
||||
|
||||
when a.rwjsdx = '03' then
|
||||
a.jsxzid in (select c.id
|
||||
from mosty_qwgl.tb_qw_xfbb c,
|
||||
mosty_qwgl.tb_qw_jl d
|
||||
where c.id = d.ywid
|
||||
and c.xt_sjzt = '1'
|
||||
and c.xt_scbz = '0'
|
||||
and d.xt_sjzt = '1'
|
||||
and d.xt_scbz = '0'
|
||||
and (c.fzr_sfzh = #{sfzh} or d.sfzh = #{sfzh}))
|
||||
|
||||
when a.rwjsdx = '02' then
|
||||
a.jsbmdm = #{ssbmid}
|
||||
end
|
||||
</select>
|
||||
</mapper>
|
34
mosty-rwzx/src/main/resources/mapper/TbRwTaskUserMapper.xml
Normal file
34
mosty-rwzx/src/main/resources/mapper/TbRwTaskUserMapper.xml
Normal file
@ -0,0 +1,34 @@
|
||||
<?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.mosty.rwzx.mapper.TbRwTaskUserMapper">
|
||||
<select id="selectByRwId" resultType="com.mosty.base.model.entity.rwzx.TbRwTaskUser">
|
||||
select *
|
||||
from tb_rw_task_user a
|
||||
where a.xt_scbz = '0'
|
||||
and a.xt_sjzt = '1'
|
||||
and a.rwid = #{rwid}
|
||||
and case
|
||||
when a.rwjsdx = '01' then a.jsrsfzh = #{sfzh}
|
||||
|
||||
when a.rwjsdx = '03' then
|
||||
a.jsxzid in (select c.id
|
||||
from mosty_qwgl.tb_qw_xfbb c,
|
||||
mosty_qwgl.tb_qw_jl d
|
||||
where c.id = d.ywid
|
||||
and c.xt_sjzt = '1'
|
||||
and c.xt_scbz = '0'
|
||||
and d.xt_sjzt = '1'
|
||||
and d.xt_scbz = '0'
|
||||
and (c.fzr_sfzh = #{sfzh} or d.sfzh = #{sfzh}))
|
||||
|
||||
when a.rwjsdx = '02' then
|
||||
a.jsbmdm = #{ssbmid}
|
||||
end
|
||||
</select>
|
||||
|
||||
<delete id="deleteEntity">
|
||||
delete
|
||||
from tb_rw_task_user
|
||||
where id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
16
mosty-rwzx/src/main/resources/rebel.xml
Normal file
16
mosty-rwzx/src/main/resources/rebel.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>mosty-rwzx</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="E:/project/rs/mosty-dyga-cloud/mosty-rwzx/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
Reference in New Issue
Block a user