yxm
2024-07-15 eb0760c36778d07c0d13d917c0db30dfa03aa0fd
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sg/controller/SgGxStepController.java
@@ -1,7 +1,9 @@
package cn.gistack.sm.sg.controller;
import cn.gistack.sm.sg.DO.SgGxRoleDO;
import cn.gistack.sm.sg.DO.SgGxStepDO;
import cn.gistack.sm.sg.DTO.ProjectSearchDTO;
import cn.gistack.sm.sg.VO.SgGxRoleVO;
import cn.gistack.sm.sg.VO.SgGxVO;
import cn.gistack.sm.sg.service.SgGxStepService;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -11,6 +13,9 @@
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
/**
 * <p>
@@ -62,6 +67,12 @@
      return R.data(page);
   }
   @GetMapping(value = "/sg_list")
   public R sgGxStepList() {
      List<SgGxStepDO> sgGxStepDOS = sgGxStepService.sgGxStepList();
      return R.data(sgGxStepDOS);
   }
   /**
    * 详情
    */
@@ -69,4 +80,33 @@
   public R queryPageList(String id) {
      return R.data(sgGxStepService.getById(id));
   }
   /**
    * 新增工序角色配置记录
    * @param SgGxRoleVO
    * @return
    */
   @PostMapping(value = "/addSgGxRole")
   public R addSgGxRole(@RequestBody SgGxRoleVO SgGxRoleVO) {
      sgGxStepService.insertSgGxRole(SgGxRoleVO);
      return R.success("添加成功");
   }
   /**
    * 更新工序角色配置记录
    * @param SgGxRoleVO
    * @return
    */
   @PostMapping(value = "/updateSgGxRole")
   public R updateSgGxRole(@RequestBody SgGxRoleVO SgGxRoleVO) {
      sgGxStepService.updateSgGxRole(SgGxRoleVO);
      return R.success("修改成功");
   }
   @GetMapping(value = "/getSgGxRoles")
   public R getSgGxRoles(String gxDeviceType,String gxStepId) {
      List<String> roleIds=sgGxStepService.getSgGxRoles(gxDeviceType,gxStepId);
      return R.data(roleIds);
   }
}