Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
e5e55dca
Commit
e5e55dca
authored
Mar 25, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交报告漏洞代码
parent
aa932249
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
611 additions
and
717 deletions
+611
-717
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+3
-3
RiskSituationAction.java
...yeejoin/amos/fas/business/action/RiskSituationAction.java
+4
-3
SimpleTipAction.java
...com/yeejoin/amos/fas/business/action/SimpleTipAction.java
+2
-1
ReflectUtil.java
...om/yeejoin/amos/fas/business/action/util/ReflectUtil.java
+5
-2
BaseController.java
.../yeejoin/amos/fas/business/controller/BaseController.java
+2
-5
FireRectificationController.java
.../fas/business/controller/FireRectificationController.java
+68
-68
FireRectificationMapper.java
...amos/fas/business/dao/mapper/FireRectificationMapper.java
+40
-40
FireRectificationServiceImpl.java
...s/business/service/impl/FireRectificationServiceImpl.java
+232
-232
FireRectificationService.java
.../fas/business/service/intfc/FireRectificationService.java
+46
-46
FileUtils.java
...in/java/com/yeejoin/amos/fas/business/util/FileUtils.java
+0
-154
LogFilter.java
.../src/main/java/com/yeejoin/amos/fas/config/LogFilter.java
+39
-0
AmosThreadPool.java
.../com/yeejoin/amos/fas/core/threadpool/AmosThreadPool.java
+6
-4
FileUtil.java
...rc/main/java/com/yeejoin/amos/fas/core/util/FileUtil.java
+1
-1
ResponseUtils.java
...in/java/com/yeejoin/amos/fas/core/util/ResponseUtils.java
+1
-1
WordConverterUtils.java
...va/com/yeejoin/amos/fas/core/util/WordConverterUtils.java
+3
-0
BaseQuerySpecification.java
...join/amos/fas/core/util/query/BaseQuerySpecification.java
+2
-2
dbTemplate_fire_rectification.xml
...ain/resources/db/mapper/dbTemplate_fire_rectification.xml
+156
-155
logback.xml
YeeAmosFireAutoSysStart/src/main/resources/logback.xml
+1
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
e5e55dca
...
@@ -228,7 +228,7 @@ public class ContingencyAction implements CustomerAction {
...
@@ -228,7 +228,7 @@ public class ContingencyAction implements CustomerAction {
try
{
try
{
constructor
=
Class
.
forName
(
PACKAGEURL
+
result
.
getClass
().
getSimpleName
()
+
"Message"
).
getConstructor
(
ActionResult
.
class
);
constructor
=
Class
.
forName
(
PACKAGEURL
+
result
.
getClass
().
getSimpleName
()
+
"Message"
).
getConstructor
(
ActionResult
.
class
);
AbstractActionResultMessage
<?>
action
=
(
AbstractActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
AbstractActionResultMessage
<?>
action
=
(
AbstractActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
if
(
"mqtt"
.
equals
(
pushType
.
toLowerCase
()))
{
if
(
"mqtt"
.
equals
(
pushType
.
toLowerCase
(
Locale
.
ENGLISH
)))
{
ToipResponse
toipResponse
=
action
.
buildResponse
(
msgType
,
contingency
,
result
.
toJson
());
ToipResponse
toipResponse
=
action
.
buildResponse
(
msgType
,
contingency
,
result
.
toJson
());
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
log
.
info
(
String
.
format
(
"mqtt[%s]:【 %s 】"
,
topic
,
toipResponse
.
toJsonStr
()));
log
.
info
(
String
.
format
(
"mqtt[%s]:【 %s 】"
,
topic
,
toipResponse
.
toJsonStr
()));
...
@@ -252,7 +252,7 @@ public class ContingencyAction implements CustomerAction {
...
@@ -252,7 +252,7 @@ public class ContingencyAction implements CustomerAction {
}
}
}
}
}
else
if
(
"websocket"
.
equals
(
pushType
.
toLowerCase
()))
{
}
else
if
(
"websocket"
.
equals
(
pushType
.
toLowerCase
(
Locale
.
ENGLISH
)))
{
action
.
execute
(
msgType
,
contingency
);
action
.
execute
(
msgType
,
contingency
);
}
}
...
@@ -862,7 +862,7 @@ public class ContingencyAction implements CustomerAction {
...
@@ -862,7 +862,7 @@ public class ContingencyAction implements CustomerAction {
try
{
try
{
constructor
=
Class
.
forName
(
PACKAGEURL
+
result
.
getClass
().
getSimpleName
()
+
"Message"
).
getConstructor
(
ActionResult
.
class
);
constructor
=
Class
.
forName
(
PACKAGEURL
+
result
.
getClass
().
getSimpleName
()
+
"Message"
).
getConstructor
(
ActionResult
.
class
);
AbstractActionResultMessage
<?>
action
=
(
AbstractActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
AbstractActionResultMessage
<?>
action
=
(
AbstractActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
if
(
"mqtt"
.
equals
(
pushType
.
toLowerCase
()))
{
if
(
"mqtt"
.
equals
(
pushType
.
toLowerCase
(
Locale
.
ENGLISH
)))
{
ToipResponse
toipResponse
=
action
.
buildResponse
(
msgType
,
null
,
result
.
toJson
());
ToipResponse
toipResponse
=
action
.
buildResponse
(
msgType
,
null
,
result
.
toJson
());
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
log
.
info
(
String
.
format
(
"mqtt[%s]:【 %s 】"
,
topic
,
toipResponse
.
toJsonStr
()));
log
.
info
(
String
.
format
(
"mqtt[%s]:【 %s 】"
,
topic
,
toipResponse
.
toJsonStr
()));
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/RiskSituationAction.java
View file @
e5e55dca
...
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Component;
...
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Component;
import
java.lang.reflect.Constructor
;
import
java.lang.reflect.Constructor
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Locale
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
*
*
...
@@ -68,7 +69,7 @@ public class RiskSituationAction implements CustomerAction
...
@@ -68,7 +69,7 @@ public class RiskSituationAction implements CustomerAction
.
getConstructor
(
ActionResult
.
class
);
.
getConstructor
(
ActionResult
.
class
);
AbstractActionResultMessage
<?>
action
=
(
AbstractActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
AbstractActionResultMessage
<?>
action
=
(
AbstractActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
String
msgType
=
"bubbleTip"
;
String
msgType
=
"bubbleTip"
;
if
(
"mqtt"
.
equals
(
pushType
.
toLowerCase
()))
{
if
(
"mqtt"
.
equals
(
pushType
.
toLowerCase
(
Locale
.
ENGLISH
)))
{
ToipResponse
toipResponse
=
action
.
buildResponse
(
msgType
,
bizobj
,
result
);
ToipResponse
toipResponse
=
action
.
buildResponse
(
msgType
,
bizobj
,
result
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"rule"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"rule"
);
webMqttComponent
.
publish
(
topic
,
toipResponse
.
toJsonStr
());
webMqttComponent
.
publish
(
topic
,
toipResponse
.
toJsonStr
());
...
@@ -102,7 +103,7 @@ public class RiskSituationAction implements CustomerAction
...
@@ -102,7 +103,7 @@ public class RiskSituationAction implements CustomerAction
.
getConstructor
(
ActionResult
.
class
);
.
getConstructor
(
ActionResult
.
class
);
AbstractActionResultMessage
<?>
action
=
(
AbstractActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
AbstractActionResultMessage
<?>
action
=
(
AbstractActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
String
msgType
=
"changeColor"
;
String
msgType
=
"changeColor"
;
if
(
"mqtt"
.
equals
(
pushType
.
toLowerCase
()))
{
if
(
"mqtt"
.
equals
(
pushType
.
toLowerCase
(
Locale
.
ENGLISH
)))
{
ToipResponse
toipResponse
=
action
.
buildResponse
(
msgType
,
bizobj
,
result
);
ToipResponse
toipResponse
=
action
.
buildResponse
(
msgType
,
bizobj
,
result
);
webMqttComponent
.
publish
(
""
,
toipResponse
.
toJsonStr
());
webMqttComponent
.
publish
(
""
,
toipResponse
.
toJsonStr
());
}
else
{
}
else
{
...
@@ -136,7 +137,7 @@ public class RiskSituationAction implements CustomerAction
...
@@ -136,7 +137,7 @@ public class RiskSituationAction implements CustomerAction
.
getConstructor
(
ActionResult
.
class
);
.
getConstructor
(
ActionResult
.
class
);
AbstractActionResultMessage
<?>
action
=
(
AbstractActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
AbstractActionResultMessage
<?>
action
=
(
AbstractActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
String
msgType
=
"message"
;
String
msgType
=
"message"
;
if
(
"mqtt"
.
equals
(
pushType
.
toLowerCase
()))
{
if
(
"mqtt"
.
equals
(
pushType
.
toLowerCase
(
Locale
.
ENGLISH
)))
{
ToipResponse
toipResponse
=
action
.
buildResponse
(
msgType
,
bizobj
,
result
);
ToipResponse
toipResponse
=
action
.
buildResponse
(
msgType
,
bizobj
,
result
);
webMqttComponent
.
publish
(
""
,
toipResponse
.
toJsonStr
());
webMqttComponent
.
publish
(
""
,
toipResponse
.
toJsonStr
());
}
else
{
}
else
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/SimpleTipAction.java
View file @
e5e55dca
...
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Component;
...
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Component;
import
java.lang.reflect.Constructor
;
import
java.lang.reflect.Constructor
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Locale
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -68,7 +69,7 @@ public class SimpleTipAction implements CustomerAction
...
@@ -68,7 +69,7 @@ public class SimpleTipAction implements CustomerAction
.
getConstructor
(
ActionResult
.
class
);
.
getConstructor
(
ActionResult
.
class
);
AbstractActionResultMessage
<?>
action
=
(
AbstractActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
AbstractActionResultMessage
<?>
action
=
(
AbstractActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
String
msgType
=
"message"
;
String
msgType
=
"message"
;
if
(
"mqtt"
.
equals
(
pushType
.
toLowerCase
()))
{
if
(
"mqtt"
.
equals
(
pushType
.
toLowerCase
(
Locale
.
ENGLISH
)))
{
ToipResponse
toipResponse
=
action
.
buildResponse
(
msgType
,
bizobj
,
result
);
ToipResponse
toipResponse
=
action
.
buildResponse
(
msgType
,
bizobj
,
result
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"rule"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"rule"
);
webMqttComponent
.
publish
(
topic
,
toipResponse
.
toJsonStr
());
webMqttComponent
.
publish
(
topic
,
toipResponse
.
toJsonStr
());
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/util/ReflectUtil.java
View file @
e5e55dca
...
@@ -10,6 +10,7 @@ import java.util.List;
...
@@ -10,6 +10,7 @@ import java.util.List;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.util.ReflectionUtils
;
/**
/**
*
*
...
@@ -70,7 +71,8 @@ public class ReflectUtil
...
@@ -70,7 +71,8 @@ public class ReflectUtil
Field
field
=
clazz
.
getDeclaredField
(
fname
);
// 获取定义的类属性
Field
field
=
clazz
.
getDeclaredField
(
fname
);
// 获取定义的类属性
if
(!
Modifier
.
isPublic
(
field
.
getModifiers
()))
if
(!
Modifier
.
isPublic
(
field
.
getModifiers
()))
{
// 设置非共有类属性权限
{
// 设置非共有类属性权限
field
.
setAccessible
(
true
);
// field.setAccessible(true);
ReflectionUtils
.
makeAccessible
(
field
);
}
}
field
.
set
(
target
,
fvalue
);
// 设置类属性值
field
.
set
(
target
,
fvalue
);
// 设置类属性值
...
@@ -130,7 +132,8 @@ public class ReflectUtil
...
@@ -130,7 +132,8 @@ public class ReflectUtil
Field
field
=
clazz
.
getDeclaredField
(
fname
);
// 获取定义的类属性
Field
field
=
clazz
.
getDeclaredField
(
fname
);
// 获取定义的类属性
if
(!
Modifier
.
isPublic
(
field
.
getModifiers
()))
if
(!
Modifier
.
isPublic
(
field
.
getModifiers
()))
{
// 设置非共有类属性权限
{
// 设置非共有类属性权限
field
.
setAccessible
(
true
);
// field.setAccessible(true);
ReflectionUtils
.
makeAccessible
(
field
);
}
}
return
field
.
get
(
target
);
// 返回类属性值
return
field
.
get
(
target
);
// 返回类属性值
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/BaseController.java
View file @
e5e55dca
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.Cookie
;
import
javax.servlet.http.Cookie
;
...
@@ -269,7 +266,7 @@ public class BaseController {
...
@@ -269,7 +266,7 @@ public class BaseController {
criteria
.
setPropertyName
(
query
.
getName
());
criteria
.
setPropertyName
(
query
.
getName
());
String
column
=
criteria
.
getPropertyName
();
String
column
=
criteria
.
getPropertyName
();
if
(!(
query
.
getValue
()
instanceof
Collection
<?>)
if
(!(
query
.
getValue
()
instanceof
Collection
<?>)
&&
column
.
substring
(
column
.
length
()-
2
,
column
.
length
()).
toUpperCase
().
equals
(
"ID"
))
{
&&
column
.
substring
(
column
.
length
()-
2
,
column
.
length
()).
toUpperCase
(
Locale
.
ENGLISH
).
equals
(
"ID"
))
{
criteria
.
setValue
(
Long
.
valueOf
(
query
.
getValue
().
toString
()));
criteria
.
setValue
(
Long
.
valueOf
(
query
.
getValue
().
toString
()));
}
else
{
}
else
{
criteria
.
setValue
(
query
.
getValue
());
criteria
.
setValue
(
query
.
getValue
());
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireRectificationController.java
View file @
e5e55dca
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
//
package com.yeejoin.amos.fas.business.controller;
//
import
com.yeejoin.amos.fas.business.bo.FireParamBo
;
//
import com.yeejoin.amos.fas.business.bo.FireParamBo;
import
com.yeejoin.amos.fas.business.service.intfc.FireRectificationService
;
//
import com.yeejoin.amos.fas.business.service.intfc.FireRectificationService;
import
com.yeejoin.amos.fas.config.Permission
;
//
import com.yeejoin.amos.fas.config.Permission;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
//
import com.yeejoin.amos.fas.core.util.CommonResponse;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
//
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import
io.swagger.annotations.Api
;
//
import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
//
import io.swagger.annotations.ApiOperation;
import
org.springframework.beans.factory.annotation.Autowired
;
//
import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.GetMapping
;
//
import org.springframework.web.bind.annotation.GetMapping;
import
org.springframework.web.bind.annotation.PostMapping
;
//
import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
//
import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
//
import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
//
import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
//
import org.springframework.web.bind.annotation.RestController;
//
import
javax.servlet.http.HttpServletResponse
;
//
import javax.servlet.http.HttpServletResponse;
import
java.util.List
;
//
import java.util.List;
//
//
/**
/
//
**
* 安全执行-消防整改 控制器
//
* 安全执行-消防整改 控制器
*
//
*
* @author 郑嘉伟
//
* @author 郑嘉伟
*/
//
*/
@RestController
//
@RestController
@RequestMapping
(
value
=
"/api/fireRectification"
)
//
@RequestMapping(value = "/api/fireRectification")
@Api
(
tags
=
"消防整改"
)
//
@Api(tags = "消防整改")
public
class
FireRectificationController
extends
BaseController
{
//
public class FireRectificationController extends BaseController {
//
@Autowired
//
@Autowired
private
FireRectificationService
fireRectificationService
;
//
private FireRectificationService fireRectificationService;
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"按条件查询消防整改列表信息"
,
notes
=
"按条件查询消防整改列表信息"
)
//
@ApiOperation(httpMethod = "GET", value = "按条件查询消防整改列表信息", notes = "按条件查询消防整改列表信息")
@GetMapping
(
value
=
"/list"
)
//
@GetMapping(value = "/list")
public
CommonResponse
queryFireList
(
//
public CommonResponse queryFireList(
@RequestParam
(
value
=
"nameLike"
)
String
nameLike
,
//
@RequestParam(value = "nameLike") String nameLike,
@RequestParam
(
value
=
"sDate"
)
String
sDate
,
//
@RequestParam(value = "sDate") String sDate,
@RequestParam
(
value
=
"eDate"
)
String
eDate
,
//
@RequestParam(value = "eDate") String eDate,
@RequestParam
(
value
=
"states"
)
int
states
,
//
@RequestParam(value = "states") int states,
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
//
@RequestParam(value = "pageNum") int pageNum,
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
)
{
//
@RequestParam(value = "pageSize") int pageSize) {
return
CommonResponseUtil
.
success
(
fireRectificationService
.
queryFiresAndCount
(
nameLike
,
sDate
,
eDate
,
states
,
pageNum
,
pageSize
));
//
return CommonResponseUtil.success(fireRectificationService.queryFiresAndCount(nameLike,sDate,eDate,states,pageNum,pageSize));
}
//
}
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取单个单据详细数据"
,
notes
=
"获取单个单据详细数据"
)
//
@ApiOperation(httpMethod = "GET", value = "获取单个单据详细数据", notes = "获取单个单据详细数据")
@GetMapping
(
value
=
"/getMoreData"
)
//
@GetMapping(value = "/getMoreData")
public
CommonResponse
seleteOne
(
@RequestParam
(
value
=
"billNo"
)
String
billNo
){
//
public CommonResponse seleteOne(@RequestParam(value = "billNo") String billNo){
return
CommonResponseUtil
.
success
(
fireRectificationService
.
selectOneById
(
billNo
));
//
return CommonResponseUtil.success(fireRectificationService.selectOneById(billNo));
}
//
}
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"下载附件"
,
notes
=
"下载附件"
)
//
@ApiOperation(httpMethod = "POST", value = "下载附件", notes = "下载附件")
@PostMapping
(
value
=
"/downLoad"
)
//
@PostMapping(value = "/downLoad")
public
void
downLoad
(
@RequestBody
List
<
String
>
path
,
HttpServletResponse
response
){
//
public void downLoad(@RequestBody List<String> path, HttpServletResponse response){
fireRectificationService
.
downLoadFilesByUrll
(
path
.
get
(
0
),
response
);
//
fireRectificationService.downLoadFilesByUrll(path.get(0),response);
}
//
}
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"修改表单数据"
,
notes
=
"修改表单数据"
)
//
@ApiOperation(httpMethod = "POST", value = "修改表单数据", notes = "修改表单数据")
@PostMapping
(
value
=
"/update"
)
//
@PostMapping(value = "/update")
public
CommonResponse
update
(
@RequestBody
FireParamBo
paramBo
){
//
public CommonResponse update(@RequestBody FireParamBo paramBo){
return
CommonResponseUtil
.
success
(
fireRectificationService
.
updateByid
(
paramBo
));
//
return CommonResponseUtil.success(fireRectificationService.updateByid(paramBo));
}
//
}
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/FireRectificationMapper.java
View file @
e5e55dca
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
//
package com.yeejoin.amos.fas.business.dao.mapper;
//
import
com.yeejoin.amos.fas.business.bo.FireInfoBo
;
//
import com.yeejoin.amos.fas.business.bo.FireInfoBo;
import
com.yeejoin.amos.fas.business.bo.FireMoreDataBo
;
//
import com.yeejoin.amos.fas.business.bo.FireMoreDataBo;
import
com.yeejoin.amos.fas.business.bo.FireRectificationBo
;
//
import com.yeejoin.amos.fas.business.bo.FireRectificationBo;
//
import
java.util.List
;
//
import java.util.List;
import
java.util.Map
;
//
import java.util.Map;
//
public
interface
FireRectificationMapper
extends
BaseMapper
{
//
public interface FireRectificationMapper extends BaseMapper{
/**
//
/**
* 查询当前页数据和数量
//
* 查询当前页数据和数量
* @param param
//
* @param param
* @return
//
* @return
*/
//
*/
List
<
FireRectificationBo
>
queryFiresAndCount
(
Map
<
String
,
Object
>
param
);
//
List<FireRectificationBo> queryFiresAndCount(Map<String,Object> param);
long
countQueryFireList
(
Map
<
String
,
Object
>
param
);
//
long countQueryFireList(Map<String,Object> param);
//
/**
//
/**
* 查询详细信息
//
* 查询详细信息
* @param billNo
//
* @param billNo
* @return
//
* @return
*/
//
*/
FireRectificationBo
selectOneForBase
(
String
billNo
);
//
FireRectificationBo selectOneForBase(String billNo);
List
<
FireMoreDataBo
>
selectOneForEmergency
(
String
billNo
);
//
List<FireMoreDataBo> selectOneForEmergency(String billNo);
List
<
FireMoreDataBo
>
selectOneForDanger
(
String
billNo
);
//
List<FireMoreDataBo> selectOneForDanger(String billNo);
List
<
FireMoreDataBo
>
selectOneForHidden
(
String
billNo
);
//
List<FireMoreDataBo> selectOneForHidden (String billNo);
FireInfoBo
selectOneForfire
(
String
billNo
,
int
id
);
//
FireInfoBo selectOneForfire(String billNo, int id);
//
/**
//
/**
* 修改单据及其相关信息
//
* 修改单据及其相关信息
* @param param
//
* @param param
* @return
//
* @return
*/
//
*/
int
updateBill
(
Map
<
String
,
String
>
param
);
//
int updateBill(Map<String,String > param);
int
updateWarnning
(
FireMoreDataBo
param
);
//
int updateWarnning(FireMoreDataBo param);
int
updateHidden
(
FireMoreDataBo
param
);
//
int updateHidden(FireMoreDataBo param);
int
updateDanger
(
FireMoreDataBo
param
);
//
int updateDanger(FireMoreDataBo param);
//
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireRectificationServiceImpl.java
View file @
e5e55dca
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
//
package com.yeejoin.amos.fas.business.service.impl;
//
import
com.yeejoin.amos.fas.business.bo.FireInfoBo
;
//
import com.yeejoin.amos.fas.business.bo.FireInfoBo;
import
com.yeejoin.amos.fas.business.bo.FireMoreDataBo
;
//
import com.yeejoin.amos.fas.business.bo.FireMoreDataBo;
import
com.yeejoin.amos.fas.business.bo.FireParamBo
;
//
import com.yeejoin.amos.fas.business.bo.FireParamBo;
import
com.yeejoin.amos.fas.business.bo.FireRectificationBo
;
//
import com.yeejoin.amos.fas.business.bo.FireRectificationBo;
import
com.yeejoin.amos.fas.business.dao.mapper.FireRectificationMapper
;
//
import com.yeejoin.amos.fas.business.dao.mapper.FireRectificationMapper;
import
com.yeejoin.amos.fas.business.service.intfc.FireRectificationService
;
//
import com.yeejoin.amos.fas.business.service.intfc.FireRectificationService;
import
com.yeejoin.amos.fas.business.util.FileUtils
;
//
import com.yeejoin.amos.fas.business.util.FileUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
//
import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
//
import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Service
;
//
import org.springframework.stereotype.Service;
//
import
javax.servlet.http.HttpServletResponse
;
//
import javax.servlet.http.HttpServletResponse;
import
java.io.IOException
;
//
import java.io.IOException;
import
java.util.ArrayList
;
//
import java.util.ArrayList;
import
java.util.Arrays
;
//
import java.util.Arrays;
import
java.util.HashMap
;
//
import java.util.HashMap;
import
java.util.List
;
//
import java.util.List;
import
java.util.Map
;
//
import java.util.Map;
//
@Service
(
"fireRectificationService"
)
//
@Service("fireRectificationService")
public
class
FireRectificationServiceImpl
implements
FireRectificationService
{
//
public class FireRectificationServiceImpl implements FireRectificationService {
@Autowired
//
@Autowired
FireRectificationMapper
fireRectificationMapper
;
//
FireRectificationMapper fireRectificationMapper;
//
/**
//
/**
* 文件服务器地址
//
* 文件服务器地址
*/
//
*/
@Value
(
"${file.downLoad.url}"
)
//
@Value("${file.downLoad.url}")
private
String
ipUrl
;
//
private String ipUrl;
//
/**
//
/**
* 根据条件查询对应单据
//
* 根据条件查询对应单据
* @param nameLike 单据模糊查询
//
* @param nameLike 单据模糊查询
* @param sDate 起始日
//
* @param sDate 起始日
* @param eDate 终止日
//
* @param eDate 终止日
* @param states 状态
//
* @param states 状态
* @param pageNum 页码
//
* @param pageNum 页码
* @param pageSize
//
* @param pageSize
* @return
//
* @return
*/
//
*/
@Override
//
@Override
public
Map
<
String
,
Object
>
queryFiresAndCount
(
String
nameLike
,
String
sDate
,
String
eDate
,
int
states
,
int
pageNum
,
int
pageSize
)
{
//
public Map<String, Object> queryFiresAndCount(String nameLike, String sDate, String eDate, int states, int pageNum,int pageSize) {
if
(
nameLike
.
trim
().
equals
(
""
)){
//
if(nameLike.trim().equals("")){
nameLike
=
null
;
//
nameLike = null;
}
//
}
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
//
Map<String, Object> map = new HashMap<>();
int
spage
=
(
pageNum
-
1
)*
pageSize
;
//
int spage = (pageNum-1)*pageSize;
map
.
put
(
"nameLike"
,
nameLike
);
//
map.put("nameLike",nameLike);
map
.
put
(
"sDate"
,
sDate
);
//
map.put("sDate",sDate);
map
.
put
(
"eDate"
,
eDate
);
//
map.put("eDate",eDate);
map
.
put
(
"states"
,
states
);
//
map.put("states",states);
map
.
put
(
"spage"
,
spage
);
//
map.put("spage",spage);
map
.
put
(
"pageSize"
,
pageSize
);
//
map.put("pageSize",pageSize);
List
<
FireRectificationBo
>
fireRectificationBos
=
fireRectificationMapper
.
queryFiresAndCount
(
map
);
//
List<FireRectificationBo> fireRectificationBos = fireRectificationMapper.queryFiresAndCount(map);
long
countFires
=
fireRectificationMapper
.
countQueryFireList
(
map
);
//
long countFires = fireRectificationMapper.countQueryFireList(map);
map
.
clear
();
//
map.clear();
map
.
put
(
"fireRectificationBos"
,
fireRectificationBos
);
//
map.put("fireRectificationBos",fireRectificationBos);
map
.
put
(
"countFires"
,
countFires
);
//
map.put("countFires",countFires);
return
map
;
//
return map;
}
//
}
//
/**
//
/**
* 查询详细单据信息
//
* 查询详细单据信息
* @param billNo
//
* @param billNo
* @return
//
* @return
*/
//
*/
@Override
//
@Override
public
Map
<
String
,
Object
>
selectOneById
(
String
billNo
)
{
//
public Map<String, Object> selectOneById(String billNo) {
Map
<
String
,
Object
>
result
=
new
HashMap
();
//
Map<String ,Object> result = new HashMap();
FireRectificationBo
base
=
fireRectificationMapper
.
selectOneForBase
(
billNo
);
//
FireRectificationBo base = fireRectificationMapper.selectOneForBase(billNo);
List
<
FireMoreDataBo
>
warnnings
=
fireRectificationMapper
.
selectOneForEmergency
(
billNo
);
//
List<FireMoreDataBo> warnnings = fireRectificationMapper.selectOneForEmergency(billNo);
List
<
FireMoreDataBo
>
danger
=
fireRectificationMapper
.
selectOneForDanger
(
billNo
);
//
List<FireMoreDataBo> danger = fireRectificationMapper.selectOneForDanger(billNo);
List
<
FireMoreDataBo
>
hidden
=
fireRectificationMapper
.
selectOneForHidden
(
billNo
);
//
List<FireMoreDataBo> hidden = fireRectificationMapper.selectOneForHidden(billNo);
List
<
FireInfoBo
>
files
=
new
ArrayList
<>();
//
List<FireInfoBo> files = new ArrayList<>();
for
(
int
i
=
0
;
i
<
4
;
i
++){
//
for (int i=0;i<4;i++){
files
.
add
(
fireRectificationMapper
.
selectOneForfire
(
billNo
,
i
));
//
files.add(fireRectificationMapper.selectOneForfire(billNo,i));
}
//
}
Map
<
String
,
Object
>
backResult
=
makeFIreString
(
files
);
//
Map<String ,Object> backResult = makeFIreString(files);
result
.
put
(
"base"
,
base
);
//
result.put("base", base);
result
.
put
(
"warnnings"
,
warnnings
);
//
result.put("warnnings", warnnings);
result
.
put
(
"danger"
,
danger
);
//
result.put("danger", danger);
result
.
put
(
"hidden"
,
hidden
);
//
result.put("hidden", hidden);
result
.
put
(
"fires"
,
backResult
.
get
(
"fires"
));
//
result.put("fires", backResult.get("fires"));
result
.
put
(
"backResult"
,
backResult
.
get
(
"backResult"
));
//
result.put("backResult", backResult.get("backResult"));
return
result
;
//
return result;
}
//
}
//
/**
//
/**
* 下载文件
//
* 下载文件
* @param path
//
* @param path
* @param response
//
* @param response
*/
//
*/
@Override
//
@Override
public
void
downLoadFilesByUrll
(
String
path
,
HttpServletResponse
response
)
{
//
public void downLoadFilesByUrll(String path, HttpServletResponse response) {
List
<
String
>
list
=
Arrays
.
asList
(
path
.
split
(
","
));
//
List<String> list = Arrays.asList(path.split(","));
try
{
//
try {
FileUtils
.
downloadZIP
(
response
,
list
,
ipUrl
);
//
FileUtils.downloadZIP(response,list,ipUrl);
}
catch
(
IOException
e
)
{
//
} catch (IOException e) {
e
.
printStackTrace
();
//
e.printStackTrace();
}
//
}
}
//
}
//
/**
//
/**
* 修改单据相关信息
//
* 修改单据相关信息
* @param paramBo
//
* @param paramBo
* @return
//
* @return
*/
//
*/
@Override
//
@Override
public
Map
<
String
,
String
>
updateByid
(
FireParamBo
paramBo
)
{
//
public Map<String, String> updateByid(FireParamBo paramBo) {
Map
<
String
,
String
>
map
=
new
HashMap
<>();
//
Map<String, String> map = new HashMap<>();
map
.
put
(
"billNo"
,
paramBo
.
getBillNo
());
//
map.put("billNo",paramBo.getBillNo());
map
.
put
(
"backResult"
,
paramBo
.
getBackResult
());
//
map.put("backResult",paramBo.getBackResult());
map
.
put
(
"refResult"
,
paramBo
.
getRefResult
());
//
map.put("refResult",paramBo.getRefResult());
try
{
//
try {
if
(
isDataEmpty
(
paramBo
.
getBillNo
(),
null
)
||
//
if(isDataEmpty(paramBo.getBillNo(),null) ||
isDataEmpty
(
paramBo
.
getBackResult
(),
null
)
||
//
isDataEmpty(paramBo.getBackResult(),null) ||
isDataEmpty
(
paramBo
.
getRefResult
(),
null
)
//
isDataEmpty(paramBo.getRefResult(),null)
){
//
){
fireRectificationMapper
.
updateBill
(
map
);
//
fireRectificationMapper.updateBill(map);
}
//
}
if
(
isDataEmpty
(
null
,
paramBo
.
getWarnningData
())){
//
if (isDataEmpty(null,paramBo.getWarnningData())){
for
(
FireMoreDataBo
bo
:
paramBo
.
getWarnningData
())
{
//
for (FireMoreDataBo bo : paramBo.getWarnningData()) {
fireRectificationMapper
.
updateWarnning
(
bo
);
//
fireRectificationMapper.updateWarnning(bo);
}
//
}
}
//
}
if
(
isDataEmpty
(
null
,
paramBo
.
getHiddenData
())){
//
if (isDataEmpty(null,paramBo.getHiddenData())){
for
(
FireMoreDataBo
bo
:
paramBo
.
getHiddenData
())
{
//
for (FireMoreDataBo bo : paramBo.getHiddenData()) {
fireRectificationMapper
.
updateHidden
(
bo
);
//
fireRectificationMapper.updateHidden(bo);
}
//
}
}
//
}
if
(
isDataEmpty
(
null
,
paramBo
.
getDangerData
())){
//
if (isDataEmpty(null,paramBo.getDangerData())){
for
(
FireMoreDataBo
bo
:
paramBo
.
getDangerData
())
{
//
for (FireMoreDataBo bo : paramBo.getDangerData()) {
fireRectificationMapper
.
updateDanger
(
bo
);
//
fireRectificationMapper.updateDanger(bo);
}
//
}
}
//
}
map
.
clear
();
//
map.clear();
}
catch
(
Exception
e
)
{
//
}catch (Exception e) {
map
.
put
(
"result"
,
"数据保存失败"
);
//
map.put("result","数据保存失败");
map
.
put
(
"message"
,
"error"
);
//
map.put("message","error");
return
map
;
//
return map;
}
//
}
map
.
put
(
"result"
,
"数据保存成功"
);
//
map.put("result","数据保存成功");
map
.
put
(
"message"
,
"success"
);
//
map.put("message","success");
return
map
;
//
return map;
}
//
}
//
/**
//
/**
* 判空
//
* 判空
* @param data
//
* @param data
* @param list
//
* @param list
* @return
//
* @return
*/
//
*/
public
boolean
isDataEmpty
(
String
data
,
List
<
FireMoreDataBo
>
list
)
{
//
public boolean isDataEmpty (String data,List<FireMoreDataBo> list) {
if
(
data
!=
null
){
//
if (data != null){
return
!(
""
).
equals
(
data
);
//
return !("").equals(data);
}
//
}
return
list
!=
null
&&
list
.
size
()
!=
0
;
//
return list != null && list.size() != 0;
}
//
}
//
/**
//
/**
* 生成返回拼接评价
//
* 生成返回拼接评价
* @param files
//
* @param files
* @return
//
* @return
*/
//
*/
public
Map
<
String
,
Object
>
makeFIreString
(
List
<
FireInfoBo
>
files
){
//
public Map<String ,Object> makeFIreString( List<FireInfoBo> files){
Map
<
String
,
Object
>
result
=
new
HashMap
();
//
Map<String ,Object> result = new HashMap();
Map
<
String
,
Object
>
newfires
=
new
HashMap
();
//
Map<String ,Object> newfires = new HashMap();
//
String
backResult
=
",需加强"
;
//
String backResult = ",需加强";
//
FireInfoBo
fire1
=
files
.
get
(
0
);
//
FireInfoBo fire1= files.get(0);
FireInfoBo
fire2
=
files
.
get
(
1
);
//
FireInfoBo fire2= files.get(1);
FireInfoBo
fire3
=
files
.
get
(
2
);
//
FireInfoBo fire3= files.get(2);
FireInfoBo
fire4
=
files
.
get
(
3
);
//
FireInfoBo fire4= files.get(3);
if
(
fire1
==
null
){
//
if (fire1 == null){
fire1
=
new
FireInfoBo
(
0
,
0
);
//
fire1 = new FireInfoBo(0,0);
}
//
}
if
(
fire2
==
null
){
//
if (fire2 == null){
fire2
=
new
FireInfoBo
(
0
,
0
);
//
fire2 = new FireInfoBo(0,0);
}
//
}
if
(
fire3
==
null
){
//
if (fire3 == null){
fire3
=
new
FireInfoBo
(
0
,
0
);
//
fire3 = new FireInfoBo(0,0);
}
//
}
if
(
fire4
==
null
){
//
if (fire4 == null){
fire4
=
new
FireInfoBo
(
0
,
0
);
//
fire4 = new FireInfoBo(0,0);
}
//
}
newfires
.
put
(
"fire1rel"
,
fire1
.
getRealNum
());
//
newfires.put("fire1rel",fire1.getRealNum());
newfires
.
put
(
"fire1thr"
,
fire1
.
getThreshold
());
//
newfires.put("fire1thr",fire1.getThreshold());
//
newfires
.
put
(
"fire2rel"
,
fire2
.
getRealNum
());
//
newfires.put("fire2rel",fire2.getRealNum());
newfires
.
put
(
"fire2thr"
,
fire2
.
getThreshold
());
//
newfires.put("fire2thr",fire2.getThreshold());
//
newfires
.
put
(
"fire3rel"
,
fire3
.
getRealNum
());
//
newfires.put("fire3rel",fire3.getRealNum());
newfires
.
put
(
"fire3thr"
,
fire3
.
getThreshold
());
//
newfires.put("fire3thr",fire3.getThreshold());
//
newfires
.
put
(
"fire4rel"
,
fire4
.
getRealNum
());
//
newfires.put("fire4rel",fire4.getRealNum());
newfires
.
put
(
"fire4thr"
,
fire4
.
getThreshold
());
//
newfires.put("fire4thr",fire4.getThreshold());
//
if
(
fire1
.
getRealNum
()<
fire1
.
getThreshold
()
&&
fire1
.
getRealNum
()!=
fire1
.
getThreshold
()){
//
if (fire1.getRealNum()<fire1.getThreshold() && fire1.getRealNum()!=fire1.getThreshold()){
backResult
=
backResult
+
"消防应急预案"
;
//
backResult = backResult+"消防应急预案";
}
//
}
if
(
fire2
.
getRealNum
()<
fire2
.
getThreshold
()
&&
fire2
.
getRealNum
()!=
fire2
.
getThreshold
()){
//
if (fire2.getRealNum()<fire2.getThreshold() && fire2.getRealNum()!=fire2.getThreshold()){
if
(!
backResult
.
equals
(
",需加强"
)){
//
if(!backResult.equals(",需加强")){
backResult
=
backResult
+
","
;
//
backResult = backResult+",";
}
//
}
backResult
=
backResult
+
"消防安全教育培训"
;
//
backResult = backResult+"消防安全教育培训";
}
//
}
if
(
fire3
.
getRealNum
()<
fire3
.
getThreshold
()
&&
fire3
.
getRealNum
()!=
fire3
.
getThreshold
()){
//
if (fire3.getRealNum()<fire3.getThreshold() && fire3.getRealNum()!=fire3.getThreshold()){
if
(!
backResult
.
equals
(
",需加强"
)){
//
if(!backResult.equals(",需加强")){
backResult
=
backResult
+
","
;
//
backResult = backResult+",";
}
//
}
backResult
=
backResult
+
"消防日常训练"
;
//
backResult = backResult+"消防日常训练";
}
//
}
if
(
fire4
.
getRealNum
()<
fire4
.
getThreshold
()
&&
fire4
.
getRealNum
()!=
fire4
.
getThreshold
()){
//
if ( fire4.getRealNum()<fire4.getThreshold() && fire4.getRealNum()!=fire4.getThreshold()){
if
(!
backResult
.
equals
(
",需加强"
)){
//
if(!backResult.equals(",需加强")){
backResult
=
backResult
+
","
;
//
backResult = backResult+",";
}
//
}
backResult
=
backResult
+
"消防器材保养"
;
//
backResult = backResult+"消防器材保养";
}
//
}
if
(
backResult
.
equals
(
",需加强"
)){
//
if (backResult.equals(",需加强")){
backResult
=
"。"
;
//
backResult = "。";
}
else
{
//
}else {
backResult
=
backResult
+
"工作。"
;
//
backResult = backResult+"工作。";
}
//
}
//
result
.
put
(
"fires"
,
newfires
);
//
result.put("fires", newfires);
result
.
put
(
"backResult"
,
backResult
);
//
result.put("backResult", backResult);
return
result
;
//
return result;
}
//
}
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/FireRectificationService.java
View file @
e5e55dca
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
//
package com.yeejoin.amos.fas.business.service.intfc;
//
import
com.yeejoin.amos.fas.business.bo.FireParamBo
;
//
import com.yeejoin.amos.fas.business.bo.FireParamBo;
//
import
javax.servlet.http.HttpServletResponse
;
//
import javax.servlet.http.HttpServletResponse;
import
java.util.Map
;
//
import java.util.Map;
//
/**
/
//
**
* 安全监管-单据管理 服务类
//
* 安全监管-单据管理 服务类
*
//
*
* @author 郑嘉伟
//
* @author 郑嘉伟
*/
//
*/
public
interface
FireRectificationService
{
//
public interface FireRectificationService {
//
/**
//
/**
* 按条件查询消防整改列表信息
//
* 按条件查询消防整改列表信息
* @param nameLike 单据模糊查询
//
* @param nameLike 单据模糊查询
* @param sDate 起始日
//
* @param sDate 起始日
* @param eDate 终止日
//
* @param eDate 终止日
* @param states 状态
//
* @param states 状态
* @param pageNum 页码
//
* @param pageNum 页码
* @return
//
* @return
*/
//
*/
Map
<
String
,
Object
>
queryFiresAndCount
(
String
nameLike
,
String
sDate
,
String
eDate
,
int
states
,
int
pageNum
,
int
pageSize
);
//
Map<String, Object> queryFiresAndCount(String nameLike, String sDate, String eDate, int states, int pageNum ,int pageSize);
//
/**
//
/**
* 查询详细单据信息
//
* 查询详细单据信息
* @param billNo
//
* @param billNo
* @return
//
* @return
*/
//
*/
Map
<
String
,
Object
>
selectOneById
(
String
billNo
);
//
Map<String ,Object> selectOneById(String billNo);
//
/**
//
/**
* 下载文件
//
* 下载文件
* @param path
//
* @param path
* @param response
//
* @param response
*/
//
*/
void
downLoadFilesByUrll
(
String
path
,
HttpServletResponse
response
);
//
void downLoadFilesByUrll(String path, HttpServletResponse response );
//
/**
//
/**
* 修改单据相关信息
//
* 修改单据相关信息
* @param paramBo
//
* @param paramBo
* @return
//
* @return
*/
//
*/
Map
<
String
,
String
>
updateByid
(
FireParamBo
paramBo
);
//
Map<String, String> updateByid(FireParamBo paramBo);
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/util/FileUtils.java
deleted
100644 → 0
View file @
aa932249
package
com
.
yeejoin
.
amos
.
fas
.
business
.
util
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.BufferedInputStream
;
import
java.io.BufferedOutputStream
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.net.HttpURLConnection
;
import
java.net.URL
;
import
java.util.List
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
/**
* 文件下载 工具类
*
* @author 郑嘉伟
* @since 2020-08-05
*/
public
class
FileUtils
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
FileUtils
.
class
);
/**
* 获取压缩好zip——>设置消息头——>输出
* @param response
* @param list
* @param ipUrl
* @throws IOException
*/
public
static
void
downloadZIP
(
HttpServletResponse
response
,
List
<
String
>
list
,
String
ipUrl
)
throws
IOException
{
//构建zip
String
zipname
=
"单据相关附件.zip"
;
String
zippath
=
fileToZip
(
list
,
zipname
,
ipUrl
);
OutputStream
out
=
null
;
BufferedInputStream
br
=
null
;
try
{
String
fileName
=
new
String
(
zipname
.
getBytes
(
"UTF-8"
),
"iso-8859-1"
);
br
=
new
BufferedInputStream
(
new
FileInputStream
(
zippath
));
byte
[]
buf
=
new
byte
[
1024
];
int
len
=
0
;
response
.
reset
();
response
.
setHeader
(
"Content-Type"
,
"application/octet-stream;charset=utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment; filename="
+
fileName
);
response
.
setHeader
(
"Access-Control-Expose-Headers"
,
"access_token"
);
response
.
setHeader
(
"Access-Control-Allow-Origin"
,
"*"
);
response
.
setContentType
(
"application/zip"
);
out
=
response
.
getOutputStream
();
while
((
len
=
br
.
read
(
buf
))
>
0
)
{
out
.
write
(
buf
,
0
,
len
);
out
.
flush
();
}
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
}
finally
{
br
.
close
();
out
.
close
();
}
}
/**
* 通过文件服务器——>获取流——>输出——>压缩
*
* @param list
* @param fileName
* @return
*/
public
static
String
fileToZip
(
List
<
String
>
list
,
String
fileName
,
String
ipUrl
)
{
InputStream
fis
=
null
;
BufferedInputStream
bis
=
null
;
FileOutputStream
fos
=
null
;
ZipOutputStream
zos
=
null
;
// 临时目录
String
path
=
System
.
getProperty
(
"java.io.tmpdir"
)
+
fileName
;
try
{
File
zipFile
=
new
File
(
path
);
zipFile
.
deleteOnExit
();
zipFile
.
createNewFile
();
fos
=
new
FileOutputStream
(
zipFile
);
zos
=
new
ZipOutputStream
(
new
BufferedOutputStream
(
fos
));
byte
[]
bufs
=
new
byte
[
1024
*
10
];
for
(
String
a
:
list
)
{
fis
=
getInputStreamFromURL
(
ipUrl
+
a
);
String
subFileName
=
new
File
(
ipUrl
+
a
).
getName
();
//创建ZIP实体,并添加进压缩包
ZipEntry
zipEntry
=
new
ZipEntry
(
subFileName
);
zos
.
putNextEntry
(
zipEntry
);
bis
=
new
BufferedInputStream
(
fis
,
1024
*
10
);
int
read
=
0
;
while
((
read
=
bis
.
read
(
bufs
,
0
,
1024
*
10
))
!=
-
1
)
{
zos
.
write
(
bufs
,
0
,
read
);
}
}
System
.
out
.
println
(
"压缩成功"
);
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
e
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
e
);
}
finally
{
try
{
if
(
null
!=
bis
)
{
bis
.
close
();
}
if
(
null
!=
zos
)
{
zos
.
close
();
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
e
);
}
}
return
path
;
}
/**
* 从URL中读取图片,转换成流形式.
*
* @param destUrl
* @return
*/
public
static
InputStream
getInputStreamFromURL
(
String
destUrl
)
{
HttpURLConnection
httpUrl
=
null
;
URL
url
=
null
;
InputStream
in
=
null
;
try
{
url
=
new
URL
(
destUrl
);
httpUrl
=
(
HttpURLConnection
)
url
.
openConnection
();
httpUrl
.
connect
();
in
=
httpUrl
.
getInputStream
();
return
in
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/config/LogFilter.java
0 → 100644
View file @
e5e55dca
package
com
.
yeejoin
.
amos
.
fas
.
config
;
import
ch.qos.logback.classic.pattern.ClassicConverter
;
import
ch.qos.logback.classic.spi.ILoggingEvent
;
import
java.text.Normalizer
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* @author keyong
* @title: LogFilter
* <pre>
* @description: TODO
* </pre>
* @date 2024/3/25 15:04
*/
public
class
LogFilter
extends
ClassicConverter
{
private
static
final
List
<
String
>
LOG_VALID_LIST
=
Arrays
.
asList
(
"%0d"
,
"%0a"
,
"%0A"
,
"%0D"
,
"\r"
,
"\n"
);
@Override
public
String
convert
(
ILoggingEvent
event
)
{
if
(
event
.
getLoggerName
().
startsWith
(
"com.yeejoin"
))
{
//根据package启用规则
return
validLog
(
event
.
getFormattedMessage
());
}
else
{
return
event
.
getFormattedMessage
();
}
}
public
static
String
validLog
(
String
logs
)
{
String
normalize
=
Normalizer
.
normalize
(
logs
,
Normalizer
.
Form
.
NFKC
);
for
(
String
str
:
LOG_VALID_LIST
)
{
normalize
=
normalize
.
replace
(
str
,
""
);
}
return
normalize
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/core/threadpool/AmosThreadPool.java
View file @
e5e55dca
...
@@ -18,6 +18,8 @@ public class AmosThreadPool {
...
@@ -18,6 +18,8 @@ public class AmosThreadPool {
*/
*/
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AmosThreadPool
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AmosThreadPool
.
class
);
private
static
volatile
AmosThreadPool
amosThreadPool
=
null
;
/**
/**
* 单例
* 单例
*/
*/
...
@@ -34,14 +36,14 @@ public class AmosThreadPool {
...
@@ -34,14 +36,14 @@ public class AmosThreadPool {
* @return
* @return
*/
*/
public
static
AmosThreadPool
getInstance
()
{
public
static
AmosThreadPool
getInstance
()
{
if
(
instance
==
null
)
{
if
(
amosThreadPool
==
null
)
{
synchronized
(
AmosThreadPool
.
class
)
{
synchronized
(
AmosThreadPool
.
class
)
{
if
(
instance
==
null
)
{
if
(
amosThreadPool
==
null
)
{
instance
=
new
AmosThreadPool
();
amosThreadPool
=
new
AmosThreadPool
();
}
}
}
}
}
}
return
instance
;
return
amosThreadPool
;
}
}
static
{
static
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/core/util/FileUtil.java
View file @
e5e55dca
...
@@ -78,7 +78,7 @@ public class FileUtil {
...
@@ -78,7 +78,7 @@ public class FileUtil {
fileName
=
new
Date
().
getTime
()
+
"_"
+
name
;
fileName
=
new
Date
().
getTime
()
+
"_"
+
name
;
// 获取文件的后缀名
// 获取文件的后缀名
String
suffixName
=
fileName
.
substring
(
fileName
.
lastIndexOf
(
"."
)).
toLowerCase
();
// 例如:.jpg
String
suffixName
=
fileName
.
substring
(
fileName
.
lastIndexOf
(
"."
)).
toLowerCase
(
Locale
.
ENGLISH
);
// 例如:.jpg
// 文件上传后的路径
// 文件上传后的路径
String
filePath
=
getFilePath
(
suffixName
);
// 1.images 2.musics 3.videos
String
filePath
=
getFilePath
(
suffixName
);
// 1.images 2.musics 3.videos
// 4.docs
// 4.docs
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/core/util/ResponseUtils.java
View file @
e5e55dca
...
@@ -168,7 +168,7 @@ public final class ResponseUtils {
...
@@ -168,7 +168,7 @@ public final class ResponseUtils {
public
static
Object
getGetMethod
(
Object
ob
,
String
name
)
throws
Exception
{
public
static
Object
getGetMethod
(
Object
ob
,
String
name
)
throws
Exception
{
Method
[]
m
=
ob
.
getClass
().
getMethods
();
Method
[]
m
=
ob
.
getClass
().
getMethods
();
for
(
int
i
=
0
;
i
<
m
.
length
;
i
++){
for
(
int
i
=
0
;
i
<
m
.
length
;
i
++){
if
((
"get"
+
name
).
toLowerCase
().
equals
(
m
[
i
].
getName
().
toLowerCas
e
())){
if
((
"get"
+
name
).
equalsIgnoreCase
(
m
[
i
].
getNam
e
())){
return
m
[
i
].
invoke
(
ob
);
return
m
[
i
].
invoke
(
ob
);
}
}
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/core/util/WordConverterUtils.java
View file @
e5e55dca
...
@@ -6,6 +6,7 @@ import org.apache.poi.xwpf.converter.xhtml.XHTMLConverter;
...
@@ -6,6 +6,7 @@ import org.apache.poi.xwpf.converter.xhtml.XHTMLConverter;
import
org.apache.poi.xwpf.converter.xhtml.XHTMLOptions
;
import
org.apache.poi.xwpf.converter.xhtml.XHTMLOptions
;
import
org.apache.poi.xwpf.usermodel.XWPFDocument
;
import
org.apache.poi.xwpf.usermodel.XWPFDocument
;
import
javax.xml.XMLConstants
;
import
javax.xml.parsers.DocumentBuilderFactory
;
import
javax.xml.parsers.DocumentBuilderFactory
;
import
javax.xml.transform.OutputKeys
;
import
javax.xml.transform.OutputKeys
;
import
javax.xml.transform.Transformer
;
import
javax.xml.transform.Transformer
;
...
@@ -104,6 +105,7 @@ public class WordConverterUtils {
...
@@ -104,6 +105,7 @@ public class WordConverterUtils {
DOMSource
domSource
=
new
DOMSource
(
htmlDocument
);
DOMSource
domSource
=
new
DOMSource
(
htmlDocument
);
StreamResult
streamResult
=
new
StreamResult
(
targetFile
);
StreamResult
streamResult
=
new
StreamResult
(
targetFile
);
TransformerFactory
tf
=
TransformerFactory
.
newInstance
();
TransformerFactory
tf
=
TransformerFactory
.
newInstance
();
tf
.
setFeature
(
XMLConstants
.
FEATURE_SECURE_PROCESSING
,
true
);
Transformer
serializer
=
tf
.
newTransformer
();
Transformer
serializer
=
tf
.
newTransformer
();
serializer
.
setOutputProperty
(
OutputKeys
.
ENCODING
,
"utf-8"
);
serializer
.
setOutputProperty
(
OutputKeys
.
ENCODING
,
"utf-8"
);
serializer
.
setOutputProperty
(
OutputKeys
.
INDENT
,
"yes"
);
serializer
.
setOutputProperty
(
OutputKeys
.
INDENT
,
"yes"
);
...
@@ -150,6 +152,7 @@ public class WordConverterUtils {
...
@@ -150,6 +152,7 @@ public class WordConverterUtils {
StringWriter
stringWriter
=
new
StringWriter
();
StringWriter
stringWriter
=
new
StringWriter
();
StreamResult
streamResult
=
new
StreamResult
(
stringWriter
);
StreamResult
streamResult
=
new
StreamResult
(
stringWriter
);
TransformerFactory
tf
=
TransformerFactory
.
newInstance
();
TransformerFactory
tf
=
TransformerFactory
.
newInstance
();
tf
.
setFeature
(
XMLConstants
.
FEATURE_SECURE_PROCESSING
,
true
);
Transformer
serializer
=
tf
.
newTransformer
();
Transformer
serializer
=
tf
.
newTransformer
();
serializer
.
setOutputProperty
(
OutputKeys
.
ENCODING
,
"utf-8"
);
serializer
.
setOutputProperty
(
OutputKeys
.
ENCODING
,
"utf-8"
);
serializer
.
setOutputProperty
(
OutputKeys
.
INDENT
,
"yes"
);
serializer
.
setOutputProperty
(
OutputKeys
.
INDENT
,
"yes"
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/core/util/query/BaseQuerySpecification.java
View file @
e5e55dca
...
@@ -77,11 +77,11 @@ public class BaseQuerySpecification<T> implements Specification<T> {
...
@@ -77,11 +77,11 @@ public class BaseQuerySpecification<T> implements Specification<T> {
List
<
Order
>
orders
=
new
ArrayList
<>();
List
<
Order
>
orders
=
new
ArrayList
<>();
orderbys
.
keySet
().
forEach
(
key
->
{
orderbys
.
keySet
().
forEach
(
key
->
{
if
(
key
.
toLowerCase
().
equals
(
"asc"
)
&&
!
orderbys
.
get
(
key
).
isEmpty
())
{
if
(
"asc"
.
equalsIgnoreCase
(
key
)
&&
!
orderbys
.
get
(
key
).
isEmpty
())
{
orderbys
.
get
(
key
).
forEach
(
propertyName
->
{
orderbys
.
get
(
key
).
forEach
(
propertyName
->
{
orders
.
add
(
builder
.
asc
(
root
.
get
(
propertyName
)));
orders
.
add
(
builder
.
asc
(
root
.
get
(
propertyName
)));
});
});
}
else
if
(
key
.
toLowerCase
().
equals
(
"desc"
)
&&
!
orderbys
.
get
(
key
).
isEmpty
())
{
}
else
if
(
"desc"
.
equalsIgnoreCase
(
key
)
&&
!
orderbys
.
get
(
key
).
isEmpty
())
{
orderbys
.
get
(
key
).
forEach
(
propertyName
->
{
orderbys
.
get
(
key
).
forEach
(
propertyName
->
{
orders
.
add
(
builder
.
desc
(
root
.
get
(
propertyName
)));
orders
.
add
(
builder
.
desc
(
root
.
get
(
propertyName
)));
});
});
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_rectification.xml
View file @
e5e55dca
...
@@ -2,161 +2,161 @@
...
@@ -2,161 +2,161 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.FireRectificationMapper"
>
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.FireRectificationMapper"
>
<select
id=
"queryFiresAndCount"
resultType=
"com.yeejoin.amos.fas.business.bo.FireRectificationBo"
>
<!-- <select id="queryFiresAndCount" resultType="com.yeejoin.amos.fas.business.bo.FireRectificationBo">--
>
SELECT * FROM (
<!-- SELECT * FROM (-->
SELECT
<!-- SELECT-->
BILL_NO AS billno,
<!-- BILL_NO AS billno,-->
STATION_SEQ AS stationNum,
<!-- STATION_SEQ AS stationNum,-->
STATION_NAME AS stationName,
<!-- STATION_NAME AS stationName,-->
( SELECT COUNT(1) FROM ELEC_BILLS_ALARM_INFO WHERE EBD.SEQUENCE_NBR = SEQUENCE_NBR ) AS warnning,
<!-- ( SELECT COUNT(1) FROM ELEC_BILLS_ALARM_INFO WHERE EBD.SEQUENCE_NBR = SEQUENCE_NBR ) AS warnning,-->
( SELECT COUNT(1) FROM ELEC_BILLS_RISK_INFO WHERE EBD.SEQUENCE_NBR = SEQUENCE_NBR) AS danger,
<!-- ( SELECT COUNT(1) FROM ELEC_BILLS_RISK_INFO WHERE EBD.SEQUENCE_NBR = SEQUENCE_NBR) AS danger,-->
( SELECT COUNT(1) FROM ELEC_BILLS_DANGER_INFO WHERE EBD.SEQUENCE_NBR = SEQUENCE_NBR ) AS hiddenTrouble,
<!-- ( SELECT COUNT(1) FROM ELEC_BILLS_DANGER_INFO WHERE EBD.SEQUENCE_NBR = SEQUENCE_NBR ) AS hiddenTrouble,-->
( SELECT COUNT(1) FROM ELEC_BILLS_FIRE_SAFETY_CONTROL WHERE EBD.SEQUENCE_NBR = SEQUENCE_NBR ) AS adminOfFire,
<!-- ( SELECT COUNT(1) FROM ELEC_BILLS_FIRE_SAFETY_CONTROL WHERE EBD.SEQUENCE_NBR = SEQUENCE_NBR ) AS adminOfFire,-->
SAFETY_CHARGE_PERSON AS chargePerson,
<!-- SAFETY_CHARGE_PERSON AS chargePerson,-->
SAFETY_PERSON_PHONE AS chargePersonTel,
<!-- SAFETY_PERSON_PHONE AS chargePersonTel,-->
date_format(REQUIREMENT_DATE,'%Y / %m / %d') AS completionDate,
<!-- date_format(REQUIREMENT_DATE,'%Y / %m / %d') AS completionDate,-->
REQUIREMENT_DATE,
<!-- REQUIREMENT_DATE,-->
date_format(ACTUAL_FINISH_DATE,'%Y / %m / %d') AS reCompletionDate,
<!-- date_format(ACTUAL_FINISH_DATE,'%Y / %m / %d') AS reCompletionDate,-->
STATUS AS statuscode,
<!-- STATUS AS statuscode,-->
if(STATUS=1,'未处理','已完成') AS status
<!-- if(STATUS=1,'未处理','已完成') AS status-->
FROM
<!-- FROM-->
ELEC_BILLS_BASIC_INFO EBD
<!-- ELEC_BILLS_BASIC_INFO EBD-->
where STATUS = 1 or STATUS = 2
<!-- where STATUS = 1 or STATUS = 2-->
ORDER BY REQUIREMENT_DATE) BDATA
<!-- ORDER BY REQUIREMENT_DATE) BDATA-->
where 1=1
<!-- where 1=1-->
<if
test=
"nameLike != null "
>
<!-- <if test="nameLike != null ">--
>
and billno like CONCAT('%',#{nameLike},'%')
<!-- and billno like CONCAT('%',#{nameLike},'%')-->
</if
>
<!-- </if>--
>
<if
test=
"sDate != 'null' and sDate != '1970-1-1' "
>
<!-- <if test="sDate != 'null' and sDate != '1970-1-1' ">--
>
and STR_TO_DATE(REQUIREMENT_DATE,'%Y-%m-%d') >= STR_TO_DATE(#{sDate},'%Y-%m-%d')
<!-- and STR_TO_DATE(REQUIREMENT_DATE,'%Y-%m-%d') >= STR_TO_DATE(#{sDate},'%Y-%m-%d')-->
</if
>
<!-- </if>--
>
<if
test=
"eDate != 'null' and eDate != '1970-1-1' "
>
<!-- <if test="eDate != 'null' and eDate != '1970-1-1' ">--
>
and STR_TO_DATE(#{eDate},'%Y-%m-%d') >=STR_TO_DATE(REQUIREMENT_DATE,'%Y-%m-%d')
<!-- and STR_TO_DATE(#{eDate},'%Y-%m-%d') >=STR_TO_DATE(REQUIREMENT_DATE,'%Y-%m-%d')-->
</if
>
<!-- </if>--
>
<if
test=
"states != 0 "
>
<!-- <if test="states != 0 ">--
>
and statuscode = #{states}
<!-- and statuscode = #{states}-->
</if
>
<!-- </if>--
>
LIMIT #{spage},#{pageSize}
<!-- LIMIT #{spage},#{pageSize}-->
</select
>
<!-- </select>--
>
<select
id=
"countQueryFireList"
resultType=
"long"
>
<!-- <select id="countQueryFireList" resultType="long">--
>
SELECT COUNT(1) FROM (
<!-- SELECT COUNT(1) FROM (-->
SELECT
<!-- SELECT-->
BILL_NO AS billno,
<!-- BILL_NO AS billno,-->
REQUIREMENT_DATE,
<!-- REQUIREMENT_DATE,-->
STATUS
<!-- STATUS-->
FROM
<!-- FROM-->
ELEC_BILLS_BASIC_INFO EBD
<!-- ELEC_BILLS_BASIC_INFO EBD-->
where STATUS = 1 or STATUS = 2
<!-- where STATUS = 1 or STATUS = 2-->
ORDER BY REQUIREMENT_DATE) BDATA
<!-- ORDER BY REQUIREMENT_DATE) BDATA-->
where 1=1
<!-- where 1=1-->
<if
test=
"nameLike != null "
>
<!-- <if test="nameLike != null ">--
>
and billno like CONCAT('%',#{nameLike},'%')
<!-- and billno like CONCAT('%',#{nameLike},'%')-->
</if
>
<!-- </if>--
>
<if
test=
"sDate != 'null' and sDate != '1970-1-1' "
>
<!-- <if test="sDate != 'null' and sDate != '1970-1-1' ">--
>
and STR_TO_DATE(REQUIREMENT_DATE,'%Y-%m-%d') >= STR_TO_DATE(#{sDate},'%Y-%m-%d')
<!-- and STR_TO_DATE(REQUIREMENT_DATE,'%Y-%m-%d') >= STR_TO_DATE(#{sDate},'%Y-%m-%d')-->
</if
>
<!-- </if>--
>
<if
test=
"eDate != 'null' and eDate != '1970-1-1' "
>
<!-- <if test="eDate != 'null' and eDate != '1970-1-1' ">--
>
and STR_TO_DATE(#{eDate},'%Y-%m-%d') >=STR_TO_DATE(REQUIREMENT_DATE,'%Y-%m-%d')
<!-- and STR_TO_DATE(#{eDate},'%Y-%m-%d') >=STR_TO_DATE(REQUIREMENT_DATE,'%Y-%m-%d')-->
</if
>
<!-- </if>--
>
<if
test=
"states != 0 "
>
<!-- <if test="states != 0 ">--
>
and STATUS = #{states}
<!-- and STATUS = #{states}-->
</if
>
<!-- </if>--
>
</select
>
<!-- </select>--
>
<select
id=
"selectOneForBase"
resultType=
"com.yeejoin.amos.fas.business.bo.FireRectificationBo"
>
<!-- <select id="selectOneForBase" resultType="com.yeejoin.amos.fas.business.bo.FireRectificationBo">--
>
select
<!-- select-->
BILL_NO AS billNo,
<!-- BILL_NO AS billNo,-->
STATION_NAME AS stationName,
<!-- STATION_NAME AS stationName,-->
DISTRIBUTION_USER_NAME AS disUser,
<!-- DISTRIBUTION_USER_NAME AS disUser,-->
DISTRIBUTION_DATE AS disDate,
<!-- DISTRIBUTION_DATE AS disDate,-->
STATION_CHARGE_PERSON AS stationUser,
<!-- STATION_CHARGE_PERSON AS stationUser,-->
CHARGE_PERSON_PHONE AS stationUserTel,
<!-- CHARGE_PERSON_PHONE AS stationUserTel,-->
SAFETY_CHARGE_PERSON AS safeUser,
<!-- SAFETY_CHARGE_PERSON AS safeUser,-->
SAFETY_PERSON_PHONE AS safeUserTel,
<!-- SAFETY_PERSON_PHONE AS safeUserTel,-->
REQUIREMENT_DATE AS reqDate,
<!-- REQUIREMENT_DATE AS reqDate,-->
if(ACTUAL_FINISH_DATE is null, date_format(sysdate(),'%Y-%m-%d') ,ACTUAL_FINISH_DATE) AS finishDate,
<!-- if(ACTUAL_FINISH_DATE is null, date_format(sysdate(),'%Y-%m-%d') ,ACTUAL_FINISH_DATE) AS finishDate,-->
REFORM_RESULT AS refResult,
<!-- REFORM_RESULT AS refResult,-->
VIEWS_AND_SUGGESTIONS AS viewsAndSuggestions,
<!-- VIEWS_AND_SUGGESTIONS AS viewsAndSuggestions,-->
FEEDBACK_RESULT AS backResult,
<!-- FEEDBACK_RESULT AS backResult,-->
STATUS AS status
<!-- STATUS AS status-->
from
<!-- from-->
elec_bills_basic_info EBD
<!-- elec_bills_basic_info EBD-->
where BILL_NO = #{billNo}
<!-- where BILL_NO = #{billNo}-->
</select
>
<!-- </select>--
>
<select
id=
"selectOneForEmergency"
resultType=
"com.yeejoin.amos.fas.business.bo.FireMoreDataBo"
>
<!-- <select id="selectOneForEmergency" resultType="com.yeejoin.amos.fas.business.bo.FireMoreDataBo">--
>
select
<!-- select-->
SEQUENCE_NBR as req,
<!-- SEQUENCE_NBR as req,-->
FIRE_EQUIPMENT_NAME AS name,
<!-- FIRE_EQUIPMENT_NAME AS name,-->
ALARM_DESC AS persent,
<!-- ALARM_DESC AS persent,-->
HANDLE_STATE AS doneResult,
<!-- HANDLE_STATE AS doneResult,-->
FILE_PATH as filePath
<!-- FILE_PATH as filePath-->
from
<!-- from-->
elec_bills_alarm_info
<!-- elec_bills_alarm_info-->
where BILL_SEQ = (select SEQUENCE_NBR from elec_bills_basic_info where BILL_NO=#{billNo})
<!-- where BILL_SEQ = (select SEQUENCE_NBR from elec_bills_basic_info where BILL_NO=#{billNo})-->
</select
>
<!-- </select>--
>
<select
id=
"selectOneForDanger"
resultType=
"com.yeejoin.amos.fas.business.bo.FireMoreDataBo"
>
<!-- <select id="selectOneForDanger" resultType="com.yeejoin.amos.fas.business.bo.FireMoreDataBo">--
>
select
<!-- select-->
SEQUENCE_NBR as req,
<!-- SEQUENCE_NBR as req,-->
LEVEL_NAME AS lvl,
<!-- LEVEL_NAME AS lvl,-->
POINT_NAME AS persent,
<!-- POINT_NAME AS persent,-->
RISK_FACTOR_NAME AS affect,
<!-- RISK_FACTOR_NAME AS affect,-->
FEEDBACK AS backResult
<!-- FEEDBACK AS backResult-->
from
<!-- from-->
elec_bills_risk_info
<!-- elec_bills_risk_info-->
where BILL_SEQ = (select SEQUENCE_NBR from elec_bills_basic_info where BILL_NO=#{billNo})
<!-- where BILL_SEQ = (select SEQUENCE_NBR from elec_bills_basic_info where BILL_NO=#{billNo})-->
</select
>
<!-- </select>--
>
<select
id=
"selectOneForHidden"
resultType=
"com.yeejoin.amos.fas.business.bo.FireMoreDataBo"
>
<!-- <select id="selectOneForHidden" resultType="com.yeejoin.amos.fas.business.bo.FireMoreDataBo">--
>
select
<!-- select-->
SEQUENCE_NBR as req,
<!-- SEQUENCE_NBR as req,-->
if(DANGER_LEVEL=1,'一般隐患','重大隐患') AS lvl,
<!-- if(DANGER_LEVEL=1,'一般隐患','重大隐患') AS lvl,-->
DANGER_NAME AS persent,
<!-- DANGER_NAME AS persent,-->
INPUT_ITEM_NAME AS affect,
<!-- INPUT_ITEM_NAME AS affect,-->
HANDLE_STATE AS doneResult,
<!-- HANDLE_STATE AS doneResult,-->
FILE_PATH as filePath
<!-- FILE_PATH as filePath-->
from
<!-- from-->
elec_bills_danger_info
<!-- elec_bills_danger_info-->
where BILL_SEQ = (select SEQUENCE_NBR from elec_bills_basic_info where BILL_NO=#{billNo})
<!-- where BILL_SEQ = (select SEQUENCE_NBR from elec_bills_basic_info where BILL_NO=#{billNo})-->
</select
>
<!-- </select>--
>
<select
id=
"selectOneForfire"
resultType=
"com.yeejoin.amos.fas.business.bo.FireInfoBo"
>
<!-- <select id="selectOneForfire" resultType="com.yeejoin.amos.fas.business.bo.FireInfoBo">--
>
select
<!-- select-->
TYPE AS type,
<!-- TYPE AS type,-->
ACTUAL_NUMBER AS realNum,
<!-- ACTUAL_NUMBER AS realNum,-->
THRESHOLD AS threshold
<!-- THRESHOLD AS threshold-->
from
<!-- from-->
elec_bills_fire_safety_control
<!-- elec_bills_fire_safety_control-->
where BILL_SEQ = (select SEQUENCE_NBR from elec_bills_basic_info where BILL_NO=#{billNo})
<!-- where BILL_SEQ = (select SEQUENCE_NBR from elec_bills_basic_info where BILL_NO=#{billNo})-->
and type =${id}
<!-- and type =${id}-->
</select
>
<!-- </select>--
>
<update
id=
"updateBill"
>
<!-- <update id="updateBill">--
>
UPDATE
<!-- UPDATE-->
ELEC_BILLS_BASIC_INFO
<!-- ELEC_BILLS_BASIC_INFO-->
SET STATUS = 2,
<!-- SET STATUS = 2,-->
REFORM_RESULT =#{refResult} ,
<!-- REFORM_RESULT =#{refResult} ,-->
FEEDBACK_RESULT =#{backResult}
<!-- FEEDBACK_RESULT =#{backResult}-->
where BILL_NO = #{billNo}
<!-- where BILL_NO = #{billNo}-->
</update
>
<!-- </update>--
>
<update
id=
"updateWarnning"
>
<!-- <update id="updateWarnning">--
>
UPDATE
<!-- UPDATE-->
ELEC_BILLS_ALARM_INFO
<!-- ELEC_BILLS_ALARM_INFO-->
SET
<!-- SET-->
HANDLE_STATE =#{doneResult} ,
<!-- HANDLE_STATE =#{doneResult} ,-->
FILE_PATH =#{filePath}
<!-- FILE_PATH =#{filePath}-->
where SEQUENCE_NBR = #{req}
<!-- where SEQUENCE_NBR = #{req}-->
</update
>
<!-- </update>--
>
<update
id=
"updateHidden"
>
<!-- <update id="updateHidden">--
>
UPDATE
<!-- UPDATE-->
ELEC_BILLS_DANGER_INFO
<!-- ELEC_BILLS_DANGER_INFO-->
SET
<!-- SET-->
HANDLE_STATE =#{doneResult} ,
<!-- HANDLE_STATE =#{doneResult} ,-->
FILE_PATH =#{filePath}
<!-- FILE_PATH =#{filePath}-->
where SEQUENCE_NBR = #{req}
<!-- where SEQUENCE_NBR = #{req}-->
</update
>
<!-- </update>--
>
<update
id=
"updateDanger"
>
<!-- <update id="updateDanger">--
>
UPDATE
<!-- UPDATE-->
ELEC_BILLS_RISK_INFO
<!-- ELEC_BILLS_RISK_INFO-->
SET
<!-- SET-->
FEEDBACK =#{backResult}
<!-- FEEDBACK =#{backResult}-->
where SEQUENCE_NBR = #{req}
<!-- where SEQUENCE_NBR = #{req}-->
</update
>
<!-- </update>--
>
</mapper>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/logback.xml
View file @
e5e55dca
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<configuration
debug=
"false"
>
<configuration
debug=
"false"
>
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property
name=
"LOG_HOME"
value=
"log"
/>
<property
name=
"LOG_HOME"
value=
"log"
/>
<conversionRule
conversionWord=
"msg"
converterClass=
"com.yeejoin.amos.fas.config.LogFilter"
/>
<!-- 按照每天生成日志文件 -->
<!-- 按照每天生成日志文件 -->
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
...
...
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