Преглед на файлове

1.JL8102支座垫石公式变为绝对值
2.自定义节点可编辑时间,可以预览,删除完附件时删除合同段wbs树缓存

chenr преди 1 седмица
родител
ревизия
4f5aa33f0b

+ 11 - 6
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -2671,7 +2671,7 @@ public class InformationWriteQueryController extends BladeController {
     public R<Boolean> updateContractNodeParameter(@RequestParam Long pKeyId, @RequestParam String
         nodeName, @RequestParam String partitionCode, @RequestParam(required = false) Integer className,
                                                   @RequestParam(required = false) Integer unitName, @RequestParam(required = false) Integer excellentNum,
-                                                  @RequestParam(required = false) Integer unitNum) {
+                                                  @RequestParam(required = false) Integer unitNum,@RequestParam(required = false)String digitizeTime) {
         WbsTreeContract node = new WbsTreeContract();
         node.setPKeyId(pKeyId);
         node.setNodeName(nodeName);
@@ -2695,14 +2695,19 @@ public class InformationWriteQueryController extends BladeController {
                 }
 
             }
-            String father = "SELECT * FROM m_wbs_tree_contract WHERE id=" + queries.getParentId();
-            WbsTreeContract fatherNode = jdbcTemplate.queryForObject(father, new BeanPropertyRowMapper<>(WbsTreeContract.class));
-            if (ObjectUtil.isNotEmpty(fatherNode)) {
-                if (fatherNode.getIsClassifition() == Integer.valueOf(1)) {
-                    return R.fail("当前节点的父节点包含单元评定");
+            String father = "SELECT * FROM m_wbs_tree_contract WHERE id=" + queries.getParentId()+" AND is_deleted=0";
+             List<WbsTreeContract>  fatherNode = jdbcTemplate.query(father, new BeanPropertyRowMapper<>(WbsTreeContract.class));
+            if (ObjectUtil.isNotEmpty(fatherNode)&&fatherNode.size()>0) {
+                for (WbsTreeContract wbsTreeContract : fatherNode) {
+                    if (wbsTreeContract.getIsClassifition() == Integer.valueOf(1)) {
+                        return R.fail("当前节点的父节点包含单元评定");
+                    }
                 }
             }
         }
+        if(ObjectUtil.isNotEmpty(digitizeTime)){
+            node.setDigitizeTime(digitizeTime);
+        }
         if (ObjectUtil.isNotEmpty(unitName) && ObjectUtil.isNotEmpty(className)) {
             node.setIsClassifition(1);
             node.setClassName(className);

+ 4 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/TableFileController.java

@@ -43,6 +43,7 @@ import org.springblade.manager.service.IExcelTabService;
 import org.springblade.manager.service.IWbsTreeContractService;
 import org.springblade.manager.service.IWbsTreePrivateService;
 import org.springblade.manager.vo.ExcelTabVO;
+import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.web.bind.annotation.*;
@@ -82,6 +83,8 @@ public class TableFileController extends BladeController {
 
     private final JdbcTemplate jdbcTemplate;
 
+    private final RedisTemplate redisTemplate;
+
     /**
      * 删除 表单附件信息
      */
@@ -140,6 +143,7 @@ public class TableFileController extends BladeController {
                         jdbcTemplate.execute(sql);
                     }
                 }
+                redisTemplate.delete("blade-manager::contract:wbstree:");
             }
         }
         return R.status(true);

+ 9 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/FormulaZhiZuo.java

@@ -46,6 +46,9 @@ public class FormulaZhiZuo implements FormulaStrategy {
             Double v = map.get(firstEntry.getKey() + i + 1);
             if (ObjectUtil.isNotEmpty(v)) {
                 Double value = first - v;
+                if(value<0){
+                    value=Math.abs(value);
+                }
                 for (int j = i; j < values.size(); j++) {
                     if(values.get(j).getY()==firstEntry.getKey() + i + 1){
                         values.get(j).setValue(value);
@@ -65,6 +68,9 @@ public class FormulaZhiZuo implements FormulaStrategy {
                     Double v = map.get(key1 + i -4);
                     if (ObjectUtil.isNotEmpty(v)) {
                         Double value = second - v;
+                        if(value<0){
+                            value=Math.abs(value);
+                        }
                         for (int j = i; j < values.size(); j++) {
                             if(values.get(j).getY()==key1 + i -4){
                                 values.get(j).setValue(value);
@@ -84,6 +90,9 @@ public class FormulaZhiZuo implements FormulaStrategy {
                     Double v = map.get(key2 + i -9);
                     if (ObjectUtil.isNotEmpty(v)) {
                         Double value = threed - v;
+                        if(value<0){
+                            value=Math.abs(value);
+                        }
                         for (int j = i; j < values.size(); j++) {
                             if(values.get(j).getY()==key2 + i -9){
                                 values.get(j).setValue(value);

+ 1 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/TableFileMapper.xml

@@ -51,7 +51,7 @@
     </delete>
 
     <select id="selectTableFileListByTen" resultMap="TableFileVO">
-        select *,domain_url as url from m_table_file where is_deleted = 0  and classify = #{classify} and type in (10,11,12) and tab_id = #{pKid}
+        select *,domain_url as url from m_table_file where is_deleted = 0  and classify = #{classify} and type in (10,11,12,20,21,22) and tab_id = #{pKid}
     </select>
 
     <select id="selectTableFileList1" resultMap="TableFileVO">