优化
This commit is contained in:
parent
53109729e9
commit
486828f9f3
@ -92,5 +92,10 @@ public class PsContractInfoQueryBo {
|
|||||||
*/
|
*/
|
||||||
private String isDue;
|
private String isDue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否代账
|
||||||
|
*/
|
||||||
|
private String isProxy;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
@ -566,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");
|
||||||
@ -580,6 +583,18 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
|
|||||||
psContractBusinessBo.setCompanyId(companyInfoBo.getId());
|
psContractBusinessBo.setCompanyId(companyInfoBo.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//标记所有任务为 失效。 合同号
|
||||||
|
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())){
|
if(ContractStatusEnum.isReturn(old.getContractStatus())){
|
||||||
//已回款的添加任务,没回款的等审批后再添加
|
//已回款的添加任务,没回款的等审批后再添加
|
||||||
PsTaskMain psTaskMain = new PsTaskMain();
|
PsTaskMain psTaskMain = new PsTaskMain();
|
||||||
@ -595,6 +610,7 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
|
|||||||
if (!psTaskMainList.isEmpty()){
|
if (!psTaskMainList.isEmpty()){
|
||||||
taskMainService.insertBatch(psTaskMainList);
|
taskMainService.insertBatch(psTaskMainList);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//保存公司合同关联表
|
//保存公司合同关联表
|
||||||
@ -1104,6 +1120,8 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
|
|||||||
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(),",")+")");//服务项目编码集合
|
||||||
|
@ -316,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())
|
||||||
|
@ -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