LingxinMeng 2 anos atrás
pai
commit
af1a803db9

+ 3 - 4
simulation-resource-server/src/main/java/com/css/simulation/resource/project/controller/SimulationProjectController.java

@@ -8,6 +8,8 @@ import api.common.util.StringUtil;
 import com.css.simulation.resource.project.service.SimulationProjectService;
 import com.css.simulation.resource.system.service.ClusterService;
 import com.github.pagehelper.PageInfo;
+
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -160,9 +162,8 @@ public class SimulationProjectController {
      * 根据字典类型和
      *
      * @param param 参数
-     * @return name
      */
-    @RequestMapping("getDictName")
+    @PostMapping("getDictName")
     public ResponseBodyVO<String> getDictName(@RequestBody DictParam param) {
         String dictName = service.getDictName(param.getType(), param.getCode());
         return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, null, dictName);
@@ -201,7 +202,6 @@ public class SimulationProjectController {
         } else {
             return service.saveEvaluationLevel(id);
         }
-
     }
 
     /**
@@ -228,7 +228,6 @@ public class SimulationProjectController {
         service.exportProjectReportAndTaskFileById(param);
     }
 
-
     /**
      * 添加编辑自动项目
      */

+ 4 - 4
simulation-resource-server/src/main/java/com/css/simulation/resource/project/service/impl/SimulationProjectServiceImpl.java

@@ -4946,12 +4946,12 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
         if (center) {
             for (String title : titleList) {
                 PdfPCell pdfPCell = new PdfPCell();
-                pdfPCell.setBackgroundColor(BaseColor.LIGHT_GRAY);  // 单元格底色
-                pdfPCell.setHorizontalAlignment(Element.ALIGN_CENTER);  // 水平居中
-                pdfPCell.setUseAscender(true);                          // 垂直居中
-                pdfPCell.setVerticalAlignment(Element.ALIGN_MIDDLE);    // 垂直居中
                 final Paragraph paragraph = new Paragraph(title, defaultFont(font));
+                pdfPCell.setBackgroundColor(BaseColor.LIGHT_GRAY);  // 单元格底色
                 pdfPCell.setPhrase(paragraph);
+                pdfPCell.setUseAscender(true);
+                pdfPCell.setVerticalAlignment(Element.ALIGN_CENTER);    // 垂直居中
+                pdfPCell.setHorizontalAlignment(Element.ALIGN_CENTER);  // 水平居中
                 pdfPTable.addCell(pdfPCell);
             }
         } else {