Jelajahi Sumber

补录订单添加接口

785834757 5 bulan lalu
induk
melakukan
9121cd8c95

+ 2 - 1
authentication/src/main/java/com/jzg/controller/AppAuthController.java

@@ -96,7 +96,8 @@ public class AppAuthController extends BaseController {
             if (ObjectUtil.isNull(sysUser)){
                 throw new ServletException("当前用户不存在或已注销");
             }
-            SysUserJzgInfo sysUserJzgInfo = sysUserJzgInfoMapper.selectOne(new LambdaQueryWrapper<>(SysUserJzgInfo.class).eq(SysUserJzgInfo::getUserId, sysUser.getId())
+            SysUserJzgInfo sysUserJzgInfo = sysUserJzgInfoMapper.selectOne(new LambdaQueryWrapper<>(SysUserJzgInfo.class)
+                    .eq(SysUserJzgInfo::getUserId, sysUser.getId())
                     .eq(SysUserJzgInfo::getSystemCode, loginFormVo.getSystem()));
             HttpResult<Boolean> isTherePartner = partnerDistributionClient.isTherePartner(sysUserJzgInfo.getId(),loginFormVo.getSystem());
             if (200 == isTherePartner.getCode()){

+ 0 - 2
platform/src/main/java/com/jzg/controller/SysMenuController.java

@@ -17,8 +17,6 @@ import java.util.stream.Collectors;
 /**
  * 菜单控制器
  *
- * @author Yasepix
- * @date Oct 29, 2018
  */
 @RestController
 @RequestMapping("menu")

+ 3 - 1
platform/src/main/resources/application.yml

@@ -58,7 +58,8 @@ tenant:
     - sys_menu
     - sys_common_function
     - sys_role_menu
-
+    - sys_menu
+    - sys_system_menu
     # 临时表
     - company_tree
     - t
@@ -67,6 +68,7 @@ tenant:
 
   ignoreFunction:
     - /userInfo/getUser
+    - /menu/getSystemMenu
 
 data-scope:
   tables:

+ 16 - 0
tenant/organization/src/main/java/com/jzg/organization/controller/AgreementController.java

@@ -8,6 +8,7 @@ import com.jzg.commons.core.page.HttpResult;
 import com.jzg.commons.entity.dto.*;
 import com.jzg.commons.entity.enums.YesNoEnum;
 import com.jzg.commons.entity.po.PtlAgreement;
+import com.jzg.commons.entity.po.PtlAgreementCostExternal;
 import com.jzg.commons.entity.vo.AgreementVo;
 import com.jzg.commons.entity.vo.UpAndDownVo;
 import com.jzg.commons.util.AssertionUtils;
@@ -255,4 +256,19 @@ public class AgreementController extends BaseController {
     public PtlAgreement getByAgreementId(String agreementId) {
         return agreementService.getById(agreementId);
     }
+
+
+    @Operation(summary = "获取外部协议")
+    @GetMapping("/getContactAgreement")
+    public HttpResult getContactAgreement(String companyId){
+        List<PtlAgreement> contactAgreement = agreementService.getContactAgreement(companyId);
+        return HttpResult.ok(contactAgreement);
+    }
+
+    @Operation(summary = "获取外部费用")
+    @GetMapping("/getContactAgreementCost")
+    public HttpResult getContactAgreementCost(String agreementId,String productId,String isInquiry){
+        List<PtlAgreementCostExternal> costExternals = agreementService.getContactAgreementCost(agreementId, productId, isInquiry);
+        return HttpResult.ok(costExternals);
+    }
 }

+ 4 - 1
tenant/organization/src/main/java/com/jzg/organization/service/PtlAgreementCostExternalService.java

@@ -5,6 +5,7 @@ import com.jzg.commons.core.page.HttpResult;
 import com.jzg.commons.entity.dto.*;
 import com.jzg.commons.entity.po.PtlAgreementCostExternal;
 import com.jzg.commons.entity.vo.CostExternalListVo;
+import com.jzg.commons.entity.vo.CostExternalVo;
 
 import java.util.List;
 
@@ -16,7 +17,9 @@ public interface PtlAgreementCostExternalService extends IService<PtlAgreementCo
 
     HttpResult updateById(PtlAgreementCostExternalEnd costExternalEnd);
 
-    HttpResult costExternalList(CostExternalParam costExternalParam);
+    HttpResult<List<CostExternalVo>> costExternalList(CostExternalParam costExternalParam);
+
+    HttpResult<List<PtlAgreementCostExternal>> costExternalList(String agreementId, String productId, String isInquiry);
 
     HttpResult enableDisableByIds( List<String> ids, Boolean isEnabled);
 

+ 14 - 0
tenant/organization/src/main/java/com/jzg/organization/service/PtlAgreementService.java

@@ -5,6 +5,7 @@ import com.jzg.commons.entity.dto.*;
 import com.jzg.commons.entity.po.PtlAgreement;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.jzg.commons.entity.po.PtlAgreementCost;
+import com.jzg.commons.entity.po.PtlAgreementCostExternal;
 import com.jzg.commons.entity.vo.AgreementInfoVo;
 import com.jzg.commons.entity.vo.AgreementUserVo;
 import com.jzg.commons.entity.vo.AgreementVo;
@@ -133,4 +134,17 @@ public interface PtlAgreementService extends IService<PtlAgreement> {
     void contactEdit(AgreementContactEditParam param);
 
     List<PtlAgreement> getByCompanyId(String companyId,String systemCode);
+
+    /**
+     * 获取外部协议信息
+     */
+    List<PtlAgreement> getContactAgreement(String companyId);
+
+    /**
+     * 获取外部协议费用
+     * @param agreementId
+     * @param productId
+     * @return
+     */
+    List<PtlAgreementCostExternal> getContactAgreementCost(String agreementId,String productId,String isInquiring);
 }

+ 11 - 1
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementCostExternalServiceImpl.java

@@ -131,7 +131,7 @@ public class PtlAgreementCostExternalServiceImpl extends ServiceImpl<PtlAgreemen
 
 
     @Override
-    public HttpResult costExternalList(CostExternalParam costExternalParam) {
+    public HttpResult<List<CostExternalVo>> costExternalList(CostExternalParam costExternalParam) {
         List<CostExternalVo> costExternalVo = baseMapper.costExternalList(costExternalParam);
         if (CollectionUtils.isNotEmpty(costExternalVo)) {
             costExternalVo.stream()
@@ -144,6 +144,16 @@ public class PtlAgreementCostExternalServiceImpl extends ServiceImpl<PtlAgreemen
         return HttpResult.ok(costExternalVo);
     }
 
+    @Override
+    public HttpResult<List<PtlAgreementCostExternal>> costExternalList(String agreementId, String productId, String isInquiry) {
+        List<PtlAgreementCostExternal> ptlAgreementCostExternals = baseMapper.selectList(new LambdaQueryWrapper<PtlAgreementCostExternal>()
+                .eq(PtlAgreementCostExternal::getIsEnabled, 0)
+                .eq(PtlAgreementCostExternal::getPtlAgreementId, agreementId)
+                .eq(PtlAgreementCostExternal::getProductId, productId)
+                .eq(PtlAgreementCostExternal::getIsInquiry, isInquiry));
+        return HttpResult.ok(ptlAgreementCostExternals);
+    }
+
     @Override
     public HttpResult enableDisableByIds(List<String> ids,Boolean isEnabled) {
         if (org.springframework.util.CollectionUtils.isEmpty(ids)){

+ 26 - 0
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementServiceImpl.java

@@ -12,9 +12,11 @@ import com.jzg.commons.entity.enums.YesNoEnum;
 import com.jzg.commons.entity.po.*;
 import com.jzg.commons.entity.vo.*;
 import com.jzg.commons.exception.SystemException;
+import com.jzg.commons.util.AssertionUtils;
 import com.jzg.commons.util.MinioUtils;
 import com.jzg.commons.util.StringUtils;
 import com.jzg.organization.client.EsmInsCompanyClient;
+import com.jzg.organization.mapper.PtlAgreementCostExternalMapper;
 import com.jzg.organization.mapper.PtlAgreementMapper;
 import com.jzg.organization.mapper.SysUploadFilesMapper;
 import com.jzg.organization.mapper.SysUserMapper;
@@ -78,6 +80,9 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
     @Autowired
     private SysUploadFilesMapper sysUploadFilesMapper;
 
+    @Autowired
+    private PtlAgreementCostExternalService ptlAgreementCostExternalService;
+
     @Override
     public Page<AgreementVo> queryPage(AgreementParam param) {
         param.setSystemCode(baseController.getUserSystemCode());
@@ -511,6 +516,27 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
         return byCompanyId;
     }
 
+    @Override
+    public List<PtlAgreement> getContactAgreement(String companyId) {
+        List<PtlAgreement> agreements = baseMapper.selectList(new LambdaQueryWrapper<PtlAgreement>()
+                .eq(PtlAgreement::getIsExternal,1)
+                .eq(PtlAgreement::getIsDelete,0)
+                .le(PtlAgreement::getStartDate, LocalDateTime.now())
+                .ge(PtlAgreement::getEndDate, LocalDateTime.now())
+                .eq(PtlAgreement::getCompanyId, companyId));
+        return agreements;
+    }
+
+    @Override
+    public List<PtlAgreementCostExternal> getContactAgreementCost(String agreementId, String productId,String isInquiry) {
+        CostExternalParam param = new CostExternalParam();
+        param.setPtlAgreementId(agreementId);
+        HttpResult<List<PtlAgreementCostExternal>> httpResult = ptlAgreementCostExternalService.costExternalList(agreementId,productId, isInquiry);
+        AssertionUtils.isFail(httpResult.getCode() != 200,"获取费用列表失败");
+
+        return httpResult.getData();
+    }
+
 }
 
 

+ 4 - 0
tenant/organization/src/main/java/com/jzg/organization/service/impl/SysDeptServiceImpl.java

@@ -11,6 +11,7 @@ import com.jzg.commons.entity.vo.ChangeDeptVo;
 import com.jzg.commons.entity.vo.DeptLeaderVo;
 import com.jzg.commons.entity.vo.SysUserVo;
 import com.jzg.commons.exception.SystemException;
+import com.jzg.commons.util.AssertionUtils;
 import com.jzg.commons.util.StringUtils;
 import com.jzg.commons.util.idgen.IdGenerate;
 import com.jzg.commons.entity.vo.SysDeptVo;
@@ -72,7 +73,10 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
         //处理展业信息
         sysDept.setExScope(sysDeptVo);
         //获取父级id
+
         String parentId = sysDept.getParentId();
+        AssertionUtils.isFail(parentId == null,"请选择父机构" );
+
         //设置机构路径
         if(!parentId.equals("0")){
             SysDept parentSysDept = baseMapper.selectById(parentId);