Ver código fonte

key_11修改

zhuwei 1 mês atrás
pai
commit
b9a841764e

+ 0 - 1
blade-common/src/main/java/org/springblade/common/utils/CommonUtil.java

@@ -594,7 +594,6 @@ public class CommonUtil {
         return baos.toByteArray();
     }
 
-
     /**
      * 图片压缩
      *

+ 0 - 1
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSampleInfoServiceImpl.java

@@ -124,7 +124,6 @@ public class TrialSampleInfoServiceImpl extends BaseServiceImpl<TrialSampleInfoM
 
     @Override
     public IPage<TrialSampleInfoVO> selectPage(IPage<TrialSampleInfoVO> page, TrialSampleInfoVO obj) {
-
         return page.setRecords(baseMapper.trialSamplePage(page, obj));
     }
 

+ 2 - 2
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/controller/EVisaController.java

@@ -67,7 +67,7 @@ public class EVisaController {
 
         log.info("扫描开始");
        // String sql = "SELECT * from u_task_batch where json_data like '%1840658122872455168%' and is_deleted<>5  LIMIT 10";
-        String sql = "SELECT * from u_task_batch where is_deleted<>5 and nick_name='王龙' LIMIT 10";
+        String sql = "SELECT * from u_task_batch where is_deleted<>5 and id in(SELECT max(id) as id from u_task_batch where is_deleted<>5 GROUP BY JSON_EXTRACT(json_data, '$.formDataId')) LIMIT 10 ";
         List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
         if (maps != null && maps.size() >= 1 ) {//&& SystemUtils.isLinux()
             for (Map<String, Object> dataInfo : maps) {
@@ -83,7 +83,7 @@ public class EVisaController {
                     taskApprovalVO.setNickName(nickName);
 
                     if (!aBoolean) {
-                        RedisTemplate.opsForValue().set("sign-" + taskApprovalVO.getFormDataId(), "1",600, TimeUnit.SECONDS);
+                        RedisTemplate.opsForValue().set("sign-" + taskApprovalVO.getFormDataId(), "1",1800, TimeUnit.SECONDS);
                         CompletableFuture<Void> runAsync = CompletableFuture.runAsync(() -> {
                             try {
                                 /*===============执行批量任务===============*/

+ 0 - 25
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/utils/PDFUtils.java

@@ -59,29 +59,4 @@ public class PDFUtils {
         }
     }
 
-    public static void main123(String[] args) {
-        String pdfUrl= "https://bladex-chongqing-info.oss-cn-hangzhou.aliyuncs.com//upload/20230913/0193a0611867a1828164bb0abc65584c.pdf";
-        List<String> eVisaConfigList = new ArrayList<>();
-        try {
-            PdfDocument pdf = new PdfDocument();
-            InputStream ossInputStream = CommonUtil.getOSSInputStream(pdfUrl);
-            //加载PDF文档
-            pdf.loadFromStream(ossInputStream);
-
-            for(int i= 0;i<pdf.getPages().getCount();i++){
-                PdfPageBase page = pdf.getPages().get(i);
-                String text= page.extractText(false);
-                PdfTextFindCollection allText = page.findAllText();
-                PdfTextFind[] finds = allText.getFinds();
-                for(int k=0;k<finds.length;k++){
-                    String textStr = finds[k].getMatchText();
-                    if (textStr.length() >= 15 && Func.isNumeric(textStr)) {
-                        eVisaConfigList.add(textStr);
-                    }
-                }
-            }
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-    }
 }

+ 2 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -1575,7 +1575,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         }
 
         // 获取默认值
