Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
c17d2b80
Commit
c17d2b80
authored
Sep 01, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into chenhao
parents
750fe7d2
3fa2ff39
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
183 additions
and
257 deletions
+183
-257
AircraftDto.java
...com/yeejoin/amos/boot/module/jcs/api/dto/AircraftDto.java
+6
-5
FireChemicalServiceImpl.java
...dule/common/biz/service/impl/FireChemicalServiceImpl.java
+3
-0
PlanTaskController.java
...n/amos/patrol/business/controller/PlanTaskController.java
+0
-0
PlanTaskMapper.java
...ejoin/amos/patrol/business/dao/mapper/PlanTaskMapper.java
+7
-1
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+0
-0
IPlanTaskService.java
.../amos/patrol/business/service/intfc/IPlanTaskService.java
+1
-1
PlanTaskPageParamUtil.java
...join/amos/patrol/business/util/PlanTaskPageParamUtil.java
+69
-73
application.properties
...tem-maintenance/src/main/resources/application.properties
+2
-0
PatrolApplication.java
...rol/src/main/java/com/yeejoin/amos/PatrolApplication.java
+39
-39
dbTemplate_plan_task.xml
...rol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+56
-138
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/AircraftDto.java
View file @
c17d2b80
...
@@ -149,26 +149,27 @@ public class AircraftDto extends BaseDto {
...
@@ -149,26 +149,27 @@ public class AircraftDto extends BaseDto {
@ApiModelProperty
(
value
=
"备注"
)
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
private
String
remark
;
@Excel
Property
(
value
=
"外观图"
,
index
=
28
)
@Excel
Ignore
// BUG2676 隐藏导出多余图片字段 by kongfm
@ApiModelProperty
(
value
=
"外观图"
)
@ApiModelProperty
(
value
=
"外观图"
)
private
String
appearanceImages
;
private
String
appearanceImages
;
@Excel
Property
(
value
=
"平面图"
,
index
=
29
)
@Excel
Ignore
// BUG2676 隐藏导出多余图片字段 by kongfm
@ApiModelProperty
(
value
=
"平面图"
)
@ApiModelProperty
(
value
=
"平面图"
)
private
String
planeImages
;
private
String
planeImages
;
@Excel
Property
(
value
=
"救援图"
,
index
=
30
)
@Excel
Ignore
// BUG2676 隐藏导出多余图片字段 by kongfm
@ApiModelProperty
(
value
=
"救援图"
)
@ApiModelProperty
(
value
=
"救援图"
)
private
String
rescueImages
;
private
String
rescueImages
;
@Excel
Property
(
value
=
"方位图"
,
index
=
31
)
@Excel
Ignore
// BUG2676 隐藏导出多余图片字段 by kongfm
@ApiModelProperty
(
value
=
"方位图"
)
@ApiModelProperty
(
value
=
"方位图"
)
private
String
positionImages
;
private
String
positionImages
;
@Excel
Property
(
value
=
"三维模型"
,
index
=
32
)
@Excel
Ignore
// BUG2676 隐藏导出多余图片字段 by kongfm
@ApiModelProperty
(
value
=
"三维模型"
)
@ApiModelProperty
(
value
=
"三维模型"
)
private
String
models
;
private
String
models
;
@ExcelIgnore
// BUG2676 隐藏导出多余图片字段 by kongfm
@ApiModelProperty
(
value
=
"现场图片"
)
@ApiModelProperty
(
value
=
"现场图片"
)
private
List
<
String
>
scenePicture
;
private
List
<
String
>
scenePicture
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FireChemicalServiceImpl.java
View file @
c17d2b80
...
@@ -30,6 +30,9 @@ public class FireChemicalServiceImpl extends BaseService<FireChemicalDto,FireChe
...
@@ -30,6 +30,9 @@ public class FireChemicalServiceImpl extends BaseService<FireChemicalDto,FireChe
*/
*/
@Override
@Override
public
Page
<
FireChemicalDto
>
queryForFireChemicalPage
(
Page
<
FireChemicalDto
>
page
,
@Condition
(
Operator
.
like
)
String
casNo
,
@Condition
(
Operator
.
like
)
String
formula
,
@Condition
(
Operator
.
like
)
String
name
,
String
typeCode
,
boolean
isDelete
)
{
public
Page
<
FireChemicalDto
>
queryForFireChemicalPage
(
Page
<
FireChemicalDto
>
page
,
@Condition
(
Operator
.
like
)
String
casNo
,
@Condition
(
Operator
.
like
)
String
formula
,
@Condition
(
Operator
.
like
)
String
name
,
String
typeCode
,
boolean
isDelete
)
{
if
(
typeCode
.
equals
(
"-1"
))
{
// bug 2673 选择 -1 时候没有查出所有危化品处理 by kongfm
typeCode
=
null
;
}
return
this
.
queryForPage
(
page
,
""
,
false
,
casNo
,
formula
,
name
,
typeCode
,
isDelete
);
return
this
.
queryForPage
(
page
,
""
,
false
,
casNo
,
formula
,
name
,
typeCode
,
isDelete
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PlanTaskController.java
View file @
c17d2b80
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/PlanTaskMapper.java
View file @
c17d2b80
...
@@ -69,7 +69,7 @@ public interface PlanTaskMapper extends BaseMapper {
...
@@ -69,7 +69,7 @@ public interface PlanTaskMapper extends BaseMapper {
* @param params
* @param params
* @return
* @return
*/
*/
List
<
Hash
Map
<
String
,
Object
>>
getPlanTasks
(
HashMap
<
String
,
Object
>
params
);
List
<
Map
<
String
,
Object
>>
getPlanTasks
(
HashMap
<
String
,
Object
>
params
);
/**
/**
* 通过计划任务Id获得计划任务信息
* 通过计划任务Id获得计划任务信息
* @param planTaskId
* @param planTaskId
...
@@ -121,6 +121,12 @@ public interface PlanTaskMapper extends BaseMapper {
...
@@ -121,6 +121,12 @@ public interface PlanTaskMapper extends BaseMapper {
* @return
* @return
*/
*/
List
<
CheckChkExListBo
>
getChkExList
(
CheckPtListPageParam
param
);
List
<
CheckChkExListBo
>
getChkExList
(
CheckPtListPageParam
param
);
/**
* 任务分页查询数量
* @param params 参数
* @return long
*/
long
getPlanTasksCount
(
HashMap
<
String
,
Object
>
params
);
long
getPlanTasksCount
(
HashMap
<
String
,
Object
>
params
);
Map
<
String
,
Object
>
getPlanTaskStatisticsForApp
(
HashMap
<
String
,
Object
>
params
);
Map
<
String
,
Object
>
getPlanTaskStatisticsForApp
(
HashMap
<
String
,
Object
>
params
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanTaskServiceImpl.java
View file @
c17d2b80
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IPlanTaskService.java
View file @
c17d2b80
...
@@ -79,7 +79,7 @@ public interface IPlanTaskService {
...
@@ -79,7 +79,7 @@ public interface IPlanTaskService {
* @param params
* @param params
* @return
* @return
*/
*/
Page
<
Hash
Map
<
String
,
Object
>>
getPlanTasks
(
String
toke
,
String
product
,
String
appKey
,
HashMap
<
String
,
Object
>
params
);
Page
<
Map
<
String
,
Object
>>
getPlanTasks
(
String
toke
,
String
product
,
String
appKey
,
HashMap
<
String
,
Object
>
params
);
/**
/**
* 根据计划任务Id获取计划任务信息
* 根据计划任务Id获取计划任务信息
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/util/PlanTaskPageParamUtil.java
View file @
c17d2b80
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
util
;
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
util
;
import
java.util.HashMap
;
import
java.util.List
;
import
org.springframework.util.ObjectUtils
;
import
com.yeejoin.amos.patrol.business.param.PlanTaskPageParam
;
import
com.yeejoin.amos.patrol.business.param.PlanTaskPageParam
;
import
com.yeejoin.amos.patrol.core.common.request.CommonPageable
;
import
com.yeejoin.amos.patrol.core.common.request.CommonPageable
;
import
com.yeejoin.amos.patrol.core.common.request.CommonRequest
;
import
com.yeejoin.amos.patrol.core.common.request.CommonRequest
;
import
com.yeejoin.amos.patrol.core.enums.QueryOperatorEnum
;
import
com.yeejoin.amos.patrol.core.enums.QueryOperatorEnum
;
import
org.springframework.util.ObjectUtils
;
import
java.util.HashMap
;
import
java.util.List
;
public
class
PlanTaskPageParamUtil
{
public
class
PlanTaskPageParamUtil
{
public
static
PlanTaskPageParam
fillChkInfoParam
(
List
<
CommonRequest
>
queryRequests
,
CommonPageable
commonPageable
,
public
static
PlanTaskPageParam
fillChkInfoParam
(
List
<
CommonRequest
>
queryRequests
,
CommonPageable
commonPageable
,
PlanTaskPageParam
param
,
HashMap
<
String
,
Object
>
paramMap
)
{
PlanTaskPageParam
param
,
HashMap
<
String
,
Object
>
paramMap
)
{
for
(
int
i
=
0
;
i
<
queryRequests
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
queryRequests
.
size
();
i
++)
{
String
name
=
queryRequests
.
get
(
i
).
getName
();
String
name
=
queryRequests
.
get
(
i
).
getName
();
if
(
"pointNo"
.
equals
(
name
))
{
if
(
"pointNo"
.
equals
(
name
))
{
param
.
setPointNo
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
setPointNo
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"pointName"
.
equals
(
name
))
{
}
else
if
(
"pointName"
.
equals
(
name
))
{
param
.
setPointName
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
setPointName
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"beginDate"
.
equals
(
name
))
{
}
else
if
(
"beginDate"
.
equals
(
name
))
{
param
.
setBeginDate
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
setBeginDate
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"endDate"
.
equals
(
name
))
{
}
else
if
(
"endDate"
.
equals
(
name
))
{
param
.
setEndDate
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
setEndDate
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"status"
.
equals
(
name
))
{
}
else
if
(
"status"
.
equals
(
name
))
{
param
.
setStatus
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
setStatus
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"planId"
.
equals
(
name
))
{
}
else
if
(
"planId"
.
equals
(
name
))
{
param
.
setPlanId
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
setPlanId
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"routeId"
.
equals
(
name
))
{
}
else
if
(
"routeId"
.
equals
(
name
))
{
param
.
setRouteId
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
setRouteId
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
}
}
}
param
.
setOrgCode
(
paramMap
.
get
(
"orgCode"
)
==
null
?
null
:
paramMap
.
get
(
"orgCode"
).
toString
());
param
.
setOrgCode
(
paramMap
.
get
(
"orgCode"
)
==
null
?
null
:
paramMap
.
get
(
"orgCode"
).
toString
());
param
.
setUserId
(
paramMap
.
get
(
"userId"
)
==
null
?
null
:
paramMap
.
get
(
"userId"
).
toString
());
param
.
setUserId
(
paramMap
.
get
(
"userId"
)
==
null
?
null
:
paramMap
.
get
(
"userId"
).
toString
());
if
(!
ObjectUtils
.
isEmpty
(
commonPageable
))
{
if
(!
ObjectUtils
.
isEmpty
(
commonPageable
))
{
param
.
setPageNumber
(
commonPageable
.
getPageNumber
());
param
.
setPageNumber
(
commonPageable
.
getPageNumber
());
param
.
setPageSize
(
commonPageable
.
getPageSize
());
param
.
setPageSize
(
commonPageable
.
getPageSize
());
}
}
return
param
;
return
param
;
}
}
private
static
String
toString
(
Object
value
)
{
private
static
String
toString
(
Object
value
)
{
if
(
null
==
value
||
value
==
""
)
{
if
(
null
==
value
||
value
==
""
)
{
return
null
;
return
null
;
}
else
{
}
else
{
return
value
.
toString
();
return
value
.
toString
();
}
}
}
}
public
static
HashMap
<
String
,
Object
>
fillPlanTask
(
List
<
CommonRequest
>
queryRequests
,
public
static
void
fillPlanTask
(
List
<
CommonRequest
>
queryRequests
,
HashMap
<
String
,
Object
>
params
)
{
HashMap
<
String
,
Object
>
params
)
{
if
(
ObjectUtils
.
isEmpty
(
queryRequests
))
{
if
(
ObjectUtils
.
isEmpty
(
queryRequests
))
{
return
params
;
return
;
}
}
String
order
=
""
;
StringBuilder
order
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
queryRequests
.
size
();
i
++){
for
(
CommonRequest
queryRequest
:
queryRequests
)
{
String
name
=
queryRequests
.
get
(
i
).
getName
();
String
name
=
queryRequest
.
getName
();
String
type
=
queryRequests
.
get
(
i
).
getType
();
String
type
=
queryRequest
.
getType
();
if
(
type
!=
null
&&
type
!=
""
){
if
(
type
!=
null
&&
!
""
.
equals
(
type
))
{
if
(!
QueryOperatorEnum
.
ORDER_BY
.
getName
().
equals
(
type
))
{
if
(!
QueryOperatorEnum
.
ORDER_BY
.
getName
().
equals
(
type
))
{
params
.
put
(
name
,
queryRequests
.
get
(
i
).
getValue
());
params
.
put
(
name
,
queryRequest
.
getValue
());
}
else
if
(
QueryOperatorEnum
.
ORDER_BY
.
getName
().
equals
(
type
))
{
}
else
{
order
+=
name
+
" "
+
queryRequests
.
get
(
i
).
getValue
();
order
.
append
(
name
).
append
(
" "
).
append
(
queryRequest
.
getValue
());
}
}
}
else
{
}
else
{
if
(
name
.
equals
(
"orderBy"
)
&&
queryRequests
.
get
(
i
).
getValue
()!=
null
){
if
(
"orderBy"
.
equals
(
name
)
&&
queryRequest
.
getValue
()
!=
null
)
{
order
+=
queryRequests
.
get
(
i
).
getValue
();
order
.
append
(
queryRequest
.
getValue
());
}
}
params
.
put
(
name
,
queryRequests
.
get
(
i
).
getValue
());
params
.
put
(
name
,
queryRequest
.
getValue
());
}
}
}
if
(!
ObjectUtils
.
isEmpty
(
order
.
toString
()))
{
}
params
.
put
(
"orderBy"
,
order
.
toString
());
if
(!
ObjectUtils
.
isEmpty
(
order
))
{
}
else
{
params
.
put
(
"orderBy"
,
order
);
params
.
put
(
"orderBy"
,
"beginTime ASC"
);
}
else
{
}
params
.
put
(
"orderBy"
,
"beginTime ASC"
);
}
}
return
params
;
}
}
}
amos-boot-system-maintenance/src/main/resources/application.properties
View file @
c17d2b80
...
@@ -26,6 +26,8 @@ mybatis.mapper-locations = classpath:db/mapper/*.xml
...
@@ -26,6 +26,8 @@ mybatis.mapper-locations = classpath:db/mapper/*.xml
mybatis-plus.mapper-locations
=
classpath:db/mapper/*.xml
mybatis-plus.mapper-locations
=
classpath:db/mapper/*.xml
mybatis.type-aliases-package
=
com.yeejoin.amos.maintenance.business.entity.mybatis
mybatis.type-aliases-package
=
com.yeejoin.amos.maintenance.business.entity.mybatis
mybatis.configuration.mapUnderscoreToCamelCase
=
true
mybatis.configuration.mapUnderscoreToCamelCase
=
true
#null值也返回
mybatis-plus.configuration.call-setters-on-nulls
=
true
spring.liquibase.changeLog
=
classpath:db/changelog/changelog-master.xml
spring.liquibase.changeLog
=
classpath:db/changelog/changelog-master.xml
spring.liquibase.enabled
=
true
spring.liquibase.enabled
=
true
...
...
amos-boot-system-patrol/src/main/java/com/yeejoin/amos/PatrolApplication.java
View file @
c17d2b80
package
com
.
yeejoin
.
amos
;
package
com
.
yeejoin
.
amos
;
import
java.io.IOException
;
import
java.net.InetAddress
;
import
java.net.URISyntaxException
;
import
java.net.UnknownHostException
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -19,15 +14,21 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
...
@@ -19,15 +14,21 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.FilterType
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
org.typroject.tyboot.core.restful.config.JsonSerializerManage
;
import
org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler
;
import
org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler
;
import
java.io.IOException
;
import
java.net.InetAddress
;
import
java.net.URISyntaxException
;
import
java.net.UnknownHostException
;
/**
/**
*
* <pre>
* <pre>
* 服务启动类
* 服务启动类
* </pre>
* </pre>
...
@@ -44,42 +45,40 @@ import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
...
@@ -44,42 +45,40 @@ import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
@EnableFeignClients
@EnableFeignClients
@EnableAsync
@EnableAsync
@EnableEurekaClient
@EnableEurekaClient
@ComponentScan
({
"org.typroject"
,
"com.yeejoin.amos"
})
@ComponentScan
(
value
=
{
"org.typroject"
,
"com.yeejoin.amos"
},
excludeFilters
=
{
@MapperScan
(
basePackages
=
{
"com.yeejoin.amos.patrol.business.dao.mapper"
,
"org.typroject.tyboot.core.auth.face.orm.dao"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
})
@ComponentScan
.
Filter
(
type
=
FilterType
.
ASSIGNABLE_TYPE
,
classes
=
{
JsonSerializerManage
.
class
})})
public
class
PatrolApplication
@MapperScan
(
basePackages
=
{
"com.yeejoin.amos.patrol.business.dao.mapper"
,
"org.typroject.tyboot.core.auth.face.orm.dao"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
})
{
public
class
PatrolApplication
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
PatrolApplication
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
PatrolApplication
.
class
);
@Bean
@Bean
@LoadBalanced
@LoadBalanced
RestTemplate
initRestTemplate
()
{
RestTemplate
initRestTemplate
()
{
return
new
RestTemplate
();
return
new
RestTemplate
();
}
}
/**
/**
* 启动amosop-server
* 启动amosop-server
*
*
* @param args
* @param args
* @throws IOException
* @throws IOException
* @throws URISyntaxException
* @throws URISyntaxException
*/
*/
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
{
logger
.
info
(
"start Service.........."
);
logger
.
info
(
"start Service.........."
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
PatrolApplication
.
class
,
args
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
PatrolApplication
.
class
,
args
);
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
Environment
env
=
context
.
getEnvironment
();
Environment
env
=
context
.
getEnvironment
();
String
ip
=
InetAddress
.
getLocalHost
().
getHostAddress
();
String
ip
=
InetAddress
.
getLocalHost
().
getHostAddress
();
String
port
=
env
.
getProperty
(
"server.port"
);
String
port
=
env
.
getProperty
(
"server.port"
);
String
path
=
env
.
getProperty
(
"server.servlet.context-path"
);
String
path
=
env
.
getProperty
(
"server.servlet.context-path"
);
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
logger
.
info
(
"\n----------------------------------------------------------\n\t"
+
logger
.
info
(
"\n----------------------------------------------------------\n\t"
+
"Application Amos-Biz-Boot is running! Access URLs:\n\t"
+
"Application Amos-Biz-Boot is running! Access URLs:\n\t"
+
"Swagger文档: \thttp://"
+
ip
+
":"
+
port
+
path
+
"/doc.html\n"
+
"Swagger文档: \thttp://"
+
ip
+
":"
+
port
+
path
+
"/doc.html\n"
+
"----------------------------------------------------------"
);
"----------------------------------------------------------"
);
}
}
}
}
\ No newline at end of file
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
c17d2b80
...
@@ -168,7 +168,6 @@
...
@@ -168,7 +168,6 @@
and SYSDATE()
<![CDATA[>=]]>
pt.begin_time
and SYSDATE()
<![CDATA[>=]]>
pt.begin_time
and SYSDATE()
<![CDATA[<]]>
pt.end_time
and SYSDATE()
<![CDATA[<]]>
pt.end_time
</select>
</select>
<select
id=
"getPlanTasks"
resultType=
"Map"
>
<select
id=
"getPlanTasks"
resultType=
"Map"
>
SELECT
SELECT
a.planTaskId,
a.planTaskId,
...
@@ -185,7 +184,6 @@
...
@@ -185,7 +184,6 @@
a.userId executiveName,
a.userId executiveName,
a.userName,
a.userName,
a.userDept
a.userDept
<!-- (SELECT GROUP_CONCAT(`name`) FROM s_user where find_in_set(id,a.userId)>0 ORDER BY `id`) AS executiveName -->
FROM
FROM
(
(
SELECT
SELECT
...
@@ -202,7 +200,6 @@
...
@@ -202,7 +200,6 @@
pt.end_time,
pt.end_time,
'%Y-%m-%d %H:%i:%s'
'%Y-%m-%d %H:%i:%s'
) endTime,
) endTime,
date_format(
date_format(
pt.check_date,
pt.check_date,
'%Y-%m-%d %H:%i:%s'
'%Y-%m-%d %H:%i:%s'
...
@@ -219,79 +216,10 @@
...
@@ -219,79 +216,10 @@
p_plan_task pt
p_plan_task pt
INNER JOIN p_plan p ON pt.plan_id = p.id
INNER JOIN p_plan p ON pt.plan_id = p.id
) a
) a
<where>
<include
refid=
"plan-task-app-where"
/>
<if
test=
"userId != null and userId > 0 "
>
and find_in_set(#{userId},a.userId)>0
</if>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
<if
test=
"routeId != null and userId > 0 "
>
and a.route_id = #{routeId}
</if>
<if
test=
"checkDate != null and checkDate != '' "
>
and a.beginTime
<![CDATA[<=]]>
#{checkDate} and a.endTime
<![CDATA[>=]]>
#{checkDate}
</if>
<if
test=
"finishStatus != null"
>
and a.finishStatus = #{finishStatus}
</if>
<if
test=
"orgCode != null and orgCode !=''"
>
and (a.OrgCode LIKE CONCAT( #{orgCode}, '-%' ) or a.OrgCode= #{orgCode} )
</if>
<choose>
<when
test=
"departmentId != null and departmentId != 0 "
>
and a.userDept like concat('%', #{departmentId}, '%')
</when>
<!-- <when test="departmentId == -1 and ids != null">and a.userId in-->
<!-- <foreach item="item" collection="ids" separator="," open="(" close=")" index="index">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </when>-->
</choose>
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
AND (
(
a.beginTime
<![CDATA[>=]]>
#{startTime}
AND a.endTime
<![CDATA[<=]]>
#{endTime}
)
OR (
a.beginTime
<![CDATA[<=]]>
#{endTime}
AND a.endTime
<![CDATA[>=]]>
#{endTime}
)
OR (
a.beginTime
<![CDATA[<=]]>
#{startTime}
AND a.endTime
<![CDATA[>]]>
#{startTime}
)
OR (
a.beginTime
<![CDATA[<=]]>
#{startTime}
AND a.endTime
<![CDATA[>=]]>
#{endTime}
)
)
</if>
<if
test=
"query != null and query != '' "
>
<if
test=
"queryType != null and queryType != 'executiveName' and queryType != 'plan' "
>
AND EXISTS (
SELECT
1
FROM
p_point pp
LEFT JOIN p_route_point rp ON rp.point_id = pp.id
LEFT JOIN p_route r ON r.id = rp.route_id
where a.route_id = r.id
<if
test=
"queryType == null or queryType == '' or queryType == 'all' "
>
AND CONCAT(pp.name, ',',r.name, ',', pp.point_no,a.taskName, ',', a.batchNo) LIKE concat('%', #{query}, '%')
</if>
<if
test=
"queryType != null and queryType == 'route' "
>
AND r.name LIKE concat('%', #{query}, '%')
</if>
<if
test=
"queryType != null and queryType == 'point' "
>
AND CONCAT(pp.name, ',', pp.point_no) LIKE concat('%', #{query}, '%')
</if>
)
</if>
<if
test=
"queryType != null and queryType == 'executiveName' "
>
AND a.userName LIKE concat('%', #{query}, '%')
</if>
<if
test=
"queryType != null and queryType == 'plan' "
>
AND CONCAT(a.taskName, ',', a.batchNo) LIKE concat('%', #{query}, '%')
</if>
</if>
</where>
<if
test=
"orderBy != null and orderBy != '' "
>
order by ${orderBy}
</if>
limit #{offset},#{pageSize}
limit #{offset},#{pageSize}
</select>
</select>
<select
id=
"getPlanTasksCount"
resultType=
"long"
>
<select
id=
"getPlanTasksCount"
resultType=
"long"
>
SELECT
SELECT
count(1) tasksCount
count(1) tasksCount
...
@@ -324,78 +252,68 @@
...
@@ -324,78 +252,68 @@
p_plan_task pt
p_plan_task pt
INNER JOIN p_plan p ON pt.plan_id = p.id
INNER JOIN p_plan p ON pt.plan_id = p.id
) a
) a
<include
refid=
"plan-task-app-where"
/>
</select>
<sql
id=
"plan-task-app-where"
>
<where>
<where>
<if
test=
"userId != null and userId > 0 "
>
and find_in_set(#{userId},a.userId)>0
</if>
<if
test=
"userId != null and userId > 0 "
>
and find_in_set(#{userId},a.userId)>0
</if>
<if
test=
"routeId != null and userId > 0 "
>
and a.route_id = #{routeId}
</if>
<if
test=
"routeId != null and routeId > 0 "
>
and a.route_id = #{routeId}
</if>
<if
test=
"checkDate != null and checkDate != '' "
>
and a.beginTime
<![CDATA[<=]]>
#{checkDate} and a.endTime
<![CDATA[>=]]>
#{checkDate}
</if>
<if
test=
"checkDate != null and checkDate != '' "
>
and a.beginTime
<![CDATA[<=]]>
#{checkDate} and a.endTime
<![CDATA[>=]]>
#{checkDate}
</if>
<if
test=
"finishStatus != null"
>
and a.finishStatus = #{finishStatus}
</if>
<if
test=
"finishStatus != null"
>
and a.finishStatus = #{finishStatus}
</if>
<if
test=
"orgCode != null and orgCode !=''"
>
<if
test=
"orgCode != null and orgCode !=''"
>
and (a.OrgCode LIKE CONCAT( #{orgCode}, '-%' ) or a.OrgCode= #{orgCode} )
and (a.OrgCode LIKE CONCAT( #{orgCode}, '-%' ) or a.OrgCode= #{orgCode} )
</if>
</if>
<choose>
<if
test=
"departmentId != null and departmentId != 0 "
>
and a.userDept like concat('%', #{departmentId}, '%')
</if>
<when
test=
"departmentId != null and departmentId!= 0 "
>
and a.userDept like concat('%', #{departmentId}, '%')
</when>
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
<!-- <when test="departmentId == -1 and ids != null">and a.userId in-->
AND (
<!-- <foreach item="item" collection="ids" separator="," open="(" close=")" index="index">-->
(
<!-- #{item}-->
a.beginTime
<![CDATA[>=]]>
#{startTime}
<!-- </foreach>-->
AND a.endTime
<![CDATA[<=]]>
#{endTime}
<!-- </when>-->
)
</choose>
OR (
a.beginTime
<![CDATA[<=]]>
#{endTime}
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
AND a.endTime
<![CDATA[>=]]>
#{endTime}
AND (
)
(
OR (
a.beginTime
<![CDATA[>=]]>
#{startTime}
a.beginTime
<![CDATA[<=]]>
#{startTime}
AND a.endTime
<![CDATA[<=]]>
#{endTime}
AND a.endTime
<![CDATA[>]]>
#{startTime}
)
)
OR (
OR (
a.beginTime
<![CDATA[<=]]>
#{endTime}
a.beginTime
<![CDATA[<=]]>
#{startTime}
AND a.endTime
<![CDATA[>=]]>
#{endTime}
AND a.endTime
<![CDATA[>=]]>
#{endTime}
)
OR (
a.beginTime
<![CDATA[<=]]>
#{startTime}
AND a.endTime
<![CDATA[>]]>
#{startTime}
)
OR (
a.beginTime
<![CDATA[<=]]>
#{startTime}
AND a.endTime
<![CDATA[>=]]>
#{endTime}
)
)
)
</if>
<if
test=
"query != null and query != '' "
>
<if
test=
"queryType != null and queryType != 'executiveName' and queryType != 'plan' "
>
AND EXISTS (
SELECT
1
FROM
p_point pp
LEFT JOIN p_route_point rp ON rp.point_id = pp.id
LEFT JOIN p_route r ON r.id = rp.route_id
where a.route_id = r.id
<if
test=
"queryType == null or queryType == '' or queryType == 'all' "
>
AND CONCAT(pp.name, ',',r.name, ',', pp.point_no,a.taskName, ',', a.batchNo) LIKE concat('%', #{query}, '%')
</if>
<if
test=
"queryType != null and queryType == 'route' "
>
AND r.name LIKE concat('%', #{query}, '%')
</if>
<if
test=
"queryType != null and queryType == 'point' "
>
AND CONCAT(pp.name, ',', pp.point_no) LIKE concat('%', #{query}, '%')
</if>
)
)
</if>
</if>
<if
test=
"query != null and query != '' "
>
<if
test=
"queryType != null and queryType == 'executiveName' "
>
<if
test=
"queryType != null and queryType != 'executiveName' and queryType != 'plan' "
>
AND EXISTS (
SELECT
1
FROM
p_point pp
LEFT JOIN p_route_point rp ON rp.point_id = pp.id
LEFT JOIN p_route r ON r.id = rp.route_id
where a.route_id = r.id
<if
test=
"queryType == null or queryType == '' or queryType == 'all' "
>
AND CONCAT(pp.name, ',',r.name, ',', pp.point_no,a.taskName, ',', a.batchNo) LIKE concat('%', #{query}, '%')
</if>
<if
test=
"queryType != null and queryType == 'route' "
>
AND r.name LIKE concat('%', #{query}, '%')
</if>
<if
test=
"queryType != null and queryType == 'point' "
>
AND CONCAT(pp.name, ',', pp.point_no) LIKE concat('%', #{query}, '%')
</if>
)
</if>
<if
test=
"queryType != null and queryType == 'executiveName' "
>
AND a.userName LIKE concat('%', #{query}, '%')
AND a.userName LIKE concat('%', #{query}, '%')
</if>
</if>
<if
test=
"queryType != null and queryType == 'plan' "
>
<if
test=
"queryType != null and queryType == 'plan' "
>
AND CONCAT(a.taskName, ',', a.batchNo) LIKE concat('%', #{query}, '%')
AND CONCAT(a.taskName, ',', a.batchNo) LIKE concat('%', #{query}, '%')
</if>
</if>
</if>
</if>
</where>
</where>
</select>
</sql>
<select
id=
"queryPlanTaskById"
resultType=
"Map"
>
<select
id=
"queryPlanTaskById"
resultType=
"Map"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment