Commit bfc6304a authored by 远方不远's avatar 远方不远
parents 01c7d6c4 2aae72c5
...@@ -42,7 +42,7 @@ public class BusinessBacklogController extends BaseController ...@@ -42,7 +42,7 @@ public class BusinessBacklogController extends BaseController
private IBusinessBacklogService businessBacklogService; private IBusinessBacklogService businessBacklogService;
/** /**
* 查询项目工作待办列表 * 分页查询项目工作待办列表
*/ */
// @PreAuthorize("@ss.hasPermi('system:backlog:list')") // @PreAuthorize("@ss.hasPermi('system:backlog:list')")
@GetMapping("/list") @GetMapping("/list")
......
...@@ -36,7 +36,7 @@ public class BusinessContactsController extends BaseController ...@@ -36,7 +36,7 @@ public class BusinessContactsController extends BaseController
private IBusinessContactsService businessContactsService; private IBusinessContactsService businessContactsService;
/** /**
* 查询项目联系人列表 * 分页查询项目联系人列表
*/ */
// @PreAuthorize("@ss.hasPermi('system:contacts:list')") // @PreAuthorize("@ss.hasPermi('system:contacts:list')")
@GetMapping("/list") @GetMapping("/list")
......
...@@ -36,15 +36,13 @@ public class BusinessFollowRecordController extends BaseController ...@@ -36,15 +36,13 @@ public class BusinessFollowRecordController extends BaseController
private IBusinessFollowRecordService businessFollowRecordService; private IBusinessFollowRecordService businessFollowRecordService;
/** /**
* 查询项目跟进记录列表 * 根据项目id查询项目跟进记录
*/ */
// @PreAuthorize("@ss.hasPermi('system:record:list')") // @PreAuthorize("@ss.hasPermi('system:record:list')")
@GetMapping("/list") @GetMapping("/list/{businessId}")
public TableDataInfo list(BusinessFollowRecord businessFollowRecord) public AjaxResult list(@PathVariable Integer businessId)
{ {
startPage(); return success(businessFollowRecordService.selectBusinessFollowRecordList(businessId));
List<BusinessFollowRecord> list = businessFollowRecordService.selectBusinessFollowRecordList(businessFollowRecord);
return getDataTable(list);
} }
/** /**
...@@ -58,6 +56,18 @@ public class BusinessFollowRecordController extends BaseController ...@@ -58,6 +56,18 @@ public class BusinessFollowRecordController extends BaseController
return toAjax(businessFollowRecordService.insertBusinessFollowRecord(businessFollowRecord)); return toAjax(businessFollowRecordService.insertBusinessFollowRecord(businessFollowRecord));
} }
/**
* 分页查询项目跟进记录
*/
// @PreAuthorize("@ss.hasPermi('system:record:list')")
// @GetMapping("/list")
// public TableDataInfo list(BusinessFollowRecord businessFollowRecord)
// {
// startPage();
// List<BusinessFollowRecord> list = businessFollowRecordService.selectBusinessFollowRecordList(businessFollowRecord);
// return getDataTable(list);
// }
// /** // /**
// * 导出项目跟进记录列表 // * 导出项目跟进记录列表
// */ // */
......
...@@ -6,6 +6,7 @@ import com.dsk.common.core.domain.entity.BusinessInfo; ...@@ -6,6 +6,7 @@ import com.dsk.common.core.domain.entity.BusinessInfo;
import com.dsk.common.dtos.BusinessInfoDto; import com.dsk.common.dtos.BusinessInfoDto;
import com.dsk.system.domain.BusinessAddDto; import com.dsk.system.domain.BusinessAddDto;
import com.dsk.system.domain.BusinessListDto; import com.dsk.system.domain.BusinessListDto;
import com.dsk.system.domain.vo.BusinessBrowseVo;
import com.dsk.system.domain.vo.BusinessListVo; import com.dsk.system.domain.vo.BusinessListVo;
import com.dsk.system.service.IBusinessInfoService; import com.dsk.system.service.IBusinessInfoService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
...@@ -37,7 +38,7 @@ public class BusinessInfoController extends BaseController ...@@ -37,7 +38,7 @@ public class BusinessInfoController extends BaseController
// @PreAuthorize("@ss.hasPermi('system:info:list')") // @PreAuthorize("@ss.hasPermi('system:info:list')")
@PostMapping("/query/project") @PostMapping("/query/project")
public AjaxResult queryprojectName(@RequestBody BusinessListDto dto){ public AjaxResult queryprojectName(@RequestBody BusinessListDto dto){
return AjaxResult.success(businessInfoService.queryprojectName(dto)); return AjaxResult.success(businessInfoService.selectProjectName(dto));
} }
/** /**
...@@ -53,12 +54,32 @@ public class BusinessInfoController extends BaseController ...@@ -53,12 +54,32 @@ public class BusinessInfoController extends BaseController
} }
/** /**
* 删除项目详情 * 查询项目速览
*/
// @PreAuthorize("@ss.hasPermi('system:info:list')")
@GetMapping("/browse/{businessId}")
public AjaxResult browse(@PathVariable Integer id)
{
return success(businessInfoService.browse(id));
}
/**
* 获取项目建设内容
*/
// @PreAuthorize("@ss.hasPermi('system:info:query')")
@GetMapping(value = "/construction/{id}")
public AjaxResult getConstruction(@PathVariable("id") Integer id)
{
return success(businessInfoService.getConstruction(id));
}
/**
* 删除项目列表
*/ */
// @PreAuthorize("@ss.hasPermi('system:info:remove')") // @PreAuthorize("@ss.hasPermi('system:info:remove')")
// @Log(title = "项目详情", businessType = BusinessType.DELETE) // @Log(title = "项目详情", businessType = BusinessType.DELETE)
@DeleteMapping("/remove/{ids}") @DeleteMapping("/remove/{ids}")
public AjaxResult remove(@RequestParam(value = "ids",required=false) Long[] ids) public AjaxResult remove(@PathVariable(value = "ids",required=false) Long[] ids)
{ {
return toAjax(businessInfoService.deleteBusinessInfoByIds(ids)); return toAjax(businessInfoService.deleteBusinessInfoByIds(ids));
} }
...@@ -77,14 +98,24 @@ public class BusinessInfoController extends BaseController ...@@ -77,14 +98,24 @@ public class BusinessInfoController extends BaseController
/** /**
* 修改项目详情 * 修改项目详情
*/ */
@PreAuthorize("@ss.hasPermi('system:info:edit')") // @PreAuthorize("@ss.hasPermi('system:info:edit')")
@Log(title = "项目详情", businessType = BusinessType.UPDATE) // @Log(title = "项目详情", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
public AjaxResult edit(@RequestBody BusinessInfo businessInfo) public AjaxResult edit(@RequestBody BusinessInfo businessInfo)
{ {
return toAjax(businessInfoService.updateBusinessInfo(businessInfo)); return toAjax(businessInfoService.updateBusinessInfo(businessInfo));
} }
// /**
// * 获取项目详情详细信息
// */
// @PreAuthorize("@ss.hasPermi('system:info:query')")
// @GetMapping(value = "/{id}")
// public AjaxResult getInfo(@PathVariable("id") Integer id)
// {
// return success(businessInfoService.selectBusinessInfoById(id));
// }
// /** // /**
// * 导出项目详情列表 // * 导出项目详情列表
// */ // */
...@@ -97,14 +128,5 @@ public class BusinessInfoController extends BaseController ...@@ -97,14 +128,5 @@ public class BusinessInfoController extends BaseController
// ExcelUtil<BusinessInfo> util = new ExcelUtil<BusinessInfo>(BusinessInfo.class); // ExcelUtil<BusinessInfo> util = new ExcelUtil<BusinessInfo>(BusinessInfo.class);
// util.exportExcel(response, list, "项目详情数据"); // util.exportExcel(response, list, "项目详情数据");
// } // }
//
// /**
// * 获取项目详情详细信息
// */
// @PreAuthorize("@ss.hasPermi('system:info:query')")
// @GetMapping(value = "/{id}")
// public AjaxResult getInfo(@PathVariable("id") Long id)
// {
// return success(businessInfoService.selectBusinessInfoById(id));
// }
} }
...@@ -67,6 +67,17 @@ public class BusinessRelateCompanyController extends BaseController ...@@ -67,6 +67,17 @@ public class BusinessRelateCompanyController extends BaseController
return toAjax(businessRelateCompanyService.insertBusinessRelateCompany(businessRelateCompany)); return toAjax(businessRelateCompanyService.insertBusinessRelateCompany(businessRelateCompany));
} }
/**
* 修改项目关联单位
*/
// @PreAuthorize("@ss.hasPermi('system:company:edit')")
// @Log(title = "项目关联单位", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
public AjaxResult edit(@RequestBody BusinessRelateCompany businessRelateCompany)
{
return toAjax(businessRelateCompanyService.updateBusinessRelateCompany(businessRelateCompany));
}
// /** // /**
// * 导出项目关联单位列表 // * 导出项目关联单位列表
// */ // */
...@@ -90,17 +101,6 @@ public class BusinessRelateCompanyController extends BaseController ...@@ -90,17 +101,6 @@ public class BusinessRelateCompanyController extends BaseController
// return success(businessRelateCompanyService.selectBusinessRelateCompanyById(id)); // return success(businessRelateCompanyService.selectBusinessRelateCompanyById(id));
// } // }
// /**
// * 修改项目关联单位
// */
// @PreAuthorize("@ss.hasPermi('system:company:edit')")
// @Log(title = "项目关联单位", businessType = BusinessType.UPDATE)
// @PutMapping
// public AjaxResult edit(@RequestBody BusinessRelateCompany businessRelateCompany)
// {
// return toAjax(businessRelateCompanyService.updateBusinessRelateCompany(businessRelateCompany));
// }
// //
// /** // /**
// * 删除项目关联单位 // * 删除项目关联单位
......
...@@ -4,8 +4,8 @@ import com.dsk.common.annotation.RepeatSubmit; ...@@ -4,8 +4,8 @@ import com.dsk.common.annotation.RepeatSubmit;
import com.dsk.common.core.controller.BaseController; import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.AjaxResult; import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.core.page.TableDataInfo; import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.utils.PageUtils;
import com.dsk.system.domain.customer.Customer; import com.dsk.system.domain.customer.Customer;
import com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto;
import com.dsk.system.domain.customer.dto.CustomerSearchDto; import com.dsk.system.domain.customer.dto.CustomerSearchDto;
import com.dsk.system.service.ICustomerService; import com.dsk.system.service.ICustomerService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -67,10 +67,19 @@ public class CustomerController extends BaseController { ...@@ -67,10 +67,19 @@ public class CustomerController extends BaseController {
/** /**
* 获取个人客户列表 * 获取个人客户列表
*/ */
@PreAuthorize("@ss.hasPermi('customer:user:list')")
@GetMapping("/user/list") @GetMapping("/user/list")
public AjaxResult selectUserList(){ public AjaxResult userList(){
return AjaxResult.success(baseService.selectUserList()); return AjaxResult.success(baseService.selectUserList());
} }
/**
* 获取客户项目(合作情况)列表
*/
// @PreAuthorize("@ss.hasPermi('customer:business:list')")
@GetMapping("/business/list")
public TableDataInfo businessList(CustomerBusinessSearchDto dto){
startPage();
return getDataTable(baseService.selectBusinessList(dto));
}
} }
...@@ -26,7 +26,7 @@ public class CustomerDecisionChainController extends BaseController { ...@@ -26,7 +26,7 @@ public class CustomerDecisionChainController extends BaseController {
/** /**
* 获取客户决策链条列表 * 获取客户决策链条列表
*/ */
@PreAuthorize("@ss.hasPermi('customer:decision:chain:list')") // @PreAuthorize("@ss.hasPermi('customer:decision:chain:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo selectPageList(CustomerDecisionChainSearchDto dto){ public TableDataInfo selectPageList(CustomerDecisionChainSearchDto dto){
startPage(); startPage();
...@@ -36,7 +36,7 @@ public class CustomerDecisionChainController extends BaseController { ...@@ -36,7 +36,7 @@ public class CustomerDecisionChainController extends BaseController {
/** /**
* 添加客户决策链条 * 添加客户决策链条
*/ */
@PreAuthorize("@ss.hasPermi('customer:decision:chain:add')") // @PreAuthorize("@ss.hasPermi('customer:decision:chain:add')")
@PostMapping() @PostMapping()
@RepeatSubmit() @RepeatSubmit()
public AjaxResult add(@RequestBody CustomerDecisionChain customerDecisionChain){ public AjaxResult add(@RequestBody CustomerDecisionChain customerDecisionChain){
...@@ -46,7 +46,7 @@ public class CustomerDecisionChainController extends BaseController { ...@@ -46,7 +46,7 @@ public class CustomerDecisionChainController extends BaseController {
/** /**
* 编辑客户决策链条 * 编辑客户决策链条
*/ */
@PreAuthorize("@ss.hasPermi('customer:decision:chain:edit')") // @PreAuthorize("@ss.hasPermi('customer:decision:chain:edit')")
@PutMapping() @PutMapping()
@RepeatSubmit() @RepeatSubmit()
public AjaxResult edit(@RequestBody CustomerDecisionChain customerDecisionChain){ public AjaxResult edit(@RequestBody CustomerDecisionChain customerDecisionChain){
...@@ -56,7 +56,7 @@ public class CustomerDecisionChainController extends BaseController { ...@@ -56,7 +56,7 @@ public class CustomerDecisionChainController extends BaseController {
/** /**
* 删除客户决策链条 * 删除客户决策链条
*/ */
@PreAuthorize("@ss.hasPermi('customer:decision:chain:del')") // @PreAuthorize("@ss.hasPermi('customer:decision:chain:del')")
@DeleteMapping("/{id}") @DeleteMapping("/{id}")
@RepeatSubmit() @RepeatSubmit()
public AjaxResult del(@PathVariable("id") Long id){ public AjaxResult del(@PathVariable("id") Long id){
......
...@@ -3,11 +3,14 @@ package com.dsk.common.core.domain.entity; ...@@ -3,11 +3,14 @@ package com.dsk.common.core.domain.entity;
import java.util.Date; import java.util.Date;
import com.dsk.common.core.domain.BaseEntity; import com.dsk.common.core.domain.BaseEntity;
import com.dsk.common.utils.CheckUtils;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.dsk.common.annotation.Excel; import com.dsk.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import javax.validation.constraints.Pattern;
/** /**
* 项目联系人对象 business_contacts * 项目联系人对象 business_contacts
* *
......
...@@ -33,30 +33,6 @@ public class BusinessFollowRecord extends BaseEntity ...@@ -33,30 +33,6 @@ public class BusinessFollowRecord extends BaseEntity
@Excel(name = "用户昵称") @Excel(name = "用户昵称")
private Integer userName; private Integer userName;
public Integer getUserName() {
return userName;
}
public String getVisitPerson() {
return visitPerson;
}
public String getPosition() {
return position;
}
public void setUserName(Integer userName) {
this.userName = userName;
}
public void setVisitPerson(String visitPerson) {
this.visitPerson = visitPerson;
}
public void setPosition(String position) {
this.position = position;
}
/** 拜访对象 */ /** 拜访对象 */
@Excel(name = "拜访对象") @Excel(name = "拜访对象")
private String visitPerson; private String visitPerson;
...@@ -88,6 +64,30 @@ public class BusinessFollowRecord extends BaseEntity ...@@ -88,6 +64,30 @@ public class BusinessFollowRecord extends BaseEntity
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date creatTime; private Date creatTime;
public Integer getUserName() {
return userName;
}
public String getVisitPerson() {
return visitPerson;
}
public String getPosition() {
return position;
}
public void setUserName(Integer userName) {
this.userName = userName;
}
public void setVisitPerson(String visitPerson) {
this.visitPerson = visitPerson;
}
public void setPosition(String position) {
this.position = position;
}
public void setId(Integer id) public void setId(Integer id)
{ {
this.id = id; this.id = id;
......
...@@ -31,12 +31,12 @@ public class BusinessInfo extends BaseEntity ...@@ -31,12 +31,12 @@ public class BusinessInfo extends BaseEntity
@Excel(name = "项目名称") @Excel(name = "项目名称")
private String projectName; private String projectName;
/** 总投金额 */ /** 总投金额(万元) */
@Excel(name = "总投金额") @Excel(name = "总投金额(万元)")
private Double investmentAmount; private Double investmentAmount;
/** 资金来源(万元) */ /** 资金来源 */
@Excel(name = "资金来源(万元)") @Excel(name = "资金来源")
private String amountSource; private String amountSource;
/** 计划招标时间 */ /** 计划招标时间 */
......
...@@ -2,6 +2,8 @@ package com.dsk.common.core.domain.entity; ...@@ -2,6 +2,8 @@ package com.dsk.common.core.domain.entity;
import com.dsk.common.annotation.Excel; import com.dsk.common.annotation.Excel;
import com.dsk.common.core.domain.BaseEntity; import com.dsk.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
...@@ -11,6 +13,8 @@ import org.apache.commons.lang3.builder.ToStringStyle; ...@@ -11,6 +13,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
* @author lxl * @author lxl
* @date 2023-05-17 * @date 2023-05-17
*/ */
@Data
@NoArgsConstructor
public class BusinessLabel extends BaseEntity public class BusinessLabel extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -26,34 +30,6 @@ public class BusinessLabel extends BaseEntity ...@@ -26,34 +30,6 @@ public class BusinessLabel extends BaseEntity
@Excel(name = "标签") @Excel(name = "标签")
private String label; private String label;
public void setId(Integer id)
{
this.id = id;
}
public Integer getId()
{
return id;
}
public void setBusinessId(Integer businessId)
{
this.businessId = businessId;
}
public Integer getBusinessId()
{
return businessId;
}
public void setLabel(String label)
{
this.label = label;
}
public String getLabel()
{
return label;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
...@@ -64,4 +40,8 @@ public class BusinessLabel extends BaseEntity ...@@ -64,4 +40,8 @@ public class BusinessLabel extends BaseEntity
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.toString(); .toString();
} }
public BusinessLabel(Integer businessId) {
this.businessId = businessId;
}
} }
...@@ -2,15 +2,22 @@ package com.dsk.common.core.domain.entity; ...@@ -2,15 +2,22 @@ package com.dsk.common.core.domain.entity;
import com.dsk.common.annotation.Excel; import com.dsk.common.annotation.Excel;
import com.dsk.common.core.domain.BaseEntity; import com.dsk.common.core.domain.BaseEntity;
import com.dsk.common.utils.CheckUtils;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import javax.validation.constraints.Pattern;
/** /**
* 项目关联单位对象 business_relate_company * 项目关联单位对象 business_relate_company
* *
* @author lxl * @author lxl
* @date 2023-05-17 * @date 2023-05-17
*/ */
@Data
@NoArgsConstructor
public class BusinessRelateCompany extends BaseEntity public class BusinessRelateCompany extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -46,78 +53,6 @@ public class BusinessRelateCompany extends BaseEntity ...@@ -46,78 +53,6 @@ public class BusinessRelateCompany extends BaseEntity
@Excel(name = "对接深度/竞争力度") @Excel(name = "对接深度/竞争力度")
private String depth; private String depth;
public String getDepth() {
return depth;
}
public void setDepth(String depth) {
this.depth = depth;
}
public void setId(Integer id)
{
this.id = id;
}
public Integer getId()
{
return id;
}
public void setBusinessId(Integer businessId)
{
this.businessId = businessId;
}
public Integer getBusinessId()
{
return businessId;
}
public void setCompanyId(Integer companyId)
{
this.companyId = companyId;
}
public Integer getCompanyId()
{
return companyId;
}
public void setCompanyName(String companyName)
{
this.companyName = companyName;
}
public String getCompanyName()
{
return companyName;
}
public void setCompanyRole(String companyRole)
{
this.companyRole = companyRole;
}
public String getCompanyRole()
{
return companyRole;
}
public void setResponsiblePerson(String responsiblePerson)
{
this.responsiblePerson = responsiblePerson;
}
public String getResponsiblePerson()
{
return responsiblePerson;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
...@@ -140,4 +75,8 @@ public class BusinessRelateCompany extends BaseEntity ...@@ -140,4 +75,8 @@ public class BusinessRelateCompany extends BaseEntity
this.companyName = companyName; this.companyName = companyName;
this.companyRole = companyRole; this.companyRole = companyRole;
} }
public BusinessRelateCompany(Integer businessId) {
this.businessId = businessId;
}
} }
...@@ -543,6 +543,14 @@ ul, li { ...@@ -543,6 +543,14 @@ ul, li {
background: #D3D3D3; background: #D3D3D3;
} }
} }
&.btn_shallow{
color: #0081FF;
background: rgba(0, 129, 255, 0.16);
&:hover{
background: #0081FF;
color: #fff;
}
}
&.h28{ &.h28{
line-height: 28px; line-height: 28px;
} }
...@@ -588,7 +596,13 @@ ul, li { ...@@ -588,7 +596,13 @@ ul, li {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
.el-input{ .el-input{
margin: -2px -1px; margin-top: -1px;
//line-height: 32px;
.el-input__inner{
line-height: 32px;
height: 32px;
border: 0;
}
} }
.btn{ .btn{
background: #F5F5F5; background: #F5F5F5;
......
//小导航
.miantitle{
color: #232323;
font-size: 12px;
margin: 12px 24px;
>span{
opacity: 0.4;
&:last-child{opacity:0.8}
}
}
.overflows{ .overflows{
overflow: initial; overflow: initial;
} }
...@@ -237,6 +246,9 @@ ...@@ -237,6 +246,9 @@
.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell{ .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell{
background: #F9FCFF; background: #F9FCFF;
} }
.el-table th.el-table__cell.is-leaf{
border-bottom: 0;
}
.has-gutter{ .has-gutter{
th{ th{
height: 40px; height: 40px;
...@@ -347,13 +359,18 @@ ...@@ -347,13 +359,18 @@
width: 137px; width: 137px;
display: inline-block; display: inline-block;
text-align: right; text-align: right;
opacity: 0.8 opacity: 0.8;
i{
color: #FF3C3C;
font-style: initial;
padding-right: 2px;
}
} }
.el-input{ .el-input{
display: inline-block; display: inline-block;
width: 240px; width: 240px;
.el-input__inner{ .el-input__inner{
width: 240px; width: 100%;
height: 32px; height: 32px;
border-radius: 0px; border-radius: 0px;
...@@ -376,7 +393,7 @@ ...@@ -376,7 +393,7 @@
.popbot{ .popbot{
text-align: right; text-align: right;
padding-top: 8px; padding-top: 8px;
padding-right: 47px; padding-right: 0;
.btn{ .btn{
border-radius: 0; border-radius: 0;
width: 80px; width: 80px;
...@@ -386,18 +403,17 @@ ...@@ -386,18 +403,17 @@
.popform.i{ .popform.i{
.left{ .left{
width: 85px; width: 85px;
i{
color: #FF3C3C;
}
} }
.el-input{ .el-input{
width: 335px; width: 335px;
.el-input__inner{
width: 335px;
}
} }
.popbot{ }
padding-right: 0; .popform.j{
.left{
width: 116px;
}
.el-input{
width: 374px;
} }
} }
.types{ .types{
...@@ -672,12 +688,9 @@ ...@@ -672,12 +688,9 @@
top: 17px; top: 17px;
.searchInput{ .searchInput{
width: 178px; width: 178px;
height: 32px;
border: 1px solid #D9D9D9; border: 1px solid #D9D9D9;
.el-input--medium .el-input__inner{ .el-input--medium .el-input__inner{
line-height: 32px;
font-size: 12px; font-size: 12px;
} }
} }
.b1{ .b1{
...@@ -757,3 +770,24 @@ ...@@ -757,3 +770,24 @@
} }
} }
} }
/*
客户管理
*/
//表格搜索
.table_search{
padding-bottom: 16px;
display: flex;
justify-content: space-between;
.searchInput{
width: 320px;
.el-input__inner{
font-size: 12px;
}
}
}
.p10{
padding: 0 10px;
}
...@@ -92,13 +92,14 @@ export const constantRoutes = [ ...@@ -92,13 +92,14 @@ export const constantRoutes = [
path: '/party', path: '/party',
component: Layout, component: Layout,
hidden: true, hidden: true,
name: 'Party',
redirect: 'noredirect', redirect: 'noredirect',
children: [ children: [
{ {
path: 'party-a', path: 'party-a',
component: () => import('@/views/detail/party-a/index'), component: () => import('@/views/detail/party-a/index'),
name: 'PartyA', name: 'PartyA',
meta: { title: '甲方详情' } meta: { title: '甲方详情' },
}, },
{ {
path: 'party-b', path: 'party-b',
......
<template> <template>
<div class="app-container"> <div>
客户列表 <div class="miantitle">
<span>客户管理</span>
<span> / 客户列表</span>
</div>
<div class="app-container">
<el-card class="box-card noborder">
<div class="tables">
<div class="empty" v-if="tableData == null || tableData.length == 0">
<img src="@/assets/images/project/empty.png">
<div class="p1">添加你的第一位客户吧</div>
<div class="p2">抱歉,你还未添加客户,快去添加吧</div>
<div class="btn btn_primary h36 w88" @click="opennew">添加客户</div>
<div class="btn btn_primary btn_shallow h36 w88">批量导入</div>
</div>
<div class="table_search">
<div class="searchInput">
<el-input type="text" placeholder="输入企业名称查询"></el-input>
<div class="btn">搜索</div>
</div>
<div class="dc">
<div class="total">共126条</div>
<div class="btn-export"><img src="@/assets/images/project/import.png">批量导入</div>
<div class="btn btn_primary h32 p10" @click="opennew"><div class="img img1"></div>添加客户</div>
</div>
</div>
<el-table
:data="tableData"
stripe border
style="width: 100%"
:default-sort = "{prop: 'date', order: 'descending'}"
>
<el-table-column
prop="index"
label="序号"
width="47">
</el-table-column> <el-table-column
prop="date"
label="企业名称"
width="441">
<template slot-scope="scope">
<div class="ps1">
<div class="wordprimary ps2">中国建筑第八工程局有限公司重庆至万州高铁</div>
<div class="ps3">
<div>写跟进<img src="@/assets/images/project/edit_1.png"></div>
<div>编辑信息<img src="@/assets/images/project/edit_2.png"></div>
</div>
</div>
</template>
</el-table-column>
<el-table-column
prop="name"
label="合作项目"
width="76">
</el-table-column>
<el-table-column
prop="name"
label="跟进项目"
width="76">
</el-table-column>
<el-table-column
prop="name"
label="储备项目"
width="76">
</el-table-column>
<el-table-column
prop="name"
label="法定代表人"
width="110">
</el-table-column>
<el-table-column
prop="name"
label="注册地区"
width="160">
</el-table-column>
<el-table-column
prop="name"
label="注册资本金(万元)"
width="140">
</el-table-column>
<el-table-column
prop="address"
label="企业主体评级" width="100">
</el-table-column>
<el-table-column
prop="address"
label="上市公司" width="76">
</el-table-column>
<el-table-column
prop="address"
label="局级大客户" width="88">
</el-table-column>
<el-table-column
prop="address"
label="客户等级" width="76">
</el-table-column>
<el-table-column
prop="address"
label="客户性质" width="76">
</el-table-column>
<el-table-column
prop="address"
label="客户级别" width="76">
</el-table-column>
<el-table-column
prop="address"
label="企业母公司" width="268">
<template slot-scope="scope">
<div class="wordprimary">中国建筑第八工程局有限公司重庆至万州高铁</div>
</template>
</el-table-column>
<el-table-column
prop="address"
label="主营业务" width="120">
</el-table-column>
<el-table-column
prop="address"
label="发包属性" width="120">
</el-table-column>
<el-table-column
prop="address"
label="跟进人" width="110">
</el-table-column>
</el-table>
<div class="bottems">
<el-pagination
background
:page-size="20"
:current-page="1"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="1000">
</el-pagination>
</div>
</div>
<el-dialog
class="popups"
:visible.sync="dialogVisible"
width="534px">
<div class="poptitle">
<img src="@/assets/images/economies/icon.png">
<span>添加客户</span>
</div>
<div class="popform j">
<div class="row">
<span class="left"><i>*</i>企业名称:</span>
<el-input type="text" placeholder="请输入"></el-input>
</div>
<div class="row">
<span class="left">法定代表人:</span>
<el-input type="text" placeholder="请输入"></el-input>
</div>
<div class="row">
<span class="left">注册资本(万):</span>
<el-input type="text" placeholder="请输入"></el-input>
</div>
<div class="row">
<span class="left">企业注册地:</span>
<el-select placeholder="请选择">
<el-option label="cccc" value="11"></el-option>
<el-option label="cccc" value="121"></el-option>
</el-select>
</div>
<div class="popbot">
<div class="wordprimary">前往城投平台寻找客户线索></div>
<div class="btn btn_cancel h32" @click="cancel">返回</div>
<div class="btn btn_primary h32">添加</div>
</div>
</div>
</el-dialog>
</el-card>
</div>
</div> </div>
</template> </template>
<script> <script>
import "@/assets/styles/project.scss"
export default { export default {
name: 'CustomList', name: 'CustomList',
data() { data() {
return {
return{
dialogVisible:false,
textarea:"",
nowedit:-1,//当前正在编辑的文本
tipslit:[],//项目标签
tipsvalue:"",//标签填写内容
tableData: [
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
}
]
} }
}, },
created() { created() {
}, },
methods: { methods:{
//翻页
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
},
cancel(){
this.dialogVisible = false
},
//打开新建窗口
opennew(){
this.dialogVisible = true
},
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.app-container{
padding: 0;
height: calc(100vh - 134px)
}
.box-card{
padding-top: 16px;
width: 100%;
height: 100%;
}
.dc{
font-size: 12px;
color: #3D3D3D;
font-weight: 400;
position: relative;
&::after{
content: ' ';
width: 2px;
height: 2px;
background: rgba(35,35,35,0.4);
border-radius: 50%;
position: absolute;
top: 16px;
left: 14px;
}
>div{
display: inline-block;
margin-left: 20px;
}
}
.img.img1{
margin-right: 2px;
background: url('../../../../src/assets/images/project/add_2.png')no-repeat center center;
}
.w88{
width: 88px;
}
.tables{
position: relative;
height: calc(100vh - 134px);
.empty{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
.btn{
margin-right: 8px;
margin-top: 12px;
}
}
}
.ps1{
display: flex;
justify-content: space-between;
.ps2{
width: 270px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ps3{
width: 150px;
display: flex;
justify-content: right;
>div{
margin-left: 12px;
&:hover{
color: #0CBC6D;
cursor: pointer;
}
>img{
float: right;
margin: 3px 0 0 4px
}
}
}
}
.popbot{
.wordprimary{
display: inline;
padding-right: 26px;
}
}
</style> </style>
<template>
<div class="app-container part-container">
商务信息
</div>
</template>
<script>
export default {
name: 'Business',
data() {
return {
}
},
created() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.part-container{
padding: 0;
}
</style>
<template>
<div class="header-container">
<div class="bread-crumb">
<el-breadcrumb separator="/">
<el-breadcrumb-item :to="{ path: '/' }">企业数据</el-breadcrumb-item>
<el-breadcrumb-item><a href="/">查企业</a></el-breadcrumb-item>
<el-breadcrumb-item>中铁一建</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="flex-box part-header">
<img class="header-logo" src="@/assets/images/avatar.png">
中交第二航务工程局有限公司
</div>
</div>
</template>
<script>
export default {
name: 'Header',
data() {
return {
}
},
created() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.bread-crumb{
.el-breadcrumb{
font-size: 12px;
::v-deep .el-breadcrumb__separator{
margin: 0 5px;
}
::v-deep .el-breadcrumb__inner.is-link, .el-breadcrumb__inner a{
color: rgba(35,35,35,0.4);
&:hover{
color: #1890ff;
}
}
::v-deep .el-breadcrumb__item{
&:last-child .el-breadcrumb__inner{
color: #232323;
}
&:nth-last-child(2){
.el-breadcrumb__separator{
color: #232323;
}
}
}
}
}
.part-header{
font-size: 16px;
font-weight: bold;
color: #232323;
background: #FFFFFF;
padding: 14px 16px;
margin-top: 12px;
.header-logo{
width: 28px;
height: 28px;
margin-right: 16px;
}
}
</style>
<template>
<div class="detail-container">
<el-input
placeholder="搜索"
class="side-input"
v-model="searchText">
<i slot="prefix" class="el-input__icon el-icon-search" @click="handleSearch"></i>
</el-input>
<el-menu
default-active="1"
class="detail-menu"
@open="handleOpen">
<template v-for="(item, index) in sideRoute">
<el-submenu :index="index.toString()" v-if="item.children">
<template slot="title">
<span>{{item.title}}</span>
</template>
<el-menu-item :index="index+'-'+idx" v-for="(it, idx) in item.children" :key="idx" @click="handleItem(it)">{{it.title}}</el-menu-item>
</el-submenu>
<el-menu-item :index="index.toString()" @click="handleItem(item)" v-else>{{item.title}}</el-menu-item>
</template>
</el-menu>
</div>
</template>
<script>
export default {
name: 'Sidebar',
data() {
return {
searchText: '',
sideRoute: [
{title: '企业概要', pathName: '', children: [
{title: '企业速览', pathName: ''},
{title: '工商信息', pathName: ''},
{title: '股东信息', pathName: ''},
{title: '高管信息', pathName: ''},
{title: '对外投资', pathName: ''},
{title: '分支机构', pathName: ''}
]},
{title: '财务简析', pathName: 'financial'},
{title: '项目商机', pathName: '', children: [
{title: '土地交易', pathName: ''},
{title: '拟建项目', pathName: ''},
{title: '专项债项目', pathName: ''},
{title: '招标计划', pathName: ''},
{title: '招标公告', pathName: ''},
{title: '标讯Pro', pathName: ''},
{title: '行政许可', pathName: ''}
]},
{title: '业务往来', pathName: '', children: [
{title: '客户', pathName: ''},
{title: '供应商', pathName: ''},
{title: '招标代理', pathName: ''},
{title: '历史发包', pathName: ''},
{title: '开标记录', pathName: ''}
]},
{title: '城投分析', pathName: '', children: [
{title: '区域经济', pathName: ''},
{title: '城投那地', pathName: ''},
{title: '同地区城投', pathName: ''}
]},
{title: '风险信息', pathName: '', children: [
{title: '行政处罚', pathName: ''},
{title: '经营异常', pathName: ''},
{title: '被执行人', pathName: ''},
{title: '失信被执行人', pathName: ''},
{title: '裁判文书', pathName: ''},
{title: '法院公告', pathName: ''},
{title: '开庭公告', pathName: ''},
{title: '信用中国', pathName: ''}
]},
{title: '商务信息', pathName: 'business'},
{title: '招标偏好', pathName: ''},
{title: '合作情况', pathName: ''},
{title: '决策链条', pathName: ''},
{title: '跟进记录', pathName: ''}
]
}
},
created() {
},
methods: {
handleOpen(key, keyPath) {
console.log(key, keyPath)
},
handleItem(item){
this.$emit("currentPath", item)
},
handleSearch(){
console.log('开始搜索了')
}
}
}
</script>
<style lang="scss" scoped>
.detail-container{
width: 144px;
min-height: calc(100vh - 170px);
background: #FFFFFF;
.side-input{
width: 128px;
margin-top: 16px;
margin-left: 8px;
border: 0;
::v-deep .el-input__inner{
height: 32px;
background: #F3F3F4;
border-radius: 20px;
border: 0;
&::placeholder {
color: #3D3D3D;
}
}
.el-icon-search{
color: #0081FF;
cursor: pointer;
}
}
.detail-menu{
margin-top: 20px;
border-right: 0;
::v-deep .el-menu-item, ::v-deep .el-submenu__title{
height: 30px;
line-height: 30px;
font-size: 14px;
color: #232323;
&:hover, &:focus{
background: linear-gradient(91deg, rgba(0,129,255,0.1) 0%, rgba(0,129,255,0) 100%);;
}
.el-submenu__icon-arrow{
color: #232323;
right: 48px;
margin-top: -5px;
}
}
::v-deep .el-submenu .el-menu-item{
font-size: 12px;
color: rgba(35,35,35,0.8);
padding: 0 0 0 27px !important;
min-width: 144px !important;
position: relative;
&:before {
content: "";
position: absolute;
top: 14px;
left: 21px;
width: 2px;
height: 2px;
background: rgba(35,35,35,0.8);
border-radius: 50%;
}
}
}
}
</style>
<template> <template>
<div class="app-container part-container"> <div class="app-container part-container">
<div class="bread-crumb"> <Header />
<el-breadcrumb separator="/"> <div class="flex-box part-main">
<el-breadcrumb-item :to="{ path: '/' }">企业数据</el-breadcrumb-item> <div class="part-left">
<el-breadcrumb-item><a href="/">查企业</a></el-breadcrumb-item> <side-bar @currentPath="showPartPage" />
<el-breadcrumb-item>中铁一建</el-breadcrumb-item> </div>
</el-breadcrumb> <div class="part-right">
</div> <!-- <Financial v-if="currentPath.pathName=='financial'" />-->
<div class="flex-box part-header"> <!-- <Business v-if="currentPath.pathName=='business'" />-->
<img class="header-logo" src="@/assets/images/avatar.png"> </div>
中交第二航务工程局有限公司
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Header from "./component/Header"
import SideBar from "./component/Sidebar"
import Financial from "./financial"
import Business from "./business"
export default { export default {
name: 'PartyA', name: 'PartyA',
components: {
Header,
SideBar,
Financial,
Business
},
data() { data() {
return { return {
currentPath: {
pathName: 'financial' //默认展示页
}
} }
}, },
created() { created() {
}, },
methods: { methods: {
showPartPage(e){
this.currentPath = e
}
} }
} }
</script> </script>
...@@ -32,41 +47,14 @@ export default { ...@@ -32,41 +47,14 @@ export default {
.part-container{ .part-container{
padding: 0; padding: 0;
} }
.bread-crumb{ .part-main{
.el-breadcrumb{
font-size: 12px;
::v-deep .el-breadcrumb__separator{
margin: 0 5px;
}
::v-deep .el-breadcrumb__inner.is-link, .el-breadcrumb__inner a{
color: rgba(35,35,35,0.4);
&:hover{
color: #1890ff;
}
}
::v-deep .el-breadcrumb__item{
&:last-child .el-breadcrumb__inner{
color: #232323;
}
&:nth-last-child(2){
.el-breadcrumb__separator{
color: #232323;
}
}
}
}
}
.part-header{
font-size: 16px;
font-weight: bold;
color: #232323;
background: #FFFFFF;
padding: 14px 16px;
margin-top: 12px; margin-top: 12px;
.header-logo{ align-items: initial;
width: 28px; }
height: 28px; .part-left{
margin-right: 16px; margin-right: 16px;
} }
.part-right{
width: 100%;
} }
</style> </style>
<template> <template>
<div> <div>
<el-card class="box-card noborder"> <el-card class="box-card noborder">
<div class="cardtitles">基本信息</div> <div class="cardtitles">基本信息</div>
...@@ -171,6 +170,7 @@ ...@@ -171,6 +170,7 @@
width: 102px; width: 102px;
} }
.popups .popform .popbot{padding-right: 47px;}
.img.img1{ .img.img1{
margin-right: 8px; margin-right: 8px;
background: url('../../../../../src/assets/images/project/add_2.png')no-repeat center center; background: url('../../../../../src/assets/images/project/add_2.png')no-repeat center center;
......
...@@ -135,15 +135,6 @@ ...@@ -135,15 +135,6 @@
.app-container{ .app-container{
padding: 0; padding: 0;
} }
.miantitle{
color: #232323;
font-size: 12px;
margin: 12px 24px;
>span{
opacity: 0.4;
&:last-child{opacity:0.8}
}
}
.head{ .head{
.titles{ .titles{
line-height: 31px; line-height: 31px;
......
...@@ -54,6 +54,10 @@ public class BusinessAddDto { ...@@ -54,6 +54,10 @@ public class BusinessAddDto {
* 可见范围 * 可见范围
*/ */
private Integer isPrivate; private Integer isPrivate;
/**
* 客户id
*/
private String customerId;
public Double getInvestmentAmount() { public Double getInvestmentAmount() {
return Double.parseDouble(investmentAmount); return Double.parseDouble(investmentAmount);
......
package com.dsk.system.domain.customer.dto;
import lombok.Data;
import java.io.Serializable;
/**
* 客户合作情况筛选对象
* @author lcl
* @create 2023/5/16
*/
@Data
public class CustomerBusinessSearchDto implements Serializable {
/**
* 企业id
*/
private String customerId;
/**
* 企业id
*/
private Long userId;
/**
* 项目阶段
*/
private String projectStage;
/**
* 项目状态
*/
private Integer status;
}
package com.dsk.system.domain.customer.vo;
import lombok.Data;
import java.io.Serializable;
/**
* 客户合作情况列表对象
*
* @author lcl
* @create 2023/5/22
*/
@Data
public class CustomerBusinessListVo implements Serializable {
/**
* 项目id
*/
private Integer id;
/**
* 项目名称
*/
private String projcetName;
/**
* 项目阶段
*/
private String projectStage;
/**
* 投资金额
*/
private String investmentAmount;
/**
* 状态
*/
private Integer status;
}
...@@ -37,7 +37,11 @@ public class CustomerListVo { ...@@ -37,7 +37,11 @@ public class CustomerListVo {
/** /**
* 注册资本(字符串) * 注册资本(字符串)
*/ */
private String registerCapitalStr; private String registerCapital;
/**
* 社会统一信用代码
*/
private String creditCode;
/** /**
* 企业性质 * 企业性质
*/ */
......
package com.dsk.system.domain.vo; package com.dsk.system.domain.vo;
import com.dsk.common.core.domain.entity.BusinessRelateCompany;
import lombok.Data; import lombok.Data;
import java.util.List;
/** /**
* @author lxl * @author lxl
* @Description: * @Description:
...@@ -10,5 +13,90 @@ import lombok.Data; ...@@ -10,5 +13,90 @@ import lombok.Data;
@Data @Data
public class BusinessBrowseVo { public class BusinessBrowseVo {
/**
* 项目名称
*/
private String projectName;
/**
* 项目名称
*/
private Integer isPrivate;
/**
* 项目类型
*/
private String projectType;
/**
* 项目类别
*/
private String projectCategory;
/**
* 投资估算
*/
private Double investmentAmount;
/**
* 省
*/
private String provinceName;
/**
* 市
*/
private String cityName;
/**
* 区
*/
private String districtName;
/**
* 商务团队
*/
private String team;
/**
* 项目阶段
*/
private String projectStage;
/**
* 项目级别
*/
private String projectLevel;
/**
* 项目标签
*/
private List<String> labelList;
/**
* 关键企业
*/
private List<BusinessRelateCompany> relateCompany;
/**
* 联系人统计
*/
private Integer contactsCount;
/**
* 跟进记录统计
*/
private Integer followRecordCount;
/**
* 工作待办统计
*/
private Integer backlogCount;
/**
* 相关企业统计
*/
private Integer relateCompanyCount;
} }
...@@ -21,12 +21,20 @@ public interface BusinessFollowRecordMapper ...@@ -21,12 +21,20 @@ public interface BusinessFollowRecordMapper
public BusinessFollowRecord selectBusinessFollowRecordById(Long id); public BusinessFollowRecord selectBusinessFollowRecordById(Long id);
/** /**
* 查询项目跟进记录列表 * 分页查询项目跟进记录列表
* *
* @param businessFollowRecord 项目跟进记录 * @param businessFollowRecord 项目跟进记录
* @return 项目跟进记录集合 * @return 项目跟进记录集合
*/ */
public List<BusinessFollowRecord> selectBusinessFollowRecordList(BusinessFollowRecord businessFollowRecord); public List<BusinessFollowRecord> businessFollowRecordPaging(BusinessFollowRecord businessFollowRecord);
/**
* 根据项目id查询项目跟进记录
*
* @param businessId 项目id
* @return 项目跟进记录集合
*/
public List<BusinessFollowRecord> selectBusinessFollowRecordList(Integer businessId);
/** /**
* 新增项目跟进记录 * 新增项目跟进记录
......
...@@ -2,10 +2,13 @@ package com.dsk.system.mapper; ...@@ -2,10 +2,13 @@ package com.dsk.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.common.core.domain.entity.BusinessInfo; import com.dsk.common.core.domain.entity.BusinessInfo;
import com.dsk.common.dtos.BusinessInfoDto;
import com.dsk.system.domain.BusinessAddDto;
import com.dsk.system.domain.BusinessListDto; import com.dsk.system.domain.BusinessListDto;
import com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto;
import com.dsk.system.domain.customer.vo.CustomerBusinessListVo;
import com.dsk.system.domain.vo.BusinessBrowseVo;
import com.dsk.system.domain.vo.BusinessListVo; import com.dsk.system.domain.vo.BusinessListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
...@@ -15,7 +18,8 @@ import java.util.List; ...@@ -15,7 +18,8 @@ import java.util.List;
* @author lxl * @author lxl
* @date 2023-05-17 * @date 2023-05-17
*/ */
public interface BusinessInfoMapper @Mapper
public interface BusinessInfoMapper extends BaseMapper<BusinessInfo>
{ {
/** /**
* 查询项目详情 * 查询项目详情
...@@ -23,13 +27,21 @@ public interface BusinessInfoMapper ...@@ -23,13 +27,21 @@ public interface BusinessInfoMapper
* @param id 项目详情主键 * @param id 项目详情主键
* @return 项目详情 * @return 项目详情
*/ */
public BusinessInfo selectBusinessInfoById(Long id); public BusinessInfo selectBusinessInfoById(Integer id);
/**
* 查询项目建设内容
*
* @param id 项目详情主键
* @return
*/
BusinessInfo getConstruction(Integer id);
/** /**
* 查询所有项目名称(支持模糊查询) * 查询所有项目名称(支持模糊查询)
* @return * @return
*/ */
List<String> queryprojectName(BusinessListDto dto); List<String> selectProjectName(BusinessListDto dto);
/** /**
* 查询项目详情列表 * 查询项目详情列表
...@@ -49,7 +61,7 @@ public interface BusinessInfoMapper ...@@ -49,7 +61,7 @@ public interface BusinessInfoMapper
/** /**
* 修改项目详情 * 修改项目详情
* *
* @param businessInfo 项目详情 * @param businessInfo 项目详情
* @return 结果 * @return 结果
*/ */
...@@ -57,7 +69,7 @@ public interface BusinessInfoMapper ...@@ -57,7 +69,7 @@ public interface BusinessInfoMapper
/** /**
* 删除项目详情 * 删除项目详情
* *
* @param id 项目详情主键 * @param id 项目详情主键
* @return 结果 * @return 结果
*/ */
...@@ -65,9 +77,23 @@ public interface BusinessInfoMapper ...@@ -65,9 +77,23 @@ public interface BusinessInfoMapper
/** /**
* 批量删除项目详情 * 批量删除项目详情
* *
* @param ids 需要删除的数据主键集合 * @param ids 需要删除的数据主键集合
* @return 结果 * @return 结果
*/ */
public int deleteBusinessInfoByIds(Long[] ids); public int deleteBusinessInfoByIds(Long[] ids);
/**
* 根据项目统计
* @param business
* @return
*/
BusinessBrowseVo selectTotal(Integer business);
int selectCountByStatusAndCustomerId(@Param("status") Integer status,@Param("customerId") String customerId);
List<CustomerBusinessListVo> selectCustomerBusinessList(CustomerBusinessSearchDto dto);
} }
...@@ -21,5 +21,9 @@ public interface CustomerMapper extends BaseMapper<Customer> { ...@@ -21,5 +21,9 @@ public interface CustomerMapper extends BaseMapper<Customer> {
List<CustomerListVo> selectList(@Param("dto") CustomerSearchDto dto); List<CustomerListVo> selectList(@Param("dto") CustomerSearchDto dto);
List<Customer> selectUserList(Long userId);
Customer selectByCompanyIdAndUserId(@Param("companyId")Integer companyId,@Param("userId")Long userId);
} }
...@@ -21,12 +21,20 @@ public interface IBusinessFollowRecordService ...@@ -21,12 +21,20 @@ public interface IBusinessFollowRecordService
public BusinessFollowRecord selectBusinessFollowRecordById(Long id); public BusinessFollowRecord selectBusinessFollowRecordById(Long id);
/** /**
* 查询项目跟进记录列表 * 根据项目id查询项目跟进记录
* *
* @param businessId 项目跟进记录
* @return 项目跟进记录集合
*/
public List<BusinessFollowRecord> selectBusinessFollowRecordList(Integer businessId);
/**
* 分页查询项目跟进记录列表
*
* @param businessFollowRecord 项目跟进记录 * @param businessFollowRecord 项目跟进记录
* @return 项目跟进记录集合 * @return 项目跟进记录集合
*/ */
public List<BusinessFollowRecord> selectBusinessFollowRecordList(BusinessFollowRecord businessFollowRecord); public List<BusinessFollowRecord> businessFollowRecordPaging(BusinessFollowRecord businessFollowRecord);
/** /**
* 新增项目跟进记录 * 新增项目跟进记录
......
...@@ -2,28 +2,38 @@ package com.dsk.system.service; ...@@ -2,28 +2,38 @@ package com.dsk.system.service;
import com.dsk.common.core.domain.AjaxResult; import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.core.domain.entity.BusinessInfo; import com.dsk.common.core.domain.entity.BusinessInfo;
import com.dsk.common.dtos.BusinessInfoDto;
import com.dsk.system.domain.BusinessAddDto; import com.dsk.system.domain.BusinessAddDto;
import com.dsk.system.domain.BusinessListDto; import com.dsk.system.domain.BusinessListDto;
import com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto;
import com.dsk.system.domain.customer.vo.CustomerBusinessListVo;
import com.dsk.system.domain.vo.BusinessBrowseVo;
import com.dsk.system.domain.vo.BusinessListVo; import com.dsk.system.domain.vo.BusinessListVo;
import java.util.List; import java.util.List;
/** /**
* 项目详情Service接口 * 项目详情Service接口
* *
* @author ruoyi * @author ruoyi
* @date 2023-05-17 * @date 2023-05-17
*/ */
public interface IBusinessInfoService public interface IBusinessInfoService
{ {
/** /**
* 查询项目详情 * 查询项目详情
* *
* @param id 项目详情主键 * @param id 项目详情主键
* @return 项目详情 * @return 项目详情
*/ */
public BusinessInfo selectBusinessInfoById(Long id); public BusinessInfo selectBusinessInfoById(Integer id);
/**
* 查询项目建设内容
*
* @param id 项目详情主键
* @return
*/
BusinessInfo getConstruction(Integer id);
/** /**
* 查询项目详情列表 * 查询项目详情列表
...@@ -33,11 +43,18 @@ public interface IBusinessInfoService ...@@ -33,11 +43,18 @@ public interface IBusinessInfoService
*/ */
public List<BusinessListVo> selectBusinessInfoList(BusinessListDto dto); public List<BusinessListVo> selectBusinessInfoList(BusinessListDto dto);
/**
* 查询项目速览
* @param businessId
* @return
*/
BusinessBrowseVo browse(Integer businessId);
/** /**
* 查询所有项目名称(支持模糊查询) * 查询所有项目名称(支持模糊查询)
* @return * @return
*/ */
List<String> queryprojectName(BusinessListDto dto); List<String> selectProjectName(BusinessListDto dto);
/** /**
* 新增项目详情 * 新增项目详情
...@@ -70,4 +87,9 @@ public interface IBusinessInfoService ...@@ -70,4 +87,9 @@ public interface IBusinessInfoService
* @return 结果 * @return 结果
*/ */
public int deleteBusinessInfoById(Long id); public int deleteBusinessInfoById(Long id);
int selectCountByStatusAndCustomerId(Integer status,String customerId);
List<CustomerBusinessListVo> selectCustomerBusinessList(CustomerBusinessSearchDto dto);
} }
package com.dsk.system.service; package com.dsk.system.service;
import com.dsk.system.domain.customer.Customer; import com.dsk.system.domain.customer.Customer;
import com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto;
import com.dsk.system.domain.customer.dto.CustomerSearchDto; import com.dsk.system.domain.customer.dto.CustomerSearchDto;
import com.dsk.system.domain.customer.vo.CustomerBusinessListVo;
import com.dsk.system.domain.customer.vo.CustomerListVo; import com.dsk.system.domain.customer.vo.CustomerListVo;
import com.dsk.system.domain.customer.vo.CustomerVo; import com.dsk.system.domain.customer.vo.CustomerVo;
...@@ -25,4 +27,6 @@ public interface ICustomerService { ...@@ -25,4 +27,6 @@ public interface ICustomerService {
List<Customer> selectUserList(); List<Customer> selectUserList();
List<CustomerBusinessListVo> selectBusinessList(CustomerBusinessSearchDto dto);
} }
...@@ -6,6 +6,7 @@ import com.dsk.system.mapper.BusinessBacklogMapper; ...@@ -6,6 +6,7 @@ import com.dsk.system.mapper.BusinessBacklogMapper;
import com.dsk.system.service.IBusinessBacklogService; import com.dsk.system.service.IBusinessBacklogService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
...@@ -52,6 +53,7 @@ public class BusinessBacklogServiceImpl implements IBusinessBacklogService ...@@ -52,6 +53,7 @@ public class BusinessBacklogServiceImpl implements IBusinessBacklogService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional
public int insertBusinessBacklog(BusinessBacklog businessBacklog) public int insertBusinessBacklog(BusinessBacklog businessBacklog)
{ {
businessBacklog.setCreateTime(DateUtils.getNowDate()); businessBacklog.setCreateTime(DateUtils.getNowDate());
...@@ -67,6 +69,7 @@ public class BusinessBacklogServiceImpl implements IBusinessBacklogService ...@@ -67,6 +69,7 @@ public class BusinessBacklogServiceImpl implements IBusinessBacklogService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional
public int updateBusinessBacklog(BusinessBacklog businessBacklog) public int updateBusinessBacklog(BusinessBacklog businessBacklog)
{ {
businessBacklog.setUpdateTime(DateUtils.getNowDate()); businessBacklog.setUpdateTime(DateUtils.getNowDate());
......
...@@ -3,11 +3,14 @@ package com.dsk.system.service.impl; ...@@ -3,11 +3,14 @@ package com.dsk.system.service.impl;
import java.util.List; import java.util.List;
import com.dsk.common.core.domain.entity.BusinessContacts; import com.dsk.common.core.domain.entity.BusinessContacts;
import com.dsk.common.exception.base.BaseException;
import com.dsk.common.utils.CheckUtils;
import com.dsk.common.utils.DateUtils; import com.dsk.common.utils.DateUtils;
import com.dsk.system.mapper.BusinessContactsMapper; import com.dsk.system.mapper.BusinessContactsMapper;
import com.dsk.system.service.IBusinessContactsService; import com.dsk.system.service.IBusinessContactsService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/** /**
* 项目联系人Service业务层处理 * 项目联系人Service业务层处理
...@@ -52,8 +55,10 @@ public class BusinessContactsServiceImpl implements IBusinessContactsService ...@@ -52,8 +55,10 @@ public class BusinessContactsServiceImpl implements IBusinessContactsService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional
public int insertBusinessContacts(BusinessContacts businessContacts) public int insertBusinessContacts(BusinessContacts businessContacts)
{ {
if(!CheckUtils.isPhone(businessContacts.getPhone())) throw new BaseException("500","请输入正确的手机号码");
return businessContactsMapper.insertBusinessContacts(businessContacts); return businessContactsMapper.insertBusinessContacts(businessContacts);
} }
...@@ -64,8 +69,10 @@ public class BusinessContactsServiceImpl implements IBusinessContactsService ...@@ -64,8 +69,10 @@ public class BusinessContactsServiceImpl implements IBusinessContactsService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional
public int updateBusinessContacts(BusinessContacts businessContacts) public int updateBusinessContacts(BusinessContacts businessContacts)
{ {
if(!CheckUtils.isPhone(businessContacts.getPhone())) throw new BaseException("500","请输入正确的手机号码");
businessContacts.setUpdateTime(DateUtils.getNowDate()); businessContacts.setUpdateTime(DateUtils.getNowDate());
return businessContactsMapper.updateBusinessContacts(businessContacts); return businessContactsMapper.updateBusinessContacts(businessContacts);
} }
......
...@@ -8,6 +8,7 @@ import com.dsk.system.mapper.BusinessFollowRecordMapper; ...@@ -8,6 +8,7 @@ import com.dsk.system.mapper.BusinessFollowRecordMapper;
import com.dsk.system.service.IBusinessFollowRecordService; import com.dsk.system.service.IBusinessFollowRecordService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/** /**
* 项目跟进记录Service业务层处理 * 项目跟进记录Service业务层处理
...@@ -33,16 +34,15 @@ public class BusinessFollowRecordServiceImpl implements IBusinessFollowRecordSer ...@@ -33,16 +34,15 @@ public class BusinessFollowRecordServiceImpl implements IBusinessFollowRecordSer
return businessFollowRecordMapper.selectBusinessFollowRecordById(id); return businessFollowRecordMapper.selectBusinessFollowRecordById(id);
} }
/**
* 查询项目跟进记录列表
*
* @param businessFollowRecord 项目跟进记录
* @return 项目跟进记录
*/
@Override @Override
public List<BusinessFollowRecord> selectBusinessFollowRecordList(BusinessFollowRecord businessFollowRecord) public List<BusinessFollowRecord> selectBusinessFollowRecordList(Integer businessId)
{ {
return businessFollowRecordMapper.selectBusinessFollowRecordList(businessFollowRecord); return businessFollowRecordMapper.selectBusinessFollowRecordList(businessId);
}
@Override
public List<BusinessFollowRecord> businessFollowRecordPaging(BusinessFollowRecord businessFollowRecord) {
return businessFollowRecordMapper.businessFollowRecordPaging(businessFollowRecord);
} }
/** /**
...@@ -52,6 +52,7 @@ public class BusinessFollowRecordServiceImpl implements IBusinessFollowRecordSer ...@@ -52,6 +52,7 @@ public class BusinessFollowRecordServiceImpl implements IBusinessFollowRecordSer
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional
public int insertBusinessFollowRecord(BusinessFollowRecord businessFollowRecord) public int insertBusinessFollowRecord(BusinessFollowRecord businessFollowRecord)
{ {
return businessFollowRecordMapper.insertBusinessFollowRecord(businessFollowRecord); return businessFollowRecordMapper.insertBusinessFollowRecord(businessFollowRecord);
......
...@@ -2,10 +2,12 @@ package com.dsk.system.service.impl; ...@@ -2,10 +2,12 @@ package com.dsk.system.service.impl;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.dsk.common.core.domain.AjaxResult; import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.core.domain.entity.BusinessInfo; import com.dsk.common.core.domain.entity.BusinessInfo;
import com.dsk.common.core.domain.entity.BusinessLabel;
import com.dsk.common.core.domain.entity.BusinessRelateCompany; import com.dsk.common.core.domain.entity.BusinessRelateCompany;
import com.dsk.common.core.domain.entity.BusinessUser; import com.dsk.common.core.domain.entity.BusinessUser;
import com.dsk.common.dtos.BusinessInfoDto; import com.dsk.common.dtos.BusinessInfoDto;
...@@ -13,8 +15,12 @@ import com.dsk.common.utils.DateUtils; ...@@ -13,8 +15,12 @@ import com.dsk.common.utils.DateUtils;
import com.dsk.common.utils.SecurityUtils; import com.dsk.common.utils.SecurityUtils;
import com.dsk.system.domain.BusinessAddDto; import com.dsk.system.domain.BusinessAddDto;
import com.dsk.system.domain.BusinessListDto; import com.dsk.system.domain.BusinessListDto;
import com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto;
import com.dsk.system.domain.customer.vo.CustomerBusinessListVo;
import com.dsk.system.domain.vo.BusinessBrowseVo;
import com.dsk.system.domain.vo.BusinessListVo; import com.dsk.system.domain.vo.BusinessListVo;
import com.dsk.system.mapper.BusinessInfoMapper; import com.dsk.system.mapper.BusinessInfoMapper;
import com.dsk.system.mapper.BusinessLabelMapper;
import com.dsk.system.mapper.BusinessRelateCompanyMapper; import com.dsk.system.mapper.BusinessRelateCompanyMapper;
import com.dsk.system.mapper.BusinessUserMapper; import com.dsk.system.mapper.BusinessUserMapper;
import com.dsk.system.service.IBusinessInfoService; import com.dsk.system.service.IBusinessInfoService;
...@@ -31,14 +37,15 @@ import javax.annotation.Resource; ...@@ -31,14 +37,15 @@ import javax.annotation.Resource;
* @date 2023-05-17 * @date 2023-05-17
*/ */
@Service @Service
public class BusinessInfoServiceImpl implements IBusinessInfoService public class BusinessInfoServiceImpl implements IBusinessInfoService {
{
@Resource @Resource
private BusinessInfoMapper businessInfoMapper; private BusinessInfoMapper businessInfoMapper;
@Resource @Resource
private BusinessUserMapper businessUserMapper; private BusinessUserMapper businessUserMapper;
@Resource @Resource
private BusinessRelateCompanyMapper businessRelateCompanyMapper; private BusinessRelateCompanyMapper businessRelateCompanyMapper;
@Resource
private BusinessLabelMapper businessLabelMapper;
/** /**
* 查询项目详情 * 查询项目详情
...@@ -47,11 +54,15 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService ...@@ -47,11 +54,15 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService
* @return 项目详情 * @return 项目详情
*/ */
@Override @Override
public BusinessInfo selectBusinessInfoById(Long id) public BusinessInfo selectBusinessInfoById(Integer id) {
{
return businessInfoMapper.selectBusinessInfoById(id); return businessInfoMapper.selectBusinessInfoById(id);
} }
@Override
public BusinessInfo getConstruction(Integer id) {
return businessInfoMapper.getConstruction(id);
}
/** /**
* 查询项目详情列表 * 查询项目详情列表
* *
...@@ -59,14 +70,31 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService ...@@ -59,14 +70,31 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService
* @return 项目详情 * @return 项目详情
*/ */
@Override @Override
public List<BusinessListVo> selectBusinessInfoList(BusinessListDto dto) public List<BusinessListVo> selectBusinessInfoList(BusinessListDto dto) {
{
return businessInfoMapper.selectBusinessInfoList(dto); return businessInfoMapper.selectBusinessInfoList(dto);
} }
@Override @Override
public List<String> queryprojectName(BusinessListDto dto) { public BusinessBrowseVo browse(Integer businessId) {
return businessInfoMapper.queryprojectName(dto); BusinessBrowseVo businessBrowseVo = new BusinessBrowseVo();
//查询项目基本信息
BusinessInfo businessInfo = businessInfoMapper.selectBusinessInfoById(businessId);
BeanUtil.copyProperties(businessInfo,businessBrowseVo);
//查询项目标签
businessBrowseVo.setLabelList(businessLabelMapper.selectBusinessLabelList(new BusinessLabel(businessId)).stream().map(p -> p.getLabel()).collect(Collectors.toList()));
//查询关键企业
businessBrowseVo.setRelateCompany(businessRelateCompanyMapper.selectBusinessRelateCompanyList(new BusinessRelateCompany(businessId)));
BusinessBrowseVo total = businessInfoMapper.selectTotal(businessId);
businessBrowseVo.setBacklogCount(total.getBacklogCount());
businessBrowseVo.setContactsCount(total.getContactsCount());
businessBrowseVo.setFollowRecordCount(total.getFollowRecordCount());
businessBrowseVo.setRelateCompanyCount(total.getRelateCompanyCount());
return businessBrowseVo;
}
@Override
public List<String> selectProjectName(BusinessListDto dto) {
return businessInfoMapper.selectProjectName(dto);
} }
/** /**
...@@ -77,13 +105,12 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService ...@@ -77,13 +105,12 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService
*/ */
@Override @Override
@Transactional @Transactional
public AjaxResult insertBusinessInfo(BusinessAddDto dto) public AjaxResult insertBusinessInfo(BusinessAddDto dto) {
{
//新增项目主信息 //新增项目主信息
BusinessInfo businessInfo = new BusinessInfo(); BusinessInfo businessInfo = new BusinessInfo();
BeanUtil.copyProperties(dto,businessInfo); BeanUtil.copyProperties(dto, businessInfo);
int addBusiness = businessInfoMapper.insertBusinessInfo(businessInfo); int addBusiness = businessInfoMapper.insertBusinessInfo(businessInfo);
if(addBusiness > 0){ if (addBusiness > 0) {
//获取登陆用户的部门id //获取登陆用户的部门id
// Long deptId = SecurityUtils.getLoginUser().getDeptId(); // Long deptId = SecurityUtils.getLoginUser().getDeptId();
Long deptId = 100l; Long deptId = 100l;
...@@ -91,7 +118,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService ...@@ -91,7 +118,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService
int addbusinessUser = businessUserMapper.insertBusinessUser(new BusinessUser(businessInfo.getId(), deptId.intValue(), dto.getUserId(), 1)); int addbusinessUser = businessUserMapper.insertBusinessUser(new BusinessUser(businessInfo.getId(), deptId.intValue(), dto.getUserId(), 1));
//新增项目-关联企业信息 //新增项目-关联企业信息
int addRelateCompany = businessRelateCompanyMapper.insertBusinessRelateCompany(new BusinessRelateCompany(businessInfo.getId(), dto.getCompanyId(), dto.getOwnerCompany(), "业主")); int addRelateCompany = businessRelateCompanyMapper.insertBusinessRelateCompany(new BusinessRelateCompany(businessInfo.getId(), dto.getCompanyId(), dto.getOwnerCompany(), "业主"));
return addbusinessUser>0 && addRelateCompany>0 ? AjaxResult.success() : AjaxResult.error(); return addbusinessUser > 0 && addRelateCompany > 0 ? AjaxResult.success() : AjaxResult.error();
} }
return AjaxResult.error(); return AjaxResult.error();
...@@ -104,6 +131,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService ...@@ -104,6 +131,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional
public int updateBusinessInfo(BusinessInfo businessInfo) public int updateBusinessInfo(BusinessInfo businessInfo)
{ {
businessInfo.setUpdateTime(DateUtils.getNowDate()); businessInfo.setUpdateTime(DateUtils.getNowDate());
...@@ -117,8 +145,8 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService ...@@ -117,8 +145,8 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteBusinessInfoByIds(Long[] ids) @Transactional
{ public int deleteBusinessInfoByIds(Long[] ids) {
return businessInfoMapper.deleteBusinessInfoByIds(ids); return businessInfoMapper.deleteBusinessInfoByIds(ids);
} }
...@@ -129,8 +157,24 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService ...@@ -129,8 +157,24 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteBusinessInfoById(Long id) public int deleteBusinessInfoById(Long id) {
{
return businessInfoMapper.deleteBusinessInfoById(id); return businessInfoMapper.deleteBusinessInfoById(id);
} }
/**
* 查询项目数量
*
* @param status 项目状态
* @param customerId 客户id
* @return 项目数量
*/
@Override
public int selectCountByStatusAndCustomerId(Integer status, String customerId) {
return businessInfoMapper.selectCountByStatusAndCustomerId(status, customerId);
}
@Override
public List<CustomerBusinessListVo> selectCustomerBusinessList(CustomerBusinessSearchDto dto) {
return businessInfoMapper.selectCustomerBusinessList(dto);
}
} }
...@@ -9,6 +9,7 @@ import com.dsk.system.mapper.BusinessLabelMapper; ...@@ -9,6 +9,7 @@ import com.dsk.system.mapper.BusinessLabelMapper;
import com.dsk.system.service.IBusinessLabelService; import com.dsk.system.service.IBusinessLabelService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/** /**
* 项目标签Service业务层处理 * 项目标签Service业务层处理
...@@ -53,6 +54,7 @@ public class BusinessLabelServiceImpl implements IBusinessLabelService ...@@ -53,6 +54,7 @@ public class BusinessLabelServiceImpl implements IBusinessLabelService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional
public int insertBusinessLabel(BusinessLabel businessLabel) public int insertBusinessLabel(BusinessLabel businessLabel)
{ {
businessLabel.setCreateTime(DateUtils.getNowDate()); businessLabel.setCreateTime(DateUtils.getNowDate());
...@@ -91,6 +93,7 @@ public class BusinessLabelServiceImpl implements IBusinessLabelService ...@@ -91,6 +93,7 @@ public class BusinessLabelServiceImpl implements IBusinessLabelService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional
public int deleteBusinessLabelById(BusinessIdDto dto) public int deleteBusinessLabelById(BusinessIdDto dto)
{ {
return businessLabelMapper.deleteBusinessLabelById(dto); return businessLabelMapper.deleteBusinessLabelById(dto);
......
...@@ -4,12 +4,16 @@ import java.util.List; ...@@ -4,12 +4,16 @@ import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.core.domain.entity.BusinessRelateCompany; import com.dsk.common.core.domain.entity.BusinessRelateCompany;
import com.dsk.common.exception.base.BaseException;
import com.dsk.common.utils.CheckUtils;
import com.dsk.common.utils.DateUtils; import com.dsk.common.utils.DateUtils;
import com.dsk.system.domain.BusinessIdDto; import com.dsk.system.domain.BusinessIdDto;
import com.dsk.system.mapper.BusinessRelateCompanyMapper; import com.dsk.system.mapper.BusinessRelateCompanyMapper;
import com.dsk.system.service.IBusinessRelateCompanyService; import com.dsk.system.service.IBusinessRelateCompanyService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
...@@ -56,8 +60,10 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS ...@@ -56,8 +60,10 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional
public int insertBusinessRelateCompany(BusinessRelateCompany businessRelateCompany) public int insertBusinessRelateCompany(BusinessRelateCompany businessRelateCompany)
{ {
if(!CheckUtils.isPhone(businessRelateCompany.getPhone())) throw new BaseException("500","请输入正确的手机号码");
businessRelateCompany.setCreateTime(DateUtils.getNowDate()); businessRelateCompany.setCreateTime(DateUtils.getNowDate());
return businessRelateCompanyMapper.insertBusinessRelateCompany(businessRelateCompany); return businessRelateCompanyMapper.insertBusinessRelateCompany(businessRelateCompany);
} }
...@@ -69,8 +75,10 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS ...@@ -69,8 +75,10 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional
public int updateBusinessRelateCompany(BusinessRelateCompany businessRelateCompany) public int updateBusinessRelateCompany(BusinessRelateCompany businessRelateCompany)
{ {
if(!CheckUtils.isPhone(businessRelateCompany.getPhone())) throw new BaseException("500","请输入正确的手机号码");
businessRelateCompany.setUpdateTime(DateUtils.getNowDate()); businessRelateCompany.setUpdateTime(DateUtils.getNowDate());
return businessRelateCompanyMapper.updateBusinessRelateCompany(businessRelateCompany); return businessRelateCompanyMapper.updateBusinessRelateCompany(businessRelateCompany);
} }
......
...@@ -4,15 +4,17 @@ import cn.hutool.core.bean.BeanException; ...@@ -4,15 +4,17 @@ import cn.hutool.core.bean.BeanException;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.dsk.common.exception.ServiceException; import com.dsk.common.exception.ServiceException;
import com.dsk.common.utils.DskOpenApiUtil;
import com.dsk.common.utils.SecurityUtils; import com.dsk.common.utils.SecurityUtils;
import com.dsk.system.domain.customer.Customer; import com.dsk.system.domain.customer.Customer;
import com.dsk.system.domain.customer.CustomerUser; import com.dsk.system.domain.customer.CustomerUser;
import com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto;
import com.dsk.system.domain.customer.dto.CustomerSearchDto; import com.dsk.system.domain.customer.dto.CustomerSearchDto;
import com.dsk.system.domain.customer.vo.CustomerBusinessListVo;
import com.dsk.system.domain.customer.vo.CustomerListVo; import com.dsk.system.domain.customer.vo.CustomerListVo;
import com.dsk.system.domain.customer.vo.CustomerVo; import com.dsk.system.domain.customer.vo.CustomerVo;
import com.dsk.system.mapper.CustomerMapper; import com.dsk.system.mapper.CustomerMapper;
import com.dsk.system.mapper.CustomerUserMapper; import com.dsk.system.mapper.CustomerUserMapper;
import com.dsk.system.service.IBusinessInfoService;
import com.dsk.system.service.ICustomerService; import com.dsk.system.service.ICustomerService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -35,23 +37,21 @@ public class CustomerServiceImpl implements ICustomerService { ...@@ -35,23 +37,21 @@ public class CustomerServiceImpl implements ICustomerService {
private CustomerMapper baseMapper; private CustomerMapper baseMapper;
@Resource @Resource
private CustomerUserMapper customerUserMapper; private CustomerUserMapper customerUserMapper;
@Autowired @Autowired
private DskOpenApiUtil dskOpenApiUtil; private IBusinessInfoService businessInfoService;
@Override @Override
public List<CustomerListVo> selectList(CustomerSearchDto dto) { public List<CustomerListVo> selectList(CustomerSearchDto dto) {
dto.setUserId(SecurityUtils.getUserId()); dto.setUserId(SecurityUtils.getUserId());
List<CustomerListVo> vos = baseMapper.selectList(dto); List<CustomerListVo> vos = baseMapper.selectList(dto);
for (CustomerListVo vo : vos) { vos.parallelStream().forEach(vo -> {
//TODO 客户项目相关统计
//合作项目 //合作项目
vo.setCooperationProject(1); vo.setCooperationProject(businessInfoService.selectCountByStatusAndCustomerId(2, vo.getCustomerId()));
//跟进项目 //跟进项目
vo.setFollowProject(1); vo.setFollowProject(businessInfoService.selectCountByStatusAndCustomerId(1, vo.getCustomerId()));
//储备项目 //储备项目
vo.setReserveProject(1); vo.setReserveProject(businessInfoService.selectCountByStatusAndCustomerId(0, vo.getCustomerId()));
} });
return vos; return vos;
} }
...@@ -69,9 +69,15 @@ public class CustomerServiceImpl implements ICustomerService { ...@@ -69,9 +69,15 @@ public class CustomerServiceImpl implements ICustomerService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean add(Customer customer) { public boolean add(Customer customer) {
if (ObjectUtils.isEmpty(customer.getCompanyName())) throw new BeanException("企业名称不能为空"); if (ObjectUtils.isEmpty(customer.getCompanyName())) throw new BeanException("企业名称不能为空");
if (ObjectUtils.isEmpty(customer.getCompanyId())) throw new BeanException("企业id不能为空");
final Long userId = SecurityUtils.getUserId(); final Long userId = SecurityUtils.getUserId();
customer.setCreateId(userId); customer.setCreateId(userId);
customer.setUpdateId(userId); customer.setUpdateId(userId);
//查重
Customer verifyCustomer = baseMapper.selectByCompanyIdAndUserId(customer.getCompanyId(), userId);
if (!ObjectUtils.isEmpty(verifyCustomer)) {
throw new ServiceException("当前客户信息已存在,请勿重复添加!");
}
int i = baseMapper.insert(customer); int i = baseMapper.insert(customer);
if (i == 0) throw new ServiceException("客户信息添加错误!"); if (i == 0) throw new ServiceException("客户信息添加错误!");
...@@ -93,6 +99,13 @@ public class CustomerServiceImpl implements ICustomerService { ...@@ -93,6 +99,13 @@ public class CustomerServiceImpl implements ICustomerService {
@Override @Override
public List<Customer> selectUserList() { public List<Customer> selectUserList() {
return baseMapper.selectList(Wrappers.<Customer>lambdaQuery()); return baseMapper.selectUserList(SecurityUtils.getUserId());
}
@Override
public List<CustomerBusinessListVo> selectBusinessList(CustomerBusinessSearchDto dto) {
if (ObjectUtils.isEmpty(dto.getCustomerId())) throw new BeanException("客户id不能为空");
dto.setUserId(SecurityUtils.getUserId());
return businessInfoService.selectCustomerBusinessList(dto);
} }
} }
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
<if test="accendant != null and accendant != ''">and accendant = #{accendant}</if> <if test="accendant != null and accendant != ''">and accendant = #{accendant}</if>
<if test="creatTime != null ">and creat_time = #{creatTime}</if> <if test="creatTime != null ">and creat_time = #{creatTime}</if>
</where> </where>
order by creat_time desc
</select> </select>
<select id="selectBusinessContactsById" parameterType="Long" resultMap="BusinessContactsResult"> <select id="selectBusinessContactsById" parameterType="Long" resultMap="BusinessContactsResult">
......
...@@ -33,10 +33,20 @@ ...@@ -33,10 +33,20 @@
from business_follow_record from business_follow_record
</sql> </sql>
<select id="selectBusinessFollowRecordList" parameterType="com.dsk.common.core.domain.entity.BusinessFollowRecord"> <select id="selectBusinessFollowRecordList" resultType="com.dsk.common.core.domain.entity.BusinessFollowRecord">
select f.*,u.nick_name as nickName select f.*,u.nick_name as nickName
from business_follow_record f from business_follow_record f
left join sys_user u on f.user_id = u.user_id left join sys_user u on f.user_id = u.user_id
where f.business_id = #{businessId}
ORDER BY create_time DESC
</select>
<select id="selectBusinessFollowRecordById" parameterType="Long" resultMap="BusinessFollowRecordResult">
<include refid="selectBusinessFollowRecordVo"/>
where id = #{id}
</select>
<select id="businessFollowRecordPaging" resultType="com.dsk.common.core.domain.entity.BusinessFollowRecord">
<include refid="selectBusinessFollowRecordVo"></include>
<where> <where>
<if test="businessId != null ">and f.business_id = #{businessId}</if> <if test="businessId != null ">and f.business_id = #{businessId}</if>
<if test="userId != null ">and f.user_id = #{userId}</if> <if test="userId != null ">and f.user_id = #{userId}</if>
...@@ -51,11 +61,6 @@ ...@@ -51,11 +61,6 @@
ORDER BY create_time DESC ORDER BY create_time DESC
</select> </select>
<select id="selectBusinessFollowRecordById" parameterType="Long" resultMap="BusinessFollowRecordResult">
<include refid="selectBusinessFollowRecordVo"/>
where id = #{id}
</select>
<insert id="insertBusinessFollowRecord" parameterType="com.dsk.common.core.domain.entity.BusinessFollowRecord" useGeneratedKeys="true" <insert id="insertBusinessFollowRecord" parameterType="com.dsk.common.core.domain.entity.BusinessFollowRecord" useGeneratedKeys="true"
keyProperty="id"> keyProperty="id">
insert into business_follow_record insert into business_follow_record
......
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
ORDER BY i.create_time DESC ORDER BY i.create_time DESC
</select> </select>
<select id="queryprojectName" resultType="java.lang.String"> <select id="selectProjectName" resultType="java.lang.String">
SELECT * SELECT *
FROM FROM
(SELECT project_name as name FROM business_info) AS bu (SELECT project_name as name FROM business_info) AS bu
...@@ -132,11 +132,26 @@ ...@@ -132,11 +132,26 @@
</where> </where>
</select> </select>
<select id="selectBusinessInfoById" parameterType="Long" resultMap="BusinessInfoResult"> <select id="selectBusinessInfoById" parameterType="integer" resultMap="BusinessInfoResult">
<include refid="selectBusinessInfoVo"/> <include refid="selectBusinessInfoVo"/>
where id = #{id} where id = #{id}
</select> </select>
<select id="selectTotal" resultType="com.dsk.system.domain.vo.BusinessBrowseVo">
SELECT
count(DISTINCT c.id) contactsCount,
count(DISTINCT f.id) followRecordCount,
count(DISTINCT b.id) backlogCount,
count(DISTINCT r.id) relateCompanyCount
FROM
business_info i
LEFT JOIN business_contacts c on c.business_id = i.id
LEFT JOIN business_follow_record f on f.business_id = i.id
LEFT JOIN business_backlog b on b.business_id = i.id
LEFT JOIN business_relate_company r on r.business_id = i.id
WHERE i.id = #{business}
</select>
<insert id="insertBusinessInfo" parameterType="com.dsk.common.core.domain.entity.BusinessInfo" useGeneratedKeys="true" keyProperty="id"> <insert id="insertBusinessInfo" parameterType="com.dsk.common.core.domain.entity.BusinessInfo" useGeneratedKeys="true" keyProperty="id">
insert into business_info insert into business_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -236,4 +251,35 @@ ...@@ -236,4 +251,35 @@
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
</mapper>
\ No newline at end of file <select id="selectCountByStatusAndCustomerId" resultType="java.lang.Integer">
select count(id) from business_info
<where>
<if test="status != null "> and `status` = #{status} </if>
<if test="customerId != null and customerId != ''"> and `customer_id` = #{customerId} </if>
</where>
</select>
<select id="selectCustomerBusinessList" resultType="com.dsk.system.domain.customer.vo.CustomerBusinessListVo">
select
bi.id, bi.project_name, pi.investment_amount, pi.project_stage, pi.status
from business_info bi
left join business_user bu on bi.id = bu.business_id
where bi.customer_id = #{customerId} and (bu.user_id = #{userId} or bi.is_private = 1))
<if test="projectStage != null and projectStage != '' "> and bi.project_stage = #{projectStage}</if>
<if test="status != null "> and bi.status = #{status}</if>
order by bi.create_time desc
</select>
<select id="getConstruction" resultType="com.dsk.common.core.domain.entity.BusinessInfo">
select
investment_amount,
amount_source,
plan_bid_time,
plan_start_time,
plan_complete_time,
build_property,
project_details
from business_info
where id = #{id}
</select>
</mapper>
...@@ -2,13 +2,18 @@ ...@@ -2,13 +2,18 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dsk.system.mapper.CustomerMapper"> <mapper namespace="com.dsk.system.mapper.CustomerMapper">
<sql id="Base_Bean">
ct.customer_id, ct.company_id, ct.company_name, ct.legal_person, ct.credit_code,
ct.register_capital, ct.company_nature, ct.company_level, ct.credit_level, ct.super_company,
ct.is_on, ct.is_major, ct.company_attribute, ct.main_business, ct.business_scope,
ct.business_characteristic, ct.decision_chain, ct.bid_characteristic, ct.performance_characteristic,
ct.other_ms_characteistic, ct.create_id, ct.create_time, ct.update_id, ct.update_time
</sql>
<select id="selectList" resultType="com.dsk.system.domain.customer.vo.CustomerListVo"> <select id="selectList" resultType="com.dsk.system.domain.customer.vo.CustomerListVo">
select select
ct.customer_id, ct.company_id, ct.company_name, ct.legal_person, ct.register_capital_str, u.nick_name followUser,
ct.register_capital, ct.company_nature, ct.company_level, ct.credit_level, ct.super_company, <include refid="Base_Bean"></include>
ct.is_on, ct.is_major, ct.company_attribute, ct.main_business, ct.business_scope,
ct.business_characteristic, ct.decision_chain, ct.bid_characteristic, ct.performance_characteristic,
ct.other_ms_characteistic, u.nick_name followUser
from customer ct from customer ct
join customer_user ctu on ct.customer_id = ctu.customer_id join customer_user ctu on ct.customer_id = ctu.customer_id
join sys_user u on ctu.user_id = u.user_id join sys_user u on ctu.user_id = u.user_id
...@@ -16,5 +21,21 @@ ...@@ -16,5 +21,21 @@
<if test="dto.companyName != null and dto.companyName != '' "> and ct.company_name like concat('%',#{dto.companyName},'%')</if> <if test="dto.companyName != null and dto.companyName != '' "> and ct.company_name like concat('%',#{dto.companyName},'%')</if>
</select> </select>
<select id="selectUserList" resultType="com.dsk.system.domain.customer.Customer">
select
ct.customer_id, ct.company_name
from customer ct
join customer_user ctu on ct.customer_id = ctu.customer_id
where ctu.user_id = #{userId}
</select>
<select id="selectByCompanyIdAndUserId" resultType="com.dsk.system.domain.customer.Customer">
select
<include refid="Base_Bean"></include>
from customer ct
join customer_user ctu on ct.customer_id = ctu.customer_id
where ct.company_id = ${companyId} and ctu.user_id = #{userId}
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment