add:删除多余注释,添加定时任务日志打印

This commit is contained in:
wxyclub
2023-07-05 17:17:49 +08:00
parent cc6331f6a6
commit 8c677a7715
3 changed files with 6 additions and 13 deletions
@@ -195,7 +195,7 @@ public class ProcessTimer {
busMes.setJson(jsonObject.toJSONString());
busMes.setUserId(jsonObject.getString("revisionId"));
Wrapper<String> wrapper=workFlowFeignClient.completeTaskByUserId(busMes);
log.info("政策课题组会后流程已发起");
log.info("政策课题组会后流程已发起,任务ID{}UserID{}",busMes.getTaskIds(),busMes.getUserId());
}
}
log.info("=================================政策课题组会后流程定时任务启动=====================================");
@@ -226,7 +226,7 @@ public class ProcessTimer {
busMes.setUserId(result);
Wrapper<String> wrapper=workFlowFeignClient.completeTaskByUserId(busMes);
System.out.println("标准化活动会后流程自动发起");
log.info("标准化活动会后流程自动发起,任务IDS{}UserID{}",busMes.getTaskIds(),busMes.getUserId());
}
}
@@ -75,7 +75,8 @@ public class StateSync {
if(isNotScheduled){
try{
Thread.sleep(2000);
logger.info("月初:"+Thread.currentThread().getName() + " cron=0 0 1 1 * ? --- " + new Date()+"---START-01");
// logger.info("月初:"+Thread.currentThread().getName() + " cron=0 0 1 1 * ? --- " + new Date()+"---START-01");
logger.info("每天凌晨:{} corn=0 0 0 * * ? --- {}START-01",Thread.currentThread().getName(),new Date());
// String nowFirst = DateUtil.firstOneDay(DateUtil.printDate(new Date()));
// String nowFin = DateUtil.finOneDay(DateUtil.printDate(new Date()));
// String nowFinByQuery = DateUtil.addDay(DateUtil.finOneDay(DateUtil.printDate(new Date())),1);
@@ -162,12 +163,14 @@ public class StateSync {
// 复审表操作逻辑 新增
if(!insList.isEmpty()){
bussionessStandStateService.saveBatch(insList);
insList.forEach(each -> logger.info("复审表操作逻辑 新增:企业标准信息复审ID:{},标准ID:{},标准名称:{}",each.getId(),each.getStandId(),each.getStandName()));
}
// 复审表操作逻辑 更新
if(!updList.isEmpty()){
// List<SarBussionessStandState> updListResult = updList.stream().peek(p -> p.setModifyTime(DateUtil.printDateAll(new Date()))).collect(Collectors.toList());
bussionessStandStateService.updateBatchById(updList);
updList.forEach(each -> logger.info("复审表操作逻辑 更新:企业标准信息复审ID:{},标准ID:{},标准名称:{}",each.getId(),each.getStandId(),each.getStandName()));
}
}
@@ -61,12 +61,6 @@ public class OnlyofficePdfUtil {
HttpEntity entityRes = response.getEntity();
if (entityRes != null) {
InputStream content = entityRes.getContent();
// byte[] getData = readInputStream(content);
// File file = new File(filePath);
// FileOutputStream fos = new FileOutputStream(file);
// fos.write(getData);
// fos.close();
// File file = new File(Objects.requireNonNull(this.getClass().getClassLoader().getResource("")).getPath()+ filePdfName);
File file = new File(filePath);
FileUtils.copyInputStreamToFile(content,file);
content.close();
@@ -103,8 +97,6 @@ public class OnlyofficePdfUtil {
}
public static String convertFile(String onlyOfficeUrl,String titleName,String key, String onlineFilePath) throws Exception{
//String url = "http://47.92.92.38:8103/7.2.1-34/ConvertService.ashx";
// String url = "http://10.100.5.116:8088/7.2.1-34/ConvertService.ashx";
Map<String,Object> map = new HashMap<>();
map.put("async",false);
map.put("filetype","docx");
@@ -114,7 +106,6 @@ public class OnlyofficePdfUtil {
// map.put("url","https://10.100.5.111:3306/file/"+onlineFilePath);
map.put("url","https://srms.foton.com.cn/file/"+onlineFilePath);
logger.info("=======================================https://srms.foton.com.cn/file/"+onlineFilePath);
//map.put("url","https://srms.foton.com.cn/file/model/task_768330d8/task_768330d8_top_768330d8_node.docx");
JSONObject requestJson = new JSONObject(map);
logger.info("=========================post参数:{}",requestJson);
// 创建HttpClientBuilder
@@ -130,7 +121,6 @@ public class OnlyofficePdfUtil {
.setConnectTimeout(60000)
.build();
httpPost.setConfig(requestConfig);
// httpPost.addHeader("Content-Type","application/json");
CloseableHttpResponse response = null;
try {
//设置post请求方式为JSON