|
|
@@ -309,6 +309,161 @@ public class CorpsDescController extends BladeController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 按照首字母获得客户并分组
|
|
|
+ */
|
|
|
+ @GetMapping("/initialsAllList")
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
+ @ApiOperation(value = "按照首字母获得客户并分组", notes = "传入corpsDesc")
|
|
|
+ public R<List<List<CorpsDescVO>>> initialsAllList(CorpsDescVO corpsDesc) {
|
|
|
+ // 默认查有效的
|
|
|
+ LambdaQueryWrapper<CorpsDesc> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ lambdaQueryWrapper.eq(CorpsDesc::getTenantId, AuthUtil.getTenantId());
|
|
|
+ lambdaQueryWrapper.eq(CorpsDesc::getIsDeleted, 0);
|
|
|
+
|
|
|
+ //获得客户信息
|
|
|
+ List<CorpsDesc> corpsDescList = corpsDescService.list(lambdaQueryWrapper);
|
|
|
+ List<CorpsDescVO> voList = BeanUtil.copy(corpsDescList, CorpsDescVO.class);
|
|
|
+
|
|
|
+ List<List<CorpsDescVO>> listAll = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listA = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listB = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listC = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listD = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listE = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listF = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listG = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listH = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listI = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listJ = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listK = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listL = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listM = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listN = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listO = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listP = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listQ = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listR = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listS = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listT = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listU = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listV = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listW = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listX = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listY = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listZ = new ArrayList<>();
|
|
|
+ List<CorpsDescVO> listRest = new ArrayList<>();
|
|
|
+
|
|
|
+ voList.forEach(desc -> {
|
|
|
+ if (StringUtils.isNotBlank(desc.getInitials())){
|
|
|
+ if (desc.getInitials().equals("A") || desc.getInitials().equals("a")){
|
|
|
+ listA.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("B") || desc.getInitials().equals("b")) {
|
|
|
+ listB.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("C") || desc.getInitials().equals("c")) {
|
|
|
+ listC.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("D") || desc.getInitials().equals("d")) {
|
|
|
+ listD.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("E") || desc.getInitials().equals("e")) {
|
|
|
+ listE.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("F") || desc.getInitials().equals("f")) {
|
|
|
+ listF.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("G") || desc.getInitials().equals("g")) {
|
|
|
+ listG.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("H") || desc.getInitials().equals("h")) {
|
|
|
+ listH.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("I") || desc.getInitials().equals("i")) {
|
|
|
+ listI.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("J") || desc.getInitials().equals("j")) {
|
|
|
+ listJ.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("K") || desc.getInitials().equals("k")) {
|
|
|
+ listK.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("L") || desc.getInitials().equals("l")) {
|
|
|
+ listL.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("M") || desc.getInitials().equals("m")) {
|
|
|
+ listM.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("N") || desc.getInitials().equals("n")) {
|
|
|
+ listN.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("O") || desc.getInitials().equals("o")) {
|
|
|
+ listO.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("P") || desc.getInitials().equals("p")) {
|
|
|
+ listP.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("Q") || desc.getInitials().equals("q")) {
|
|
|
+ listQ.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("R") || desc.getInitials().equals("r")) {
|
|
|
+ listR.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("S") || desc.getInitials().equals("s")) {
|
|
|
+ listS.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("T") || desc.getInitials().equals("t")) {
|
|
|
+ listT.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("U") || desc.getInitials().equals("u")) {
|
|
|
+ listU.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("V") || desc.getInitials().equals("v")) {
|
|
|
+ listV.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("W") || desc.getInitials().equals("w")) {
|
|
|
+ listW.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("X") || desc.getInitials().equals("x")) {
|
|
|
+ listX.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("Y") || desc.getInitials().equals("y")) {
|
|
|
+ listY.add(desc);
|
|
|
+ } else if (desc.getInitials().equals("Z") || desc.getInitials().equals("z")) {
|
|
|
+ listZ.add(desc);
|
|
|
+ }else {
|
|
|
+ listRest.add(desc);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ listRest.add(desc);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ listAll.add(listA);
|
|
|
+ listAll.add(listB);
|
|
|
+ listAll.add(listC);
|
|
|
+ listAll.add(listD);
|
|
|
+ listAll.add(listE);
|
|
|
+ listAll.add(listF);
|
|
|
+ listAll.add(listG);
|
|
|
+ listAll.add(listH);
|
|
|
+ listAll.add(listI);
|
|
|
+ listAll.add(listJ);
|
|
|
+ listAll.add(listK);
|
|
|
+ listAll.add(listL);
|
|
|
+ listAll.add(listM);
|
|
|
+ listAll.add(listN);
|
|
|
+ listAll.add(listO);
|
|
|
+ listAll.add(listP);
|
|
|
+ listAll.add(listQ);
|
|
|
+ listAll.add(listR);
|
|
|
+ listAll.add(listS);
|
|
|
+ listAll.add(listT);
|
|
|
+ listAll.add(listU);
|
|
|
+ listAll.add(listV);
|
|
|
+ listAll.add(listW);
|
|
|
+ listAll.add(listX);
|
|
|
+ listAll.add(listY);
|
|
|
+ listAll.add(listZ);
|
|
|
+ listAll.add(listRest);
|
|
|
+ return R.data(listAll);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据前端传值通过首字母获得客户
|
|
|
+ */
|
|
|
+ @GetMapping("/initialsList")
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
+ @ApiOperation(value = "根据前端传值过滤获得客户", notes = "传入corpsDesc")
|
|
|
+ public R<List<CorpsDescVO>> initialsList(CorpsDescVO corpsDesc) {
|
|
|
+ LambdaQueryWrapper<CorpsDesc> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ lambdaQueryWrapper.eq(CorpsDesc::getTenantId, AuthUtil.getTenantId());
|
|
|
+ lambdaQueryWrapper.eq(CorpsDesc::getIsDeleted, 0);
|
|
|
+ lambdaQueryWrapper.in(CorpsDesc::getInitials, corpsDesc.getInitials());
|
|
|
+
|
|
|
+ //获得客户信息
|
|
|
+ List<CorpsDesc> corpsDescList = corpsDescService.list(lambdaQueryWrapper);
|
|
|
+ List<CorpsDescVO> voList = BeanUtil.copy(corpsDescList, CorpsDescVO.class);
|
|
|
+
|
|
|
+ return R.data(voList);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 客户信息
|
|
|
*/
|
|
|
@GetMapping("/corpsDescList")
|