| | |
| | | package com.vci.ubcs.code.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.vci.ubcs.code.applyjtcodeservice.vo.BaseModelVO; |
| | | import com.vci.ubcs.code.bo.CodeClassifyFullInfoBO; |
| | | import com.vci.ubcs.code.dto.CodeOrderDTO; |
| | | import com.vci.ubcs.code.entity.CodeClassify; |
| | | import com.vci.ubcs.code.enumpack.CodeClassifyProcessUseEnum; |
| | | import com.vci.ubcs.code.service.ICodeClassifyService; |
| | | import com.vci.ubcs.code.service.ICodeClassifyTemplateAttrService; |
| | | import com.vci.ubcs.code.service.ICodeClassifyValueService; |
| | | import com.vci.ubcs.code.service.MdmEngineService; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyValueVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO; |
| | | import com.vci.ubcs.code.service.impl.FormulaServiceImpl; |
| | | import com.vci.ubcs.code.vo.ComponentRule; |
| | | import com.vci.ubcs.code.vo.pagemodel.*; |
| | | import com.vci.ubcs.starter.annotation.VciBusinessLog; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.revision.model.TreeQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.KeyValue; |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | import com.vci.ubcs.starter.web.pagemodel.UIFormReferVO; |
| | | import com.vci.ubcs.starter.web.pagemodel.*; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 主题库定义表 控制器 |
| | |
| | | * 分类码段服务 |
| | | */ |
| | | private final ICodeClassifyValueService codeClassifyValueService; |
| | | |
| | | /** |
| | | * 公式的服务 |
| | | */ |
| | | @Autowired |
| | | private FormulaServiceImpl formulaService; |
| | | /** |
| | | * 获取库节点信息 |
| | | * @param libName 库节点名称 |
| | |
| | | * @return 执行的结果 |
| | | */ |
| | | @GetMapping("/defaultReferDataGrid") |
| | | public R<IPage<BaseModel>> defaultReferDataGrid(UIFormReferVO referConfigVO, BaseQueryObject baseQueryObject){ |
| | | IPage<BaseModel> iPage= mdmEngineService.referDataGrid(referConfigVO,baseQueryObject); |
| | | public R<IPage<BaseModelVO>> defaultReferDataGrid(UIFormReferVO referConfigVO, BaseQueryObject baseQueryObject){ |
| | | IPage<BaseModelVO> iPage= mdmEngineService.referDataGrid(referConfigVO,baseQueryObject); |
| | | return R.data(iPage); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取属性组合规则的值 |
| | | * @param componentRule 参照的配置信息 |
| | | * @param componentRule 组合规则 |
| | | * @return 执行的结果 |
| | | */ |
| | | @GetMapping("/getValueByFormula") |
| | | public R<String> getValueByFormula(ComponentRule componentRule){ |
| | | String value = formulaService.getValueByFormula(componentRule.getDataMap(),componentRule.getComponentRuleValue()); |
| | | return R.data(value); |
| | | } |
| | | |
| | | /** |
| | | * 使用分类获取对应的数据 |
| | | * @param codeClassifyOid 分类的主键 |
| | | * @param templateOid 模板的主键 |
| | | * @param queryObject 基础查询对象 |
| | | * @return 数据的信息(包含下级分类) |
| | | */ |
| | | @GetMapping("/gridTableDataByClassifyOid") |
| | | @VciBusinessLog(operateName = "查询主题库分类的数据") |
| | | public R<DataGrid<Map<String,String>>> gridTableDataByClassifyOid(String codeClassifyOid, String templateOid, BaseQueryObject queryObject){ |
| | | //TODO后续可以定义查询模板来查询 |
| | | return R.data(mdmEngineService.gridTableDataByClassifyOid(codeClassifyOid,templateOid,queryObject.getConditionMap(),queryObject.getPageHelper())); |
| | | } |
| | | |
| | | /*** |
| | | *统计子节点的个数 |
| | | * @param parentId 父节点oid |
| | | * @return |
| | | */ |
| | | @GetMapping("/countChildrenByClassifyOid") |
| | | @VciBusinessLog(operateName = "统计子节点的个数") |
| | | public R<Integer> countChildrenByClassifyOid(String parentId){ |
| | | int count= this.codeClassifyService.countChildrenByClassifyOid(parentId); |
| | | return R.data(count); |
| | | } |
| | | |
| | | /** |
| | | * 申请编码保存 |
| | | * @param orderDTO 编码申请相关的信息,需要有属性和码段相关的信息 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/addSaveCode") |
| | | @VciBusinessLog(operateName = "申请单个编码") |
| | | public R addSaveCode(@RequestBody CodeOrderDTO orderDTO) throws Exception { |
| | | return R.data(mdmEngineService.addSaveCode(orderDTO)); |
| | | } |
| | | /** |
| | | * 申请编码保存 |
| | | * @param orderDTO 编码申请相关的信息,需要有属性和码段相关的信息 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/checkKeyAttrOnOrderFordatas") |
| | | @VciBusinessLog(operateName = "申请单个编码") |
| | | public R checkKeyAttrOnOrderFordatas(@RequestBody CodeOrderDTO orderDTO) throws Exception { |
| | | return R.data(mdmEngineService.checkKeyAttrOnOrderFordatas(orderDTO)); |
| | | } |
| | | } |