生成合同

This commit is contained in:
1073413548 2024-08-30 16:48:43 +08:00
parent 5929754e1c
commit 3a32fd808c
5 changed files with 32 additions and 6 deletions

View File

@ -58,6 +58,22 @@ public class PsCustomController extends BaseController {
public TableDataInfo<PsCustomInfoVo> list(PsCustomInfoBo bo, PageQuery pageQuery) { public TableDataInfo<PsCustomInfoVo> list(PsCustomInfoBo bo, PageQuery pageQuery) {
return psCustomInfoService.queryPageList(bo, pageQuery); return psCustomInfoService.queryPageList(bo, pageQuery);
} }
// /**
// * 导出客户基本信息列表
// */
// @SaCheckPermission("business:customInfo:export")
// @Log(title = "客户基本信息", businessType = BusinessType.EXPORT)
// @PostMapping("/export")
// public void export(PsCustomInfoBo bo, HttpServletResponse response) {
// //todo 导出接口
// PageQuery pageQuery = new PageQuery();
// pageQuery.setPageNum(1);
// pageQuery.setPageSize(100000);
// TableDataInfo<PsCustomInfoVo> list = psCustomInfoService.queryPageList(bo,pageQuery);
// ExcelUtil.exportExcel(list, "客户基本信息", PsCustomInfoVo.class, response);
// }
/** /**
* 新增客户基本信息 * 新增客户基本信息
*/ */

View File

@ -36,6 +36,11 @@ public class PsCustomRecordQueryBo {
*/ */
private String name; private String name;
/**
* 客户经理名称
*/
private String customerManagerName;
/** /**
* 客户电话客户电话(多个用英文逗号分割) * 客户电话客户电话(多个用英文逗号分割)
*/ */

View File

@ -596,8 +596,8 @@ 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.exists(CollectionUtils.isNotEmpty(bo.getServiceProjects()), "select 1 from ps_contract_business_detail detail " + qw.exists(CollectionUtils.isNotEmpty(bo.getServiceProjects()), "select 1 from ps_contract_business detail " +
"where detail.contract_code = info.contract_code and detail.business_project 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");

View File

@ -359,10 +359,15 @@ public class PsCustomInfoServiceImpl implements IPsCustomInfoService {
public TableDataInfo<PsCustomerRecordVo> getCustomerRecordList(PsCustomRecordQueryBo queryBo, PageQuery pageQuery){ public TableDataInfo<PsCustomerRecordVo> getCustomerRecordList(PsCustomRecordQueryBo queryBo, PageQuery pageQuery){
QueryWrapper<PsCustomInfo> qw = Wrappers.query(); QueryWrapper<PsCustomInfo> qw = Wrappers.query();
qw.like(StringUtils.isNotBlank(queryBo.getCompanyName()), "com.company_name", queryBo.getCompanyName()); qw.like(StringUtils.isNotBlank(queryBo.getCompanyName()), "com.company_name", queryBo.getCompanyName());
qw.like(StringUtils.isNotBlank(queryBo.getFinanceAccountNo()), "com.finance_account_no", queryBo.getFinanceAccountNo());
qw.like(StringUtils.isNotBlank(queryBo.getLegalPersonName()), "com.legal_person_name", queryBo.getLegalPersonName());
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.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()+"%");
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) {
@ -373,8 +378,8 @@ public class PsCustomInfoServiceImpl implements IPsCustomInfoService {
qw.exists(queryBo.getServiceType() !=null && queryBo.getServiceType() == 2, "select 1 from ps_contract_business bus " + qw.exists(queryBo.getServiceType() !=null && queryBo.getServiceType() == 2, "select 1 from ps_contract_business bus " +
"where bus.contract_code = con.contract_code and bus.business_type != 2"); "where bus.contract_code = con.contract_code and bus.business_type != 2");
//服务项目编码集合 //服务项目编码集合
qw.exists(CollectionUtils.isNotEmpty(queryBo.getServiceProjects()), "select 1 from ps_contract_business_detail detail " + qw.exists(CollectionUtils.isNotEmpty(queryBo.getServiceProjects()), "select 1 from ps_contract_business detail " +
"where detail.contract_code = con.contract_code and detail.business_project in ("+StringUtils.join(queryBo.getServiceProjects(),",")+")");//服务项目编码集合 "where detail.contract_code = con.contract_code and detail.business_type in ("+StringUtils.join(queryBo.getServiceProjects(),",")+")");//服务项目编码集合
} }
Page<PsCustomerRecordVo> list = baseMapper.selectPageCustomerRecordList(pageQuery.build(), qw); Page<PsCustomerRecordVo> list = baseMapper.selectPageCustomerRecordList(pageQuery.build(), qw);
if(CollectionUtils.isEmpty(list.getRecords())){ if(CollectionUtils.isEmpty(list.getRecords())){

View File

@ -409,8 +409,8 @@ public class PsTaskServiceImpl implements IPsTaskService {
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.getName()), "com.legal_person_name", bo.getName());//法人姓名
//服务项目编码集合 //服务项目编码集合
lqw.exists(CollectionUtils.isNotEmpty(bo.getServiceProjectCode()), "select 1 from ps_contract_business_detail detail " + lqw.exists(CollectionUtils.isNotEmpty(bo.getServiceProjectCode()), "select 1 from ps_contract_business detail " +
"where detail.contract_code = con.contract_code and detail.business_project 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.executor = su.user_id and appoint.task_id = main.id and su.nick_name like '%" + bo.getExecutor() + "%'");