shenyijian
2024-06-21 f20611265f7d34fd4fbcdfdaff6cb9cccd0b25fc
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>
@@ -69,4 +74,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);
   }
}