| | |
| | | package com.vci.ubcs.code.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.vci.ubcs.code.dto.CodeRuleDTO; |
| | | import com.vci.ubcs.code.entity.CodeRule; |
| | |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO; |
| | | import com.vci.ubcs.code.wrapper.CodeRuleWrapper; |
| | | import com.vci.ubcs.com.vci.starter.web.util.VciBaseUtil; |
| | | |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.BladeQueryObject; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.http.util.EncodingUtils; |
| | | 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.secure.BladeUser; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import java.util.Collection; |
| | | import java.util.Map; |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 编码规则 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入codeRuleVO") |
| | | public R<IPage<CodeRuleVO>> list(CodeRule codeRule, Query query) { |
| | | IPage<CodeRule> pages = codeRuleService.page(Condition.getPage(query), Condition.getQueryWrapper(codeRule)); |
| | | return R.data(CodeRuleWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * 编码规则 自定义分页 |
| | | * @return baseQueryObject |
| | | */ |
| | | @GetMapping("/gridCodeRule") |
| | | @GetMapping(value = "/gridCodeRule") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入CodeRule") |
| | | public R<IPage<CodeRuleVO>> gridCodeRule(CodeRuleVO CodeRule, Query query) { |
| | | IPage<CodeRuleVO> pages = codeRuleService.gridCodeRule(Condition.getPage(query.setDescs("CREATETIME")), CodeRule); |
| | | public R<IPage<CodeRuleVO>> gridCodeRule(BladeQueryObject bladeQueryObject) { |
| | | IPage<CodeRuleVO> pages = codeRuleService.gridCodeRule(bladeQueryObject.getQuery().setDescs("CREATETIME"), bladeQueryObject.getConditionMap()); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | @DeleteMapping( "/deleteData") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "删除", notes = "传入codeRuleDTO") |
| | | public R delCodeRule(@Valid @RequestBody CodeRuleDTO codeRuleDTO) { |
| | | public R delCodeRule(@RequestBody CodeRuleDTO codeRuleDTO) { |
| | | return codeRuleService.deleteCodeRule(codeRuleDTO); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 参照主数据编码规则列表 |
| | | * @param CodeRule |
| | | * @param query |
| | | * @param bladeQueryObject |
| | | * @return 主数据编码规则显示对象列表,生效的内容 |
| | | */ |
| | | @GetMapping("/refDataGrid") |
| | | @ApiOperationSupport(order = 10) |
| | | @ApiOperation(value = "参照主数据编码规则列表", notes = "传入oids") |
| | | public R<IPage<CodeRuleVO>> refDataGridCodeRule(CodeRuleVO CodeRule, Query query){ |
| | | return R.data(codeRuleService.refDataGridCodeRule(Condition.getPage(query),CodeRule)); |
| | | public R<IPage<CodeRuleVO>> refDataGridCodeRule(BladeQueryObject bladeQueryObject){ |
| | | return R.data(codeRuleService.refDataGridCodeRule(bladeQueryObject)); |
| | | } |
| | | |
| | | /** |