| | |
| | | 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; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | 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> |
| | |
| | | sgGxStepService.delete(id); |
| | | return R.success("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | @GetMapping(value = "/page") |
| | | public R queryPageList(ProjectSearchDTO searchDTO, Query query) { |
| | | IPage<SgGxStepDO> page = sgGxStepService.queryPageList(Condition.getPage(query), searchDTO); |
| | | return R.data(page); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @GetMapping(value = "/detail") |
| | | 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); |
| | | } |
| | | } |