Browse Source

常用功能

guarantee-lsq 7 months ago
parent
commit
9978cb1994

+ 1 - 0
platform-dao/src/main/java/com/platform/dao/mapper/custom/CustomFormMapper.java

@@ -23,4 +23,5 @@ public interface CustomFormMapper extends MyMapper<CustomForm> {
      */
     List<CustomFormVO> selectList(CustomFormDTO dto);
 
+    List<CustomFormVO> selectIndexList(CustomFormDTO dto);
 }

+ 5 - 0
platform-dao/src/main/resources/mapper/custom/CustomFormMapper.xml

@@ -58,4 +58,9 @@
             <include refid="List_Condition"/>
         </where>
     </select>
+
+    <select id="selectIndexList" parameterType="com.platform.dao.dto.custom.CustomFormDTO" resultType="com.platform.dao.vo.query.custom.CustomFormVO">
+        select form.id,form.name
+        from t_custom_form as form where status = 1 limit 30
+    </select>
 </mapper>

+ 9 - 0
platform-rest/src/main/java/com/platform/rest/controller/workplace/WorkplaceController.java

@@ -1,7 +1,9 @@
 package com.platform.rest.controller.workplace;
 
 import com.platform.common.util.R;
+import com.platform.dao.dto.custom.CustomFormDTO;
 import com.platform.dao.dto.workflow.WorkflowTaskBomDTO;
+import com.platform.service.custom.CustomFormService;
 import com.platform.service.workflow.WorkflowTaskBomService;
 import lombok.AllArgsConstructor;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -21,6 +23,8 @@ public class WorkplaceController {
 
     private final WorkflowTaskBomService workflowTaskBomService;
 
+    private final CustomFormService customFormService;
+
     /**
      * 获取待发起事项
      * @param workflowTaskBomDTO
@@ -32,4 +36,9 @@ public class WorkplaceController {
     public R getById(WorkflowTaskBomDTO workflowTaskBomDTO, @RequestParam(defaultValue = "1") int pageNum, @RequestParam(defaultValue = "10") int pageSize) {
         return new R(workflowTaskBomService.selectWorkPlacePageList(workflowTaskBomDTO, pageNum, pageSize));
     }
+
+    @GetMapping("/template/list")
+    public R getTemplateList(CustomFormDTO record) {
+        return new R(customFormService.selectIndexList(record));
+    }
 }

+ 1 - 0
platform-service/src/main/java/com/platform/service/custom/CustomFormService.java

@@ -42,4 +42,5 @@ public interface CustomFormService extends IBaseService<CustomForm, CustomFormDT
 
     void enableStatus(String id,Integer status);
 
+    List<CustomFormVO> selectIndexList(CustomFormDTO record);
 }