Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
indicators
Overview
Overview
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
zhangkb
indicators
Commits
ae99835d
Commit
ae99835d
authored
Jan 18, 2022
by
hzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复短板bug,升级log4j
parent
9f6ab34c
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
66 additions
and
62 deletions
+66
-62
pom.xml
pom.xml
+22
-5
ShortboardTaskCtrl.java
...eymobile/indicators/api/hytobacco/ShortboardTaskCtrl.java
+1
-1
ShortboardTaskValCtrl.java
...obile/indicators/api/hytobacco/ShortboardTaskValCtrl.java
+4
-4
ShortBoardTask.java
...le/indicators/model/entity/shortboard/ShortBoardTask.java
+6
-0
ShortboardParam.java
...e/indicators/model/entity/shortboard/ShortboardParam.java
+3
-0
SystemAuthService.java
...a/com/keymobile/indicators/service/SystemAuthService.java
+10
-0
ShortboardTaskService.java
...e/indicators/service/hytobacco/ShortboardTaskService.java
+3
-2
FileUtils.java
src/main/java/com/keymobile/indicators/utils/FileUtils.java
+6
-0
HttpUtil.java
src/main/java/com/keymobile/indicators/utils/HttpUtil.java
+1
-6
application-test.yml
src/main/resources/application-test.yml
+6
-6
ShortboardTaskMapper.xml
src/main/resources/mybatis/mapping/ShortboardTaskMapper.xml
+4
-0
AppTest.java
src/test/java/com/keymobile/indicators/AppTest.java
+0
-38
No files found.
pom.xml
View file @
ae99835d
...
...
@@ -37,11 +37,6 @@
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-jpa
</artifactId>
</dependency>
<dependency>
...
...
@@ -200,6 +195,28 @@
<artifactId>swagger2markup</artifactId>
<version>1.3.1</version>
</dependency> -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-logging
</artifactId>
<exclusions>
<exclusion>
<artifactId>
log4j-to-slf4j
</artifactId>
<groupId>
org.apache.logging.log4j
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<artifactId>
log4j-to-slf4j
</artifactId>
<exclusions>
<exclusion>
<artifactId>
log4j-api
</artifactId>
<groupId>
org.apache.logging.log4j
</groupId>
</exclusion>
</exclusions>
<groupId>
org.apache.logging.log4j
</groupId>
<version>
2.17.0
</version>
</dependency>
</dependencies>
<dependencyManagement>
...
...
src/main/java/com/keymobile/indicators/api/hytobacco/ShortboardTaskCtrl.java
View file @
ae99835d
...
...
@@ -31,7 +31,7 @@ public class ShortboardTaskCtrl {
@ApiOperation
(
value
=
"下发短板"
,
notes
=
"下发短板"
)
@PostMapping
(
"assign"
)
public
Result
assignShortboard
(
@RequestBody
ShortBoardTask
shortBoardTask
){
LogManager
.
logInfo
(
Constants
.
LOG_INDICATOR_SHORTBOARD_RECORD_API
,
"下发短板,短板名称{}"
,
shortBoardTask
.
getDriveName
());
return
shortboardTaskService
.
assignShortboard
(
shortBoardTask
);
}
...
...
src/main/java/com/keymobile/indicators/api/hytobacco/ShortboardTaskValCtrl.java
View file @
ae99835d
...
...
@@ -147,17 +147,17 @@ public class ShortboardTaskValCtrl {
column4
.
add
(
"单位"
);
column4
.
add
(
shortBoardTask
.
getUnitName
());
column4
.
add
(
"指标值"
);
column4
.
add
(
shortBoardTask
.
getValue
());
column4
.
add
(
shortBoardTask
Val
.
getValue
());
List
<
String
>
column5
=
new
ArrayList
<>();
column5
.
add
(
"短板规则描述"
);
column5
.
add
(
shortBoardTask
.
getShortboardDesc
());
column5
.
add
(
"下发时间"
);
column5
.
add
(
DateUtils
.
formatDate
(
shortBoardTask
.
getStartTime
(),
"yyyy-MM-dd HH:mm:ss"
));
column5
.
add
(
DateUtils
.
formatDate
(
shortBoardTask
Val
.
getStartTime
(),
"yyyy-MM-dd HH:mm:ss"
));
List
<
String
>
column6
=
new
ArrayList
<>();
column6
.
add
(
"截止时间"
);
column6
.
add
(
DateUtils
.
formatDate
(
shortBoardTask
.
getEndTime
(),
"yyyy-MM-dd HH:mm:ss"
));
column6
.
add
(
DateUtils
.
formatDate
(
shortBoardTask
Val
.
getEndTime
(),
"yyyy-MM-dd HH:mm:ss"
));
column6
.
add
(
"下发原因"
);
column6
.
add
(
shortBoardTask
.
getCause
());
column6
.
add
(
shortBoardTask
Val
.
getCause
());
//短板原因分析
List
<
String
>
column7
=
new
ArrayList
<>();
...
...
src/main/java/com/keymobile/indicators/model/entity/shortboard/ShortBoardTask.java
View file @
ae99835d
...
...
@@ -110,6 +110,12 @@ public class ShortBoardTask implements Serializable {
@ApiModelProperty
(
"接收人id多个用逗号分隔(id前后都要有逗号,如 ,id,)"
)
@Column
(
name
=
"enter_user_id"
)
private
String
enterUserId
;
/**
* 接收人部门编码
*/
@ApiModelProperty
(
"接收人部门)"
)
@Column
(
name
=
"enter_user_dept_code"
)
private
String
enterUserDeptCode
;
/**
* 接收人
...
...
src/main/java/com/keymobile/indicators/model/entity/shortboard/ShortboardParam.java
View file @
ae99835d
...
...
@@ -39,4 +39,7 @@ public class ShortboardParam {
@ApiModelProperty
(
"日期精确查询--维度"
)
private
String
dateInt
;
@ApiModelProperty
(
"填报接收人部门编码模糊匹配"
)
private
String
enterUserDeptCode
;
}
src/main/java/com/keymobile/indicators/service/SystemAuthService.java
View file @
ae99835d
...
...
@@ -11,6 +11,7 @@ import java.util.List;
@Service
@FeignClient
(
name
=
"PORTAL"
)
//,url = "http://127.0.0.1:8091/"
public
interface
SystemAuthService
{
/**
...
...
@@ -91,4 +92,13 @@ public interface SystemAuthService {
*/
@GetMapping
(
"/user/getOrgRoleUser"
)
List
<
JSONObject
>
getOrgRoleUser
(
@RequestParam
(
"userId"
)
String
userId
);
/**
* 根据机构编码获取机构
* @param: [nos]
* @author: hzc
* @date: 2021/12/20 15:55
*/
@GetMapping
(
"/org/getByNos"
)
List
<
JSONObject
>
getByNos
(
@RequestParam
(
"nos"
)
List
<
String
>
nos
);
}
src/main/java/com/keymobile/indicators/service/hytobacco/ShortboardTaskService.java
View file @
ae99835d
...
...
@@ -80,8 +80,9 @@ public class ShortboardTaskService {
//标记为已下发
shortboardRecord
.
setIsIssue
(
"1"
);
shortboardRecordMapper
.
updateByPrimaryKeySelective
(
shortboardRecord
);
String
message
=
"下发了短板,短板id:{}短板名:{}"
;
LogManager
.
logInfo
(
Constants
.
LOG_INDICATOR_SHORTBOARD_RECORD_API
,
message
,
shortBoardTask
.
getId
(),
shortBoardTask
.
getShortboardName
());
String
message
=
"下发了短板,短板id:{}-》短板对象:{}"
;
LogManager
.
logInfo
(
Constants
.
LOG_INDICATOR_SHORTBOARD_RECORD_API
,
message
,
shortBoardTask
.
getId
(),
shortBoardTask
.
toString
());
// LogManager.logInfo(Constants.LOG_INDICATOR_SHORTBOARD_RECORD_API,"下发短板:{}",shortBoardTask.toString());
}
//生成一版历史记录---val
...
...
src/main/java/com/keymobile/indicators/utils/FileUtils.java
View file @
ae99835d
...
...
@@ -78,4 +78,10 @@ public class FileUtils {
throw
new
Exception
(
"文件下载失败:"
+
e
);
}
}
public
static
void
deleteFileByPath
(
String
filePath
)
{
File
file
=
new
File
(
filePath
);
boolean
delete
=
file
.
delete
();
logger
.
info
(
"删除文件:"
+
filePath
,
"isDelete"
+
delete
);
}
}
src/main/java/com/keymobile/indicators/utils/HttpUtil.java
View file @
ae99835d
...
...
@@ -169,13 +169,8 @@ public class HttpUtil {
return
response
;
}
public
static
void
main
(
String
[]
args
)
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"dimDesc"
,
"asda萨达撒打算撒打算"
);
jsonObject
.
put
(
"id"
,
45
);
// sendPost("http://192.168.1.56:8080/smkj/api/lcds/user/lcdsUser",map);
String
s
=
jsonPost
(
"http://localhost:9088/indDim/test"
,
jsonObject
.
toJSONString
());
System
.
out
.
println
(
s
);
// sendGet("http://192.168.0.241:18080/api/v1/applications/application_1635264003926_0016")
}
/**
* 测试
...
...
src/main/resources/application-test.yml
View file @
ae99835d
...
...
@@ -20,14 +20,14 @@ spring:
multipart
:
max-file-size
:
20Mb
max-request-size
:
100Mb
location
:
/home/deploy/data/upload_tmp
#D://af
ile
location
:
S://tmpF
ile
session
:
store-type
:
redis
redis
:
namespace
:
hyycdev
redis
:
host
:
1
39.198.127.54
port
:
9
379
host
:
1
92.168.0.141
port
:
6
379
server
:
port
:
9088
servlet
:
...
...
@@ -40,7 +40,7 @@ eureka:
registryFetchIntervalSeconds
:
5
serviceUrl
:
defaultZone
:
http://192.168.0.230:7081/eureka/
enabled
:
tru
e
enabled
:
fals
e
instance
:
prefer-ip-address
:
true
hostname
:
192.168.0.230
...
...
@@ -69,11 +69,11 @@ mybatis:
logging
:
level
:
com.keymobile.indicators
:
info
com.keymobile.indicators
:
debug
config
:
classpath:logback-custom.xml
uploadfile
:
path
:
/home/deploy/uploadfile
path
:
fileTmp
isClearAllPools
:
true
...
...
src/main/resources/mybatis/mapping/ShortboardTaskMapper.xml
View file @
ae99835d
...
...
@@ -97,6 +97,10 @@
<if
test=
"unitName !=null and unitName!=''"
>
and sbt.unit_name like concat('%',#{unitName},'%')
</if>
<if
test=
"enterUserDeptCode!=null and enterUserDeptCode!=''"
>
and sbt.enter_user_dept_code like concat('%,',#{enterUserDeptCode},'%')
</if>
</sql>
...
...
src/test/java/com/keymobile/indicators/AppTest.java
deleted
100644 → 0
View file @
9f6ab34c
package
com
.
keymobile
.
indicators
;
import
junit.framework.Test
;
import
junit.framework.TestCase
;
import
junit.framework.TestSuite
;
/**
* Unit test for simple App.
*/
public
class
AppTest
extends
TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public
AppTest
(
String
testName
)
{
super
(
testName
);
}
/**
* @return the suite of tests being tested
*/
public
static
Test
suite
()
{
return
new
TestSuite
(
AppTest
.
class
);
}
/**
* Rigourous Test :-)
*/
public
void
testApp
()
{
assertTrue
(
true
);
}
}
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