¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.controller; |
| | | |
| | | import com.vci.ubcs.code.dto.CodeResembleRuleDTO; |
| | | import com.vci.ubcs.code.service.ICodeResembleRuleService; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeResembleRuleVO; |
| | | 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 org.springblade.core.tool.api.R; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Collection; |
| | | |
| | | /** |
| | | * ç¸ä¼¼æ¥è¯¢è§åæ§å¶å¨ |
| | | * |
| | | * @author weidy |
| | | * @date 2022-04-10 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/resembleRuleController") |
| | | public class CodeResembleRuleController { |
| | | /** |
| | | * ç¸ä¼¼æ¥è¯¢è§å æå¡ |
| | | */ |
| | | @Resource |
| | | private ICodeResembleRuleService codeResembleRuleService; |
| | | |
| | | /** |
| | | * ç¸ä¼¼æ¥è¯¢è§åå表 |
| | | * @param baseQueryObject åºç¡æ¥è¯¢å¯¹è±¡ï¼å
嫿¥è¯¢æ¡ä»¶ï¼åé¡µï¼æåºç |
| | | * @return ç¸ä¼¼æ¥è¯¢è§åæ¾ç¤ºå¯¹è±¡å表 |
| | | */ |
| | | @GetMapping("/gridCodeResembleRule") |
| | | public DataGrid<CodeResembleRuleVO> gridCodeResembleRule(BaseQueryObject baseQueryObject){ |
| | | if(baseQueryObject == null){ |
| | | baseQueryObject = new BaseQueryObject(); |
| | | } |
| | | return codeResembleRuleService.gridCodeResembleRule(baseQueryObject.getConditionMap(),baseQueryObject.getPageHelper()); |
| | | } |
| | | /** |
| | | * å¢å ç¸ä¼¼æ¥è¯¢è§å |
| | | * @param codeResembleRuleDTO ç¸ä¼¼æ¥è¯¢è§åæ°æ®ä¼ è¾å¯¹è±¡ |
| | | * @return æ§è¡ç»æï¼success为true表示æåï¼msgæ¯å¤±è´¥çæç¤ºä¿¡æ¯ï¼objæ¯æ·»å 宿åçæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @PostMapping( "/addSave") |
| | | public R<CodeResembleRuleVO> addSave(@RequestBody CodeResembleRuleDTO codeResembleRuleDTO){ |
| | | CodeResembleRuleVO codeResembleRuleVO = codeResembleRuleService.addSave(codeResembleRuleDTO); |
| | | return R.data(codeResembleRuleVO); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ ç¸ä¼¼æ¥è¯¢è§å |
| | | * @param codeResembleRuleDTO ç¸ä¼¼æ¥è¯¢è§åæ°æ®ä¼ è¾å¯¹è±¡ |
| | | * @return æ§è¡ç»æï¼success为true表示æåï¼msgæ¯å¤±è´¥çæç¤ºä¿¡æ¯ï¼objæ¯æ·»å 宿åçæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @PutMapping("/editSave") |
| | | public R<CodeResembleRuleVO> editSave(@RequestBody CodeResembleRuleDTO codeResembleRuleDTO){ |
| | | CodeResembleRuleVO codeResembleRuleVO = codeResembleRuleService.editSave(codeResembleRuleDTO); |
| | | return R.data(codeResembleRuleVO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å é¤ç¸ä¼¼æ¥è¯¢è§å |
| | | * @param codeResembleRuleDTO ç¸ä¼¼æ¥è¯¢è§åæ°æ®ä¼ è¾å¯¹è±¡ï¼oidåtséè¦ä¼ è¾ |
| | | * @return å é¤ç»æåé¦ï¼ï¼successï¼æåï¼failï¼å¤±è´¥ |
| | | */ |
| | | @DeleteMapping( "/deleteData") |
| | | public R delCodeResembleRule( CodeResembleRuleDTO codeResembleRuleDTO) { |
| | | return codeResembleRuleService.deleteCodeResembleRule(codeResembleRuleDTO); |
| | | } |
| | | |
| | | /** |
| | | * 主é®è·åç¸ä¼¼æ¥è¯¢è§å |
| | | * @param oid ä¸»é® |
| | | * @return ç¸ä¼¼æ¥è¯¢è§åæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @GetMapping("/getObjectByOid") |
| | | public R<CodeResembleRuleVO> getObjectByOid(String oid){ |
| | | CodeResembleRuleVO codeResembleRuleVO = codeResembleRuleService.getObjectByOid(oid); |
| | | return R.data(codeResembleRuleVO); |
| | | } |
| | | |
| | | /** |
| | | * 䏻鮿¹éè·åç¸ä¼¼æ¥è¯¢è§å |
| | | * @param oids 主é®ï¼å¤ä¸ªä»¥éå·åéï¼ä½æ¯åæ§è½å½±åï¼å»ºè®®ä¸æ¬¡æ¥è¯¢ä¸è¶
è¿10000个 |
| | | * @return ç¸ä¼¼æ¥è¯¢è§åæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @GetMapping("/listDataByOids") |
| | | public R<CodeResembleRuleVO> listCodeResembleRuleByOids(String oids){ |
| | | Collection<CodeResembleRuleVO> voCollection = codeResembleRuleService.listCodeResembleRuleByOids(VciBaseUtil.str2List(oids)); |
| | | R baseResult = R.success("æ¥è¯¢æå!"); |
| | | baseResult.setData(voCollection); |
| | | return baseResult; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * åç
§ç¸ä¼¼æ¥è¯¢è§åå表 |
| | | * @param baseQueryObject åºç¡æ¥è¯¢å¯¹è±¡ï¼å
嫿¥è¯¢æ¡ä»¶ï¼åé¡µï¼æåºç |
| | | * @return ç¸ä¼¼æ¥è¯¢è§åæ¾ç¤ºå¯¹è±¡å表ï¼çæçå
容 |
| | | */ |
| | | @GetMapping("/refDataGrid") |
| | | public DataGrid<CodeResembleRuleVO> refDataGridCodeResembleRule(BaseQueryObject baseQueryObject){ |
| | | if(baseQueryObject == null){ |
| | | baseQueryObject = new BaseQueryObject(); |
| | | } |
| | | return codeResembleRuleService.refDataGridCodeResembleRule(baseQueryObject.getConditionMap(),baseQueryObject.getPageHelper()); |
| | | } |
| | | } |