|
@@ -23,11 +23,10 @@ import org.springblade.common.utils.CommonUtil;
|
|
import org.springblade.common.utils.SnowFlakeUtil;
|
|
import org.springblade.common.utils.SnowFlakeUtil;
|
|
import org.springblade.common.utils.SystemUtils;
|
|
import org.springblade.common.utils.SystemUtils;
|
|
import org.springblade.core.launch.StartEventListener;
|
|
import org.springblade.core.launch.StartEventListener;
|
|
|
|
+import org.springblade.core.log.exception.ServiceException;
|
|
|
|
+import org.springblade.core.log.publisher.ErrorLogPublisher;
|
|
import org.springblade.core.oss.model.BladeFile;
|
|
import org.springblade.core.oss.model.BladeFile;
|
|
-import org.springblade.core.tool.utils.DateUtil;
|
|
|
|
-import org.springblade.core.tool.utils.Func;
|
|
|
|
-import org.springblade.core.tool.utils.ObjectUtil;
|
|
|
|
-import org.springblade.core.tool.utils.ResourceUtil;
|
|
|
|
|
|
+import org.springblade.core.tool.utils.*;
|
|
import org.springblade.evisa.service.EVDataService;
|
|
import org.springblade.evisa.service.EVDataService;
|
|
import org.springblade.evisa.service.EVisaService;
|
|
import org.springblade.evisa.service.EVisaService;
|
|
import org.springblade.evisa.utils.FileUtils;
|
|
import org.springblade.evisa.utils.FileUtils;
|
|
@@ -260,7 +259,7 @@ public class EVDataServiceImpl implements EVDataService {
|
|
} else if (taskApp.getSigState() == 3) {
|
|
} else if (taskApp.getSigState() == 3) {
|
|
taskStatus = "已废除";
|
|
taskStatus = "已废除";
|
|
}
|
|
}
|
|
- String updTrial = "update u_trial_self_inspection_record set status=" + taskApp.getSigType() + ", task_status='" + taskStatus + "',pdf_url='" + taskApp.getLastFilePdfUrl() + "' where id=(select b.trial_self_inspection_record_id from u_task b,u_task_parallel c where b.process_instance_id=c.process_instance_id and b.is_deleted=0 and c.is_deleted=0 and b.status in(1,2) and parallel_process_instance_id='" + taskApp.getParallelProcessInstanceId() + "')";
|
|
|
|
|
|
+ String updTrial = "update u_trial_self_inspection_record set status=" + taskApp.getSigType() + ", task_status='" + taskStatus + "',pdf_url='" + taskApp.getLastFilePdfUrl() + "' where id=(select b.trial_self_inspection_record_id from u_task b where b.id = '" + taskApp.getTaskId() + "')";
|
|
jdbcTemplate.execute(updTrial);
|
|
jdbcTemplate.execute(updTrial);
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -359,6 +358,8 @@ public class EVDataServiceImpl implements EVDataService {
|
|
taskApp.setSignSmg("修改业务数据异常-请联系开发人员");
|
|
taskApp.setSignSmg("修改业务数据异常-请联系开发人员");
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
SignBackPdfInfo(taskApp);
|
|
SignBackPdfInfo(taskApp);
|
|
|
|
+ //发送服务异常事件
|
|
|
|
+ ErrorLogPublisher.publishEvent(e, null);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -492,7 +493,7 @@ public class EVDataServiceImpl implements EVDataService {
|
|
taskApp.setSigState(2);
|
|
taskApp.setSigState(2);
|
|
taskApp.setSignSmg("获取pdf信息异常");
|
|
taskApp.setSignSmg("获取pdf信息异常");
|
|
SignBackPdfInfo(taskApp);
|
|
SignBackPdfInfo(taskApp);
|
|
- return;
|
|
|
|
|
|
+ ErrorLogPublisher.publishEvent(e, null);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -511,24 +512,26 @@ public class EVDataServiceImpl implements EVDataService {
|
|
System.out.println("东方中讯--签字--" + sqlinfo);
|
|
System.out.println("东方中讯--签字--" + sqlinfo);
|
|
}
|
|
}
|
|
List<Map<String, Object>> maps2 = jdbcTemplate.queryForList(sqlinfo);
|
|
List<Map<String, Object>> maps2 = jdbcTemplate.queryForList(sqlinfo);
|
|
- Map<String, List<Map<String, Object>>> peopleByAge = maps2.stream()
|
|
|
|
- .collect(Collectors.groupingBy(hada -> (Func.toStr(hada.get("keyWord")))));
|
|
|
|
- for (String keyId : peopleByAge.keySet()) {
|
|
|
|
- int exId = 0;
|
|
|
|
- List<Map<String, Object>> keyList = peopleByAge.get(keyId);
|
|
|
|
- if (keyList != null && keyList.size() == 1) {
|
|
|
|
- maps.addAll(keyList);
|
|
|
|
- exId = 1;
|
|
|
|
- } else if (keyList != null && keyList.size() >= 2) {
|
|
|
|
- for (Map<String, Object> datax : keyList) {
|
|
|
|
- if ((datax.get("project_id") + "").equals(task.getProjectId())) {
|
|
|
|
- maps.add(datax);
|
|
|
|
- exId = 1;
|
|
|
|
|
|
+ if(CollectionUtil.isNotEmpty(maps2)) {
|
|
|
|
+ Map<String, List<Map<String, Object>>> peopleByAge = maps2.stream()
|
|
|
|
+ .collect(Collectors.groupingBy(hada -> (Func.toStr(hada.get("keyWord")))));
|
|
|
|
+ for (String keyId : peopleByAge.keySet()) {
|
|
|
|
+ int exId = 0;
|
|
|
|
+ List<Map<String, Object>> keyList = peopleByAge.get(keyId);
|
|
|
|
+ if (keyList != null && keyList.size() == 1) {
|
|
|
|
+ maps.addAll(keyList);
|
|
|
|
+ exId = 1;
|
|
|
|
+ } else if (keyList != null && keyList.size() >= 2) {
|
|
|
|
+ for (Map<String, Object> datax : keyList) {
|
|
|
|
+ if ((datax.get("project_id") + "").equals(task.getProjectId())) {
|
|
|
|
+ maps.add(datax);
|
|
|
|
+ exId = 1;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
- if (exId == 0) {
|
|
|
|
- maps.add(keyList.get(0));
|
|
|
|
|
|
+ if (exId == 0) {
|
|
|
|
+ maps.add(keyList.get(0));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -780,6 +783,11 @@ public class EVDataServiceImpl implements EVDataService {
|
|
//执行电签
|
|
//执行电签
|
|
if (result != null) {
|
|
if (result != null) {
|
|
try {
|
|
try {
|
|
|
|
+ //对文件流做判断
|
|
|
|
+ byte[] bytes = (byte[]) result[0];
|
|
|
|
+ if(bytes.length < 50){
|
|
|
|
+ throw new ServiceException("读取电签文件失败,文件字节长度小于100");
|
|
|
|
+ }
|
|
ByteArrayInputStream inputStream = new ByteArrayInputStream((byte[]) result[0]);
|
|
ByteArrayInputStream inputStream = new ByteArrayInputStream((byte[]) result[0]);
|
|
FileOutputStream fout = new FileOutputStream(dataFileUrl);
|
|
FileOutputStream fout = new FileOutputStream(dataFileUrl);
|
|
int bytesRead = 0;
|
|
int bytesRead = 0;
|