package com.vci.ubcs.code.applyjtcodeservice.controller;
|
|
import com.vci.ubcs.code.applyjtcodeservice.entity.DockingPreMetaAttr;
|
import com.vci.ubcs.code.applyjtcodeservice.service.IGroupAttrPoolMappingService;
|
import com.vci.ubcs.code.applyjtcodeservice.vo.GroupAttrPoolMappingVO;
|
import io.swagger.annotations.Api;
|
import lombok.AllArgsConstructor;
|
import org.springblade.core.tool.api.R;
|
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;
|
|
import javax.sql.rowset.serial.SerialException;
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* 集团属性池映射Controller
|
* @author ludc
|
* @date 2024/4/15 16:48
|
*/
|
@RestController
|
@AllArgsConstructor
|
@RequestMapping("/groupAttrPoolMapping")
|
@Api(value = "集团属性池映射配置", tags = "集团属性池映射配置接口")
|
public class GroupAttrPoolMappingController {
|
|
private final IGroupAttrPoolMappingService groupAttrPoolMappingService;
|
|
/**
|
* 查询集团属性池映射的属性
|
* @param groupAttrPoolMappingVO
|
* @return
|
*/
|
@PostMapping("/getGroupAttrPoolALlList")
|
public R<List<GroupAttrPoolMappingVO>> getGroupAttrPoolALlList(@RequestBody GroupAttrPoolMappingVO groupAttrPoolMappingVO) throws SerialException {
|
return R.data(groupAttrPoolMappingService.getGroupAttrPoolALlList(groupAttrPoolMappingVO));
|
}
|
|
/**
|
* 根据集团属性编号查询集团属性池映射
|
* @param groupAttrPoolMappingVO
|
* @return
|
*/
|
@PostMapping("/getByGroupAttrKeyList")
|
public R<List<GroupAttrPoolMappingVO>> getByGroupAttrKeyList(@RequestBody GroupAttrPoolMappingVO groupAttrPoolMappingVO) throws SerialException {
|
return R.data(groupAttrPoolMappingService.getByGroupAttrKeyList(groupAttrPoolMappingVO));
|
}
|
|
/**
|
* 根据集团属性编号查询集团属性池映射
|
* @param groupAttrPoolMappingVO
|
* @return
|
*/
|
@PostMapping("/editGroupAttr")
|
public R editGroupAttr(@RequestBody List<GroupAttrPoolMappingVO>groupAttrPoolMappingVO) throws SerialException {
|
return R.status(groupAttrPoolMappingService.editGroupAttr(groupAttrPoolMappingVO));
|
}
|
|
/**
|
* 根据集团属性编号查询集团属性池映射,慎用因为会更新所有用到这个集团属性的记录
|
* @param groupAttrPoolMappingVOS
|
* @return
|
*/
|
@PostMapping("/syncGroupAttrMapping")
|
public R syncGroupAttrMapping(@RequestBody List<GroupAttrPoolMappingVO> groupAttrPoolMappingVOS) throws SerialException {
|
return R.status(groupAttrPoolMappingService.syncGroupAttrMapping(groupAttrPoolMappingVOS));
|
}
|
|
/**
|
* 后期要删除,前期测试用
|
* @param dockingPreMetaAttrList
|
* @return
|
* @throws SerialException
|
*/
|
@PostMapping("/saveDistinctGroupAttr")
|
public R saveDistinctGroupAttr(@RequestBody List<DockingPreMetaAttr> dockingPreMetaAttrList) throws SerialException {
|
return R.status(groupAttrPoolMappingService.saveDistinctGroupAttr(dockingPreMetaAttrList));
|
}
|
|
}
|