|
@@ -427,12 +427,9 @@ public class EVisaServiceImpl implements EVisaService {
|
|
return NOT_PFX_SGIN;
|
|
return NOT_PFX_SGIN;
|
|
}
|
|
}
|
|
|
|
|
|
- //上锁
|
|
|
|
- //if (DistributedRedisLock.acquire(task.getUserId().toString(), batch)) {
|
|
|
|
try {
|
|
try {
|
|
//获取需要签章的数据
|
|
//获取需要签章的数据
|
|
List<TaskApprovalVO.ApprovalFile> files = taskFile.getApprovalFileList();
|
|
List<TaskApprovalVO.ApprovalFile> files = taskFile.getApprovalFileList();
|
|
-
|
|
|
|
//这里的文件只会是一张拼接好的PDF
|
|
//这里的文件只会是一张拼接好的PDF
|
|
for (TaskApprovalVO.ApprovalFile file : files) {
|
|
for (TaskApprovalVO.ApprovalFile file : files) {
|
|
|
|
|
|
@@ -462,28 +459,28 @@ public class EVisaServiceImpl implements EVisaService {
|
|
String contractId = Func.toStrArray(dataInfo)[0];
|
|
String contractId = Func.toStrArray(dataInfo)[0];
|
|
String projectId = Func.toStrArray(dataInfo)[1];
|
|
String projectId = Func.toStrArray(dataInfo)[1];
|
|
|
|
|
|
|
|
+
|
|
if (taskFile.getRemarkType().equals("2")) {
|
|
if (taskFile.getRemarkType().equals("2")) {
|
|
|
|
+ // 查询任务下所有
|
|
String sqlinfo = " SELECT * from ( SELECT a.id as keyWord,a.project_id,a.pyzbx ,a.pyzby,(SELECT acc_code from blade_user where id='" + task.getUserId() + "' and is_deleted=0 ) as sealId from m_textdict_info a where a.type =2 and a.id in (" + ids + ") and sig_role_id in (SELECT DISTINCT c.role_id from m_project_assignment_user c where c.contract_id=" + contractId + " and user_id=" + task.getUserId() + " and c.is_deleted=0 ) ) x where x.sealId is not null ";
|
|
String sqlinfo = " SELECT * from ( SELECT a.id as keyWord,a.project_id,a.pyzbx ,a.pyzby,(SELECT acc_code from blade_user where id='" + task.getUserId() + "' and is_deleted=0 ) as sealId from m_textdict_info a where a.type =2 and a.id in (" + ids + ") and sig_role_id in (SELECT DISTINCT c.role_id from m_project_assignment_user c where c.contract_id=" + contractId + " and user_id=" + task.getUserId() + " and c.is_deleted=0 ) ) x where x.sealId is not null ";
|
|
System.out.println("东方中讯-个人-user-id" + task.getUserId() + "--SQL=" + sqlinfo);
|
|
System.out.println("东方中讯-个人-user-id" + task.getUserId() + "--SQL=" + sqlinfo);
|
|
List<Map<String, Object>> maps2 = jdbcTemplate.queryForList(sqlinfo);
|
|
List<Map<String, Object>> maps2 = jdbcTemplate.queryForList(sqlinfo);
|
|
- if (maps2 != null && !maps2.isEmpty()) {
|
|
|
|
- List<Map<String, Object>> maps = new ArrayList<>();
|
|
|
|
- Map<String, List<Map<String, Object>>> peopleByAge = maps2.stream()
|
|
|
|
|
|
+ List<Map<String, Object>> maps = new ArrayList<>();
|
|
|
|
+ Map<String, List<Map<String, Object>>> peopleByAge = maps2.stream()
|
|
.collect(Collectors.groupingBy( hada ->(Func.toStr(hada.get("keyWord")))));
|
|
.collect(Collectors.groupingBy( hada ->(Func.toStr(hada.get("keyWord")))));
|
|
-
|
|
|
|
- for(String keyId :peopleByAge.keySet()){
|
|
|
|
- List<Map<String, Object>> keyList = peopleByAge.get(keyId);
|
|
|
|
- if(keyList!=null && keyList.size()==1){
|
|
|
|
- maps.addAll(keyList);
|
|
|
|
- }else if(keyList!=null && keyList.size()>=2){
|
|
|
|
- for(Map<String, Object> datax : keyList){
|
|
|
|
- if((datax.get("project_id")+"").equals(projectId)){
|
|
|
|
- maps.add(datax);
|
|
|
|
- }
|
|
|
|
|
|
+ if (maps2 != null && !maps2.isEmpty()) {
|
|
|
|
+ for(String keyId :peopleByAge.keySet()){
|
|
|
|
+ List<Map<String, Object>> keyList = peopleByAge.get(keyId);
|
|
|
|
+ if(keyList!=null && keyList.size()==1){
|
|
|
|
+ maps.addAll(keyList);
|
|
|
|
+ }else if(keyList!=null && keyList.size()>=2){
|
|
|
|
+ for(Map<String, Object> datax : keyList){
|
|
|
|
+ if((datax.get("project_id")+"").equals(projectId)){
|
|
|
|
+ maps.add(datax);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ }
|
|
String fileUrl = pdfUrl;
|
|
String fileUrl = pdfUrl;
|
|
for (Map<String, Object> dataMap : maps) {
|
|
for (Map<String, Object> dataMap : maps) {
|
|
HashMap<String, Object> daMa = new HashMap<>();
|
|
HashMap<String, Object> daMa = new HashMap<>();
|
|
@@ -879,7 +876,7 @@ public class EVisaServiceImpl implements EVisaService {
|
|
private Object[] signPdfByAXQZ(SealPdfVO pdfVO, byte[] fileByte) {
|
|
private Object[] signPdfByAXQZ(SealPdfVO pdfVO, byte[] fileByte) {
|
|
Object[] result = new Object[3];
|
|
Object[] result = new Object[3];
|
|
try {
|
|
try {
|
|
- PaperlessClient paperlessClient = new PaperlessClient(SIGN_HOST, SIGN_PORT, 300000, 1800000);
|
|
|
|
|
|
+ PaperlessClient paperlessClient = new PaperlessClient(SIGN_HOST, SIGN_PORT, 18000000, 72000000);
|
|
paperlessClient.setSSL(false);
|
|
paperlessClient.setSSL(false);
|
|
//*****************************************************************************
|
|
//*****************************************************************************
|
|
CompoundSealPdfListDetachedRequest compoundSealPdfListDetachedRequest = new CompoundSealPdfListDetachedRequest();
|
|
CompoundSealPdfListDetachedRequest compoundSealPdfListDetachedRequest = new CompoundSealPdfListDetachedRequest();
|