生成合同
This commit is contained in:
parent
c50448c07c
commit
4c7eec53fe
@ -3,6 +3,7 @@ package com.pusong.business.controller;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaIgnore;
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
|
import com.pusong.business.domain.bo.PsCompanyQueryBo;
|
||||||
import com.pusong.common.core.validate.QueryGroup;
|
import com.pusong.common.core.validate.QueryGroup;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
@ -49,6 +50,16 @@ public class PsCompanyInfoController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询公司信息列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("business:companyInfo:list")
|
||||||
|
@GetMapping("/pageList")
|
||||||
|
public R<List<PsCompanyInfoVo>> pageList( PsCompanyQueryBo bo, PageQuery pageQuery) {
|
||||||
|
return R.ok(psCompanyInfoService.queryPageList(bo,pageQuery));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增公司信息
|
* 新增公司信息
|
||||||
*/
|
*/
|
||||||
|
@ -0,0 +1,47 @@
|
|||||||
|
package com.pusong.business.domain.bo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.pusong.business.domain.PsCompanyInfo;
|
||||||
|
import com.pusong.common.core.validate.AddGroup;
|
||||||
|
import com.pusong.common.core.validate.EditGroup;
|
||||||
|
import com.pusong.common.core.validate.QueryGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司信息业务对象 ps_company_info
|
||||||
|
*
|
||||||
|
* @author wls
|
||||||
|
* @date 2024-07-29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode
|
||||||
|
public class PsCompanyQueryBo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 客户姓名
|
||||||
|
*/
|
||||||
|
private String customName;
|
||||||
|
/**
|
||||||
|
* 客户电话
|
||||||
|
*/
|
||||||
|
private String customMobile;
|
||||||
|
/**
|
||||||
|
* 公司名称
|
||||||
|
*/
|
||||||
|
private String companyName;
|
||||||
|
/**
|
||||||
|
* 介绍人名称
|
||||||
|
*/
|
||||||
|
private String customIntroducer;
|
||||||
|
}
|
@ -78,7 +78,6 @@ public class PsCustomInfoBo {
|
|||||||
/**
|
/**
|
||||||
* 介绍人-仅支持本司内客户
|
* 介绍人-仅支持本司内客户
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "介绍人姓名")
|
|
||||||
private String customIntroducerName;
|
private String customIntroducerName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,7 +40,7 @@ public class PsCustomRecordQueryBo {
|
|||||||
* 客户经理名称
|
* 客户经理名称
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private String customerManagerName;
|
private String customManagerName;
|
||||||
/**
|
/**
|
||||||
* 客户电话客户电话(多个用英文逗号分割)
|
* 客户电话客户电话(多个用英文逗号分割)
|
||||||
*/
|
*/
|
||||||
@ -63,6 +63,10 @@ public class PsCustomRecordQueryBo {
|
|||||||
* 1 托管 2 非托管
|
* 1 托管 2 非托管
|
||||||
*/
|
*/
|
||||||
private Integer serviceType;
|
private Integer serviceType;
|
||||||
|
/**
|
||||||
|
* 客户渠道
|
||||||
|
*/
|
||||||
|
private String customSource;
|
||||||
/**
|
/**
|
||||||
* 服务项目(可多选)
|
* 服务项目(可多选)
|
||||||
*/
|
*/
|
||||||
|
@ -55,6 +55,7 @@ public class PsTaskQueryBo {
|
|||||||
* 所属区域(公司地址)
|
* 所属区域(公司地址)
|
||||||
*/
|
*/
|
||||||
private String companyAdress;
|
private String companyAdress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 法人手机号
|
* 法人手机号
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.pusong.business.service;
|
package com.pusong.business.service;
|
||||||
|
|
||||||
|
import com.pusong.business.domain.bo.PsCompanyQueryBo;
|
||||||
import com.pusong.business.domain.vo.PsCompanyInfoVo;
|
import com.pusong.business.domain.vo.PsCompanyInfoVo;
|
||||||
import com.pusong.business.domain.bo.PsCompanyInfoBo;
|
import com.pusong.business.domain.bo.PsCompanyInfoBo;
|
||||||
import com.pusong.common.mybatis.core.page.TableDataInfo;
|
import com.pusong.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -31,6 +32,13 @@ public interface IPsCompanyInfoService {
|
|||||||
* @return 公司信息列表
|
* @return 公司信息列表
|
||||||
*/
|
*/
|
||||||
List<PsCompanyInfoVo> queryList(PsCompanyInfoBo bo);
|
List<PsCompanyInfoVo> queryList(PsCompanyInfoBo bo);
|
||||||
|
/**
|
||||||
|
* 查询符合条件的公司信息列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 公司信息列表
|
||||||
|
*/
|
||||||
|
List<PsCompanyInfoVo> queryPageList(PsCompanyQueryBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增公司信息
|
* 新增公司信息
|
||||||
|
@ -2,6 +2,7 @@ package com.pusong.business.service.impl;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
import com.pusong.business.domain.PsContractInfo;
|
import com.pusong.business.domain.PsContractInfo;
|
||||||
|
import com.pusong.business.domain.bo.PsCompanyQueryBo;
|
||||||
import com.pusong.business.mapper.PsContractInfoMapper;
|
import com.pusong.business.mapper.PsContractInfoMapper;
|
||||||
import com.pusong.business.service.IPsContractInfoService;
|
import com.pusong.business.service.IPsContractInfoService;
|
||||||
import com.pusong.common.core.exception.ServiceException;
|
import com.pusong.common.core.exception.ServiceException;
|
||||||
@ -60,6 +61,17 @@ public class PsCompanyInfoServiceImpl implements IPsCompanyInfoService {
|
|||||||
return baseMapper.selectVoList(lqw);
|
return baseMapper.selectVoList(lqw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的公司信息列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 公司信息列表
|
||||||
|
*/
|
||||||
|
public List<PsCompanyInfoVo> queryPageList(PsCompanyQueryBo bo, PageQuery pageQuery){
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private LambdaQueryWrapper<PsCompanyInfo> buildQueryWrapper(PsCompanyInfoBo bo) {
|
private LambdaQueryWrapper<PsCompanyInfo> buildQueryWrapper(PsCompanyInfoBo bo) {
|
||||||
LambdaQueryWrapper<PsCompanyInfo> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<PsCompanyInfo> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.eq(bo.getId() != null, PsCompanyInfo::getId, bo.getId());
|
lqw.eq(bo.getId() != null, PsCompanyInfo::getId, bo.getId());
|
||||||
|
@ -597,7 +597,7 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
|
|||||||
"where bus.contract_code = info.contract_code and bus.business_type = 2");
|
"where bus.contract_code = info.contract_code and bus.business_type = 2");
|
||||||
//非托管服务类型编码集合
|
//非托管服务类型编码集合
|
||||||
qw.notExists(bo.getServiceType() !=null && bo.getServiceType() == 2, "select 1 from ps_contract_business bus " +
|
qw.notExists(bo.getServiceType() !=null && bo.getServiceType() == 2, "select 1 from ps_contract_business bus " +
|
||||||
"where bus.contract_code = info.contract_code and bus.business_type == 2");
|
"where bus.contract_code = info.contract_code and bus.business_type = 2");
|
||||||
}
|
}
|
||||||
//服务项目编码集合
|
//服务项目编码集合
|
||||||
qw.exists(CollectionUtils.isNotEmpty(bo.getServiceProjects()), "select 1 from ps_contract_business detail " +
|
qw.exists(CollectionUtils.isNotEmpty(bo.getServiceProjects()), "select 1 from ps_contract_business detail " +
|
||||||
|
@ -365,9 +365,10 @@ public class PsCustomInfoServiceImpl implements IPsCustomInfoService {
|
|||||||
qw.eq(queryBo.getId() != null,"custom.id",queryBo.getId());
|
qw.eq(queryBo.getId() != null,"custom.id",queryBo.getId());
|
||||||
qw.like(StringUtils.isNotBlank(queryBo.getName()), "custom.custom_name", queryBo.getName());
|
qw.like(StringUtils.isNotBlank(queryBo.getName()), "custom.custom_name", queryBo.getName());
|
||||||
qw.like(StringUtils.isNotBlank(queryBo.getMobile()), "custom.custom_mobile", queryBo.getMobile());
|
qw.like(StringUtils.isNotBlank(queryBo.getMobile()), "custom.custom_mobile", queryBo.getMobile());
|
||||||
|
qw.eq(StringUtils.isNotBlank(queryBo.getCustomSource()), "custom.custom_source", queryBo.getCustomSource());
|
||||||
qw.notIn("con.contract_status", ContractStatusEnum.isValid());
|
qw.notIn("con.contract_status", ContractStatusEnum.isValid());
|
||||||
|
|
||||||
qw.exists(StringUtils.isNotBlank(queryBo.getCustomerManagerName()),"select 1 from sys_user su where su.user_id = custom.custom_manager and su.nick_name like %"+queryBo.getCustomerManagerName()+"%");
|
qw.exists(StringUtils.isNotBlank(queryBo.getCustomManagerName()),"select 1 from sys_user su where su.user_id = custom.custom_manager and su.nick_name like %"+queryBo.getCustomManagerName()+"%");
|
||||||
if(queryBo.getType() !=null && queryBo.getType() == 2){
|
if(queryBo.getType() !=null && queryBo.getType() == 2){
|
||||||
qw.eq("con.contract_status", ContractStatusEnum.SUCCESS.getCode());
|
qw.eq("con.contract_status", ContractStatusEnum.SUCCESS.getCode());
|
||||||
}else if (queryBo.getType() !=null && queryBo.getType() == 1) {
|
}else if (queryBo.getType() !=null && queryBo.getType() == 1) {
|
||||||
|
@ -411,6 +411,7 @@ public class PsTaskServiceImpl implements IPsTaskService {
|
|||||||
lqw.like(StringUtils.isNotBlank(bo.getCompanyAdress()), "com.company_adress", bo.getCompanyAdress());//公司地址
|
lqw.like(StringUtils.isNotBlank(bo.getCompanyAdress()), "com.company_adress", bo.getCompanyAdress());//公司地址
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getMobile()), "com.legal_person_phone", bo.getMobile());//法人手机号
|
lqw.like(StringUtils.isNotBlank(bo.getMobile()), "com.legal_person_phone", bo.getMobile());//法人手机号
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getIdNo()), "com.legal_person_idcard", bo.getIdNo());//法人身份证
|
lqw.like(StringUtils.isNotBlank(bo.getIdNo()), "com.legal_person_idcard", bo.getIdNo());//法人身份证
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getName()), "com.legal_person_name", bo.getName());//法人姓名
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getCustomName()), "cus.custom_name", bo.getCustomName());//客户姓名
|
lqw.like(StringUtils.isNotBlank(bo.getCustomName()), "cus.custom_name", bo.getCustomName());//客户姓名
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getCustomMobile()), "cus.custom_mobile", bo.getCustomMobile());//客户电话
|
lqw.like(StringUtils.isNotBlank(bo.getCustomMobile()), "cus.custom_mobile", bo.getCustomMobile());//客户电话
|
||||||
//服务项目编码集合
|
//服务项目编码集合
|
||||||
@ -418,7 +419,7 @@ public class PsTaskServiceImpl implements IPsTaskService {
|
|||||||
"where detail.contract_code = con.contract_code and detail.business_type in ("+StringUtils.join(bo.getServiceProjectCode(),",")+")");//服务项目编码集合
|
"where detail.contract_code = con.contract_code and detail.business_type in ("+StringUtils.join(bo.getServiceProjectCode(),",")+")");//服务项目编码集合
|
||||||
//执行者姓名
|
//执行者姓名
|
||||||
lqw.exists(StringUtils.isNotBlank(bo.getExecutor()), "select 1 from ps_task_appoint appoint,sys_user su " +
|
lqw.exists(StringUtils.isNotBlank(bo.getExecutor()), "select 1 from ps_task_appoint appoint,sys_user su " +
|
||||||
"where appoint.executor = su.user_id and appoint.task_id = main.id and su.nick_name like '%" + bo.getExecutor() + "%'");
|
"where appoint.appoint_status != '50' and appoint.executor = su.user_id and appoint.task_id = main.id and su.nick_name like '%" + bo.getExecutor() + "%'");
|
||||||
lqw.orderByDesc("main.create_time");
|
lqw.orderByDesc("main.create_time");
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user