From 7d9733a9fe0e21efe346787838aa5182633e30d2 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期日, 08 十月 2023 22:33:10 +0800 Subject: [PATCH] 注意更新blade-core-tool.jar --- Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeButtonController.java | 97 +++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 90 insertions(+), 7 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeButtonController.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeButtonController.java index be3cfa6..ee1f49f 100644 --- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeButtonController.java +++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeButtonController.java @@ -19,11 +19,15 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.vci.ubcs.code.dto.CodeButtonDTO; import com.vci.ubcs.code.entity.CodeButton; import com.vci.ubcs.code.mapper.CodeButtonMapper; import com.vci.ubcs.code.service.ICodeButtonService; import com.vci.ubcs.code.vo.pagemodel.CodeButtonVO; import com.vci.ubcs.code.wrapper.CodeButtonWrapper; +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 io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -38,6 +42,7 @@ import org.springframework.web.bind.annotation.*; import javax.validation.Valid; +import java.util.Collection; /** * 妯℃澘鎵╁睍姹� 鎺у埗鍣� @@ -47,11 +52,11 @@ */ @RestController @AllArgsConstructor -@RequestMapping("/codebutton") +@RequestMapping("/codeButtonController") @Api(value = "妯℃澘鎵╁睍姹�", tags = "妯℃澘鎵╁睍姹犳帴鍙�") public class CodeButtonController extends BladeController { - private final ICodeButtonService codebuttonService; + private final ICodeButtonService codeButtonService; CodeButtonMapper codeButtonMapper; @@ -65,6 +70,7 @@ CodeButton detail = codeButtonMapper.selectOne(Condition.getQueryWrapper(codebutton)); return R.data(CodeButtonWrapper.build().entityVO(detail)); } + /** * 妯℃澘鎵╁睍姹� 鍒嗛〉 */ @@ -83,7 +89,7 @@ @ApiOperationSupport(order = 3) @ApiOperation(value = "鍒嗛〉", notes = "浼犲叆codebutton") public R<IPage<CodeButtonVO>> page(CodeButtonVO codebutton, Query query) { - IPage<CodeButtonVO> pages = codebuttonService.selectcodebuttonPage(Condition.getPage(query), codebutton); + IPage<CodeButtonVO> pages = codeButtonService.selectcodebuttonPage(Condition.getPage(query), codebutton); return R.data(pages); } @@ -128,9 +134,87 @@ @ApiOperation(value = "閫昏緫鍒犻櫎", notes = "浼犲叆ids") public R remove(@ApiParam(value = "涓婚敭闆嗗悎", required = true) @RequestParam String ids) { // return codebuttonService.deleteCodeButton(ids); - return R.status(SqlHelper.retBool(codeButtonMapper.deleteBatchIds(Func.toLongList(ids)))); + return R.status(SqlHelper.retBool(codeButtonMapper.deleteBatchIds(Func.toStrList(ids)))); } + /** + * 涓绘暟鎹腑鐨勬寜閽墿灞曞垪琛� + * @param baseQueryObject 鍩虹鏌ヨ瀵硅薄锛屽寘鍚煡璇㈡潯浠讹紝鍒嗛〉锛屾帓搴忕瓑 + * @return 涓绘暟鎹腑鐨勬寜閽墿灞曟樉绀哄璞″垪琛� + */ + @GetMapping("/gridCodeButton") + public R<IPage<CodeButtonVO>> gridCodeButton(BaseQueryObject baseQueryObject){ + if(baseQueryObject == null){ + baseQueryObject = new BaseQueryObject(); + } + return R.data(codeButtonService.gridCodeButton(baseQueryObject.getConditionMap(),baseQueryObject.getPageHelper())); + } + + /** + * 澧炲姞 涓绘暟鎹腑鐨勬寜閽墿灞� + * @param codeButtonDTO 涓绘暟鎹腑鐨勬寜閽墿灞曟暟鎹紶杈撳璞� + * @return 鎵ц缁撴灉锛宻uccess涓簍rue琛ㄧず鎴愬姛锛宮sg鏄け璐ョ殑鎻愮ず淇℃伅锛宱bj鏄坊鍔犲畬鎴愬悗鐨勬樉绀哄璞� + */ + @PostMapping( "/addSave") + public R<CodeButtonVO> addSave(@RequestBody CodeButtonDTO codeButtonDTO){ + CodeButtonVO codeButtonVO = codeButtonService.addSave(codeButtonDTO); + return R.data(codeButtonVO); + } + + /** + * 淇敼 涓绘暟鎹腑鐨勬寜閽墿灞� + * @param codeButtonDTO 涓绘暟鎹腑鐨勬寜閽墿灞曟暟鎹紶杈撳璞� + * @return 鎵ц缁撴灉锛宻uccess涓簍rue琛ㄧず鎴愬姛锛宮sg鏄け璐ョ殑鎻愮ず淇℃伅锛宱bj鏄坊鍔犲畬鎴愬悗鐨勬樉绀哄璞� + */ + @PutMapping("/editSave") + public R<CodeButtonVO> editSave(@RequestBody CodeButtonDTO codeButtonDTO){ + CodeButtonVO codeButtonVO = codeButtonService.editSave(codeButtonDTO); + return R.data(codeButtonVO); + } + + /** + * 鍒犻櫎涓绘暟鎹腑鐨勬寜閽墿灞� + * @param codeButtonDTO 涓绘暟鎹腑鐨勬寜閽墿灞曟暟鎹紶杈撳璞★紝oid鍜宼s闇�瑕佷紶杈� + * @return 鍒犻櫎缁撴灉鍙嶉锛氾細success锛氭垚鍔燂紝fail锛氬け璐� + */ + @DeleteMapping( "/deleteData") + public R delCodeButton( CodeButtonDTO codeButtonDTO) { + return codeButtonService.deleteCodeButton(codeButtonDTO); + } + + /** + * 涓婚敭鑾峰彇涓绘暟鎹腑鐨勬寜閽墿灞� + * @param oid 涓婚敭 + * @return 涓绘暟鎹腑鐨勬寜閽墿灞曟樉绀哄璞� + */ + @GetMapping("/getObjectByOid") + public R<CodeButtonVO> getObjectByOid(String oid){ + CodeButtonVO codeButtonVO = codeButtonService.getObjectByOid(oid); + return R.data(codeButtonVO); + } + + /** + * 涓婚敭鎵归噺鑾峰彇涓绘暟鎹腑鐨勬寜閽墿灞� + * @param oids 涓婚敭锛屽涓互閫楀彿鍒嗛殧锛屼絾鏄彈鎬ц兘褰卞搷锛屽缓璁竴娆℃煡璇笉瓒呰繃10000涓� + * @return 涓绘暟鎹腑鐨勬寜閽墿灞曟樉绀哄璞� + */ + @GetMapping("/listDataByOids") + public R<Collection<CodeButtonVO>> listCodeButtonByOids(String oids){ + return R.data(codeButtonService.listCodeButtonByOids(VciBaseUtil.str2List(oids))); + } + + /** + * 鍙傜収涓绘暟鎹腑鐨勬寜閽墿灞曞垪琛� + * @param baseQueryObject 鍩虹鏌ヨ瀵硅薄锛屽寘鍚煡璇㈡潯浠讹紝鍒嗛〉锛屾帓搴忕瓑 + * @return 涓绘暟鎹腑鐨勬寜閽墿灞曟樉绀哄璞″垪琛紝鐢熸晥鐨勫唴瀹� + */ + @GetMapping("/refDataGrid") + public R<IPage<CodeButtonVO>> refDataGridCodeButton(BaseQueryObject baseQueryObject){ + if(baseQueryObject == null){ + baseQueryObject = new BaseQueryObject(); + } + return R.data(codeButtonService.refDataGridCodeButton(baseQueryObject.getConditionMap(),baseQueryObject.getPageHelper())); + } /** * 鍚敤 @@ -139,7 +223,7 @@ */ @PostMapping("/enableData") public R enableOrgDuty(@ApiParam(value = "涓婚敭闆嗗悎", required = true) @RequestParam String oid) { - return codebuttonService.enableCodeButton(oid); + return codeButtonService.enableCodeButton(oid); } /** @@ -149,8 +233,7 @@ */ @PostMapping("/disableData") public R disableOrgDuty(@ApiParam(value = "涓婚敭闆嗗悎", required = true) @RequestParam String oid) { - return codebuttonService.disableOrgDuty(oid); + return codeButtonService.disableOrgDuty(oid); } - } -- Gitblit v1.9.3