Commit ae99835d by hzc

修复短板bug,升级log4j

parent 9f6ab34c
......@@ -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>
......
......@@ -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);
}
......
......@@ -147,17 +147,17 @@ public class ShortboardTaskValCtrl {
column4.add("单位");
column4.add(shortBoardTask.getUnitName());
column4.add("指标值");
column4.add(shortBoardTask.getValue());
column4.add(shortBoardTaskVal.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(shortBoardTaskVal.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(shortBoardTaskVal.getEndTime(),"yyyy-MM-dd HH:mm:ss"));
column6.add("下发原因");
column6.add(shortBoardTask.getCause());
column6.add(shortBoardTaskVal.getCause());
//短板原因分析
List<String> column7 = new ArrayList<>();
......
......@@ -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;
/**
* 接收人
......
......@@ -39,4 +39,7 @@ public class ShortboardParam {
@ApiModelProperty("日期精确查询--维度")
private String dateInt;
@ApiModelProperty("填报接收人部门编码模糊匹配")
private String enterUserDeptCode;
}
......@@ -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);
}
......@@ -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
......
......@@ -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);
}
}
......@@ -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")
}
/**
* 测试
......
......@@ -20,14 +20,14 @@ spring:
multipart:
max-file-size: 20Mb
max-request-size: 100Mb
location: /home/deploy/data/upload_tmp #D://afile
location: S://tmpFile
session:
store-type: redis
redis:
namespace: hyycdev
redis:
host: 139.198.127.54
port: 9379
host: 192.168.0.141
port: 6379
server:
port: 9088
servlet:
......@@ -40,7 +40,7 @@ eureka:
registryFetchIntervalSeconds: 5
serviceUrl:
defaultZone: http://192.168.0.230:7081/eureka/
enabled: true
enabled: false
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
......
......@@ -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>
......
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 );
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment