修改客户跟进
This commit is contained in:
@@ -145,4 +145,12 @@ public class CrmFileRest {
|
||||
return rb.success().setMsg("删除成功");
|
||||
}
|
||||
|
||||
@ApiOperation("Pc端查询附件")
|
||||
@PostMapping("/getPcAppendix")
|
||||
public ResultBean<List<CommonAppendixVo>> getPcAppendix(@RequestBody CommonAppendixSelectQuery query) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
List<CommonAppendixVo> list = crmFileService.getPcAppendix(query);
|
||||
return rb.success().setData(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ 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.CrmCustomerTemp;
|
||||
import com.yxt.customer.biz.crmcustomer.SalesCustomerVo;
|
||||
import com.yxt.customer.biz.crmcustomerfile.CrmCustomerFileVo;
|
||||
import com.yxt.customer.biz.crmvisit.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -58,22 +60,23 @@ public class CrmVisitRest {
|
||||
*/
|
||||
@ApiOperation("客户跟进记录分页列表")
|
||||
@PostMapping("/pageList")
|
||||
public IPage<CrmVisitVo> pageList(PagerQuery<CrmVisitQuery> pagerQuery) {
|
||||
return crmVisitService.pagerList(pagerQuery);
|
||||
public ResultBean<PagerVo<CrmVisitVo>> pageList(@RequestBody PagerQuery<CrmVisitQuery> pagerQuery) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
PagerVo<CrmVisitVo> pv = crmVisitService.pagerList(pagerQuery);
|
||||
return rb.success().setData(pv);
|
||||
}
|
||||
|
||||
@ApiOperation("Pc查看详情及修改回显")
|
||||
@GetMapping("/fetchSid/{sid}")
|
||||
@ResponseBody
|
||||
public ResultBean<CrmVisitVo> fetchSid(@PathVariable("sid") String sid){
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
ResultBean<CrmVisitVo> vo = crmVisitService.selVisitVo(sid);
|
||||
return rb.success().setData(vo);
|
||||
return crmVisitService.selVisitVo(sid);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PostMapping("/update")
|
||||
public int update(@RequestBody CrmVisitDto dto, @PathVariable("sid") String sid) {
|
||||
@PostMapping("/update/{sid}")
|
||||
public boolean update(@RequestBody CrmVisitDto dto, @PathVariable("sid") String sid) {
|
||||
return crmVisitService.updateVisit(dto,sid);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
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-base(安瑞基础信息模块) <br/>
|
||||
* File: CommonAppendixQuery.java <br/>
|
||||
* Class: com.yxt.anrui.base.api.commonappendix.CommonAppendixQuery <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
|
||||
*/
|
||||
@ApiModel(value = "公共附件表 查询条件", description = "公共附件表 查询条件")
|
||||
@Data
|
||||
public class CommonAppendixSelectQuery implements Query {
|
||||
|
||||
@ApiModelProperty("关联业务对象sid")
|
||||
private String linkSid;
|
||||
|
||||
@ApiModelProperty("附件类型")
|
||||
private String attachType;
|
||||
}
|
||||
@@ -81,4 +81,6 @@ public interface CrmFileMapper extends BaseMapper<CrmFile> {
|
||||
@Delete("DELETE FROM crm_file WHERE linkSid = #{linkSid}")
|
||||
int deleteFiles(String linkSid);
|
||||
|
||||
List<CommonAppendixVo> getPcAppendix(@Param("type") String type, @Param("linkSid") String linkSid, @Param("path") String path);
|
||||
|
||||
}
|
||||
|
||||
@@ -59,4 +59,20 @@
|
||||
from crm_file
|
||||
where linkSid = #{sid}
|
||||
</select>
|
||||
|
||||
<select id="getPcAppendix" resultType="com.yxt.customer.biz.crmfile.CommonAppendixVo">
|
||||
SELECT cax.sid,
|
||||
concat(#{path}, cax.filePath) as filePath,
|
||||
cax.fileSize,
|
||||
cax.fileType,
|
||||
cax.attachType,
|
||||
cax.fileName,
|
||||
cax.createBySid,
|
||||
DATE_FORMAT(cax.createTime, '%Y-%m-%d') AS createTime,
|
||||
cax.name,
|
||||
cax.linkSid
|
||||
FROM crm_file cax
|
||||
WHERE attachType = #{type}
|
||||
AND linkSid = #{linkSid}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -300,4 +300,11 @@ public class CrmFileService extends MybatisBaseService<CrmFileMapper, CrmFile> {
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<CommonAppendixVo> getPcAppendix(CommonAppendixSelectQuery query) {
|
||||
String attachType = query.getAttachType();
|
||||
String linkSid = query.getLinkSid();
|
||||
String urlPrefix = fileUploadComponent.getUrlPrefix();
|
||||
return baseMapper.getPcAppendix(attachType,linkSid, urlPrefix);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
cv.remind_day,
|
||||
cv.remind_day_key
|
||||
FROM crm_visit cv
|
||||
LEFT JOIN crm_customer_temp cct ON cct.sid = cv.customerSid
|
||||
LEFT JOIN crm_customer cct ON cct.sid = cv.customerSid
|
||||
where cv.sid = #{sid}
|
||||
</select>
|
||||
<!--查询本周记录条数-->
|
||||
|
||||
@@ -7,6 +7,9 @@ import com.yxt.common.base.service.MybatisBaseService;
|
||||
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.crmcustomerfile.CrmCustomerFile;
|
||||
import com.yxt.customer.biz.crmcustomerfile.CrmCustomerFileVo;
|
||||
import com.yxt.customer.biz.crmfile.CommonAppendixVo;
|
||||
import com.yxt.customer.biz.crmfile.CrmFileService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -39,10 +42,12 @@ public class CrmVisitService extends MybatisBaseService<CrmVisitMapper, CrmVisit
|
||||
baseMapper.insert(visit);
|
||||
}
|
||||
|
||||
public IPage<CrmVisitVo> pagerList(PagerQuery<CrmVisitQuery> pagerQuery) {
|
||||
IPage<CrmVisitQuery> page = PagerUtil.queryToPage(pagerQuery);
|
||||
public PagerVo<CrmVisitVo> pagerList(PagerQuery<CrmVisitQuery> pagerQuery) {
|
||||
QueryWrapper<CrmVisitVo> qw = buildQueryWrapper(pagerQuery.getParams());
|
||||
return baseMapper.pagerList(page, qw);
|
||||
IPage<CrmVisitQuery> page = PagerUtil.queryToPage(pagerQuery);
|
||||
IPage<CrmVisitVo> pagging = baseMapper.pagerList(page, qw);
|
||||
PagerVo<CrmVisitVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,8 +101,14 @@ public class CrmVisitService extends MybatisBaseService<CrmVisitMapper, CrmVisit
|
||||
baseMapper.updateAppendixUrl(s, sid);
|
||||
}
|
||||
|
||||
public int updateVisit(CrmVisitDto dto, String sid) {
|
||||
int i = updateBySid(dto.toMap(), sid);
|
||||
return i;
|
||||
public boolean updateVisit(CrmVisitDto dto, String sid) {
|
||||
// int i = updateBySid(dto.toMap(), sid);
|
||||
boolean b = false;
|
||||
CrmVisit crmVisit = fetchBySid(sid);
|
||||
if (null != crmVisit) {
|
||||
BeanUtil.copyProperties(dto, crmVisit, "id", "sid","customerSid");
|
||||
b = updateById(crmVisit);
|
||||
}
|
||||
return b;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,9 @@ 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.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* Project: anrui-crm(客户管理) <br/>
|
||||
|
||||
Reference in New Issue
Block a user