-        QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
+/*        QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("type", 4);
         queryWrapper.eq("tab_id", wbsTreeContract.getIsTypePrivatePid());
         final List<TextdictInfo> textdictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
@@ -1587,7 +1587,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                     reData.put(textdictInfo.getColKey() + "", textdictInfo.getSigRoleName());
                 }
             }
-        }
+        }*/
 
         // 移除Id 和 p_key_id
         if (type == 0) {

+ 15 - 11
blade-service/blade-meter/src/main/java/org/springblade/meter/controller/TaskController.java

@@ -4073,17 +4073,21 @@ public class TaskController extends BladeController {
     @Transactional
     public void addSignTaskBatch(Report report) {
         try {
-            // 修改个人电签状态
-            String UPSql = "update u_task_parallel a set a.e_visa_status=null,e_visa_content=null where a.process_instance_id = (select b.process_instance_id from u_task b where  b.`status` in(1,2) and b.form_data_id=" + report.getPeriodId() +  ") ";
-            String UPSqlJL = " update u_task_parallel a set a.e_visa_status=1,e_visa_content='电签成功' where sort in( SELECT a.fixed_flow_branch_sort from u_task b,u_fixed_flow_link a where b.`status` in(1,2) and b.form_data_id='"+report.getPeriodId()+"' and a.fixed_flow_id=b.fixed_flow_id and a.flow_task_type=2 ) and a.process_instance_id in(SELECT process_instance_id from u_task b where b.`status` in(1,2) and b.form_data_id='"+report.getPeriodId()+"')";
-            String DeSql = "delete from u_task_batch where task_parallel_id in(select b.process_instance_id from u_task b where b.`status` in(1,2) and b.form_data_id=" + report.getPeriodId()  + ")";
-            //删除以前存在的电签
-            String sql = " insert INTO u_task_batch(id,task_parallel_id,json_data,create_user,create_dept,create_time,update_user,update_time,status,is_deleted,nick_name) " + " SELECT a.id,a.process_instance_id,json_object('approvalFileList',json_array(),'approvalType',b.approval_type,'comment','','flag','OK','formDataId',b.form_data_id,'parallelProcessInstanceId',a.parallel_process_instance_id,'pass',true,'taskId',b.id) as  json_data,a.task_user,a.create_dept,a.create_time,a.update_user,a.update_time,1 as status,0 as is_deleted,a.task_user_name as nick_name " + " from u_task_parallel a,u_task b,u_fixed_flow_link c where b.`status` in(1,2) and  a.process_instance_id=b.process_instance_id and c.flow_task_type!=2 and a.sort = c.fixed_flow_branch_sort and c.fixed_flow_id=b.fixed_flow_id and (a.e_visa_status is not null or a.e_visa_content is not null or a.`status`=2) and b.form_data_id= '" + report.getPeriodId()+"'";
-
-            jdbcTemplate.execute(DeSql);
-            jdbcTemplate.execute(UPSql);
-            jdbcTemplate.execute(sql);
-            jdbcTemplate.execute(UPSqlJL);
+            String selSql = "select * from  u_task_parallel a set a.e_visa_status=null,e_visa_content=null where a.process_instance_id = (select b.process_instance_id from u_task b where  b.`status` in(1,2) and b.form_data_id=" + report.getPeriodId() +  ") and a.status=1 and a.e_visa_status is NULL and a.e_visa_content is null ";
+            List<Map<String, Object>> mapList = jdbcTemplate.queryForList(selSql);
+            if(Func.isEmpty(mapList) || mapList.size()==0) {
+                // 修改个人电签状态
+                String UPSql = "update u_task_parallel a set a.e_visa_status=null,e_visa_content=null where a.process_instance_id = (select b.process_instance_id from u_task b where  b.`status` in(1,2) and b.form_data_id=" + report.getPeriodId() + ") ";
+                String UPSqlJL = " update u_task_parallel a set a.e_visa_status=1,e_visa_content='电签成功' where sort in( SELECT a.fixed_flow_branch_sort from u_task b,u_fixed_flow_link a where b.`status` in(1,2) and b.form_data_id='" + report.getPeriodId() + "' and a.fixed_flow_id=b.fixed_flow_id and a.flow_task_type=2 ) and a.process_instance_id in(SELECT process_instance_id from u_task b where b.`status` in(1,2) and b.form_data_id='" + report.getPeriodId() + "')";
+                String DeSql = "delete from u_task_batch where task_parallel_id in(select b.process_instance_id from u_task b where b.`status` in(1,2) and b.form_data_id=" + report.getPeriodId() + ")";
+                //删除以前存在的电签
+                String sql = " insert INTO u_task_batch(id,task_parallel_id,json_data,create_user,create_dept,create_time,update_user,update_time,status,is_deleted,nick_name) " + " SELECT a.id,a.process_instance_id,json_object('approvalFileList',json_array(),'approvalType',b.approval_type,'comment','','flag','OK','formDataId',b.form_data_id,'parallelProcessInstanceId',a.parallel_process_instance_id,'pass',true,'taskId',b.id) as  json_data,a.task_user,a.create_dept,a.create_time,a.update_user,a.update_time,1 as status,0 as is_deleted,a.task_user_name as nick_name " + " from u_task_parallel a,u_task b,u_fixed_flow_link c where b.`status` in(1,2) and  a.process_instance_id=b.process_instance_id and c.flow_task_type!=2 and a.sort = c.fixed_flow_branch_sort and c.fixed_flow_id=b.fixed_flow_id and b.form_data_id= '" + report.getPeriodId() + "'";
+
+                jdbcTemplate.execute(DeSql);
+                jdbcTemplate.execute(UPSql);
+                jdbcTemplate.execute(sql);
+                jdbcTemplate.execute(UPSqlJL);
+            }
         } catch (Exception e) {
             StaticLog.error(e.getMessage());
         }

+ 14 - 11
blade-service/blade-meter/src/main/java/org/springblade/meter/utils/CreateDashedLine.java

@@ -99,7 +99,7 @@ public class CreateDashedLine {
         }
 
 
-        Map<String , float[]> s_data_xy = new HashMap<>();
+        List<Map<String,float[]>> s_data_xy = new ArrayList();
 
         for(String sval:s_data){
             //测试数据
@@ -112,15 +112,19 @@ public class CreateDashedLine {
                     }
                     float[] postions = listData.get(positionIndex);
                     if("1".equals(type)){ //实际
-                        if((postions[2]==s_heiht || Math.abs(postions[2]-s_heiht)<=0.01 ) && postions[1]>s_with){
-                            s_data_xy.put(sval,postions);
+                        if((postions[2]==s_heiht || Math.abs(postions[2]-s_heiht)<=0.02 ) && postions[1]>s_with){
+                            Map<String,float[]> dataxy = new HashMap<>();
+                            dataxy.put(sval, postions);
+                            s_data_xy.add(dataxy);
                             s_with = postions[1];
                             break;
                         }
                     }
                     if("2".equals(type)){ //计划
-                        if((postions[2]==j_heiht || Math.abs(postions[2]-j_heiht)<=0.01 ) && postions[1]>j_with){
-                            s_data_xy.put(sval,postions);
+                        if((postions[2]==j_heiht || Math.abs(postions[2]-j_heiht)<=0.02 ) && postions[1]>s_with){
+                            Map<String,float[]> dataxy = new HashMap<>();
+                            dataxy.put(sval, postions);
+                            s_data_xy.add(dataxy);
                             s_with = postions[1];
                             break;
                         }
@@ -135,17 +139,16 @@ public class CreateDashedLine {
         float oney = (data.get("0")[2] -data.get("5")[2])/5 * pageHeight;
         //实线坐标
         List<Float> points = new ArrayList<>();
-        for(String sval:s_data){
-            float[] floats = s_data_xy.get(sval);
+        for(Map<String,float[]> svalData:s_data_xy){
+            String sval = svalData.keySet().iterator().next().trim();
+            float[] floats = svalData.get(sval);
             if(floats!=null){
                 points.add( pageWidth * (floats[1])+2);
                 Double floor = Math.floor(Func.toDouble(sval) / 5)*5;
-                String da2 = floor.intValue()+"";
                 float add = (float) ((Func.toDouble(sval)-floor ) * oney);
+                String da2 = floor.intValue()+"";
                 float[] floats1 = data.get(da2);
-                float daa = pageHeight - pageHeight * (floats1[2]) + add;
-                System.out.println("zw+__"+daa);
-                points.add(daa);
+                points.add( pageHeight- pageHeight * (floats1[2]) + add );
             }
         }
         PDFFill(points,pdfUrl,type);