commit
This commit is contained in:
parent
3c10e741ae
commit
dcdf1d5a8a
@ -7,6 +7,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import com.pusong.common.idempotent.annotation.RepeatSubmit;
|
import com.pusong.common.idempotent.annotation.RepeatSubmit;
|
||||||
@ -43,8 +44,8 @@ public class PsContractPayController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@SaCheckPermission("business:contractPay:list")
|
@SaCheckPermission("business:contractPay:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public List<PsContractPayVo> list(@NotBlank(message = "合同编码不能为空") String contractCode) {
|
public R<List<PsContractPayVo>> list(@NotBlank(message = "合同编码不能为空") String contractCode) {
|
||||||
return psContractPayService.queryListByContractCode(contractCode,null,null);
|
return R.ok(psContractPayService.queryListByContractCode(contractCode,null,null));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取合同回款记录详细信息
|
* 获取合同回款记录详细信息
|
||||||
@ -88,7 +89,7 @@ public class PsContractPayController extends BaseController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("business:contractPay:query")
|
@SaCheckPermission("business:contractPay:query")
|
||||||
@GetMapping("/refundFinish")
|
@PostMapping(value = "/refundFinish",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||||
public R<Void> refundFinish(@RequestPart("files") List<MultipartFile> files, @NotNull Long id) {
|
public R<Void> refundFinish(@RequestPart("files") List<MultipartFile> files, @NotNull Long id) {
|
||||||
psContractPayService.refundFinish(files,id);
|
psContractPayService.refundFinish(files,id);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
|
@ -114,7 +114,8 @@ public class PsCustomController extends BaseController {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* 客户档案
|
||||||
|
* @param type 类型 1客户档案 2已完成客户
|
||||||
* @param name 客户名
|
* @param name 客户名
|
||||||
* @param mobile 客户电话
|
* @param mobile 客户电话
|
||||||
* @param companyName 公司名
|
* @param companyName 公司名
|
||||||
@ -123,8 +124,8 @@ public class PsCustomController extends BaseController {
|
|||||||
@SaCheckPermission("business:customInfo:record")
|
@SaCheckPermission("business:customInfo:record")
|
||||||
@Log(title = "客户档案" )
|
@Log(title = "客户档案" )
|
||||||
@GetMapping("/record")
|
@GetMapping("/record")
|
||||||
public TableDataInfo<PsCustomerRecordVo> record(String name, String mobile, String companyName, PageQuery pageQuery) {
|
public TableDataInfo<PsCustomerRecordVo> record(Integer type, String name, String mobile, String companyName, PageQuery pageQuery) {
|
||||||
return psCustomInfoService.getCustomerRecordList(name,mobile,companyName,pageQuery);
|
return psCustomInfoService.getCustomerRecordList(type,name,mobile,companyName,pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ import com.pusong.common.log.enums.BusinessType;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import com.pusong.common.web.core.BaseController;
|
import com.pusong.common.web.core.BaseController;
|
||||||
@ -164,9 +165,9 @@ public class PsTaskController extends BaseController {
|
|||||||
* @param file 发票文件
|
* @param file 发票文件
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Log(title = "免费工单任务作废")
|
@Log(title = "上传发票")
|
||||||
@SaCheckPermission("business:task:list")
|
@SaCheckPermission("business:task:list")
|
||||||
@GetMapping("/invoice")
|
@PostMapping(value = "/invoice", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||||
public R<Void> taskReset(@RequestPart("file") MultipartFile file, @NotNull Long id) {
|
public R<Void> taskReset(@RequestPart("file") MultipartFile file, @NotNull Long id) {
|
||||||
psTaskMainService.invoice(file,id);
|
psTaskMainService.invoice(file,id);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
@ -181,7 +182,20 @@ public class PsTaskController extends BaseController {
|
|||||||
@SaCheckPermission("business:task:list")
|
@SaCheckPermission("business:task:list")
|
||||||
@GetMapping("/pause")
|
@GetMapping("/pause")
|
||||||
public R<Void> pause( @NotNull Long id) {
|
public R<Void> pause( @NotNull Long id) {
|
||||||
// psTaskMainService.pause(id);
|
psTaskMainService.pause(id);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务恢复
|
||||||
|
* @param id 任务id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Log(title = "任务恢复")
|
||||||
|
@SaCheckPermission("business:task:list")
|
||||||
|
@GetMapping("/recover")
|
||||||
|
public R<Void> recover( @NotNull Long id) {
|
||||||
|
psTaskMainService.recover(id);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,8 +9,11 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合同回款记录业务对象 ps_contract_pay
|
* 合同回款记录业务对象 ps_contract_pay
|
||||||
@ -48,9 +51,10 @@ public class PsContractPayBo {
|
|||||||
/**
|
/**
|
||||||
* 回款日期
|
* 回款日期
|
||||||
*/
|
*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date payDate;
|
private Date payDate;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回款类型(1全款,2分期)
|
* 回款类型(1全款,2分期)
|
||||||
*/
|
*/
|
||||||
|
@ -3,6 +3,7 @@ package com.pusong.business.domain.bo;
|
|||||||
import com.pusong.business.domain.PsCustomInfo;
|
import com.pusong.business.domain.PsCustomInfo;
|
||||||
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.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 lombok.Data;
|
import lombok.Data;
|
||||||
@ -22,7 +23,11 @@ import java.util.List;
|
|||||||
@EqualsAndHashCode
|
@EqualsAndHashCode
|
||||||
@AutoMapper(target = PsCustomInfo.class)
|
@AutoMapper(target = PsCustomInfo.class)
|
||||||
public class PsCustomInfoBo {
|
public class PsCustomInfoBo {
|
||||||
|
/**
|
||||||
|
* 类型 1客户列表 2黑名单 3公海
|
||||||
|
*/
|
||||||
|
@NotNull(message = "类型不能为空", groups = { QueryGroup.class })
|
||||||
|
private Integer type;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -73,6 +73,9 @@ public class PsTaskQueryBo {
|
|||||||
*/
|
*/
|
||||||
@NotBlank(message = "任务委派类型不能为空", groups = {QueryGroup.class})
|
@NotBlank(message = "任务委派类型不能为空", groups = {QueryGroup.class})
|
||||||
private String appointType;
|
private String appointType;
|
||||||
|
/**
|
||||||
|
* 任务类型
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,8 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
|||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import com.pusong.common.excel.annotation.ExcelDictFormat;
|
import com.pusong.common.excel.annotation.ExcelDictFormat;
|
||||||
import com.pusong.common.excel.convert.ExcelDictConvert;
|
import com.pusong.common.excel.convert.ExcelDictConvert;
|
||||||
|
import com.pusong.common.translation.annotation.Translation;
|
||||||
|
import com.pusong.common.translation.constant.TransConstant;
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -59,7 +61,7 @@ public class PsContractPayVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 回款日期
|
* 回款日期
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "回款日期")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date payDate;
|
private Date payDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,6 +77,7 @@ public class PsContractPayVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 收款主体
|
* 收款主体
|
||||||
*/
|
*/
|
||||||
|
@Translation(type = TransConstant.DICT_TYPE_TO_LABEL ,other = "contract_main")
|
||||||
private String gathMain;
|
private String gathMain;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -94,6 +97,7 @@ public class PsContractPayVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,8 @@ package com.pusong.business.enums;
|
|||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum CustomerStatusEnum {
|
public enum CustomerStatusEnum {
|
||||||
@ -14,4 +16,11 @@ public enum CustomerStatusEnum {
|
|||||||
private String code;
|
private String code;
|
||||||
private String text;
|
private String text;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取公海的数据状态
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<String> getPublic() {
|
||||||
|
return List.of(PUBLIC.code,CLAIMAPPROVER.code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,8 @@ public interface PsCustomInfoMapper extends BaseMapperPlus<PsCustomInfo, PsCusto
|
|||||||
})
|
})
|
||||||
Page<PsCustomInfoVo> selectPageCustomerList(@Param("page") Page<PsCustomInfo> page, @Param(Constants.WRAPPER) Wrapper<PsCustomInfo> queryWrapper);
|
Page<PsCustomInfoVo> selectPageCustomerList(@Param("page") Page<PsCustomInfo> page, @Param(Constants.WRAPPER) Wrapper<PsCustomInfo> queryWrapper);
|
||||||
|
|
||||||
|
Page<PsCustomInfoVo> selectPagePublicCustomerList(@Param("page") Page<PsCustomInfo> page, @Param(Constants.WRAPPER) Wrapper<PsCustomInfo> queryWrapper);
|
||||||
|
|
||||||
@DataPermission({
|
@DataPermission({
|
||||||
@DataColumn(key = "deptName", value = "info.create_dept"),
|
@DataColumn(key = "deptName", value = "info.create_dept"),
|
||||||
@DataColumn(key = "userName", value = "info.custom_manager")
|
@DataColumn(key = "userName", value = "info.custom_manager")
|
||||||
|
@ -97,7 +97,7 @@ public interface IPsCustomInfoService {
|
|||||||
* @param companyName
|
* @param companyName
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
TableDataInfo<PsCustomerRecordVo> getCustomerRecordList(String name, String mobile, String companyName, PageQuery pageQuery);
|
TableDataInfo<PsCustomerRecordVo> getCustomerRecordList(Integer type,String name, String mobile, String companyName, PageQuery pageQuery);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 移除黑名单
|
* 移除黑名单
|
||||||
|
@ -113,6 +113,18 @@ public interface IPsTaskService {
|
|||||||
* @param file 发票文件
|
* @param file 发票文件
|
||||||
*/
|
*/
|
||||||
void invoice(MultipartFile file, @NotNull Long id);
|
void invoice(MultipartFile file, @NotNull Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务暂停
|
||||||
|
* @param id 任务主表id
|
||||||
|
*/
|
||||||
|
void pause( Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务恢复
|
||||||
|
* @param id 任务主表id
|
||||||
|
*/
|
||||||
|
void recover( Long id);
|
||||||
/* *//**
|
/* *//**
|
||||||
* 查询主任务
|
* 查询主任务
|
||||||
*
|
*
|
||||||
|
@ -20,6 +20,7 @@ import com.pusong.business.domain.vo.PsApproverRecordVo;
|
|||||||
import com.pusong.business.domain.PsApproverRecord;
|
import com.pusong.business.domain.PsApproverRecord;
|
||||||
import com.pusong.business.mapper.PsApproverRecordMapper;
|
import com.pusong.business.mapper.PsApproverRecordMapper;
|
||||||
import com.pusong.business.service.IPsApproverRecordService;
|
import com.pusong.business.service.IPsApproverRecordService;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -94,6 +95,7 @@ public class PsApproverRecordServiceImpl implements IPsApproverRecordService {
|
|||||||
* @param id 审批表id
|
* @param id 审批表id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Transactional
|
||||||
public void approver(String operate, Long id,String desc){
|
public void approver(String operate, Long id,String desc){
|
||||||
PsApproverRecord info = baseMapper.selectById(id);
|
PsApproverRecord info = baseMapper.selectById(id);
|
||||||
if(!StringUtils.equals(ApproverStatusEnum.INIT.getCode(),info.getApproverStatus())){
|
if(!StringUtils.equals(ApproverStatusEnum.INIT.getCode(),info.getApproverStatus())){
|
||||||
@ -111,7 +113,7 @@ public class PsApproverRecordServiceImpl implements IPsApproverRecordService {
|
|||||||
}
|
}
|
||||||
info.setApproverDate(new Date());
|
info.setApproverDate(new Date());
|
||||||
info.setApproverDesc(desc);
|
info.setApproverDesc(desc);
|
||||||
baseMapper.insert(info);
|
baseMapper.updateById(info);
|
||||||
}
|
}
|
||||||
// /**
|
// /**
|
||||||
// * 新增审批记录
|
// * 新增审批记录
|
||||||
|
@ -449,7 +449,7 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
|
|||||||
.notIn(PsTaskMain::getTaskStatus, TaskStatusEnum.returnFinish()));
|
.notIn(PsTaskMain::getTaskStatus, TaskStatusEnum.returnFinish()));
|
||||||
PsContractInfoVo info = this.queryContractByCode(contractCode);
|
PsContractInfoVo info = this.queryContractByCode(contractCode);
|
||||||
//任务已完成 合同已回传 回款已结束
|
//任务已完成 合同已回传 回款已结束
|
||||||
if(info.getRollBackStatus().equals(CommonStatusEnum.SUCCESS.getCode())
|
if(StringUtils.equals(info.getRollBackStatus(),CommonStatusEnum.SUCCESS.getCode())
|
||||||
&& num<=0 && info.getResidualMoney().compareTo(BigDecimal.ZERO)<=0){
|
&& num<=0 && info.getResidualMoney().compareTo(BigDecimal.ZERO)<=0){
|
||||||
PsContractInfo psContractInfo = new PsContractInfo();
|
PsContractInfo psContractInfo = new PsContractInfo();
|
||||||
psContractInfo.setContractCode(contractCode);
|
psContractInfo.setContractCode(contractCode);
|
||||||
@ -478,12 +478,12 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
|
|||||||
//用户表条件
|
//用户表条件
|
||||||
qw.like( StringUtils.isNotBlank(bo.getCustomManagerName()),"us.nick_name", bo.getCustomManagerName());
|
qw.like( StringUtils.isNotBlank(bo.getCustomManagerName()),"us.nick_name", bo.getCustomManagerName());
|
||||||
|
|
||||||
|
//2待回款(不要作废数据) 3已回款(需要展示退款中的作废数据)
|
||||||
//待回款(不要作废数据) 已回款(需要展示退款中的作废数据)
|
qw.and(bo.getType() != null && (bo.getType() == 2 || (bo.getType() == 3)),wq->{
|
||||||
qw.ne(bo.getType() != null && (bo.getType() == 2 || (bo.getType() == 3)),"info.is_cancel",CommonStatusEnum.SUCCESS.getCode());
|
wq.ne("info.is_cancel",CommonStatusEnum.SUCCESS.getCode());
|
||||||
qw.or().gt(bo.getType() != null && bo.getType() == 2,"((select IFNULL(sum(pa.money),0) from ps_contract_pay pa where pa.pay_status = 1 and pa.business_type = 1 and pa.contract_code = info.contract_code\n" +
|
wq.or().gt( bo.getType() == 2,"((select IFNULL(sum(pa.money),0) from ps_contract_pay pa where pa.pay_status = 1 and pa.business_type = 1 and pa.contract_code = info.contract_code\n" +
|
||||||
")-(select IFNULL(sum(pay.money),0) from ps_contract_pay pay where pay.pay_status = 1 and pay.business_type = 2 and pay.contract_code = info.contract_code))",0);
|
")-(select IFNULL(sum(pay.money),0) from ps_contract_pay pay where pay.pay_status = 1 and pay.business_type = 2 and pay.contract_code = info.contract_code))",0);
|
||||||
|
});
|
||||||
//托管续费合同
|
//托管续费合同
|
||||||
qw.exists(bo.getType() != null && bo.getType() == 4
|
qw.exists(bo.getType() != null && bo.getType() == 4
|
||||||
,"select 1 from ps_contract_business bus where info.contract_code = bus.contract_code and bus.business_type = 4");
|
,"select 1 from ps_contract_business bus where info.contract_code = bus.contract_code and bus.business_type = 4");
|
||||||
|
@ -54,10 +54,11 @@ public class PsContractPayServiceImpl implements IPsContractPayService {
|
|||||||
*/
|
*/
|
||||||
public List<PsContractPayVo> queryListByContractCode(String contractCode,String business,PayStatusEnum enu){
|
public List<PsContractPayVo> queryListByContractCode(String contractCode,String business,PayStatusEnum enu){
|
||||||
if(StringUtils.isBlank(contractCode)){return new ArrayList<>();}
|
if(StringUtils.isBlank(contractCode)){return new ArrayList<>();}
|
||||||
|
String code = enu == null ? null :enu.getCode();
|
||||||
List<PsContractPayVo> list = baseMapper.selectVoList(Wrappers.<PsContractPay>lambdaQuery().
|
List<PsContractPayVo> list = baseMapper.selectVoList(Wrappers.<PsContractPay>lambdaQuery().
|
||||||
eq(PsContractPay::getContractCode, contractCode).eq(PsContractPay::getDelFlag,0)
|
eq(PsContractPay::getContractCode, contractCode).eq(PsContractPay::getDelFlag,0)
|
||||||
.eq(StringUtils.isNotBlank(business),PsContractPay::getBusinessType,business)
|
.eq(StringUtils.isNotBlank(business),PsContractPay::getBusinessType,business)
|
||||||
.eq(enu != null ,PsContractPay::getPayStatus, enu.getCode())
|
.eq(code != null ,PsContractPay::getPayStatus, code)
|
||||||
.notIn(PsContractPay::getPayStatus, PayStatusEnum.getStatus())//去掉无用的状态
|
.notIn(PsContractPay::getPayStatus, PayStatusEnum.getStatus())//去掉无用的状态
|
||||||
.orderByAsc(PsContractPay::getPayDate));
|
.orderByAsc(PsContractPay::getPayDate));
|
||||||
return list == null?new ArrayList<>():list;
|
return list == null?new ArrayList<>():list;
|
||||||
|
@ -95,8 +95,20 @@ public class PsCustomInfoServiceImpl implements IPsCustomInfoService {
|
|||||||
//查询客户基本信息
|
//查询客户基本信息
|
||||||
bo.setNotCustomStatus(List.of(CustomerStatusEnum.PUBLIC.getCode()));
|
bo.setNotCustomStatus(List.of(CustomerStatusEnum.PUBLIC.getCode()));
|
||||||
bo.setBlack(CommonStatusEnum.N.getCode());
|
bo.setBlack(CommonStatusEnum.N.getCode());
|
||||||
|
if(bo.getType() == null || bo.getType() == 1){//任务列表
|
||||||
|
}else if(bo.getType() == 2){//黑名单
|
||||||
|
bo.setBlack(CommonStatusEnum.Y.getCode());
|
||||||
|
}else if(bo.getType() == 3){//公海
|
||||||
|
bo.setInCustomStatus(CustomerStatusEnum.getPublic());
|
||||||
|
}
|
||||||
Wrapper<PsCustomInfo> lqw = buildQueryWrapper(bo);
|
Wrapper<PsCustomInfo> lqw = buildQueryWrapper(bo);
|
||||||
Page<PsCustomInfoVo> result = baseMapper.selectPageCustomerList(pageQuery.build(), lqw);
|
Page<PsCustomInfoVo> result = new Page<>();
|
||||||
|
if(bo.getType() == 3){//公海数据不用加数据权限
|
||||||
|
result = baseMapper.selectPagePublicCustomerList(pageQuery.build(), lqw);
|
||||||
|
}else{
|
||||||
|
result = baseMapper.selectPageCustomerList(pageQuery.build(), lqw);
|
||||||
|
}
|
||||||
|
|
||||||
if(CollectionUtils.isEmpty(result.getRecords())){
|
if(CollectionUtils.isEmpty(result.getRecords())){
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
@ -335,18 +347,22 @@ public class PsCustomInfoServiceImpl implements IPsCustomInfoService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户档案查询列表
|
* 客户档案查询列表
|
||||||
|
* @param type 类型 1客户档案 2已完成客户
|
||||||
* @param name
|
* @param name
|
||||||
* @param mobile
|
* @param mobile
|
||||||
* @param companyName
|
* @param companyName
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public TableDataInfo<PsCustomerRecordVo> getCustomerRecordList(String name, String mobile, String companyName, PageQuery pageQuery){
|
public TableDataInfo<PsCustomerRecordVo> getCustomerRecordList(Integer type,String name, String mobile,
|
||||||
|
String companyName, PageQuery pageQuery){
|
||||||
QueryWrapper<PsCustomInfo> qw = Wrappers.query();
|
QueryWrapper<PsCustomInfo> qw = Wrappers.query();
|
||||||
|
|
||||||
qw.like(StringUtils.isNotBlank(companyName), "com.company_name", companyName);
|
qw.like(StringUtils.isNotBlank(companyName), "com.company_name", companyName);
|
||||||
qw.like(StringUtils.isNotBlank(name), "custom.custom_name", name);
|
qw.like(StringUtils.isNotBlank(name), "custom.custom_name", name);
|
||||||
qw.like(StringUtils.isNotBlank(mobile), "custom.custom_mobile", mobile);
|
qw.like(StringUtils.isNotBlank(mobile), "custom.custom_mobile", mobile);
|
||||||
qw.notIn("con.contract_status", ContractStatusEnum.isValid());
|
qw.notIn("con.contract_status", ContractStatusEnum.isValid());
|
||||||
|
if(type !=null && type == 2){
|
||||||
|
qw.eq("con.contract_status", ContractStatusEnum.SUCCESS.getCode());
|
||||||
|
}
|
||||||
Page<PsCustomerRecordVo> list = baseMapper.selectPageCustomerRecordList(pageQuery.build(), qw);
|
Page<PsCustomerRecordVo> list = baseMapper.selectPageCustomerRecordList(pageQuery.build(), qw);
|
||||||
return TableDataInfo.build(list);
|
return TableDataInfo.build(list);
|
||||||
}
|
}
|
||||||
|
@ -329,8 +329,9 @@ public class PsTaskServiceImpl implements IPsTaskService {
|
|||||||
|
|
||||||
private QueryWrapper<PsTaskMain> buildQueryWrapper(PsTaskQueryBo bo) {
|
private QueryWrapper<PsTaskMain> buildQueryWrapper(PsTaskQueryBo bo) {
|
||||||
QueryWrapper<PsTaskMain> lqw = new QueryWrapper<PsTaskMain>();
|
QueryWrapper<PsTaskMain> lqw = new QueryWrapper<PsTaskMain>();
|
||||||
lqw.eq("del_flag","0");
|
lqw.eq("main.del_flag","0");
|
||||||
lqw.ne("task_status",TaskStatusEnum.CANCEL.getCode());
|
lqw.ne("main.task_status",TaskStatusEnum.CANCEL.getCode());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getType()),"main.task_type",bo.getType());
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getCompanyName()), "com.company_name", bo.getCompanyName());//公司地址
|
lqw.like(StringUtils.isNotBlank(bo.getCompanyName()), "com.company_name", bo.getCompanyName());//公司地址
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getCustomerNum()), "com.customer_num", bo.getCustomerNum());//纳税人识别号
|
lqw.like(StringUtils.isNotBlank(bo.getCustomerNum()), "com.customer_num", bo.getCustomerNum());//纳税人识别号
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getCustomerCert()), "com.customer_cert", bo.getCustomerCert());//纳税人资格
|
lqw.eq(StringUtils.isNotBlank(bo.getCustomerCert()), "com.customer_cert", bo.getCustomerCert());//纳税人资格
|
||||||
@ -360,9 +361,46 @@ public class PsTaskServiceImpl implements IPsTaskService {
|
|||||||
}
|
}
|
||||||
SysOssVo vo = ossService.upload(file);
|
SysOssVo vo = ossService.upload(file);
|
||||||
info.setInvoice(vo.getOssId()+"");
|
info.setInvoice(vo.getOssId()+"");
|
||||||
|
baseMapper.updateById(info);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 任务暂停
|
||||||
|
* @param id 任务主表id
|
||||||
|
*/
|
||||||
|
public void pause( Long id){
|
||||||
|
PsTaskMain info = baseMapper.selectById(id);
|
||||||
|
if(!StringUtils.equals(info.getTaskStatus(),TaskStatusEnum.ING.getCode())){
|
||||||
|
throw new ServiceException("只有进行中的任务可以暂停");
|
||||||
|
}
|
||||||
|
PsTaskMain main = new PsTaskMain();
|
||||||
|
main.setId(id);
|
||||||
|
main.setTaskStatus(TaskStatusEnum.PAUSE.getCode());
|
||||||
|
baseMapper.updateById(main);
|
||||||
|
//只有进行中可以暂停
|
||||||
|
appointMapper.update(Wrappers.<PsTaskAppoint>lambdaUpdate()
|
||||||
|
.set(PsTaskAppoint::getAppointStatus,AppointStatusEnum.PAUSE.getCode())
|
||||||
|
.eq(PsTaskAppoint::getTaskId,id).eq(PsTaskAppoint::getAppointStatus,AppointStatusEnum.ING.getCode()));
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 任务恢复
|
||||||
|
* @param id 任务主表id
|
||||||
|
*/
|
||||||
|
public void recover( Long id){
|
||||||
|
PsTaskMain info = baseMapper.selectById(id);
|
||||||
|
if(!StringUtils.equals(info.getTaskStatus(),TaskStatusEnum.PAUSE.getCode())){
|
||||||
|
throw new ServiceException("只有暂停中的任务可以恢复");
|
||||||
|
}
|
||||||
|
PsTaskMain main = new PsTaskMain();
|
||||||
|
main.setId(id);
|
||||||
|
main.setTaskStatus(TaskStatusEnum.ING.getCode());
|
||||||
|
baseMapper.updateById(main);
|
||||||
|
//只有暂停可以恢复
|
||||||
|
appointMapper.update(Wrappers.<PsTaskAppoint>lambdaUpdate()
|
||||||
|
.set(PsTaskAppoint::getAppointStatus,AppointStatusEnum.ING.getCode())
|
||||||
|
.eq(PsTaskAppoint::getTaskId,id).eq(PsTaskAppoint::getAppointStatus,AppointStatusEnum.PAUSE.getCode()));
|
||||||
|
|
||||||
|
}
|
||||||
// /**
|
// /**
|
||||||
// * 查询主任务
|
// * 查询主任务
|
||||||
// *
|
// *
|
||||||
|
@ -2,6 +2,7 @@ package com.pusong.system.controller.system;
|
|||||||
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.pusong.common.core.domain.R;
|
import com.pusong.common.core.domain.R;
|
||||||
import com.pusong.common.core.validate.QueryGroup;
|
import com.pusong.common.core.validate.QueryGroup;
|
||||||
@ -86,6 +87,7 @@ public class SysOssController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param ossId OSS对象ID
|
* @param ossId OSS对象ID
|
||||||
*/
|
*/
|
||||||
|
@SaIgnore
|
||||||
@SaCheckPermission("system:oss:download")
|
@SaCheckPermission("system:oss:download")
|
||||||
@GetMapping("/download/{ossId}")
|
@GetMapping("/download/{ossId}")
|
||||||
public void download(@PathVariable Long ossId, HttpServletResponse response) throws IOException {
|
public void download(@PathVariable Long ossId, HttpServletResponse response) throws IOException {
|
||||||
|
Loading…
Reference in New Issue
Block a user