
51 changed files with 3192 additions and 3 deletions
@ -0,0 +1,87 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.apiadmin; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.customer.biz.crmcustomerfile.*; |
|||
import com.yxt.customer.biz.crmfile.CrmFileDto; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户) <br/> |
|||
* File: CrmCustomerFileFeignFallback.java <br/> |
|||
* Class: com.yxt.anrui.crm.biz.crmcustomerfile.CrmCustomerFileRest <br/> |
|||
* Description: 客户资料初始化表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-02-26 14:10:17 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "客户资料初始化表") |
|||
@RestController("com.yxt.anrui.crm.biz.crmcustomerfile.CrmCustomerFileRest") |
|||
@RequestMapping("v1/crmcustomerfile") |
|||
public class CrmCustomerFileRest { |
|||
|
|||
@Autowired |
|||
private CrmCustomerFileService crmCustomerFileService; |
|||
|
|||
|
|||
// public ResultBean<PagerVo<CrmCustomerFileVo>> listPage(@RequestBody PagerQuery<CrmCustomerFileQuery> pq) {
|
|||
// ResultBean rb = ResultBean.fireFail();
|
|||
// PagerVo<CrmCustomerFileVo> pv = crmCustomerFileService.listPageVo(pq);
|
|||
// return rb.success().setData(pv);
|
|||
// }
|
|||
//
|
|||
//
|
|||
// public ResultBean saveCustomerFile(String staffName, String staffSid, String sid, List<CrmFileDto> crmFileDtos) {
|
|||
// return crmCustomerFileService.saveCustomerFile(staffName, staffSid, sid, crmFileDtos);
|
|||
// }
|
|||
//
|
|||
//
|
|||
// public ResultBean<CrmCustomerFileListVo> fetchFileListBySid(String sid) {
|
|||
// return crmCustomerFileService.fetchFileListBySid(sid);
|
|||
// }
|
|||
//
|
|||
//
|
|||
// public ResultBean<List<CrmCustomerFile>> selectIdImageByCustomerSid(String customerSid) {
|
|||
// ResultBean rb = ResultBean.fireFail();
|
|||
// List<CrmCustomerFile> crmCustomerFiles = crmCustomerFileService.selectIdImageByCustomerSid(customerSid);
|
|||
// return rb.success().setData(crmCustomerFiles);
|
|||
// }
|
|||
|
|||
|
|||
} |
@ -0,0 +1,66 @@ |
|||
package com.yxt.customer.apiadmin; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.utils.ExportExcelUtils; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.customer.biz.crmcustomer.*; |
|||
import com.yxt.customer.biz.crmcustomerfile.AppCrmCustomerTempArchivesDto; |
|||
import com.yxt.customer.biz.crmcustomerfile.AppCrmCustomerTempArchivesVo; |
|||
import com.yxt.customer.biz.crmcustomerfile.CrmCustomerFileService; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.cloud.openfeign.SpringQueryMap; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import javax.validation.Valid; |
|||
import java.io.UnsupportedEncodingException; |
|||
import java.net.URLEncoder; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户管理) <br/> |
|||
* File: CrmCustomerTempFeignFallback.java <br/> |
|||
* Class: com.yxt.anrui.crm.biz.crmcustomertemp.CrmCustomerTempRest <br/> |
|||
* Description: 潜在客户信息. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-01-12 11:21:17 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "潜在客户信息") |
|||
@RestController |
|||
@RequestMapping("v1/crmcustomertemp") |
|||
public class CrmCustomerTempRest { |
|||
|
|||
@Autowired |
|||
private CrmCustomerTempService crmCustomerTempService; |
|||
|
|||
@Autowired |
|||
private CrmCustomerFileService crmCustomerFileService; |
|||
|
|||
@Autowired |
|||
private HttpServletResponse response; |
|||
|
|||
|
|||
|
|||
@ApiOperation("销售订单选择客户") |
|||
@PostMapping("/chooseCustomerList") |
|||
public ResultBean<PagerVo<SalesCustomerVo>> chooseCustomerList(@RequestBody PagerQuery<SalesCustomerQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<SalesCustomerVo> pv = crmCustomerTempService.chooseCustomerList(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,114 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.apiadmin; |
|||
|
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.customer.biz.crmfile.*; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户信息) <br/> |
|||
* File: CrmFileFeignFallback.java <br/> |
|||
* Class: com.yxt.anrui.crm.biz.crmfile.CrmFileRest <br/> |
|||
* Description: 客户资料表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-01-24 09:15:29 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "客户资料表") |
|||
@RestController("com.yxt.anrui.crm.biz.crmfile.CrmFileRest") |
|||
@RequestMapping("v1/crmfile") |
|||
public class CrmFileRest { |
|||
|
|||
@Autowired |
|||
private CrmFileService crmFileService; |
|||
|
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<CrmFileVo>> listPage(@RequestBody PagerQuery<CrmFileQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
IPage<CrmFileVo> page = crmFileService.listPageVo(pq); |
|||
PagerVo<CrmFileVo> pv = new PagerVo<>(); |
|||
PagerVo<CrmFileVo> pv1 = PagerUtil.pageToVo(page, pv); |
|||
return rb.success().setData(pv1); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("新增保存") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody CrmFileDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
crmFileService.saveCrmFile(dto); |
|||
return rb.success(); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("修改保存") |
|||
@PostMapping("/update/{sid}") |
|||
public ResultBean update(@RequestBody CrmFileDto dto, @PathVariable("sid") String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
crmFileService.updateCrmFile(dto,sid); |
|||
return rb.success(); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("根据sid批量删除") |
|||
@PostMapping("/delBySids") |
|||
public ResultBean delBySids(@RequestBody String[] sids) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
crmFileService.delBySids(sids); |
|||
return rb.success(); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("根据SID获取一条记录") |
|||
@GetMapping("/fetchBySid/{sid}") |
|||
public ResultBean<CrmFileVo> fetchBySid(@PathVariable("sid") String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
CrmFile vo = crmFileService.fetchBySid(sid); |
|||
return rb.success().setData(vo); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("根据SID获取一条记录") |
|||
@PostMapping("/deleteFilesOss") |
|||
public ResultBean deleteFilesOss(@RequestParam("fullPath") String fullPath) { |
|||
return crmFileService.deleteFilesOss(fullPath); |
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.yxt.customer.apiadmin; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.utils.DateUtils; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.customer.biz.crmvisit.*; |
|||
import io.swagger.annotations.Api; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.text.SimpleDateFormat; |
|||
import java.util.Date; |
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户管理) <br/> |
|||
* File: CrmVisitFeignFallback.java <br/> |
|||
* Class: com.yxt.anrui.crm.biz.crmvisit.CrmVisitRest <br/> |
|||
* Description: 客户跟进记录. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-28 09:57:14 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "客户跟进记录") |
|||
@RestController |
|||
@RequestMapping("v1/crmvisit") |
|||
public class CrmVisitRest { |
|||
|
|||
} |
@ -0,0 +1,163 @@ |
|||
package com.yxt.customer.biz.crmcustomer; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户管理) <br/> |
|||
* File: CrmCustomerTemp.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTemp <br/> |
|||
* Description: 潜在客户信息. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-01-12 11:21:16 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "潜在客户信息", description = "潜在客户信息") |
|||
@TableName("crm_customer_temp") |
|||
@Data |
|||
public class CrmCustomerTemp extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
|
|||
@ApiModelProperty("客户编号(部门编码+客户类型(1位,0个人,1企业)+部门内部流水号(6位))") |
|||
private String customerNo; |
|||
|
|||
@ApiModelProperty("客户类型(自然人/法人)") |
|||
private String customerType; |
|||
|
|||
@ApiModelProperty("客户类型key") |
|||
private String customerTypeKey; |
|||
|
|||
@ApiModelProperty("客户分类(个人:司机/个体老板/其他。企业:企业型客户/一级经销商/二级经销商/终端物流客户)") |
|||
private String customerClass; |
|||
|
|||
@ApiModelProperty("客户分类key") |
|||
private String customerClassKey; |
|||
|
|||
@ApiModelProperty("客户来源(公司资源/自主开发/交接客户/转介绍客户/集团内销)") |
|||
private String source; |
|||
|
|||
@ApiModelProperty("客户来源key") |
|||
private String sourceKey; |
|||
|
|||
@ApiModelProperty("客户级别(意向客户/准客户/成交客户/集团内销/黑名单客户)") |
|||
private String level; |
|||
|
|||
@ApiModelProperty("客户级别key") |
|||
private String levelKey; |
|||
|
|||
@ApiModelProperty("客户名称") |
|||
private String name; |
|||
|
|||
@ApiModelProperty("证件类型key") |
|||
private String certificateTypeKey; |
|||
|
|||
@ApiModelProperty("证件类型(个人为身份证/企业为营业执照)") |
|||
private String certificateType; |
|||
|
|||
@ApiModelProperty("证件号码(个人为身份证号/企业为统一社会信用代码)") |
|||
private String IDNumber; |
|||
|
|||
@ApiModelProperty("证件有效期") |
|||
private String endDate; |
|||
|
|||
@ApiModelProperty("行政区划代码(省)") |
|||
private String address_province; |
|||
|
|||
@ApiModelProperty("行政区划代码(市)") |
|||
private String address_city; |
|||
|
|||
@ApiModelProperty("行政区划代码(县)") |
|||
private String address_county; |
|||
|
|||
@ApiModelProperty("省") |
|||
private String province; |
|||
|
|||
@ApiModelProperty("市") |
|||
private String city; |
|||
|
|||
@ApiModelProperty("县") |
|||
private String county; |
|||
|
|||
@ApiModelProperty("详细地址") |
|||
private String address; |
|||
|
|||
@ApiModelProperty("邮编") |
|||
private String zipCode; |
|||
|
|||
@ApiModelProperty("电子邮箱") |
|||
private String e_mail; |
|||
|
|||
@ApiModelProperty("联系人") |
|||
private String contacts; |
|||
|
|||
@ApiModelProperty("联系电话") |
|||
private String mobile; |
|||
|
|||
@ApiModelProperty("紧急联系电话") |
|||
private String emergencyContact; |
|||
|
|||
@ApiModelProperty("紧急联系电话") |
|||
private String emergencyMobile; |
|||
|
|||
@ApiModelProperty("微信号码") |
|||
private String weixin; |
|||
|
|||
@ApiModelProperty("业务人员sid") |
|||
private String staffSid; |
|||
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; |
|||
|
|||
@ApiModelProperty("创建部门sid") |
|||
private String useOrgSid; |
|||
|
|||
@ApiModelProperty("性别") |
|||
private String sex; |
|||
|
|||
@ApiModelProperty("性别key") |
|||
private String sexKey; |
|||
|
|||
@ApiModelProperty("生日") |
|||
private String birthday; |
|||
|
|||
@ApiModelProperty("所在公司名称") |
|||
private String companyName; |
|||
|
|||
@ApiModelProperty("跟进状态key") |
|||
private String follow_state_key; |
|||
|
|||
@ApiModelProperty("跟进状态") |
|||
private String follow_state; |
|||
|
|||
@ApiModelProperty("是否开启提醒key(1开启,0不开启)") |
|||
private String isOnRemindkey; |
|||
|
|||
@ApiModelProperty("是否开启提醒(1开启,0不开启)") |
|||
private String isOnRemind; |
|||
|
|||
@ApiModelProperty("提醒日期") |
|||
private String remind_day; |
|||
|
|||
@ApiModelProperty("提醒备注") |
|||
private String remind_remark; |
|||
|
|||
@ApiModelProperty("客户头像") |
|||
private String customerPhoto; |
|||
|
|||
@ApiModelProperty("见面方式key") |
|||
private String visitWayKey; |
|||
|
|||
@ApiModelProperty("见面方式(到店/电话/拜访)") |
|||
private String visitWay; |
|||
|
|||
@ApiModelProperty("证件地址") |
|||
private String certificateAddress; |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.yxt.customer.biz.crmcustomer; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户管理) <br/> |
|||
* File: CrmCustomerTempMapper.java <br/> |
|||
* Class: com.yxt.anrui.crm.biz.crmcustomertemp.CrmCustomerTempMapper <br/> |
|||
* Description: 潜在客户信息. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-01-12 11:21:17 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface CrmCustomerTempMapper extends BaseMapper<CrmCustomerTemp> { |
|||
|
|||
IPage<SalesCustomerVo> chooseCustomerList(IPage<CrmCustomerTemp> page, @Param(Constants.WRAPPER)QueryWrapper<CrmCustomerTemp> qw); |
|||
} |
@ -0,0 +1,14 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.customer.biz.crmcustomer.CrmCustomerTempMapper"> |
|||
<select id="chooseCustomerList" resultType="com.yxt.customer.biz.crmcustomer.SalesCustomerVo"> |
|||
SELECT |
|||
* |
|||
from |
|||
crm_customer AS a |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,68 @@ |
|||
package com.yxt.customer.biz.crmcustomer; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.config.component.FileUploadComponent; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.HanZiConverterPinYin; |
|||
import com.yxt.common.base.utils.HttpStatusEnum; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.BeanUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.*; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户管理) <br/> |
|||
* File: CrmCustomerTempService.java <br/> |
|||
* Class: com.yxt.anrui.crm.biz.crmcustomertemp.CrmCustomerTempService <br/> |
|||
* Description: 潜在客户信息 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-01-12 11:21:17 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class CrmCustomerTempService extends MybatisBaseService<CrmCustomerTempMapper, CrmCustomerTemp> { |
|||
public static final Logger logger = LoggerFactory.getLogger(CrmCustomerTempService.class); |
|||
|
|||
@Autowired |
|||
private FileUploadComponent fileUploadComponent; |
|||
|
|||
|
|||
public PagerVo<SalesCustomerVo> chooseCustomerList(PagerQuery<SalesCustomerQuery> pq) { |
|||
SalesCustomerQuery query = pq.getParams(); |
|||
QueryWrapper<CrmCustomerTemp> qw = new QueryWrapper<>(); |
|||
if (StringUtils.isNotBlank(query.getName())) { |
|||
qw.like("a.name", query.getName()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getCustomerNo())) { |
|||
qw.like("a.customerNo", query.getCustomerNo()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getMobile())) { |
|||
qw.like("a.mobile", query.getMobile()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getCreateOrgSid())) { |
|||
qw.eq("a.createOrgSid", query.getCreateOrgSid()); |
|||
} |
|||
qw.eq("a.isDelete", 0); |
|||
qw.orderByDesc("a.createTime"); |
|||
IPage<CrmCustomerTemp> page = PagerUtil.queryToPage(pq); |
|||
IPage<SalesCustomerVo> pagging = baseMapper.chooseCustomerList(page, qw); |
|||
PagerVo<SalesCustomerVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
|
|||
} |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.yxt.customer.biz.crmcustomer; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Fan |
|||
* @description |
|||
* @date 2024/7/24 15:17 |
|||
*/ |
|||
@Data |
|||
public class SalesCustomerQuery implements Query { |
|||
|
|||
private String createOrgSid; |
|||
/** |
|||
* 客户编码 |
|||
*/ |
|||
private String customerNo; |
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
/** |
|||
* 客户名称 |
|||
*/ |
|||
private String name; |
|||
|
|||
} |
@ -0,0 +1,59 @@ |
|||
package com.yxt.customer.biz.crmcustomer; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Fan |
|||
* @description |
|||
* @date 2024/7/24 15:18 |
|||
*/ |
|||
@Data |
|||
public class SalesCustomerVo { |
|||
|
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String address; |
|||
/** |
|||
* 昵称 |
|||
*/ |
|||
private String buyserNickname; |
|||
/** |
|||
* 市 |
|||
*/ |
|||
private String city; |
|||
/** |
|||
* 县 |
|||
*/ |
|||
private String county; |
|||
/** |
|||
* 客户编码 |
|||
*/ |
|||
private String customerNo; |
|||
/** |
|||
* 手机 |
|||
*/ |
|||
private String mobile; |
|||
/** |
|||
* 客户名称 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 平台 |
|||
*/ |
|||
private String originalPlat; |
|||
/** |
|||
* 固话 |
|||
*/ |
|||
private String phone; |
|||
/** |
|||
* 省 |
|||
*/ |
|||
private String province; |
|||
private String sid; |
|||
/** |
|||
* 街道 |
|||
*/ |
|||
private String street; |
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.yxt.customer.biz.crmcustomerfile; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class AppCrmCustomerTempArchivesDto implements Dto { |
|||
|
|||
@ApiModelProperty("客户sid") |
|||
private String customerSid; |
|||
|
|||
@ApiModelProperty("客户档案数据") |
|||
private List<AppCustomerArchivesDataDto> data; |
|||
|
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
|
|||
} |
@ -0,0 +1,19 @@ |
|||
package com.yxt.customer.biz.crmcustomerfile; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
@Data |
|||
public class AppCrmCustomerTempArchivesVo implements Vo { |
|||
|
|||
private String customerSid; |
|||
|
|||
private List<AppCustomerArchivesDataVo> data; |
|||
|
|||
private String userSid; |
|||
|
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.customer.biz.crmcustomerfile; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class AppCustomerArchivesDataDto implements Dto { |
|||
|
|||
@ApiModelProperty("是否修改了图片,是 需要验证是否可以提交") |
|||
private boolean change; |
|||
|
|||
@ApiModelProperty("文件的key") |
|||
private String key; |
|||
|
|||
@ApiModelProperty("文件的类型") |
|||
private String title; |
|||
|
|||
@ApiModelProperty("图片的集合") |
|||
private List<String> files; |
|||
|
|||
@ApiModelProperty("图片上传的时间") |
|||
private String lastUploadTime; |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.yxt.customer.biz.crmcustomerfile; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class AppCustomerArchivesDataVo implements Vo { |
|||
|
|||
@ApiModelProperty("附件关联sid") |
|||
private String sid; |
|||
@ApiModelProperty("文件名称") |
|||
private String title; |
|||
@ApiModelProperty("类型") |
|||
private String key; |
|||
@ApiModelProperty("附件list") |
|||
private List<String> files; |
|||
@ApiModelProperty("最后上传时间") |
|||
private String createTime; |
|||
@ApiModelProperty("最后上传时间戳") |
|||
private String lastUploadTime; |
|||
} |
@ -0,0 +1,67 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.biz.crmcustomerfile; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户) <br/> |
|||
* File: CrmCustomerFile.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmcustomerfile.CrmCustomerFile <br/> |
|||
* Description: 客户资料初始化表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-02-26 14:10:17 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "客户资料初始化表", description = "客户资料初始化表") |
|||
@TableName("crm_customer_file") |
|||
@Data |
|||
public class CrmCustomerFile extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("资料类别") |
|||
private String dataType; |
|||
@ApiModelProperty("文件名称") |
|||
private String fileName; |
|||
@ApiModelProperty("文件格式") |
|||
private String fileType; |
|||
@ApiModelProperty("关联业务对象sid") |
|||
private String linkSid; |
|||
@ApiModelProperty("文件类别") |
|||
private String attachType; |
|||
@ApiModelProperty("排序号") |
|||
private Integer sortNo; |
|||
// @ApiModelProperty("示例")
|
|||
// private String sample;
|
|||
} |
@ -0,0 +1,66 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.biz.crmcustomerfile; |
|||
|
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户) <br/> |
|||
* File: CrmCustomerFileDto.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmcustomerfile.CrmCustomerFileDto <br/> |
|||
* Description: 客户资料初始化表 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-02-26 14:10:17 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "客户资料初始化表 数据传输对象", description = "客户资料初始化表 数据传输对象") |
|||
@Data |
|||
public class CrmCustomerFileDto implements Dto { |
|||
|
|||
private static final long serialVersionUID = 4689998978239910797L; |
|||
@ApiModelProperty("资料类别") |
|||
private String dataType; |
|||
@ApiModelProperty("文件名称") |
|||
private String fileName; |
|||
@ApiModelProperty("文件格式") |
|||
private String fileType; |
|||
@ApiModelProperty("关联业务对象sid") |
|||
private String linkSid; |
|||
@ApiModelProperty("文件类别") |
|||
private String attachType; |
|||
@ApiModelProperty("排序号") |
|||
private Integer sortNo; |
|||
@ApiModelProperty("示例") |
|||
private String sample; |
|||
} |
@ -0,0 +1,46 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.biz.crmcustomerfile; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import com.yxt.customer.biz.crmfile.CrmFileDetailsVo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class CrmCustomerFileListVo implements Vo { |
|||
|
|||
private static final long serialVersionUID = -7975044183441168149L; |
|||
@ApiModelProperty("文件类别") |
|||
private String attachType; |
|||
@ApiModelProperty("文件名称") |
|||
private String fileName; |
|||
@ApiModelProperty("客户资料信息") |
|||
private List<CrmFileDetailsVo> crmFileDetailsVoList; |
|||
} |
@ -0,0 +1,84 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.biz.crmcustomerfile; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.customer.biz.crmfile.CrmFile; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户) <br/> |
|||
* File: CrmCustomerFileMapper.java <br/> |
|||
* Class: com.yxt.anrui.crm.biz.crmcustomerfile.CrmCustomerFileMapper <br/> |
|||
* Description: 客户资料初始化表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-02-26 14:10:17 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface CrmCustomerFileMapper extends BaseMapper<CrmCustomerFile> { |
|||
|
|||
//@Update("update crm_customer_file set name=#{msg} where id=#{id}")
|
|||
//IPage<CrmCustomerFileVo> voPage(IPage<CrmCustomerFile> page, @Param(Constants.WRAPPER) QueryWrapper<CrmCustomerFile> qw);
|
|||
|
|||
IPage<CrmCustomerFileVo> selectPageVo(IPage<CrmCustomerFile> page, @Param(Constants.WRAPPER) Wrapper<CrmCustomerFile> qw); |
|||
|
|||
List<CrmCustomerFileVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<CrmCustomerFile> qw); |
|||
|
|||
@Select("select * from crm_customer_file") |
|||
List<CrmCustomerFileVo> selectListVo(); |
|||
|
|||
List<AppCustomerArchivesDataVo> selectByCustomerSid(@Param("customerSid") String customerSid); |
|||
|
|||
/** |
|||
* 手机端维护客户信息是否完善的状态 |
|||
* 查询客户档案状态 |
|||
* |
|||
* @param customerSid |
|||
* @return |
|||
*/ |
|||
List<CrmCustomerFileVo> selectByCustomerSidState(@Param("customerSid") String customerSid); |
|||
|
|||
List<CrmFile> selArchivesFileImageBySid(@Param("sid") String sid); |
|||
|
|||
// 查询数据库是否存在该类型
|
|||
Integer selectBySid(@Param("sid") String sid); |
|||
|
|||
List<CrmCustomerFile> selectIdImageByCustomerSid(@Param("customerSid") String customerSid, @Param("dataType") String dataType); |
|||
|
|||
CrmCustomerFile selectCustomerFileOne(@Param("customerSid") String customerSid, @Param("s") String s); |
|||
} |
@ -0,0 +1,70 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.customer.biz.crmcustomerfile.CrmCustomerFileMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.customer.biz.crmcustomerfile.CrmCustomerFileVo"> |
|||
SELECT ccf.sid, |
|||
ccf.attachType, |
|||
ccf.fileName, |
|||
(SELECT cf.name |
|||
FROM crm_file cf |
|||
WHERE cf.linkSid = ccf.`sid` |
|||
ORDER BY cf.`createTime` DESC |
|||
LIMIT 1) NAME, |
|||
(SELECT MAX(cf.`createTime`) FROM crm_file cf WHERE cf.linkSid = ccf.`sid`) createTime |
|||
FROM crm_customer_file ccf |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectListAllVo" resultType="com.yxt.customer.biz.crmcustomerfile.CrmCustomerFileVo"> |
|||
SELECT * |
|||
FROM crm_customer_file |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectByCustomerSid" |
|||
resultType="com.yxt.customer.biz.crmcustomerfile.AppCustomerArchivesDataVo"> |
|||
SELECT ccf.sid, |
|||
ccf.dataType AS `key`, |
|||
ccf.fileName AS title, |
|||
createTime |
|||
FROM crm_customer_file ccf |
|||
WHERE ccf.linkSid = #{customerSid} |
|||
</select> |
|||
<select id="selArchivesFileImageBySid" resultType="com.yxt.customer.biz.crmfile.CrmFile"> |
|||
select * |
|||
from crm_file cf |
|||
where cf.linkSid = #{sid} |
|||
</select> |
|||
|
|||
<select id="selectBySid" resultType="java.lang.Integer"> |
|||
select count(*) |
|||
from crm_file ccf |
|||
where ccf.linkSid = #{sid} |
|||
</select> |
|||
|
|||
<select id="selectByCustomerSidState" resultType="com.yxt.customer.biz.crmcustomerfile.CrmCustomerFileVo"> |
|||
SELECT * |
|||
FROM crm_customer_file ccf |
|||
WHERE ccf.linkSid = #{customerSid} |
|||
</select> |
|||
|
|||
<select id="selectIdImageByCustomerSid" resultType="com.yxt.customer.biz.crmcustomerfile.CrmCustomerFile"> |
|||
SELECT * |
|||
FROM crm_customer_file ccf |
|||
WHERE ccf.linkSid = #{customerSid} |
|||
And ccf.dataType = #{dataType} |
|||
</select> |
|||
|
|||
<select id="selectCustomerFileOne" resultType="com.yxt.customer.biz.crmcustomerfile.CrmCustomerFile"> |
|||
select * |
|||
from crm_customer_file |
|||
where linkSid = #{customerSid} |
|||
and attachType = #{s} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,58 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.biz.crmcustomerfile; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户) <br/> |
|||
* File: CrmCustomerFileQuery.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmcustomerfile.CrmCustomerFileQuery <br/> |
|||
* Description: 客户资料初始化表 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-02-26 14:10:17 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "客户资料初始化表 查询条件", description = "客户资料初始化表 查询条件") |
|||
@Data |
|||
public class CrmCustomerFileQuery implements Query { |
|||
|
|||
private static final long serialVersionUID = -7649979452082150903L; |
|||
@ApiModelProperty("文件类别") |
|||
private String attachType; |
|||
@ApiModelProperty("文件名称") |
|||
private String fileName; |
|||
@ApiModelProperty("客户sid") |
|||
private String customerSid; |
|||
} |
@ -0,0 +1,64 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.biz.crmcustomerfile; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.config.component.FileUploadComponent; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.DateUtils; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Collections; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户) <br/> |
|||
* File: CrmCustomerFileService.java <br/> |
|||
* Class: com.yxt.anrui.crm.biz.crmcustomerfile.CrmCustomerFileService <br/> |
|||
* Description: 客户资料初始化表 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-02-26 14:10:17 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class CrmCustomerFileService extends MybatisBaseService<CrmCustomerFileMapper, CrmCustomerFile> { |
|||
|
|||
|
|||
} |
@ -0,0 +1,64 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.biz.crmcustomerfile; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户) <br/> |
|||
* File: CrmCustomerFileVo.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmcustomerfile.CrmCustomerFileVo <br/> |
|||
* Description: 客户资料初始化表 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-02-26 14:10:17 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "客户资料初始化表 视图数据对象", description = "客户资料初始化表 视图数据对象") |
|||
@Data |
|||
public class CrmCustomerFileVo implements Vo { |
|||
|
|||
private static final long serialVersionUID = -2901642630941149061L; |
|||
@ApiModelProperty("客户资料初始化sid") |
|||
private String sid; |
|||
@ApiModelProperty("文件类别") |
|||
private String attachType; |
|||
@ApiModelProperty("文件名称") |
|||
private String fileName; |
|||
@ApiModelProperty("最新上传人") |
|||
private String name; |
|||
@ApiModelProperty("最新上传时间") |
|||
private String createTime; |
|||
@ApiModelProperty("示例") |
|||
private String sample; |
|||
} |
@ -0,0 +1,158 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.biz.crmfile; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户信息) <br/> |
|||
* File: CrmFile.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmfile.CrmFile <br/> |
|||
* Description: 客户资料表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-01-24 09:15:29 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "客户资料表", description = "客户资料表") |
|||
@TableName("crm_file") |
|||
public class CrmFile extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
|
|||
@ApiModelProperty("文件名") |
|||
private String fileName; // 文件名
|
|||
@ApiModelProperty("文件类型") |
|||
private String fileType; // 文件类型
|
|||
@ApiModelProperty("上传人姓名") |
|||
private String name; // 上传人姓名
|
|||
@ApiModelProperty("关联业务对象sid") |
|||
private String linkSid; // 关联业务对象sid
|
|||
@ApiModelProperty("附件类型") |
|||
private String attachType; // 附件类型
|
|||
@ApiModelProperty("文件大小") |
|||
private String fileSize; // 文件大小
|
|||
@ApiModelProperty("文件的相对路径") |
|||
private String filePath; // 文件的相对路径
|
|||
|
|||
/** |
|||
* @return 文件名 |
|||
*/ |
|||
public String getFileName(){ |
|||
return fileName; |
|||
} |
|||
|
|||
/** |
|||
* @param fileName 文件名 to set |
|||
*/ |
|||
public void setFileName(String fileName){ |
|||
this.fileName = fileName; |
|||
} |
|||
/** |
|||
* @return 文件类型 |
|||
*/ |
|||
public String getFileType(){ |
|||
return fileType; |
|||
} |
|||
|
|||
/** |
|||
* @param fileType 文件类型 to set |
|||
*/ |
|||
public void setFileType(String fileType){ |
|||
this.fileType = fileType; |
|||
} |
|||
/** |
|||
* @return 上传人姓名 |
|||
*/ |
|||
public String getName(){ |
|||
return name; |
|||
} |
|||
|
|||
/** |
|||
* @param name 上传人姓名 to set |
|||
*/ |
|||
public void setName(String name){ |
|||
this.name = name; |
|||
} |
|||
/** |
|||
* @return 关联业务对象sid |
|||
*/ |
|||
public String getLinkSid(){ |
|||
return linkSid; |
|||
} |
|||
|
|||
/** |
|||
* @param linkSid 关联业务对象sid to set |
|||
*/ |
|||
public void setLinkSid(String linkSid){ |
|||
this.linkSid = linkSid; |
|||
} |
|||
/** |
|||
* @return 附件类型 |
|||
*/ |
|||
public String getAttachType(){ |
|||
return attachType; |
|||
} |
|||
|
|||
/** |
|||
* @param attachType 附件类型 to set |
|||
*/ |
|||
public void setAttachType(String attachType){ |
|||
this.attachType = attachType; |
|||
} |
|||
/** |
|||
* @return 文件大小 |
|||
*/ |
|||
public String getFileSize(){ |
|||
return fileSize; |
|||
} |
|||
|
|||
/** |
|||
* @param fileSize 文件大小 to set |
|||
*/ |
|||
public void setFileSize(String fileSize){ |
|||
this.fileSize = fileSize; |
|||
} |
|||
/** |
|||
* @return 文件的相对路径 |
|||
*/ |
|||
public String getFilePath(){ |
|||
return filePath; |
|||
} |
|||
|
|||
/** |
|||
* @param filePath 文件的相对路径 to set |
|||
*/ |
|||
public void setFilePath(String filePath){ |
|||
this.filePath = filePath; |
|||
} |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.yxt.customer.biz.crmfile; |
|||
|
|||
/** |
|||
* 客户资料类型的枚举类 |
|||
*/ |
|||
public enum CrmFileAttachTypeEnum { |
|||
|
|||
IDCARD("0001", "身份证"), |
|||
IDOFFRONT("0001_1", "身份证正面"), |
|||
IDOFBACK("0001_2", "身份证反面"), |
|||
|
|||
; |
|||
|
|||
/** |
|||
* 附件类型 |
|||
*/ |
|||
private final String attachType; |
|||
|
|||
/** |
|||
* 代号 |
|||
*/ |
|||
private final String mark; |
|||
|
|||
|
|||
CrmFileAttachTypeEnum(String attachType, String mark) { |
|||
this.attachType = attachType; |
|||
this.mark = mark; |
|||
} |
|||
|
|||
public String getAttachType() { |
|||
return attachType; |
|||
} |
|||
|
|||
public String getMark() { |
|||
return mark; |
|||
} |
|||
} |
@ -0,0 +1,63 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.biz.crmfile; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户信息) <br/> |
|||
* File: CrmFileVo.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmfile.CrmFileVo <br/> |
|||
* Description: 客户资料表 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-01-24 09:15:29 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "客户资料表 视图数据对象", description = "客户资料表 视图数据对象") |
|||
@Data |
|||
public class CrmFileDetailsVo implements Vo { |
|||
|
|||
@ApiModelProperty("图片sid") |
|||
private String sid; |
|||
@ApiModelProperty("上传时间") |
|||
private String createTime; |
|||
@ApiModelProperty("文件名") |
|||
private String fileName; |
|||
@ApiModelProperty("文件大小") |
|||
private String fileSize; |
|||
@ApiModelProperty("文件路径") |
|||
private String filePath; |
|||
@ApiModelProperty("是否可以删除(0不可删除,1可以删除)") |
|||
private Integer isDel; |
|||
} |
@ -0,0 +1,65 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.biz.crmfile; |
|||
|
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户信息) <br/> |
|||
* File: CrmFileDto.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmfile.CrmFileDto <br/> |
|||
* Description: 客户资料表 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-01-24 09:15:29 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "客户资料表 数据传输对象", description = "客户资料表 数据传输对象") |
|||
@Data |
|||
public class CrmFileDto implements Dto { |
|||
|
|||
@ApiModelProperty("文件名") |
|||
private String fileName; // 文件名
|
|||
@ApiModelProperty("文件类型") |
|||
private String fileType; // 文件类型
|
|||
@ApiModelProperty("上传人姓名") |
|||
private String name; // 上传人姓名
|
|||
@ApiModelProperty("关联业务对象sid") |
|||
private String linkSid; // 关联业务对象sid
|
|||
@ApiModelProperty("附件类型") |
|||
private String attachType; // 附件类型
|
|||
@ApiModelProperty("文件大小") |
|||
private String fileSize; // 文件大小
|
|||
@ApiModelProperty("文件的相对路径") |
|||
private String filePath; // 文件的相对路径
|
|||
} |
@ -0,0 +1,39 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.biz.crmfile; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class CrmFileListDto implements Dto { |
|||
|
|||
@ApiModelProperty("客户资料") |
|||
private List<CrmFileDto> crmFileDtoList; |
|||
} |
@ -0,0 +1,78 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.biz.crmfile; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Delete; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户信息) <br/> |
|||
* File: CrmFileMapper.java <br/> |
|||
* Class: com.yxt.anrui.crm.biz.crmfile.CrmFileMapper <br/> |
|||
* Description: 客户资料表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-01-24 09:15:29 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface CrmFileMapper extends BaseMapper<CrmFile> { |
|||
|
|||
|
|||
IPage<CrmFileVo> selectPageVo(IPage<CrmFile> page, @Param(Constants.WRAPPER) Wrapper<CrmFile> qw); |
|||
|
|||
List<CrmFileVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<CrmFile> qw); |
|||
|
|||
@Select("select * from crm_file") |
|||
List<CrmFileVo> selectListVo(); |
|||
|
|||
List<String> selectByLinkSid(@Param("linkSid") String linkSid, @Param("attachType") String attachType); |
|||
|
|||
@Delete("delete from crm_file where linkSid=#{linkSid} and filePath=#{filePath}") |
|||
int delByLinkSidAndFilePath(@Param("linkSid") String linkSid, @Param("filePath") String filePath); |
|||
|
|||
@Select("select * from crm_file where linkSid = #{sid}") |
|||
List<CrmFileDetailsVo> fetchByLinkSid(String sid); |
|||
|
|||
int selectPath(String path); |
|||
|
|||
void deletePath(String path); |
|||
|
|||
int fetchByFilePath(String str); |
|||
|
|||
void deleteByLinkSidAndAttachType(@Param("sid") String sid, @Param("key") String key); |
|||
} |
@ -0,0 +1,57 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.customer.biz.crmfile.CrmFileMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.customer.biz.crmfile.CrmFileVo"> |
|||
SELECT |
|||
fileName, |
|||
attachType, |
|||
name, |
|||
createTime |
|||
FROM |
|||
crm_file |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectListAllVo" resultType="com.yxt.customer.biz.crmfile.CrmFileVo"> |
|||
SELECT * FROM crm_file |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectByLinkSid" resultType="String"> |
|||
SELECT filePath FROM crm_file |
|||
WHERE linkSid = #{linkSid} |
|||
<if test="attachType != null and attachType != ''"> |
|||
AND attachType = #{attachType} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="selectPath" resultType="int"> |
|||
select count(*) |
|||
from crm_file |
|||
where filePath = #{path} |
|||
</select> |
|||
|
|||
<delete id="deletePath"> |
|||
delete |
|||
from crm_file |
|||
where filePath = #{path} |
|||
</delete> |
|||
<delete id="deleteByLinkSidAndAttachType"> |
|||
delete |
|||
from crm_file |
|||
where linkSid = #{sid} |
|||
and attachType = #{key} |
|||
</delete> |
|||
|
|||
<select id="fetchByFilePath" resultType="int"> |
|||
select count(*) |
|||
from crm_file |
|||
where filePath = #{str} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,57 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.biz.crmfile; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户信息) <br/> |
|||
* File: CrmFileQuery.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmfile.CrmFileQuery <br/> |
|||
* Description: 客户资料表 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-01-24 09:15:29 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "客户资料表 查询条件", description = "客户资料表 查询条件") |
|||
@Data |
|||
public class CrmFileQuery implements Query { |
|||
|
|||
@ApiModelProperty("客户sid") |
|||
private String linkSid; |
|||
@ApiModelProperty("文件名") |
|||
private String fileName; |
|||
@ApiModelProperty("文件类型") |
|||
private String fileType; |
|||
} |
@ -0,0 +1,240 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.biz.crmfile; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.config.component.FileUploadComponent; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.base.utils.StringUtils; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.io.File; |
|||
import java.text.SimpleDateFormat; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户信息) <br/> |
|||
* File: CrmFileService.java <br/> |
|||
* Class: com.yxt.anrui.crm.biz.crmfile.CrmFileService <br/> |
|||
* Description: 客户资料表 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-01-24 09:15:29 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class CrmFileService extends MybatisBaseService<CrmFileMapper, CrmFile> { |
|||
|
|||
@Autowired |
|||
private FileUploadComponent fileUploadComponent; |
|||
|
|||
public PagerVo<CrmFile> listPage(PagerQuery<CrmFileQuery> pq) { |
|||
CrmFileQuery query = pq.getParams(); |
|||
QueryWrapper<CrmFile> qw = createQueryWrapper(query); |
|||
IPage<CrmFile> page = PagerUtil.queryToPage(pq); |
|||
IPage<CrmFile> pagging = baseMapper.selectPage(page, qw); |
|||
PagerVo<CrmFile> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
private QueryWrapper<CrmFile> createQueryWrapper(CrmFileQuery query) { |
|||
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
|||
QueryWrapper<CrmFile> qw = new QueryWrapper<>(); |
|||
|
|||
qw.eq("linkSid", query.getLinkSid()); |
|||
if (StringUtils.isNotNull(query.getFileType())) { |
|||
qw.eq("fileType", query.getFileType()); |
|||
} |
|||
if (StringUtils.isNotNull(query.getFileName())) { |
|||
qw.eq("fileName", query.getFileName()); |
|||
} |
|||
qw.groupBy("attachType", "fileName"); |
|||
return qw; |
|||
} |
|||
|
|||
public IPage<CrmFileVo> listPageVo(PagerQuery<CrmFileQuery> pq) { |
|||
// mybits所用的分页对对象
|
|||
IPage<CrmFile> page = PagerUtil.queryToPage(pq); |
|||
// mybits所用的查询条件封装类
|
|||
QueryWrapper<CrmFile> qw = createQueryWrapper(pq.getParams()); |
|||
return baseMapper.selectPageVo(page, qw); |
|||
} |
|||
|
|||
public void saveOrUpdateDto(CrmFileDto dto) { |
|||
CrmFile entity = new CrmFile(); |
|||
dto.fillEntity(entity); |
|||
this.saveOrUpdate(entity); |
|||
} |
|||
|
|||
public CrmFileVo fetchByIdVo(String id) { |
|||
CrmFile entity = this.fetchById(id); |
|||
CrmFileVo vo = new CrmFileVo(); |
|||
BeanUtil.copyProperties(entity, vo); |
|||
return vo; |
|||
} |
|||
|
|||
/** |
|||
* 根据linkSid和附件类型查询文件路径 |
|||
* |
|||
* @param linkSid |
|||
* @param attachType |
|||
* @return |
|||
*/ |
|||
public List<String> selectByLinkSid(String linkSid, String attachType) { |
|||
return baseMapper.selectByLinkSid(linkSid, attachType); |
|||
} |
|||
|
|||
/** |
|||
* 插入客户资料数据 |
|||
* |
|||
* @param linkSid |
|||
* @param list 相对路径 |
|||
*/ |
|||
public void insertCrmFile(String linkSid, List<String> list) { |
|||
list.stream().forEach(str -> { |
|||
CrmFile crmFile = new CrmFile(); |
|||
File file = new File(fileUploadComponent.getUploadPath() + str.replace("/", File.separator)); |
|||
if (file != null) { |
|||
crmFile.setFileSize(fileUploadComponent.getPrintSize(file.length())); |
|||
} |
|||
crmFile.setLinkSid(linkSid); |
|||
crmFile.setFileName(str.substring(str.lastIndexOf("/") + 1, str.lastIndexOf("."))); |
|||
crmFile.setFileType(str.substring(str.lastIndexOf(".") + 1)); |
|||
crmFile.setAttachType(CrmFileAttachTypeEnum.IDCARD.getAttachType()); |
|||
crmFile.setFilePath(str.replace(fileUploadComponent.getUrlPrefix(), "")); |
|||
save(crmFile); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* 根据linkSid和附件类型删除文件 |
|||
* |
|||
* @param linkSid |
|||
* @param delList |
|||
* @return |
|||
*/ |
|||
public void delByLinkSidAndAttachType(String linkSid, List<String> delList) { |
|||
for (String str : delList) { |
|||
// 删除数据库
|
|||
baseMapper.delByLinkSidAndFilePath(linkSid, str); |
|||
// 删除文件
|
|||
String pathLoc = fileUploadComponent.getUploadPath() + str; |
|||
pathLoc = pathLoc.substring(0, pathLoc.lastIndexOf("/") + 1).replace("/", File.separator); |
|||
fileUploadComponent.deleteFiles(fileUploadComponent.getUrlPrefix() + str, pathLoc); |
|||
} |
|||
} |
|||
|
|||
public void saveCrmFile(CrmFileDto dto) { |
|||
/* List<String> filePath = dto.getFilePath(); |
|||
for (String str : filePath) { |
|||
String xdfilePath = str.replace(fileUploadComponent.getUrlPrefix(), ""); |
|||
int i = baseMapper.fetchByFilePath(xdfilePath); |
|||
if (i > 0) { |
|||
continue; |
|||
} |
|||
CrmFile crmFile = new CrmFile(); |
|||
File file = new File(fileUploadComponent.getUploadPath() + str.replace("/", File.separator)); |
|||
if (file != null) { |
|||
crmFile.setFileSize(fileUploadComponent.getPrintSize(file.length())); |
|||
} |
|||
crmFile.setName(dto.getName()); |
|||
crmFile.setLinkSid(dto.getLinkSid()); |
|||
crmFile.setFileName(str.substring(str.lastIndexOf("/") + 1, str.lastIndexOf("."))); |
|||
crmFile.setFileType(str.substring(str.lastIndexOf(".") + 1)); |
|||
crmFile.setAttachType(dto.getAttachType()); |
|||
crmFile.setFilePath(xdfilePath); |
|||
save(crmFile); |
|||
}*/ |
|||
} |
|||
|
|||
public void updateCrmFile(CrmFileDto dto, String sid) { |
|||
CrmFile crmFile = new CrmFile(); |
|||
dto.fillEntity(crmFile); |
|||
} |
|||
|
|||
public List<CrmFileDetailsVo> fetchByLinkSid(String sid) { |
|||
List<CrmFileDetailsVo> crmFileDetailsVos = baseMapper.fetchByLinkSid(sid); |
|||
if (crmFileDetailsVos.size() > 0) { |
|||
ChenkCrmFileDetails(crmFileDetailsVos); |
|||
} |
|||
return crmFileDetailsVos; |
|||
} |
|||
|
|||
private void ChenkCrmFileDetails(List<CrmFileDetailsVo> crmFileDetailsVos) { |
|||
String path = ""; |
|||
for (CrmFileDetailsVo crmFileDetailsVo : crmFileDetailsVos) { |
|||
String filePath = crmFileDetailsVo.getFilePath(); |
|||
String urlPrefix = fileUploadComponent.getUrlPrefix(); |
|||
path = urlPrefix + filePath; |
|||
crmFileDetailsVo.setFilePath(path); |
|||
String createTime = crmFileDetailsVo.getCreateTime(); |
|||
String date = createTime.substring(0, 10); |
|||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
|||
String format = simpleDateFormat.format(new Date()); |
|||
if (date.equals(format)) { |
|||
crmFileDetailsVo.setIsDel(1); |
|||
} else { |
|||
crmFileDetailsVo.setIsDel(0); |
|||
} |
|||
} |
|||
} |
|||
|
|||
public ResultBean deleteFilesOss(String fullPath) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
//删除服务器上的该文件
|
|||
String pathT = fileUploadComponent.getUrlPrefix(); |
|||
String path = ""; |
|||
if (fullPath.indexOf(pathT) > -1) { |
|||
path = fullPath.replace(pathT, ""); |
|||
} else { |
|||
path = fullPath; |
|||
} |
|||
String a = path.substring(0, path.lastIndexOf("/")).replace("/", File.separator); |
|||
String pathOne = fileUploadComponent.getUploadPath() + path.substring(0, path.lastIndexOf("/") + 1).replace("/", File.separator); |
|||
FileUploadComponent.deleteFiles(fullPath, pathOne); |
|||
//查询数据库,然后根据相对路径删除数据
|
|||
int count = baseMapper.selectPath(path); |
|||
if (count > 0) { |
|||
baseMapper.deletePath(path); |
|||
} |
|||
return rb.success().setMsg("移除成功"); |
|||
} |
|||
|
|||
public void deleteByLinkSidAndAttachType(String sid, String key) { |
|||
baseMapper.deleteByLinkSidAndAttachType(sid,key); |
|||
} |
|||
} |
@ -0,0 +1,60 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.customer.biz.crmfile; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户信息) <br/> |
|||
* File: CrmFileVo.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmfile.CrmFileVo <br/> |
|||
* Description: 客户资料表 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-01-24 09:15:29 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "客户资料表 视图数据对象", description = "客户资料表 视图数据对象") |
|||
@Data |
|||
public class CrmFileVo implements Vo { |
|||
|
|||
private static final long serialVersionUID = -7094724945005598636L; |
|||
@ApiModelProperty("文件名") |
|||
private String fileName; |
|||
@ApiModelProperty("上传人姓名") |
|||
private String name; |
|||
@ApiModelProperty("文件类别") |
|||
private String attachType; |
|||
@ApiModelProperty(value = "上传时间") |
|||
private String createTime; |
|||
} |
@ -0,0 +1,69 @@ |
|||
package com.yxt.customer.biz.crmvisit; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class AppCrmVisitDto implements Dto { |
|||
|
|||
@ApiModelProperty("潜在客户sid") |
|||
private String customerSid; |
|||
|
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
|
|||
@ApiModelProperty("员工Sid") |
|||
private String staffSid; |
|||
|
|||
@ApiModelProperty("组织sid") |
|||
private String orgSid; |
|||
|
|||
@ApiModelProperty("跟进状态key") |
|||
private String follow_state_key; |
|||
|
|||
@ApiModelProperty("跟进状态(新获取/待跟进/初步意向/准客户/成交/失效)") |
|||
private String follow_state; |
|||
|
|||
@ApiModelProperty("跟进形式key") |
|||
private String follow_form_key; |
|||
|
|||
@ApiModelProperty("跟进形式(电话/上门/微信/到店)") |
|||
private String follow_form; |
|||
|
|||
@ApiModelProperty("拜访见证材料") |
|||
private List<String> materialsList; |
|||
|
|||
@ApiModelProperty("拜访见证材料") |
|||
private String visit_witness_materials; |
|||
|
|||
@ApiModelProperty("跟进效果") |
|||
private String follow_result; |
|||
|
|||
@ApiModelProperty("是否开启提醒(1开启,0不开启)") |
|||
private String isOnRemind; |
|||
|
|||
@ApiModelProperty("是否开启提醒(1开启,0不开启)") |
|||
private String isOnRemindkey; |
|||
|
|||
@ApiModelProperty("提醒日期") |
|||
private String remind_day; |
|||
|
|||
@ApiModelProperty("提醒备注") |
|||
private String remind_remark; |
|||
|
|||
@ApiModelProperty("位置信息") |
|||
private String positionInformation; |
|||
|
|||
@ApiModelProperty("区域代码") |
|||
private String adCode; |
|||
|
|||
@ApiModelProperty("区域经纬度") |
|||
private String location; |
|||
|
|||
@ApiModelProperty("区域代码描述") |
|||
private String locationStr; |
|||
|
|||
} |
@ -0,0 +1,48 @@ |
|||
package com.yxt.customer.biz.crmvisit; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author liuguohui |
|||
* @Date 2021/12/7 |
|||
*/ |
|||
@ApiModel("手机端跟进记录") |
|||
@Data |
|||
public class AppCrmVisitListVo implements Vo { |
|||
|
|||
@ApiModelProperty("客户名称") |
|||
private String name; |
|||
|
|||
@ApiModelProperty("联系电话") |
|||
private String mobile; |
|||
|
|||
@ApiModelProperty("微信") |
|||
private String weixin; |
|||
|
|||
@ApiModelProperty("客户类型(自然人/法人)") |
|||
private String customerTypeKey; |
|||
|
|||
@ApiModelProperty("已经记录") |
|||
private String recordedNum; |
|||
|
|||
@ApiModelProperty("本周记录") |
|||
private String curWeekNum; |
|||
|
|||
@ApiModelProperty("总记录") |
|||
private String totalNum; |
|||
|
|||
@ApiModelProperty("跟进状态(新获取/待跟进/初步意向/准客户/成交/失效)") |
|||
private String follow_state; |
|||
|
|||
@ApiModelProperty("跟进效果") |
|||
private String follow_result; |
|||
|
|||
@ApiModelProperty("跟进记录list") |
|||
private List<AppCrmVisitThumbVo> visitList; |
|||
} |
@ -0,0 +1,80 @@ |
|||
package com.yxt.customer.biz.crmvisit; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户管理) <br/> |
|||
* File: CrmVisitQuery.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmvisit.CrmVisitQuery <br/> |
|||
* Description: 客户跟进记录 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-28 09:57:14 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "客户跟进记录 查询条件", description = "客户跟进记录 查询条件") |
|||
@Data |
|||
public class AppCrmVisitQuery implements Query { |
|||
|
|||
|
|||
@ApiModelProperty("客户sid") |
|||
private String customerSid; |
|||
|
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
|
|||
@ApiModelProperty("员工Sid") |
|||
private String staffSid; |
|||
|
|||
@ApiModelProperty("跟进形式key") |
|||
private String follow_form_key; |
|||
|
|||
@ApiModelProperty("跟进形式(电话/上门/微信/到店)") |
|||
private String follow_form; |
|||
|
|||
@ApiModelProperty("跟进类别key") |
|||
private String follow_type_key; |
|||
|
|||
@ApiModelProperty("跟进类别(例行安排/临时)") |
|||
private String follow_type; |
|||
|
|||
@ApiModelProperty("起始跟进时间") |
|||
private String start_follow_time; |
|||
|
|||
@ApiModelProperty("结束跟进时间") |
|||
private String end_follow_time; |
|||
|
|||
@ApiModelProperty("跟进效果") |
|||
private String follow_result; |
|||
|
|||
@ApiModelProperty("拜访见证材料") |
|||
private String visit_witness_materials; |
|||
|
|||
@ApiModelProperty("组织sid") |
|||
private String orgSid; |
|||
|
|||
@ApiModelProperty("跟进状态key") |
|||
private String follow_state_key; |
|||
|
|||
@ApiModelProperty("跟进状态(新获取/待跟进/初步意向/准客户/成交/失效)") |
|||
private String follow_state; |
|||
|
|||
@ApiModelProperty("是否开启提醒(1开启,0不开启)") |
|||
private String isOnRemind; |
|||
|
|||
@ApiModelProperty("设置提醒日期的时间") |
|||
private String setTime; |
|||
|
|||
@ApiModelProperty("提醒日期(天)") |
|||
private String remind_day; |
|||
|
|||
@ApiModelProperty("提醒日期(天)key") |
|||
private String remind_day_key; |
|||
} |
@ -0,0 +1,68 @@ |
|||
package com.yxt.customer.biz.crmvisit; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户管理) <br/> |
|||
* File: CrmVisitVo.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmvisit.CrmVisitVo <br/> |
|||
* Description: 客户跟进记录 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-28 09:57:14 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "客户跟进记录 视图数据对象", description = "客户跟进记录 视图数据对象") |
|||
@Data |
|||
public class AppCrmVisitSelListVo implements Vo { |
|||
|
|||
@ApiModelProperty("sid") |
|||
private String sid; |
|||
|
|||
@ApiModelProperty("潜在客户sid") |
|||
private String customerSid; |
|||
|
|||
@ApiModelProperty("跟进结果") |
|||
private String follow_result; |
|||
|
|||
@ApiModelProperty("跟进时间") |
|||
private String follow_time; |
|||
|
|||
@ApiModelProperty("跟进材料") |
|||
private String visit_witness_materials; |
|||
|
|||
@ApiModelProperty("区域代码") |
|||
private String adCode; |
|||
|
|||
@ApiModelProperty("区域经纬度") |
|||
private String location; |
|||
|
|||
@ApiModelProperty("区域代码描述") |
|||
private String locationStr; |
|||
|
|||
// @ApiModelProperty("区域代码(省)")
|
|||
// private String address_province;
|
|||
// @ApiModelProperty("区域代码(市)")
|
|||
// private String address_city;
|
|||
// @ApiModelProperty("区域代码(县)")
|
|||
// private String address_county;
|
|||
|
|||
@ApiModelProperty("经度") |
|||
private String longitude; |
|||
@ApiModelProperty("纬度") |
|||
private String latitude; |
|||
|
|||
@ApiModelProperty("区域代码描述") |
|||
private String positionInformation; |
|||
|
|||
@ApiModelProperty("意向车型") |
|||
private boolean IntendedModel; |
|||
|
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.yxt.customer.biz.crmvisit; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
@ApiModel("手机端跟进记录list对象") |
|||
@Data |
|||
public class AppCrmVisitThumbDetailsVo { |
|||
@ApiModelProperty("跟进记录sid") |
|||
private String sid; |
|||
|
|||
@ApiModelProperty("跟进时间") |
|||
private String follow_time; |
|||
|
|||
@ApiModelProperty("跟进效果") |
|||
private String follow_result; |
|||
|
|||
@ApiModelProperty("跟进状态") |
|||
private String follow_state; |
|||
|
|||
@ApiModelProperty("意向车型") |
|||
private boolean IntendedModel; |
|||
|
|||
@ApiModelProperty("拜访见证材料") |
|||
private String visit_witness_materials; |
|||
|
|||
@ApiModelProperty("拜访见证材料") |
|||
private List<String> materialsList = new ArrayList<>(); |
|||
|
|||
@ApiModelProperty("地址") |
|||
private String address; |
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.yxt.customer.biz.crmvisit; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author liuguohui |
|||
* @Date 2021/12/7 |
|||
*/ |
|||
@ApiModel("手机端跟进记录list对象") |
|||
@Data |
|||
public class AppCrmVisitThumbVo implements Vo { |
|||
|
|||
@ApiModelProperty("跟进记录sid") |
|||
private String sid; |
|||
|
|||
@ApiModelProperty("跟进时间") |
|||
private String follow_time; |
|||
|
|||
@ApiModelProperty("跟进效果") |
|||
private String follow_result; |
|||
|
|||
@ApiModelProperty("意向车型") |
|||
private boolean IntendedModel; |
|||
|
|||
@ApiModelProperty("经纬度") |
|||
private String location; |
|||
|
|||
@ApiModelProperty("区域代码描述") |
|||
private String locationStr; |
|||
|
|||
@ApiModelProperty("拜访见证材料") |
|||
private List<String> visit_witness_materials; |
|||
|
|||
} |
@ -0,0 +1,93 @@ |
|||
package com.yxt.customer.biz.crmvisit; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户管理) <br/> |
|||
* File: CrmVisitVo.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmvisit.CrmVisitVo <br/> |
|||
* Description: 客户跟进记录 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-28 09:57:14 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "客户跟进记录 视图数据对象", description = "客户跟进记录 视图数据对象") |
|||
@Data |
|||
public class AppCrmVisitVo implements Vo { |
|||
|
|||
@ApiModelProperty("sid") |
|||
private String sid; |
|||
|
|||
@ApiModelProperty("客户sid") |
|||
private String customerSid; |
|||
|
|||
@ApiModelProperty("客户名称") |
|||
private String customerName; |
|||
|
|||
@ApiModelProperty("员工Sid") |
|||
private String staffSid; |
|||
|
|||
@ApiModelProperty("员工Name") |
|||
private String staffName; |
|||
|
|||
@ApiModelProperty("跟进形式key") |
|||
private String follow_form_key; |
|||
|
|||
@ApiModelProperty("跟进形式(电话/上门/微信/到店)") |
|||
private String follow_form; |
|||
|
|||
@ApiModelProperty("跟进类别key") |
|||
private String follow_type_key; |
|||
|
|||
@ApiModelProperty("跟进类别(例行安排/临时)") |
|||
private String follow_type; |
|||
|
|||
@ApiModelProperty("跟进时间") |
|||
private String follow_time; |
|||
|
|||
@ApiModelProperty("跟进效果") |
|||
private String follow_result; |
|||
|
|||
@ApiModelProperty("拜访见证材料") |
|||
private String visit_witness_materials; |
|||
|
|||
@ApiModelProperty("组织sid") |
|||
private String orgSid; |
|||
|
|||
@ApiModelProperty("跟进状态key") |
|||
private String follow_state_key; |
|||
|
|||
@ApiModelProperty("跟进状态(新获取/待跟进/初步意向/准客户/成交/失效)") |
|||
private String follow_state; |
|||
|
|||
@ApiModelProperty("是否开启提醒(1开启,0不开启)") |
|||
private String isOnRemind; |
|||
|
|||
@ApiModelProperty("是否开启提醒(1开启,0不开启)") |
|||
private String isOnRemindkey; |
|||
|
|||
@ApiModelProperty("设置提醒日期的时间") |
|||
private String setTime; |
|||
|
|||
@ApiModelProperty("提醒日期(天)") |
|||
private String remind_day; |
|||
|
|||
@ApiModelProperty("提醒日期(天)key") |
|||
private String remind_day_key; |
|||
|
|||
@ApiModelProperty("位置信息") |
|||
private String positionInformation; |
|||
|
|||
@ApiModelProperty("跟进记录附件list") |
|||
private List<CrmCommonAppendixVo> list; |
|||
} |
@ -0,0 +1,54 @@ |
|||
package com.yxt.customer.biz.crmvisit; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-base(安瑞基础信息模块) <br/> |
|||
* File: CommonAppendixVo.java <br/> |
|||
* Class: com.yxt.anrui.base.api.commonappendix.CommonAppendixVo <br/> |
|||
* Description: 公共附件表 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-10-28 08:59:25 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
public class CrmCommonAppendixVo implements Vo { |
|||
|
|||
private static final long serialVersionUID = 5198144675991307280L; |
|||
@ApiModelProperty("sid") |
|||
private String sid; |
|||
|
|||
@ApiModelProperty("文件名") |
|||
private String fileName; |
|||
|
|||
@ApiModelProperty("文件类型") |
|||
private String fileType; |
|||
|
|||
@ApiModelProperty("关联业务对象sid") |
|||
private String linkSid; |
|||
|
|||
@ApiModelProperty("附件类型") |
|||
private String attachType; |
|||
|
|||
@ApiModelProperty("文件大小") |
|||
private String fileSize; |
|||
|
|||
@ApiModelProperty("文件的路径") |
|||
private String filePath; |
|||
|
|||
@ApiModelProperty("文件的路径") |
|||
private String fileUrl; |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
|
|||
@ApiModelProperty("上传人sid") |
|||
private String createBySid; |
|||
} |
@ -0,0 +1,98 @@ |
|||
package com.yxt.customer.biz.crmvisit; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户管理) <br/> |
|||
* File: CrmVisit.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmvisit.CrmVisit <br/> |
|||
* Description: 客户跟进记录. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-28 09:57:14 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "客户跟进记录", description = "客户跟进记录") |
|||
@TableName("crm_visit") |
|||
@Data |
|||
public class CrmVisit extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
|
|||
@ApiModelProperty("客户sid") |
|||
private String customerSid; |
|||
|
|||
@ApiModelProperty("员工Sid") |
|||
private String staffSid; |
|||
|
|||
@ApiModelProperty("跟进形式key") |
|||
private String follow_form_key; |
|||
|
|||
@ApiModelProperty("跟进形式(电话/上门/微信/到店)") |
|||
private String follow_form; |
|||
|
|||
@ApiModelProperty("跟进类别key") |
|||
private String follow_type_key; |
|||
|
|||
@ApiModelProperty("跟进类别(例行安排/临时)") |
|||
private String follow_type; |
|||
|
|||
@ApiModelProperty("跟进时间") |
|||
private String follow_time; |
|||
|
|||
@ApiModelProperty("跟进效果") |
|||
private String follow_result; |
|||
|
|||
@ApiModelProperty("拜访见证材料") |
|||
private String visit_witness_materials; |
|||
|
|||
@ApiModelProperty("组织sid") |
|||
private String orgSid; |
|||
|
|||
@ApiModelProperty("跟进状态key") |
|||
private String follow_state_key; |
|||
|
|||
@ApiModelProperty("跟进状态(新获取/待跟进/初步意向/准客户/成交/失效)") |
|||
private String follow_state; |
|||
|
|||
@ApiModelProperty("是否开启提醒(1开启,0不开启)") |
|||
private String isOnRemind; |
|||
|
|||
@ApiModelProperty("是否开启提醒(1开启,0不开启)") |
|||
private String isOnRemindkey; |
|||
|
|||
@ApiModelProperty("设置提醒日期的时间") |
|||
private String setTime; |
|||
|
|||
@ApiModelProperty("提醒日期(天)") |
|||
private String remind_day; |
|||
|
|||
@ApiModelProperty("提醒日期(天)key") |
|||
private String remind_day_key; |
|||
|
|||
@ApiModelProperty("提醒备注") |
|||
private String remind_remark; |
|||
|
|||
@ApiModelProperty("位置信息") |
|||
private String positionInformation; |
|||
|
|||
/* @ApiModelProperty("区域代码(省)") |
|||
private String address_province; |
|||
@ApiModelProperty("区域代码(市)") |
|||
private String address_city; |
|||
@ApiModelProperty("区域代码(县)") |
|||
private String address_county;*/ |
|||
|
|||
@ApiModelProperty("经度") |
|||
private String longitude; |
|||
@ApiModelProperty("纬度") |
|||
private String latitude; |
|||
|
|||
} |
@ -0,0 +1,86 @@ |
|||
package com.yxt.customer.biz.crmvisit; |
|||
|
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户管理) <br/> |
|||
* File: CrmVisitDto.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmvisit.CrmVisitDto <br/> |
|||
* Description: 客户跟进记录 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-28 09:57:14 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "客户跟进记录 数据传输对象", description = "客户跟进记录 数据传输对象") |
|||
@Data |
|||
public class CrmVisitDto implements Dto { |
|||
|
|||
|
|||
@ApiModelProperty("客户sid") |
|||
private String customerSid; |
|||
|
|||
@ApiModelProperty("员工Sid") |
|||
private String staffSid; |
|||
|
|||
@ApiModelProperty("跟进形式key") |
|||
private String follow_form_key; |
|||
|
|||
@ApiModelProperty("跟进形式(电话/上门/微信/到店)") |
|||
private String follow_form; |
|||
|
|||
@ApiModelProperty("跟进类别key") |
|||
private String follow_type_key; |
|||
|
|||
@ApiModelProperty("跟进类别(例行安排/临时)") |
|||
private String follow_type; |
|||
|
|||
@ApiModelProperty("跟进时间") |
|||
private String follow_time; |
|||
|
|||
@ApiModelProperty("跟进效果") |
|||
private String follow_result; |
|||
|
|||
@ApiModelProperty("拜访见证材料") |
|||
private String visit_witness_materials; |
|||
|
|||
@ApiModelProperty("组织sid") |
|||
private String orgSid; |
|||
|
|||
@ApiModelProperty("跟进状态key") |
|||
private String follow_state_key; |
|||
|
|||
@ApiModelProperty("跟进状态(新获取/待跟进/初步意向/准客户/成交/失效)") |
|||
private String follow_state; |
|||
|
|||
@ApiModelProperty("是否开启提醒(1开启,0不开启)") |
|||
private String isOnRemindkey; |
|||
|
|||
@ApiModelProperty("是否开启提醒(1开启,0不开启)") |
|||
private String isOnRemind; |
|||
|
|||
@ApiModelProperty("设置提醒日期的时间") |
|||
private String setTime; |
|||
|
|||
@ApiModelProperty("提醒日期(天)") |
|||
private String remind_day; |
|||
|
|||
@ApiModelProperty("提醒日期(天)key") |
|||
private String remind_day_key; |
|||
|
|||
@ApiModelProperty("提醒备注") |
|||
private String remind_remark; |
|||
|
|||
@ApiModelProperty("附件信息") |
|||
private List<PcCrmVisitAppendixDto> list; |
|||
|
|||
} |
@ -0,0 +1,71 @@ |
|||
package com.yxt.customer.biz.crmvisit; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
import org.apache.ibatis.annotations.Update; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户管理) <br/> |
|||
* File: CrmVisitMapper.java <br/> |
|||
* Class: com.yxt.anrui.crm.biz.crmvisit.CrmVisitMapper <br/> |
|||
* Description: 客户跟进记录. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-28 09:57:14 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface CrmVisitMapper extends BaseMapper<CrmVisit> { |
|||
|
|||
//@Update("update crm_visit set name=#{msg} where id=#{id}")
|
|||
//IPage<CrmVisitVo> voPage(IPage<CrmVisit> page, @Param(Constants.WRAPPER) QueryWrapper<CrmVisit> qw);
|
|||
|
|||
IPage<CrmVisitVo> selectPageVo(IPage<CrmVisit> page, @Param(Constants.WRAPPER) Wrapper<CrmVisit> qw); |
|||
|
|||
List<CrmVisitVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<CrmVisit> qw); |
|||
|
|||
@Select("select * from crm_visit") |
|||
List<CrmVisitVo> selectListVo(); |
|||
|
|||
@Update("update crm_visit set isOnRemind=#{isOnRemind} where sid=#{sid}") |
|||
int updateAppIsOnRemind(@Param("sid") String sid, @Param("isOnRemind") int isOnRemind); |
|||
|
|||
@Update("update crm_visit set setTime=#{setTime},remind_day=#{remindDay},remind_day_key=#{remindDayKey} where sid=#{sid}") |
|||
int updateAppRemindDay(@Param("sid") String sid, @Param("setTime") String setTime, |
|||
@Param("remindDay") String remindDay, @Param("remindDayKey") String remindDayKey); |
|||
|
|||
@Update("update crm_visit set follow_state=#{followState}, follow_state_key=#{followStateKey} where sid=#{sid} limit 1") |
|||
int updateAppFollowState(@Param("sid") String sid, @Param("followState") String followState, @Param("followStateKey") String followStateKey); |
|||
|
|||
@Select("select * from crm_visit where customerSid=#{customerSid} order by id desc ") |
|||
List<CrmVisitVo> selectListByCustomerSid(@Param("customerSid") String customerSid, @Param("staffSid") String staffSid); |
|||
|
|||
IPage<CrmVisitVo> pagerList(IPage<CrmVisitQuery> page, @Param(Constants.WRAPPER) Wrapper<CrmVisitVo> qw); |
|||
|
|||
CrmVisitVo selVisitVo(String sid); |
|||
|
|||
int selectCurWeekCount(@Param("customerSid") String customerSid, @Param("staffSid") String staffSid); |
|||
|
|||
IPage<AppCrmVisitSelListVo> getCrmVisitListByUsersid(IPage<AppCrmVisitQuery> page, @Param("staffSid") String staffSid); |
|||
|
|||
CrmVisitVo selectNewFollow_state(@Param("staffSid") String staffSid, @Param("customerSid") String customerSid); |
|||
|
|||
AppCrmVisitThumbDetailsVo getAppVisitByCustomerSid(@Param("sid") String sid, @Param("staffSid") String staffSid); |
|||
|
|||
List<String> selVisitMaterials(@Param("sid") String sid, @Param("staffSid") String staffSid); |
|||
|
|||
int fetchByVisitSid(@Param("sid") String sid); |
|||
|
|||
@Update("UPDATE crm_visit SET visit_witness_materials = #{s} WHERE sid = #{sid}") |
|||
void updateAppendixUrl(@Param("s") String s, @Param("sid") String sid); |
|||
} |
@ -0,0 +1,119 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.customer.biz.crmvisit.CrmVisitMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.customer.biz.crmvisit.CrmVisitVo"> |
|||
SELECT * FROM crm_visit |
|||
<where>${ew.sqlSegment}</where> |
|||
</select> |
|||
|
|||
<select id="selectListAllVo" resultType="com.yxt.customer.biz.crmvisit.CrmVisitVo"> |
|||
SELECT * FROM crm_visit |
|||
<where>${ew.sqlSegment}</where> |
|||
</select> |
|||
<select id="pagerList" resultType="com.yxt.customer.biz.crmvisit.CrmVisitVo"> |
|||
SELECT |
|||
cv.sid, |
|||
<!--客户sid--> |
|||
cv.customerSid, |
|||
<!--跟进形式--> |
|||
cv.follow_form, |
|||
cv.follow_form_key, |
|||
<!--跟进类别--> |
|||
cv.follow_type, |
|||
cv.follow_type_key, |
|||
<!--跟进时间--> |
|||
cv.follow_time, |
|||
<!--跟进效果--> |
|||
cv.follow_result, |
|||
<!--跟进状态--> |
|||
cv.follow_state, |
|||
cv.follow_state_key, |
|||
<!--业务员--> |
|||
<!--是否开启提醒(1开启,0不开启)--> |
|||
cv.isOnRemind, |
|||
<!--提醒日期--> |
|||
cv.remind_day, |
|||
cv.remind_day_key, |
|||
(SELECT COUNT(*) FROM crm_vehicledemand cve WHERE cve.customerSid = cv.customerSid and cve.states = 1) xqcounts |
|||
FROM crm_visit cv |
|||
${ew.customSqlSegment} |
|||
</select> |
|||
<select id="selVisitVo" resultType="com.yxt.customer.biz.crmvisit.CrmVisitVo"> |
|||
SELECT cv.sid, |
|||
cv.remind_remark, |
|||
cv.customerSid, |
|||
cct.`name` AS customerName, |
|||
cv.follow_form, |
|||
cv.follow_form_key, |
|||
cv.follow_type, |
|||
cv.follow_type_key, |
|||
cv.follow_time, |
|||
cv.follow_result, |
|||
cv.follow_state, |
|||
cv.follow_state_key, |
|||
cv.isOnRemind, |
|||
cv.isOnRemindkey, |
|||
cv.remind_day, |
|||
cv.remind_day_key |
|||
FROM crm_visit cv |
|||
LEFT JOIN crm_customer_temp cct ON cct.sid = cv.customerSid |
|||
where cv.sid = #{sid} |
|||
</select> |
|||
<!--查询本周记录条数--> |
|||
<select id="selectCurWeekCount" resultType="int"> |
|||
SELECT COUNT(1) FROM crm_visit |
|||
WHERE YEARWEEK(date_format(follow_time,'%Y-%m-%d'), 1) = YEARWEEK(now()) |
|||
<if test="customerSid != null and customerSid != ''"> |
|||
AND customerSid=#{customerSid} |
|||
</if> |
|||
<if test="staffSid != null and staffSid != ''"> |
|||
AND staffSid=#{staffSid} |
|||
</if> |
|||
</select> |
|||
<select id="getCrmVisitListByUsersid" resultType="com.yxt.customer.biz.crmvisit.AppCrmVisitSelListVo"> |
|||
SELECT cv.sid, |
|||
cv.follow_result, |
|||
cv.follow_time, |
|||
cv.visit_witness_materials, |
|||
cv.customerSid, |
|||
cv.longitude, |
|||
cv.latitude, |
|||
cv.positionInformation |
|||
FROM crm_visit cv |
|||
WHERE cv.staffSid = #{staffSid} |
|||
</select> |
|||
<select id="selectNewFollow_state" resultType="com.yxt.customer.biz.crmvisit.CrmVisitVo"> |
|||
SELECT follow_state |
|||
FROM crm_visit |
|||
WHERE customerSid = #{customerSid} |
|||
AND staffSid = #{staffSid} |
|||
ORDER BY id DESC LIMIT 0,1 |
|||
</select> |
|||
<select id="selVisitMaterials" resultType="String"> |
|||
SELECT visit_witness_materials |
|||
FROM crm_visit |
|||
WHERE customerSid = #{sid} |
|||
AND staffSid = #{staffSid} |
|||
ORDER BY id DESC |
|||
</select> |
|||
<select id="fetchByVisitSid" resultType="java.lang.Integer"> |
|||
SELECT count(*) |
|||
FROM crm_visit_demand cvd |
|||
WHERE cvd.visitSid = #{sid} |
|||
</select> |
|||
<select id="getAppVisitByCustomerSid" |
|||
resultType="com.yxt.customer.biz.crmvisit.AppCrmVisitThumbDetailsVo"> |
|||
select sid, |
|||
follow_time, |
|||
follow_result, |
|||
follow_state, |
|||
visit_witness_materials, |
|||
positionInformation AS address |
|||
from crm_visit |
|||
where customerSid = #{sid} |
|||
order by id desc LIMIT 0,1 |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,43 @@ |
|||
package com.yxt.customer.biz.crmvisit; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户管理) <br/> |
|||
* File: CrmVisitQuery.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmvisit.CrmVisitQuery <br/> |
|||
* Description: 客户跟进记录 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-28 09:57:14 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "客户跟进记录 查询条件", description = "客户跟进记录 查询条件") |
|||
@Data |
|||
public class CrmVisitQuery implements Query { |
|||
|
|||
@ApiModelProperty("客户sid") |
|||
private String customerSid; |
|||
|
|||
@ApiModelProperty("员工Sid") |
|||
private String staffSid; |
|||
|
|||
@ApiModelProperty("跟进形式key") |
|||
private String follow_form_key; |
|||
|
|||
@ApiModelProperty("起始跟进时间") |
|||
private String start_follow_time; |
|||
|
|||
@ApiModelProperty("结束跟进时间") |
|||
private String end_follow_time; |
|||
|
|||
@ApiModelProperty("跟进状态key") |
|||
private String follow_state_key; |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.yxt.customer.biz.crmvisit; |
|||
|
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户管理) <br/> |
|||
* File: CrmVisitService.java <br/> |
|||
* Class: com.yxt.anrui.crm.biz.crmvisit.CrmVisitService <br/> |
|||
* Description: 客户跟进记录 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-28 09:57:14 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class CrmVisitService extends MybatisBaseService<CrmVisitMapper, CrmVisit> { |
|||
|
|||
} |
@ -0,0 +1,104 @@ |
|||
package com.yxt.customer.biz.crmvisit; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-crm(客户管理) <br/> |
|||
* File: CrmVisitVo.java <br/> |
|||
* Class: com.yxt.anrui.crm.api.crmvisit.CrmVisitVo <br/> |
|||
* Description: 客户跟进记录 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-28 09:57:14 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "客户跟进记录 视图数据对象", description = "客户跟进记录 视图数据对象") |
|||
@Data |
|||
public class CrmVisitVo implements Vo { |
|||
|
|||
private static final long serialVersionUID = 3237477051430279347L; |
|||
@ApiModelProperty("sid") |
|||
private String sid; |
|||
|
|||
@ApiModelProperty("员工Sid") |
|||
private String staffSid; |
|||
|
|||
@ApiModelProperty("员工Name") |
|||
private String staffName; |
|||
|
|||
@ApiModelProperty("客户名称") |
|||
private String customerName; |
|||
|
|||
@ApiModelProperty("跟进形式key") |
|||
private String follow_form_key; |
|||
|
|||
@ApiModelProperty("跟进形式(电话/上门/微信/到店)") |
|||
private String follow_form; |
|||
|
|||
@ApiModelProperty("跟进类别key") |
|||
private String follow_type_key; |
|||
|
|||
@ApiModelProperty("跟进类别(例行安排/临时)") |
|||
private String follow_type; |
|||
|
|||
@ApiModelProperty("跟进时间") |
|||
private String follow_time; |
|||
|
|||
@ApiModelProperty("跟进效果") |
|||
private String follow_result; |
|||
|
|||
@ApiModelProperty("拜访见证材料") |
|||
private String visit_witness_materials; |
|||
|
|||
@ApiModelProperty("组织sid") |
|||
private String orgSid; |
|||
|
|||
@ApiModelProperty("跟进状态key") |
|||
private String follow_state_key; |
|||
|
|||
@ApiModelProperty("跟进状态(新获取/待跟进/初步意向/准客户/成交/失效)") |
|||
private String follow_state; |
|||
|
|||
@ApiModelProperty("是否开启提醒(1开启,0不开启)") |
|||
private String isOnRemind; |
|||
|
|||
@ApiModelProperty("是否开启提醒(1开启,0不开启)") |
|||
private String isOnRemindkey; |
|||
|
|||
@ApiModelProperty("设置提醒日期的时间") |
|||
private String setTime; |
|||
|
|||
@ApiModelProperty("提醒日期(天)") |
|||
private String remind_day; |
|||
|
|||
@ApiModelProperty("提醒日期(天)key") |
|||
private String remind_day_key; |
|||
|
|||
@ApiModelProperty("提醒备注") |
|||
private String remind_remark; |
|||
|
|||
@ApiModelProperty("位置信息") |
|||
private String positionInformation; |
|||
|
|||
@ApiModelProperty("经度") |
|||
private String longitude; |
|||
|
|||
@ApiModelProperty("纬度") |
|||
private String latitude; |
|||
|
|||
@ApiModelProperty("经纬度") |
|||
private String location; |
|||
|
|||
@ApiModelProperty("区域代码描述") |
|||
private String locationStr; |
|||
|
|||
@ApiModelProperty("车辆需求条数") |
|||
private String xqcounts; |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.yxt.customer.biz.crmvisit; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class PcCrmVisitAppendixDto implements Dto { |
|||
|
|||
private static final long serialVersionUID = -215934317034761854L; |
|||
//附件类型:1、0001:合同,2、0002:人行征信,3、0003:开票申请附件,4、0004:跟进记录的材料
|
|||
@ApiModelProperty("上传人sid") |
|||
private String createBySid; |
|||
@ApiModelProperty("文件名") |
|||
private String fileName; |
|||
@ApiModelProperty("文件类型") |
|||
private String fileType; |
|||
@ApiModelProperty("文件大小") |
|||
private String fileSize; |
|||
@ApiModelProperty("文件的路径") |
|||
private String filePath; |
|||
} |
Loading…
Reference in new issue