| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.vci.ubcs.code.feign.ICodeClassifyClient; |
| | | import com.vci.ubcs.code.webservice.service.*; |
| | | import com.vci.ubcs.code.webservice.vo.*; |
| | | import com.vci.ubcs.code.webservice.vo.collection.DockingPreAttrMappingVOList; |
| | | import com.vci.ubcs.code.webservice.wrapper.DockingPreApplyFormWrapper; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.revision.model.TreeQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | import com.vci.ubcs.code.webservice.entity.DockingPreApplyForm; |
| | | import com.vci.ubcs.code.webservice.vo.BaseModelVO; |
| | | import com.vci.ubcs.code.webservice.vo.DockingPreApplyFormVO; |
| | | import com.vci.ubcs.code.webservice.vo.DockingPreAttrMappingVO; |
| | | import com.vci.ubcs.code.webservice.vo.DockingPreAttrRangeVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.validation.Valid; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | @RequestMapping("/DockingPreApplyCode") |
| | | @Api(value = "集团属性映射配置", tags = "集团属性映射配置接口") |
| | | public class DockingPreApplyCodeController { |
| | | |
| | | /** |
| | | * 集团属性映射配置属性 |
| | | */ |
| | | private final IDockingPreAttrMappingService dockingPreAttrMappingService; |
| | | |
| | | /** |
| | | /** |
| | | * 集团属性映射配置属性 |
| | | */ |
| | | private final IGroupMdmInterService groupMdmInterService; |
| | |
| | | |
| | | private final IDockingPreApplyFormService dockingPreApplyFormService; |
| | | |
| | | /*** |
| | | * 属性枚举范围服务 |
| | | */ |
| | | |
| | | private final IDockingPreViewModelService dockingPreViewModelService; |
| | | |
| | | |
| | | /*** |
| | | * 属性枚举范围服务 |
| | | */ |
| | | |
| | | private final ICodeClassifyClient codeClassifyClient; |
| | | |
| | | /** |
| | | * 根据主数据编码oid获取集团属性映射信息 |
| | |
| | | IPage<DockingPreApplyForm> pages = dockingPreApplyFormService.page(Condition.getPage(query), Condition.getQueryWrapper(dockingPreApplyForm)); |
| | | return R.data(DockingPreApplyFormWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * 保存属性映射配置组件 |
| | | * @param dockingPreAttrMappingVOList 属性映射配置数据传输对象 |
| | |
| | | @PostMapping( "/batchAddSave") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "保存属性映射配置", notes = "dockingPreAttrMappingVOList") |
| | | public R batchSave(@Valid @RequestBody List<DockingPreAttrMappingVO> dockingPreAttrMappingVOList){ |
| | | public R batchSave(@RequestBody DockingPreAttrMappingVOList dockingPreAttrMappingVOList){ |
| | | List<DockingPreAttrMappingVO> dockingPreAttrMappingVOs = dockingPreAttrMappingVOList.getDockingPreAttrMappingVOList(); |
| | | List<DockingPreAttrMappingVO> dockingPreAttrRangeVOS=new ArrayList<>(); |
| | | try { |
| | | dockingPreAttrRangeVOS = dockingPreAttrMappingService.batchAddSave(dockingPreAttrMappingVOList); |
| | | dockingPreAttrRangeVOS = dockingPreAttrMappingService.batchAddSave(dockingPreAttrMappingVOs); |
| | | }catch (Exception e){ |
| | | return R.fail("集团集成属性映射配置保存失败:"+e.getMessage()); |
| | | } |
| | |
| | | /** |
| | | * 参照树 集团分类(是否包含属性) |
| | | * @param treeQueryObject 树形查询对象 conditionMap 存上 codeclsfid=主数据的分类oid |
| | | * @return 主题库分类显示树 |
| | | * @return 集团分类显示树 |
| | | */ |
| | | @GetMapping("/referTree") |
| | | public List<Tree> referTree(TreeQueryObject treeQueryObject) { |
| | | return dockingPreClassifyService.treeCompanyGroupClassify(treeQueryObject); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 参照树 主数据模板属性信息 |
| | | * @param classifyId 主数据分类主键 |
| | | * @return 主题库分类模板属性 |
| | | */ |
| | | @GetMapping("/listViewModelAttributeByClassId") |
| | | public R listViewModelAttributeByClassId(String classifyId) { |
| | | return R.data(dockingPreViewModelService.selectDockingPreViewModelByClassId(classifyId,true)); |
| | | } |
| | | |
| | | /** |
| | | * 参照树 主数据分类 |
| | | * @param treeQueryObject 树形查询对象 conditionMap 存上 codeclsfid=主数据的分类oid |
| | | * @return 主题库分类显示树 |
| | | */ |
| | | @GetMapping("/referCodeClassifyTree") |
| | | public List<Tree> referCodeClassifyTree(TreeQueryObject treeQueryObject) { |
| | | return codeClassifyClient.referCodeClassifyTree(treeQueryObject); |
| | | } |
| | | |
| | | /** |
| | | * 参照树 主数据模板属性信息 |
| | | * @param codeClassifyId 主数据分类主键 |
| | | * @return 主题库分类模板属性 |
| | | */ |
| | | @GetMapping("/listCodeAttributeByClassId") |
| | | public R listCodeAttributeByClassId(String codeClassifyId) { |
| | | return R.data(codeClassifyClient.listCodeAttributeByClassId(codeClassifyId)); |
| | | } |
| | | |
| | | |
| | | /*** |
| | | * 申请集团编码 |
| | |
| | | return R.fail("集团码申请失败:"+e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | /*** |
| | | * 同步集团模型视图 |
| | | * @return 返回执行结果信息 |
| | | */ |
| | | @PostMapping( "/syncClassifyModel") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "同步集团模型视图", notes = "同步集团模型视图->all:同步集团主模型,one:同步集团模型详细信息") |
| | | public R syncClassifyModel(String classifyId,String operationType){ |
| | | try { |
| | | return groupMdmInterService.syncClassifyModel(classifyId,operationType); |
| | | }catch (VciBaseException e){ |
| | | return R.fail("同步集团模型视图失败:"+e.getMessage()); |
| | | } |
| | | |
| | | } |
| | | |
| | | /*** |
| | | * 查询申请单状态 |
| | | * oids:业务数据oid |
| | | * @return 返回执行结果信息 |
| | | */ |
| | | @GetMapping( "/queryApplyState") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "查看申请单状态", notes = "查看申请单状态") |
| | | public R queryApplyState(String oids){ |
| | | try { |
| | | return groupMdmInterService.queryApplyState(oids); |
| | | }catch (VciBaseException e){ |
| | | return R.fail("查看申请单状态失败:"+e.getMessage()); |
| | | } |
| | | } |
| | | } |