¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.code.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.vci.ubcs.code.dto.CodeTemplatePhaseDTO; |
| | | import com.vci.ubcs.code.service.ICodeTempphaseService; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateAttrVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeTemplatePhaseVO; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.Collection; |
| | | |
| | | /** |
| | | * ç¼ç åºå®ä¹-模æ¿é¶æ®µ æ§å¶å¨ |
| | | * |
| | | * @author ludc |
| | | * @since 2023-05-07 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/codeTempPhaseController") |
| | | @Api(value = "ç¼ç åºå®ä¹-模æ¿é¶æ®µ", tags = "ç¼ç åºå®ä¹-模æ¿é¶æ®µæ¥å£") |
| | | public class CodeTemplatePhaseController extends BladeController { |
| | | |
| | | /** |
| | | * 模æ¿é¶æ®µ æå¡ |
| | | */ |
| | | private final ICodeTempphaseService codeTemplatePhaseService; |
| | | |
| | | /** |
| | | * 模æ¿é¶æ®µå表 |
| | | * @param baseQueryObject åºç¡æ¥è¯¢å¯¹è±¡ï¼å
嫿¥è¯¢æ¡ä»¶ï¼åé¡µï¼æåºç |
| | | * @return 模æ¿é¶æ®µæ¾ç¤ºå¯¹è±¡å表 |
| | | */ |
| | | @GetMapping("/gridCodeTemplatePhase") |
| | | public R<IPage<CodeTemplatePhaseVO>> gridCodeTemplatePhase(BaseQueryObject baseQueryObject){ |
| | | return R.data(codeTemplatePhaseService.gridCodeTemplatePhase(baseQueryObject.getConditionMap(),baseQueryObject.getPageHelper())); |
| | | } |
| | | |
| | | /** |
| | | * å¢å 模æ¿é¶æ®µ |
| | | * @param codeTemplatePhaseDTO 模æ¿é¶æ®µæ°æ®ä¼ è¾å¯¹è±¡ |
| | | * @return æ§è¡ç»æï¼success为true表示æåï¼msgæ¯å¤±è´¥çæç¤ºä¿¡æ¯ï¼objæ¯æ·»å 宿åçæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @PostMapping( "/addSave") |
| | | public R<CodeTemplatePhaseVO> addSave(@Valid @RequestBody CodeTemplatePhaseDTO codeTemplatePhaseDTO){ |
| | | return R.data(codeTemplatePhaseService.addSave(codeTemplatePhaseDTO)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ æ¨¡æ¿é¶æ®µ |
| | | * @param codeTemplatePhaseDTO 模æ¿é¶æ®µæ°æ®ä¼ è¾å¯¹è±¡ |
| | | * @return æ§è¡ç»æï¼success为true表示æåï¼msgæ¯å¤±è´¥çæç¤ºä¿¡æ¯ï¼objæ¯æ·»å 宿åçæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @PutMapping("/editSave") |
| | | public R<CodeTemplatePhaseVO> editSave(@Valid @RequestBody CodeTemplatePhaseDTO codeTemplatePhaseDTO){ |
| | | return R.data(codeTemplatePhaseService.editSave(codeTemplatePhaseDTO)); |
| | | } |
| | | |
| | | /** |
| | | * å 餿¨¡æ¿é¶æ®µ |
| | | * @param codeTemplatePhaseDTO 模æ¿é¶æ®µæ°æ®ä¼ è¾å¯¹è±¡ï¼oidåtséè¦ä¼ è¾ |
| | | * @return å é¤ç»æåé¦ï¼ï¼successï¼æåï¼failï¼å¤±è´¥ |
| | | */ |
| | | @DeleteMapping( "/deleteData") |
| | | public R delCodeTemplatePhase(@Valid @RequestBody CodeTemplatePhaseDTO codeTemplatePhaseDTO) { |
| | | return codeTemplatePhaseService.deleteCodeTemplatePhase(codeTemplatePhaseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 主é®è·å模æ¿é¶æ®µ |
| | | * @param oid ä¸»é® |
| | | * @return 模æ¿é¶æ®µæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @GetMapping("/getObjectByOid") |
| | | public R<CodeTemplatePhaseVO> getObjectByOid(String oid){ |
| | | CodeTemplatePhaseVO codeTemplatePhaseVO = codeTemplatePhaseService.getObjectByOid(oid); |
| | | return R.data(codeTemplatePhaseVO); |
| | | } |
| | | |
| | | /** |
| | | * 䏻鮿¹éè·å模æ¿é¶æ®µ |
| | | * @param oids 主é®ï¼å¤ä¸ªä»¥éå·åéï¼ä½æ¯åæ§è½å½±åï¼å»ºè®®ä¸æ¬¡æ¥è¯¢ä¸è¶
è¿10000个 |
| | | * @return 模æ¿é¶æ®µæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @GetMapping("/listDataByOids") |
| | | public R<Collection<CodeTemplatePhaseVO>> listCodeTemplatePhaseByOids(String oids){ |
| | | Collection<CodeTemplatePhaseVO> voCollection = codeTemplatePhaseService.listCodeTemplatePhaseByOids(VciBaseUtil.str2List(oids)); |
| | | return R.data(voCollection); |
| | | } |
| | | |
| | | /** |
| | | * åç
§æ¨¡æ¿é¶æ®µå表 |
| | | * @param baseQueryObject åºç¡æ¥è¯¢å¯¹è±¡ï¼å
嫿¥è¯¢æ¡ä»¶ï¼åé¡µï¼æåºç |
| | | * @return 模æ¿é¶æ®µæ¾ç¤ºå¯¹è±¡å表ï¼çæçå
容 |
| | | */ |
| | | @GetMapping("/refDataGrid") |
| | | public IPage<CodeTemplatePhaseVO> refDataGridCodeTemplatePhase(BaseQueryObject baseQueryObject){ |
| | | if(baseQueryObject == null){ |
| | | baseQueryObject = new BaseQueryObject(); |
| | | } |
| | | return codeTemplatePhaseService.refDataGridCodeTemplatePhase(baseQueryObject.getConditionMap(),baseQueryObject.getPageHelper()); |
| | | } |
| | | |
| | | /** |
| | | * è·åé¶æ®µä¸æ²¡æä½¿ç¨ç模æ¿å±æ§ |
| | | * @param baseQueryObject æ¥è¯¢å¯¹è±¡ï¼å¿
é¡»è¦ææ¨¡æ¿ç主é®ï¼classifyTemplateOidï¼ï¼å¦åä¸è½ç¡®å®å±æ§ |
| | | * @return 屿§çä¿¡æ¯ |
| | | */ |
| | | @GetMapping("/gridUnUsedAttribute") |
| | | public R<IPage<CodeClassifyTemplateAttrVO>> gridUnUsedAttribute(BaseQueryObject baseQueryObject){ |
| | | return R.data(codeTemplatePhaseService.gridUnUsedAttribute(baseQueryObject.getConditionMap(),baseQueryObject.getPageHelper())); |
| | | } |
| | | |
| | | /** |
| | | * è·åé¶æ®µä¸ä½¿ç¨ç模æ¿å±æ§ |
| | | * @param baseQueryObject æ¥è¯¢å¯¹è±¡ï¼å¿
é¡»è¦é¶æ®µç主é®(codePhaseOid) |
| | | * @return 屿§çä¿¡æ¯ |
| | | */ |
| | | @GetMapping("/gridUsedAttribute") |
| | | public R<IPage<CodeClassifyTemplateAttrVO>> gridUsedAttribute(BaseQueryObject baseQueryObject){ |
| | | return R.data(codeTemplatePhaseService.gridUsedAttribute(baseQueryObject.getConditionMap(),baseQueryObject.getPageHelper())); |
| | | } |
| | | |
| | | } |