renqianlong hai 1 ano
pai
achega
b809a25cde

+ 9 - 1
zhongzheng-admin/src/main/java/com/zhongzheng/controller/system/SysTenantController.java

@@ -50,10 +50,18 @@ public class SysTenantController extends BaseController {
      * 新增,修改收款信息
      */
     @ApiOperation("新增,修改收款信息")
-    @PreAuthorize("@ss.hasPermi('system:tenant:add')")
     @Log(title = "系统商户", businessType = BusinessType.INSERT)
     @PostMapping("/insertOrUpdate")
     public AjaxResult<Void> add( @RequestBody SysTopTenantAccountBo bo) {
         return toAjax(iSysTenantService.insertOrUpdate(bo) ? 1 : 0);
     }
+    /**
+     * 新增,修改收款信息
+     */
+    @ApiOperation("查询收款信息")
+    @Log(title = "系统商户", businessType = BusinessType.INSERT)
+    @PostMapping("/getAccount")
+    public AjaxResult getAccount() {
+        return AjaxResult.success(iSysTenantService.getAccount());
+    }
 }

+ 16 - 0
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/SysTenantServiceImpl.java

@@ -15,6 +15,7 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
+import com.github.pagehelper.util.StringUtil;
 import com.zhongzheng.common.core.domain.entity.*;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
@@ -166,6 +167,21 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
         return true;
     }
 
+    @Override
+    public SysTenantAccountVo getAccount() {
+        SysTenant sysTenant = this.getOne(new LambdaQueryWrapper<SysTenant>().eq(SysTenant::getStatus, 1).eq(SysTenant::getAppList, 1));
+        if (ObjectUtils.isNotNull(sysTenant)){
+            String accountInformation = sysTenant.getAccountInformation();
+            if (StringUtil.isNotEmpty(accountInformation)){
+                List<SysTenantAccountVo> sysTenantAccountVos = JSONArray.parseArray(accountInformation, SysTenantAccountVo.class);
+                if (!sysTenantAccountVos.isEmpty()){
+                    return sysTenantAccountVos.get(0);
+                }
+            }
+        }
+        return null;
+    }
+
     @Override
     public Boolean updateByEditBo(SysTenantEditBo bo) {
         SysTenant update = BeanUtil.toBean(bo, SysTenant.class);

+ 2 - 15
zhongzheng-system/src/main/java/com/zhongzheng/modules/bs/covenant/service/impl/BsCovenantServiceImpl.java

@@ -4,14 +4,12 @@ import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.zhongzheng.common.core.domain.entity.SysMenu;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
-import com.zhongzheng.common.utils.Threads;
 import com.zhongzheng.common.utils.file.FileUtils;
 import com.zhongzheng.common.utils.pdf.PdfUtils;
 import com.zhongzheng.common.utils.pdf.bo.BsCovenantExportVo;
@@ -31,7 +29,6 @@ import com.zhongzheng.modules.bs.covenant.vo.BsCovenantGoodsVo;
 import com.zhongzheng.modules.bs.covenant.vo.BsCovenantVo;
 import com.zhongzheng.modules.bs.covenant.vo.NoCheckInfo;
 import com.zhongzheng.modules.course.domain.CourseBusiness;
-import com.zhongzheng.modules.course.domain.CourseProjectType;
 import com.zhongzheng.modules.course.service.ICourseBusinessService;
 import com.zhongzheng.modules.course.service.ICourseEducationTypeService;
 import com.zhongzheng.modules.course.service.ICourseProjectTypeService;
@@ -50,7 +47,6 @@ import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import org.springframework.transaction.annotation.Transactional;
-import springfox.documentation.spring.web.json.Json;
 
 import java.io.*;
 import java.util.*;
@@ -570,15 +566,6 @@ public class BsCovenantServiceImpl extends ServiceImpl<BsCovenantMapper, BsCoven
         return true;
     }
 
-    /**
-     * 保存前的数据校验
-     *
-     * @param entity 实体类数据
-     */
-    private void validEntityBeforeSave(BsCovenant entity) {
-        //TODO 做一些数据校验,如唯一约束
-    }
-
     @Override
     @Transactional
     public Boolean deleteWithValidByIds(Long covenantId) {
@@ -650,8 +637,8 @@ public class BsCovenantServiceImpl extends ServiceImpl<BsCovenantMapper, BsCoven
 
     @Override
     public String judgeExistYW(Long companyId) {
-        List<BsCovenant> bsCovenants = this.list(new LambdaQueryWrapper<BsCovenant>().eq(BsCovenant::getCompanyId, companyId).in(BsCovenant::getStatus, 0));
-        List<BsCovenant> bsCovenants1 = this.list(new LambdaQueryWrapper<BsCovenant>().eq(BsCovenant::getCompanyId, companyId).in(BsCovenant::getStatus, 5));
+        List<BsCovenant> bsCovenants = this.list(new LambdaQueryWrapper<BsCovenant>().eq(BsCovenant::getCompanyId, companyId).in(BsCovenant::getStatus, 1));
+        List<BsCovenant> bsCovenants1 = this.list(new LambdaQueryWrapper<BsCovenant>().eq(BsCovenant::getCompanyId, companyId).notIn(BsCovenant::getStopStatus, 0));
         if (!bsCovenants.isEmpty()) {
             return "当前甲方存在协议正在审核中,无法新增协议";
         }

+ 7 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/system/service/ISysTenantService.java

@@ -4,6 +4,7 @@ package com.zhongzheng.modules.system.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.zhongzheng.modules.system.bo.*;
 import com.zhongzheng.modules.system.domain.SysTenant;
+import com.zhongzheng.modules.system.vo.SysTenantAccountVo;
 import com.zhongzheng.modules.system.vo.SysTenantBankAccountVo;
 import com.zhongzheng.modules.system.vo.SysTenantVo;
 
@@ -40,6 +41,12 @@ public interface ISysTenantService extends IService<SysTenant> {
 	 * @return
 	 */
 	Boolean insertOrUpdate(SysTopTenantAccountBo bo);
+	/**
+	 * 云学堂后台 查询收款信息
+	 * @param bo 云学堂后台 查询收款信息
+	 * @return
+	 */
+	SysTenantAccountVo getAccount();
 
 	/**
 	 * 根据编辑业务对象修改系统商户