Merge branch 'main' of http://124.236.46.74:9103/mengxu/pusong-crm into main
# Conflicts: # pusong-admin/src/main/resources/application-dev.yml
This commit is contained in:
commit
79a441234f
@ -42,9 +42,14 @@ spring:
|
|||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||||
|
|
||||||
url: jdbc:mysql://124.236.46.74:9100/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
url: jdbc:mysql://124.236.46.74:9100/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
username: root
|
username: root
|
||||||
password: rwWhYfCe3Tzhatep
|
password: rwWhYfCe3Tzhatep
|
||||||
|
|
||||||
|
# url: jdbc:mysql://192.168.18.119:3308/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
|
# username: root
|
||||||
|
# password: Ps123456
|
||||||
# url: jdbc:mysql://47.95.38.123:3306/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
# url: jdbc:mysql://47.95.38.123:3306/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
# username: root
|
# username: root
|
||||||
# password: Ps123456@
|
# password: Ps123456@
|
||||||
|
@ -50,8 +50,8 @@ public class PsCustomController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@SaCheckPermission("business:customInfo:list")
|
@SaCheckPermission("business:customInfo:list")
|
||||||
@GetMapping("/listByLoginUser")
|
@GetMapping("/listByLoginUser")
|
||||||
public TableDataInfo<List<Map<String,Object>>> listByLoginUser(String customName, String customMobile, String companyName, PageQuery pageQuery) {
|
public TableDataInfo<List<Map<String,Object>>> listByLoginUser(String customName, String customMobile, String companyName, String companyServiceName, PageQuery pageQuery) {
|
||||||
return psCustomInfoService.listByLoginUser(customName, customMobile, companyName, pageQuery);
|
return psCustomInfoService.listByLoginUser(customName, customMobile, companyName, companyServiceName, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,6 +11,7 @@ import com.pusong.business.domain.vo.TaskPlanVo;
|
|||||||
import com.pusong.business.service.IPsContractInfoService;
|
import com.pusong.business.service.IPsContractInfoService;
|
||||||
import com.pusong.business.service.IPsTaskService;
|
import com.pusong.business.service.IPsTaskService;
|
||||||
import com.pusong.common.core.domain.R;
|
import com.pusong.common.core.domain.R;
|
||||||
|
import com.pusong.common.core.utils.DateUtils;
|
||||||
import com.pusong.common.core.validate.QueryGroup;
|
import com.pusong.common.core.validate.QueryGroup;
|
||||||
import com.pusong.common.idempotent.annotation.RepeatSubmit;
|
import com.pusong.common.idempotent.annotation.RepeatSubmit;
|
||||||
import com.pusong.common.log.annotation.Log;
|
import com.pusong.common.log.annotation.Log;
|
||||||
@ -115,8 +116,9 @@ public class PsTaskController extends BaseController {
|
|||||||
@Log(title = "主任务完成")
|
@Log(title = "主任务完成")
|
||||||
@SaCheckPermission("business:task:list")
|
@SaCheckPermission("business:task:list")
|
||||||
@GetMapping("/mainFinish")
|
@GetMapping("/mainFinish")
|
||||||
public R<Void> mainFinish(@NotNull Long id, Date firstFilingTime) {
|
public R<Void> mainFinish(@NotNull Long id, String firstFilingTime) {
|
||||||
contractInfoService.finish(psTaskMainService.finishMain(id, firstFilingTime));
|
Date date = DateUtils.parseDate(firstFilingTime);
|
||||||
|
contractInfoService.finish(psTaskMainService.finishMain(id, date));
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import com.pusong.business.domain.PsCompanyInfo;
|
|||||||
import com.pusong.common.core.validate.AddGroup;
|
import com.pusong.common.core.validate.AddGroup;
|
||||||
import com.pusong.common.core.validate.EditGroup;
|
import com.pusong.common.core.validate.EditGroup;
|
||||||
import com.pusong.common.core.validate.QueryGroup;
|
import com.pusong.common.core.validate.QueryGroup;
|
||||||
|
import com.pusong.common.json.utils.JsonUtils;
|
||||||
import com.pusong.common.mybatis.core.domain.BaseEntity;
|
import com.pusong.common.mybatis.core.domain.BaseEntity;
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
@ -64,6 +65,8 @@ public class PsCompanyQueryBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM")
|
||||||
|
private String firstFilingTime;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ public class PsContractInfoBo {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否续费
|
* 是否续费
|
||||||
* o新签 1续费
|
* o新签(新客户) 1续费 2新签(老客户)
|
||||||
*/
|
*/
|
||||||
private String isDue;
|
private String isDue;
|
||||||
|
|
||||||
|
@ -92,5 +92,10 @@ public class PsContractInfoQueryBo {
|
|||||||
*/
|
*/
|
||||||
private String isDue;
|
private String isDue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否代账
|
||||||
|
*/
|
||||||
|
private String isProxy;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public class PsTaskQueryBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 销售经理姓名
|
* 销售经理姓名
|
||||||
*/
|
*/
|
||||||
private String customManagerName;
|
private String customManagerName;
|
||||||
/**
|
/**
|
||||||
* 服务项目编码集合
|
* 服务项目编码集合
|
||||||
*/
|
*/
|
||||||
@ -55,30 +55,30 @@ public class PsTaskQueryBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 执行者姓名
|
* 执行者姓名
|
||||||
*/
|
*/
|
||||||
private String executor;
|
private String executor;
|
||||||
/**
|
/**
|
||||||
* 所属区域(公司地址)
|
* 所属区域(公司地址)
|
||||||
*/
|
*/
|
||||||
private String companyAdress;
|
private String companyAdress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 法人手机号
|
* 法人手机号
|
||||||
*/
|
*/
|
||||||
private String mobile;
|
private String mobile;
|
||||||
/**
|
/**
|
||||||
* 法人身份证号
|
* 法人身份证号
|
||||||
*/
|
*/
|
||||||
private String idNo;
|
private String idNo;
|
||||||
/**
|
/**
|
||||||
* 法人身份证号
|
* 法人身份证号
|
||||||
*/
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务委派类型(1内勤,2外勤,3特勤) 查询子任务列表时使用
|
* 任务委派类型(1内勤,2外勤,3特勤) 查询子任务列表时使用
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "任务委派类型不能为空", groups = {QueryGroup.class})
|
@NotBlank(message = "任务委派类型不能为空", groups = {QueryGroup.class})
|
||||||
private String appointType;
|
private String appointType;
|
||||||
/**
|
/**
|
||||||
* 任务类型
|
* 任务类型
|
||||||
*/
|
*/
|
||||||
|
@ -281,4 +281,6 @@ public class PsCompanyInfoVo implements Serializable {
|
|||||||
* 首次申报时间
|
* 首次申报时间
|
||||||
*/
|
*/
|
||||||
private Date firstFilingTime;
|
private Date firstFilingTime;
|
||||||
|
|
||||||
|
private String taskRemark;
|
||||||
}
|
}
|
||||||
|
@ -92,4 +92,6 @@ public class PsContractBusinessVo implements Serializable {
|
|||||||
* 剩余天数
|
* 剩余天数
|
||||||
*/
|
*/
|
||||||
private int remainingDay;
|
private int remainingDay;
|
||||||
|
|
||||||
|
private String pdfId;
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,9 @@ public enum TaskStatusEnum {
|
|||||||
FINISH("30","完成"),
|
FINISH("30","完成"),
|
||||||
PAUSE("40","暂停"),
|
PAUSE("40","暂停"),
|
||||||
CANCEL("50","作废"),
|
CANCEL("50","作废"),
|
||||||
CANCELAPPO("55","作废审批中");
|
CANCELAPPO("55","作废审批中")
|
||||||
|
,DISABLED("60", "因合同修改失效")
|
||||||
|
;
|
||||||
|
|
||||||
private String code;
|
private String code;
|
||||||
private String text;
|
private String text;
|
||||||
|
@ -32,7 +32,7 @@ public interface IPsCustomInfoService {
|
|||||||
* 查询登陆人下所有的客户名称和id
|
* 查询登陆人下所有的客户名称和id
|
||||||
* @return 客户id和姓名
|
* @return 客户id和姓名
|
||||||
*/
|
*/
|
||||||
TableDataInfo listByLoginUser(String customName, String customMobile, String companyName, PageQuery pageQuery);
|
TableDataInfo listByLoginUser(String customName, String customMobile, String companyName, String companyServiceName, PageQuery pageQuery);
|
||||||
/**
|
/**
|
||||||
* 分页查询客户基本信息列表
|
* 分页查询客户基本信息列表
|
||||||
*
|
*
|
||||||
|
@ -154,8 +154,11 @@ public class PsCompanyInfoServiceImpl implements IPsCompanyInfoService {
|
|||||||
lqw.like(bo.getCompanyName() != null,"com.company_name", bo.getCompanyName());
|
lqw.like(bo.getCompanyName() != null,"com.company_name", bo.getCompanyName());
|
||||||
lqw.eq(bo.getServiceStatus() != null,"com.service_status", bo.getServiceStatus());
|
lqw.eq(bo.getServiceStatus() != null,"com.service_status", bo.getServiceStatus());
|
||||||
|
|
||||||
lqw.between(bo.getParams().get("beginTime") != null && bo.getParams().get("endTime") != null,
|
if (bo.getFirstFilingTime() != null){
|
||||||
"com.first_filing_time", bo.getParams().get("beginTime"), bo.getParams().get("endTime"));
|
Date endTimeByMonth = DateUtils.getEndTimeByMonth(DateUtils.parseDate(bo.getFirstFilingTime()));
|
||||||
|
lqw.between("com.first_filing_time", bo.getFirstFilingTime(), endTimeByMonth);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String followUserSql = "";
|
String followUserSql = "";
|
||||||
|
@ -3,6 +3,7 @@ package com.pusong.business.service.impl;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -112,6 +113,13 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional//开启事务
|
@Transactional//开启事务
|
||||||
public String createContract(PsContractInfoBo bo, Integer type) {
|
public String createContract(PsContractInfoBo bo, Integer type) {
|
||||||
|
if ("0".equals(bo.getIsDue())){
|
||||||
|
bo.setIsOldCus((byte) 0);
|
||||||
|
}else if ("2".equals(bo.getIsDue())){
|
||||||
|
bo.setIsOldCus((byte) 1);
|
||||||
|
bo.setIsDue("0");
|
||||||
|
}
|
||||||
|
|
||||||
if (bo.getFirstPartyType() == PsContractInfoBo.FIRSTPARTYTYPE.INDIVIDUALS.getType()){
|
if (bo.getFirstPartyType() == PsContractInfoBo.FIRSTPARTYTYPE.INDIVIDUALS.getType()){
|
||||||
bo.setContactPersonName(bo.getCompanyInfoBo().getLegalPersonName());
|
bo.setContactPersonName(bo.getCompanyInfoBo().getLegalPersonName());
|
||||||
bo.setContactPersonPhone(bo.getCompanyInfoBo().getLegalPersonPhone());
|
bo.setContactPersonPhone(bo.getCompanyInfoBo().getLegalPersonPhone());
|
||||||
@ -221,6 +229,13 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
|
|||||||
* @return 是否新增成功
|
* @return 是否新增成功
|
||||||
*/
|
*/
|
||||||
public Long preview(PsContractInfoBo bo){
|
public Long preview(PsContractInfoBo bo){
|
||||||
|
if ("0".equals(bo.getIsDue())){
|
||||||
|
bo.setIsOldCus((byte) 0);
|
||||||
|
}else if ("2".equals(bo.getIsDue())){
|
||||||
|
bo.setIsOldCus((byte) 1);
|
||||||
|
bo.setIsDue("0");
|
||||||
|
}
|
||||||
|
|
||||||
//3.如果已存在合同,则进行修改,否则新增
|
//3.如果已存在合同,则进行修改,否则新增
|
||||||
PsContractInfo add = new PsContractInfo();
|
PsContractInfo add = new PsContractInfo();
|
||||||
add.setContractCode(getContractCode());//合同编码
|
add.setContractCode(getContractCode());//合同编码
|
||||||
@ -552,7 +567,9 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<PsTaskMain> psTaskMainList = new ArrayList<>();
|
|
||||||
|
|
||||||
|
|
||||||
for (PsCompanyInfoBo companyInfoBo : addCompany) {
|
for (PsCompanyInfoBo companyInfoBo : addCompany) {
|
||||||
//服务公司加,增加任务,重新计算合同是待分配还是已分配
|
//服务公司加,增加任务,重新计算合同是待分配还是已分配
|
||||||
companyInfoBo.setCompanyType("2");
|
companyInfoBo.setCompanyType("2");
|
||||||
@ -566,20 +583,33 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
|
|||||||
psContractBusinessBo.setCompanyId(companyInfoBo.getId());
|
psContractBusinessBo.setCompanyId(companyInfoBo.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(ContractStatusEnum.isReturn(old.getContractStatus())){
|
|
||||||
//已回款的添加任务,没回款的等审批后再添加
|
|
||||||
PsTaskMain psTaskMain = new PsTaskMain();
|
|
||||||
psTaskMain.setContractCode(old.getContractCode());
|
|
||||||
psTaskMain.setTaskType(TaskTypeEnum.CONTRACT.getCode());
|
|
||||||
psTaskMain.setTaskStatus(TaskStatusEnum.INIT.getCode());
|
|
||||||
psTaskMain.setCompanyId(updateBo.getCompanyInfoBo().getId());
|
|
||||||
psTaskMain.setCustomId(updateBo.getCustomId());
|
|
||||||
psTaskMain.setServiceCompanyId(companyInfoBo.getId());
|
|
||||||
psTaskMainList.add(psTaskMain);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!psTaskMainList.isEmpty()){
|
|
||||||
taskMainService.insertBatch(psTaskMainList);
|
//标记所有任务为 失效。 合同号
|
||||||
|
UpdateWrapper wrapper = new UpdateWrapper();
|
||||||
|
wrapper.eq("contract_code", updateBo.getContractCode());
|
||||||
|
wrapper.set("task_status", TaskStatusEnum.DISABLED.getCode());
|
||||||
|
taskMainMapper.update(wrapper);
|
||||||
|
|
||||||
|
if(!"1".equals(updateBo.getIsDue())){
|
||||||
|
List<PsTaskMain> psTaskMainList = new ArrayList<>();
|
||||||
|
for (PsCompanyInfoBo companyInfoBo : updateBo.getServiceCompanyInfoList()){
|
||||||
|
if(ContractStatusEnum.isReturn(old.getContractStatus())){
|
||||||
|
//已回款的添加任务,没回款的等审批后再添加
|
||||||
|
PsTaskMain psTaskMain = new PsTaskMain();
|
||||||
|
psTaskMain.setContractCode(old.getContractCode());
|
||||||
|
psTaskMain.setTaskType(TaskTypeEnum.CONTRACT.getCode());
|
||||||
|
psTaskMain.setTaskStatus(TaskStatusEnum.INIT.getCode());
|
||||||
|
psTaskMain.setCompanyId(updateBo.getCompanyInfoBo().getId());
|
||||||
|
psTaskMain.setCustomId(updateBo.getCustomId());
|
||||||
|
psTaskMain.setServiceCompanyId(companyInfoBo.getId());
|
||||||
|
psTaskMainList.add(psTaskMain);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!psTaskMainList.isEmpty()){
|
||||||
|
taskMainService.insertBatch(psTaskMainList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1090,16 +1120,18 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
|
|||||||
qw.exists("select 1 from ps_contract_business bus where info.contract_code = bus.contract_code and bus.business_type = 2");
|
qw.exists("select 1 from ps_contract_business bus where info.contract_code = bus.contract_code and bus.business_type = 2");
|
||||||
}else{
|
}else{
|
||||||
//托管类服务类型编码集合
|
//托管类服务类型编码集合
|
||||||
qw.exists(bo.getServiceType() !=null && bo.getServiceType() == 1, "select 1 from ps_contract_business bus " +
|
qw.exists(bo.getServiceType() != null && bo.getServiceType() == 1, "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.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(bo.getIsProxy() != null, "select 1 from ps_contract_business bus " +
|
||||||
|
"where bus.contract_code = info.contract_code and bus.is_proxy = '" + bo.getIsProxy() + "'");
|
||||||
//服务项目编码集合
|
//服务项目编码集合
|
||||||
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 " +
|
||||||
"where detail.contract_code = info.contract_code and detail.business_type in ("+StringUtils.join(bo.getServiceProjects(),",")+")");//服务项目编码集合
|
"where detail.contract_code = info.contract_code and detail.business_type in ("+StringUtils.join(bo.getServiceProjects(),",")+")");//服务项目编码集合
|
||||||
qw.between(bo.getMoneyEnd() != null && bo.getMoneyStart() !=null,"info.contract_amount",bo.getMoneyStart(),bo.getMoneyEnd());
|
qw.between(bo.getMoneyEnd() != null && bo.getMoneyStart() != null,"info.contract_amount",bo.getMoneyStart(),bo.getMoneyEnd());
|
||||||
// qw.orderByDesc("info.create_time");
|
// qw.orderByDesc("info.create_time");
|
||||||
qw.orderByDesc("info.apply_date");
|
qw.orderByDesc("info.apply_date");
|
||||||
return qw;
|
return qw;
|
||||||
|
@ -72,7 +72,7 @@ public class PsCustomInfoServiceImpl implements IPsCustomInfoService {
|
|||||||
* @return 客户id和姓名
|
* @return 客户id和姓名
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo listByLoginUser(String customName, String customMobile, String companyName, PageQuery pageQuery) {
|
public TableDataInfo listByLoginUser(String customName, String customMobile, String companyName, String companyServiceName, PageQuery pageQuery) {
|
||||||
//查询客户基本信息
|
//查询客户基本信息
|
||||||
Page<PsCustomInfoVo> list = baseMapper.selectPageCustomerList(pageQuery.build()
|
Page<PsCustomInfoVo> list = baseMapper.selectPageCustomerList(pageQuery.build()
|
||||||
, new QueryWrapper<PsCustomInfo>()
|
, new QueryWrapper<PsCustomInfo>()
|
||||||
@ -82,14 +82,21 @@ public class PsCustomInfoServiceImpl implements IPsCustomInfoService {
|
|||||||
.isNotNull("info.custom_name")
|
.isNotNull("info.custom_name")
|
||||||
.ne("info.custom_name","")
|
.ne("info.custom_name","")
|
||||||
.ne("info.custom_name","无")
|
.ne("info.custom_name","无")
|
||||||
.and(StringUtils.isNotBlank(customName) || StringUtils.isNotBlank(customMobile) || StringUtils.isNotBlank(companyName)
|
// .and(StringUtils.isNotBlank(customName) || StringUtils.isNotBlank(customMobile) || StringUtils.isNotBlank(companyName)
|
||||||
, wq -> wq.like(StringUtils.isNotBlank(customName), "info.custom_name", customName)
|
// , wq -> wq.like(StringUtils.isNotBlank(customName), "info.custom_name", customName)
|
||||||
.or()
|
// .or()
|
||||||
.like(StringUtils.isNotBlank(customMobile), "info.custom_mobile", customMobile)
|
// .like(StringUtils.isNotBlank(customMobile), "info.custom_mobile", customMobile)
|
||||||
.or()
|
// .or()
|
||||||
.exists(StringUtils.isNotBlank(companyName), "select 1 from ps_company_info where ps_company_info.custom_id = ps_custom_info.id and ps_company_info.del_flag = 0 and company_type = 2 and company_name like '%" + companyName + "%'")
|
// .exists(StringUtils.isNotBlank(companyName), "select 1 from ps_company_info where ps_company_info.custom_id = info.id and ps_company_info.del_flag = 0 and company_type = 1 and company_name like '%" + companyName + "%'")
|
||||||
|
// .exists(StringUtils.isNotBlank(companyServiceName), "select 1 from ps_company_info where ps_company_info.custom_id = info.id and ps_company_info.del_flag = 0 and company_type = 2 and company_name like '%" + companyServiceName + "%'")
|
||||||
|
//
|
||||||
|
// )
|
||||||
|
.like(StringUtils.isNotBlank(customName), "info.custom_name", customName)
|
||||||
|
.like(StringUtils.isNotBlank(customMobile), "info.custom_mobile", customMobile)
|
||||||
|
.exists(StringUtils.isNotBlank(companyName), "select 1 from ps_company_info where ps_company_info.custom_id = info.id and ps_company_info.del_flag = 0 and company_type = 1 and company_name like '%" + companyName + "%'")
|
||||||
|
.exists(StringUtils.isNotBlank(companyServiceName), "select 1 from ps_company_info where ps_company_info.custom_id = info.id and ps_company_info.del_flag = 0 and company_type = 2 and company_name like '%" + companyServiceName + "%'")
|
||||||
|
|
||||||
));
|
);
|
||||||
if (list.getRecords().isEmpty()){
|
if (list.getRecords().isEmpty()){
|
||||||
TableDataInfo tableDataInfo = new TableDataInfo();
|
TableDataInfo tableDataInfo = new TableDataInfo();
|
||||||
tableDataInfo.setRows(null);
|
tableDataInfo.setRows(null);
|
||||||
@ -309,6 +316,8 @@ public class PsCustomInfoServiceImpl implements IPsCustomInfoService {
|
|||||||
|
|
||||||
//app搜索
|
//app搜索
|
||||||
qw.and(StringUtils.isNotBlank(bo.getAppKeyWord()), wrapper -> wrapper
|
qw.and(StringUtils.isNotBlank(bo.getAppKeyWord()), wrapper -> wrapper
|
||||||
|
.like("usr.nick_name", bo.getAppKeyWord())
|
||||||
|
.or()
|
||||||
.like("psinfo.custom_name", bo.getAppKeyWord())
|
.like("psinfo.custom_name", bo.getAppKeyWord())
|
||||||
.or()
|
.or()
|
||||||
.likeLeft("info.custom_mobile", bo.getAppKeyWord())
|
.likeLeft("info.custom_mobile", bo.getAppKeyWord())
|
||||||
|
@ -121,7 +121,7 @@ public class PsTaskServiceImpl implements IPsTaskService {
|
|||||||
lqw.orderByDesc("main.create_time");
|
lqw.orderByDesc("main.create_time");
|
||||||
page = baseMapper.queryTaskPageList(pageQuery.build(), lqw);
|
page = baseMapper.queryTaskPageList(pageQuery.build(), lqw);
|
||||||
|
|
||||||
if (page.getSize() > 0){
|
if (page.getRecords().size() > 0){
|
||||||
QueryWrapper queryWrapper = new QueryWrapper();
|
QueryWrapper queryWrapper = new QueryWrapper();
|
||||||
List<Long> list = page.getRecords().stream().map(PsTaskMainVo::getId).toList();
|
List<Long> list = page.getRecords().stream().map(PsTaskMainVo::getId).toList();
|
||||||
queryWrapper.in("task_id", list);
|
queryWrapper.in("task_id", list);
|
||||||
|
@ -105,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
--pcc.contract_code contract_code, 必须在 com.*, 上边,否则company里的 contract_code值会被com表的字段覆盖
|
--pcc.contract_code contract_code, 必须在 com.*, 上边,否则company里的 contract_code值会被com表的字段覆盖
|
||||||
pcc.contract_code,
|
pcc.contract_code,
|
||||||
pcc.id pcc_id,
|
pcc.id pcc_id,
|
||||||
|
pcc.task_remark,
|
||||||
com.*,
|
com.*,
|
||||||
bus.business_amount bus_business_amount,
|
bus.business_amount bus_business_amount,
|
||||||
bus.business_desc bus_business_desc,
|
bus.business_desc bus_business_desc,
|
||||||
|
@ -38,9 +38,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="selectTuoGuanBusinessList" parameterType="String" resultType="com.pusong.business.domain.vo.PsContractBusinessVo">
|
<select id="selectTuoGuanBusinessList" parameterType="String" resultType="com.pusong.business.domain.vo.PsContractBusinessVo">
|
||||||
select
|
select
|
||||||
bus.*
|
bus.*, info.pdf_id
|
||||||
from ps_contract_company cc
|
from ps_contract_company cc
|
||||||
inner join ps_contract_business bus on bus.contract_code = cc.contract_code and bus.company_id = cc.company_id and business_type = '2'
|
inner join ps_contract_business bus on bus.contract_code = cc.contract_code and bus.company_id = cc.company_id and business_type = '2'
|
||||||
|
left join ps_contract_info info on info.contract_code = cc.contract_code
|
||||||
${ew.getCustomSqlSegment}
|
${ew.getCustomSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user