Commit bea319a2 authored by danfuman's avatar danfuman
parents bb1d90e5 80f2a8a7
...@@ -77,12 +77,15 @@ public class BusinessFileController extends BaseController { ...@@ -77,12 +77,15 @@ public class BusinessFileController extends BaseController {
* @return * @return
*/ */
@PostMapping("/upload") @PostMapping("/upload")
public AjaxResult uploadFolder(@RequestPart("file") MultipartFile file, HttpServletRequest request){ public AjaxResult uploadFolder(@RequestPart("file") MultipartFile file, HttpServletRequest request) {
try { try {
//获取文件名
String filename = file.getOriginalFilename();
//TODO 校验是否上传同名文件
String businessFileName = request.getHeader("FilePath"); String businessFileName = request.getHeader("FilePath");
// 上传文件路径 // 上传文件路径
String filePath = RuoYiConfig.getUploadPath()+businessFileName+"/"; String filePath = RuoYiConfig.getUploadPath() + businessFileName + "/";
// 上传并返回文件全路径 // 上传并返回文件全路径
String fileName = FileUploadUtils.upload(filePath, file); String fileName = FileUploadUtils.upload(filePath, file);
String url = serverConfig.getUrl() + fileName; String url = serverConfig.getUrl() + fileName;
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
......
...@@ -114,4 +114,16 @@ public class RegionalEconomicDataController { ...@@ -114,4 +114,16 @@ public class RegionalEconomicDataController {
return economicService.regionalCompare(dto); return economicService.regionalCompare(dto);
} }
/***
*@Description: 地区经济-对比
*@Param:
*@return: com.dsk.acc.security.common.msg.RestResponse
*@Author: Dgm
*@date: 2023/5/18 10:29
*/
@PostMapping("/regional/multipleCompare")
public AjaxResult regionalMultipleCompare(@RequestBody OpRegionalEconomicRegionalCompareDto compareDto) {
return economicService.regionalMultipleCompare(compareDto);
}
} }
package com.dsk.common.core.domain.entity; package com.dsk.common.core.domain.entity;
import java.util.Date;
import com.dsk.common.core.domain.BaseEntity;
import com.dsk.common.utils.CheckUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.dsk.common.annotation.Excel; import com.dsk.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
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; import java.util.Date;
/** /**
* 项目联系人对象 business_contacts * 项目联系人对象 business_contacts
...@@ -17,7 +13,7 @@ import javax.validation.constraints.Pattern; ...@@ -17,7 +13,7 @@ import javax.validation.constraints.Pattern;
* @author lxl * @author lxl
* @date 2023-05-17 * @date 2023-05-17
*/ */
public class BusinessContacts extends BaseEntity public class BusinessContacts
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -52,10 +48,21 @@ public class BusinessContacts extends BaseEntity ...@@ -52,10 +48,21 @@ public class BusinessContacts extends BaseEntity
@Excel(name = "维护人员") @Excel(name = "维护人员")
private String accendant; private String accendant;
/** 性别(1.男 2.女 0.未知) */
@Excel(name = "性别")
private Integer sex;
/** 创建时间 */ /** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date creatTime; private Date createTime;
/** 修改时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
public void setId(Integer id) public void setId(Integer id)
{ {
...@@ -129,14 +136,29 @@ public class BusinessContacts extends BaseEntity ...@@ -129,14 +136,29 @@ public class BusinessContacts extends BaseEntity
{ {
return accendant; return accendant;
} }
public void setCreatTime(Date creatTime)
{ public Date getCreateTime() {
this.creatTime = creatTime; return createTime;
} }
public Date getCreatTime() public void setCreateTime(Date createTime) {
{ this.createTime = createTime;
return creatTime; }
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getSex() {
return sex;
}
public void setSex(Integer sex) {
this.sex = sex;
} }
@Override @Override
...@@ -150,8 +172,9 @@ public class BusinessContacts extends BaseEntity ...@@ -150,8 +172,9 @@ public class BusinessContacts extends BaseEntity
.append("position", getPosition()) .append("position", getPosition())
.append("phone", getPhone()) .append("phone", getPhone())
.append("accendant", getAccendant()) .append("accendant", getAccendant())
.append("creatTime", getCreatTime()) .append("createTime", getCreateTime())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("sex", getSex())
.toString(); .toString();
} }
} }
package com.dsk.common.core.domain.entity; package com.dsk.common.core.domain.entity;
import java.util.Date; import com.dsk.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.dsk.common.core.domain.BaseEntity; import com.dsk.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
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 java.util.Date;
/** /**
* 项目详情对象 business_info * 项目详情对象 business_info
* *
......
...@@ -6,7 +6,7 @@ import javax.validation.constraints.NotNull; ...@@ -6,7 +6,7 @@ import javax.validation.constraints.NotNull;
/** /**
* @ClassName OpRegionalEconomicDataV1Dto * @ClassName OpRegionalEconomicDataV1Dto
* @Description 专项债-项目类别统计 * @Description 地区经济
* @Author Dgm * @Author Dgm
* @Date 2023/5/23 14:05 * @Date 2023/5/23 14:05
* @Version * @Version
......
package com.dsk.common.dtos;
import lombok.Data;
import java.util.List;
/**
* @ClassName OpRegionalEconomicRegionalCompareDto
* @Description 地区经济-对比
* @Author Dgm
* @Date 2023/5/23 14:05
* @Version
*/
@Data
public class OpRegionalEconomicRegionalCompareDto {
/**
* 年份
*/
private Integer year;
private List<OpRegionalEconomicDataStatisticsRegionalDto> compareList;
}
...@@ -8,7 +8,8 @@ import java.util.regex.Pattern; ...@@ -8,7 +8,8 @@ import java.util.regex.Pattern;
*/ */
public class CheckUtils { public class CheckUtils {
public static final String REG_Moblie = "^((13[0-9])|(14(0|[5-7]|9))|(15([0-3]|[5-9]))|(16(2|[5-7]))|(17[0-8])|(18[0-9])|(19([0-3]|[5-9])))\\d{8}$"; public static final String REG_Moblie = "^((13[0-9])|(14(0|[5-7]|9))|(15([0-3]|[5-9]))|(16(2|[5-7]))|(17[0-8])|(18[0-9])|(19([0-3]|[5-9])))\\d{8}$";//手机号
public static final String REG_Landline = "(\\(\\d{3,4}\\)|\\d{3,4}-|\\s)?\\d{8}";//座机号
public static final String REG_EMAIL = "[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z0-9]+"; public static final String REG_EMAIL = "[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z0-9]+";
...@@ -35,10 +36,42 @@ public class CheckUtils { ...@@ -35,10 +36,42 @@ public class CheckUtils {
if (phone == null){ if (phone == null){
return false; return false;
}else { }else {
Pattern p = Pattern.compile(REG_Moblie); Pattern mobilePattern = Pattern.compile(REG_Moblie);
Matcher m = p.matcher(phone); Pattern landlinePattern = Pattern.compile(REG_Landline);
return m.matches(); Matcher mobileMatcher = mobilePattern.matcher(phone);
Matcher landlineMatcher = landlinePattern.matcher(phone);
return mobileMatcher.matches() || landlineMatcher.matches();
} }
} }
/**
* Double小数点前的位数
* @param number
* @return
*/
public static int checkIntegerPlaces(Double number) {
String strNumber = Double.toString(Math.abs(number));
int integerPlaces = strNumber.indexOf('.');
if (integerPlaces == -1) {
return strNumber.length();
} else {
return integerPlaces;
}
}
/**
* Double小数点后的位数
* @param number
* @return
*/
public static int checkDecimalPlaces(Double number) {
String strNumber = Double.toString(Math.abs(number));
int decimalPlaces = 0;
int index = strNumber.indexOf('.');
if (index != -1) {
decimalPlaces = strNumber.length() - index - 1;
}
return decimalPlaces;
}
} }
...@@ -168,11 +168,18 @@ export default { ...@@ -168,11 +168,18 @@ export default {
::v-deep .el-table--border .el-table__cell { ::v-deep .el-table--border .el-table__cell {
border-right: 1px solid #E6EAF1; border-right: 1px solid #E6EAF1;
} }
::v-deep .el-table__body tr.hover-row.current-row>td,::v-deep .el-table__body tr.hover-row.el-table__row--striped.current-row>td,::v-deep .el-table__body tr.hover-row.el-table__row--striped>td,::v-deep .el-table__body tr.hover-row>td{ ::v-deep .el-table__body tr.hover-row.current-row>td,
background-color:#DCEBFF; ::v-deep .el-table__body tr.hover-row.el-table__row--striped.current-row>td,
::v-deep .el-table__body tr.hover-row.el-table__row--striped>td,
::v-deep .el-table__body tr.hover-row>td{
background-color:#DCEBFF !important;
.more{ .more{
background: #DCEBFF; background: #DCEBFF;
} }
} }
::v-deep .el-table--enable-row-hover .el-table__body tr:hover > td {
background-color: #DCEBFF;
}
</style> </style>
package com.dsk.system.domain; package com.dsk.system.domain;
import com.dsk.common.utils.StringUtils;
import lombok.Data; import lombok.Data;
/** /**
...@@ -34,7 +33,7 @@ public class BusinessAddDto { ...@@ -34,7 +33,7 @@ public class BusinessAddDto {
/** /**
* 投资估算 * 投资估算
*/ */
private String investmentAmount; private Double investmentAmount;
/** /**
* 项目阶段 * 项目阶段
...@@ -59,8 +58,4 @@ public class BusinessAddDto { ...@@ -59,8 +58,4 @@ public class BusinessAddDto {
* 客户id * 客户id
*/ */
private String customerId; private String customerId;
public Double getInvestmentAmount() {
return StringUtils.isEmpty(investmentAmount) ? null :Double.parseDouble(investmentAmount);
}
} }
...@@ -79,4 +79,13 @@ public interface EconomicService { ...@@ -79,4 +79,13 @@ public interface EconomicService {
*/ */
AjaxResult regionalCompare(OpRegionalEconomicDataStatisticsRegionalDto dto); AjaxResult regionalCompare(OpRegionalEconomicDataStatisticsRegionalDto dto);
/***
*@Description: 地区经济-对比
*@Param:
*@return: com.dsk.common.core.domain.AjaxResult
*@Author: Dgm
*@date: 2023/5/18 10:25
*/
AjaxResult regionalMultipleCompare (OpRegionalEconomicRegionalCompareDto dto);
} }
package com.dsk.system.service.impl; package com.dsk.system.service.impl;
import java.util.List; import cn.hutool.core.util.ObjectUtil;
import com.dsk.common.core.domain.entity.BusinessContacts; import com.dsk.common.core.domain.entity.BusinessContacts;
import com.dsk.common.core.domain.model.LoginUser;
import com.dsk.common.exception.base.BaseException; import com.dsk.common.exception.base.BaseException;
import com.dsk.common.utils.CheckUtils; import com.dsk.common.utils.CheckUtils;
import com.dsk.common.utils.DateUtils; import com.dsk.common.utils.DateUtils;
import com.dsk.common.utils.SecurityUtils;
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; import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/** /**
* 项目联系人Service业务层处理 * 项目联系人Service业务层处理
* *
...@@ -58,7 +61,11 @@ public class BusinessContactsServiceImpl implements IBusinessContactsService ...@@ -58,7 +61,11 @@ public class BusinessContactsServiceImpl implements IBusinessContactsService
@Transactional @Transactional
public int insertBusinessContacts(BusinessContacts businessContacts) public int insertBusinessContacts(BusinessContacts businessContacts)
{ {
if(!CheckUtils.isPhone(businessContacts.getPhone())) throw new BaseException("500","请输入正确的手机号码"); if(!CheckUtils.isPhone(businessContacts.getPhone())) throw new BaseException("500","请输入正确的电话号码");
LoginUser loginUser = SecurityUtils.getLoginUser();
if (ObjectUtil.isEmpty(loginUser)) throw new BaseException("请登录");
//维护人员为当前登录用户
businessContacts.setAccendant(loginUser.getUsername());
return businessContactsMapper.insertBusinessContacts(businessContacts); return businessContactsMapper.insertBusinessContacts(businessContacts);
} }
...@@ -72,7 +79,7 @@ public class BusinessContactsServiceImpl implements IBusinessContactsService ...@@ -72,7 +79,7 @@ public class BusinessContactsServiceImpl implements IBusinessContactsService
@Transactional @Transactional
public int updateBusinessContacts(BusinessContacts businessContacts) public int updateBusinessContacts(BusinessContacts businessContacts)
{ {
if(!CheckUtils.isPhone(businessContacts.getPhone())) throw new BaseException("500","请输入正确的手机号码"); 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);
} }
......
...@@ -179,6 +179,13 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService { ...@@ -179,6 +179,13 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
//新增前查询是否已存在 //新增前查询是否已存在
int count = businessInfoMapper.isRepetitionProjectName(dto.getProjectName(), dto.getUserId()); int count = businessInfoMapper.isRepetitionProjectName(dto.getProjectName(), dto.getUserId());
if (count > 0) return AjaxResult.error("项目名称已存在"); if (count > 0) return AjaxResult.error("项目名称已存在");
//判断资金Double类型的位数
if (dto.getInvestmentAmount() != null) {
int front = CheckUtils.checkIntegerPlaces(dto.getInvestmentAmount());
int later = CheckUtils.checkDecimalPlaces(dto.getInvestmentAmount());
if (front > 9) return AjaxResult.error("小数点前最多支持9位");
if (later > 6) return AjaxResult.error("小数点后最多支持6位");
}
//新增项目主信息 //新增项目主信息
BusinessInfo businessInfo = new BusinessInfo(); BusinessInfo businessInfo = new BusinessInfo();
BeanUtil.copyProperties(dto, businessInfo); BeanUtil.copyProperties(dto, businessInfo);
...@@ -205,9 +212,16 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService { ...@@ -205,9 +212,16 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
@Override @Override
@Transactional @Transactional
public int updateBusinessInfo(BusinessInfo businessInfo) { public int updateBusinessInfo(BusinessInfo businessInfo) {
//判断资金Double类型的位数
if (businessInfo.getInvestmentAmount() != null) {
int front = CheckUtils.checkIntegerPlaces(businessInfo.getInvestmentAmount());
int later = CheckUtils.checkDecimalPlaces(businessInfo.getInvestmentAmount());
if (front > 9) throw new BaseException("500", "小数点前最多支持9位");
if (later > 6) throw new BaseException("500", "小数点后最多支持6位");
}
if (StringUtils.isNotEmpty(businessInfo.getConstructionPhone()) && StringUtils.isNotEmpty(businessInfo.getSupervisorPhone())) { if (StringUtils.isNotEmpty(businessInfo.getConstructionPhone()) && StringUtils.isNotEmpty(businessInfo.getSupervisorPhone())) {
if (!CheckUtils.isPhone(businessInfo.getConstructionPhone()) || !CheckUtils.isPhone(businessInfo.getSupervisorPhone())) if (!CheckUtils.isPhone(businessInfo.getConstructionPhone()) || !CheckUtils.isPhone(businessInfo.getSupervisorPhone()))
throw new BaseException("500", "请输入正确的手机号码"); throw new BaseException("500", "请输入正确的电话号码");
} }
businessInfo.setUpdateTime(DateUtils.getNowDate()); businessInfo.setUpdateTime(DateUtils.getNowDate());
return businessInfoMapper.updateBusinessInfo(businessInfo); return businessInfoMapper.updateBusinessInfo(businessInfo);
......
package com.dsk.system.service.impl; package com.dsk.system.service.impl;
import java.util.List;
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;
...@@ -16,6 +10,8 @@ import org.springframework.stereotype.Service; ...@@ -16,6 +10,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
/** /**
* 项目关联单位Service业务层处理 * 项目关联单位Service业务层处理
...@@ -63,7 +59,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS ...@@ -63,7 +59,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
@Transactional @Transactional
public int insertBusinessRelateCompany(BusinessRelateCompany businessRelateCompany) public int insertBusinessRelateCompany(BusinessRelateCompany businessRelateCompany)
{ {
// if(!CheckUtils.isPhone(businessRelateCompany.getPhone())) throw new BaseException("500","请输入正确的手机号码"); // 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);
} }
...@@ -78,7 +74,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS ...@@ -78,7 +74,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
@Transactional @Transactional
public int updateBusinessRelateCompany(BusinessRelateCompany businessRelateCompany) public int updateBusinessRelateCompany(BusinessRelateCompany businessRelateCompany)
{ {
// if(!CheckUtils.isPhone(businessRelateCompany.getPhone())) throw new BaseException("500","请输入正确的手机号码"); // 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);
} }
......
...@@ -51,16 +51,17 @@ public class CustomerServiceImpl implements ICustomerService { ...@@ -51,16 +51,17 @@ public class CustomerServiceImpl implements ICustomerService {
@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);
vos.parallelStream().forEach(vo -> { // vos.parallelStream().forEach(vo -> {
//合作项目 // //合作项目
vo.setCooperationProject(businessInfoService.selectCountByStatusAndCustomerId(2, vo.getCustomerId())); // vo.setCooperationProject(businessInfoService.selectCountByStatusAndCustomerId(2, vo.getCustomerId()));
//跟进项目 // //跟进项目
vo.setFollowProject(businessInfoService.selectCountByStatusAndCustomerId(1, vo.getCustomerId())); // vo.setFollowProject(businessInfoService.selectCountByStatusAndCustomerId(1, vo.getCustomerId()));
//储备项目 // //储备项目
vo.setReserveProject(businessInfoService.selectCountByStatusAndCustomerId(0, vo.getCustomerId())); // vo.setReserveProject(businessInfoService.selectCountByStatusAndCustomerId(0, vo.getCustomerId()));
}); // });
return vos; // return vos;
return baseMapper.selectList(dto);
} }
@Override @Override
......
...@@ -70,4 +70,10 @@ public class EconomicServiceImpl implements EconomicService { ...@@ -70,4 +70,10 @@ public class EconomicServiceImpl implements EconomicService {
return BeanUtil.toBean(map, AjaxResult.class); return BeanUtil.toBean(map, AjaxResult.class);
} }
@Override
public AjaxResult regionalMultipleCompare(OpRegionalEconomicRegionalCompareDto dto) {
Map<String, Object> map = dskOpenApiUtil.requestBody("/economic/regional/multipleCompare", BeanUtil.beanToMap(dto, false, false));
return BeanUtil.toBean(map, AjaxResult.class);
}
} }
...@@ -12,8 +12,9 @@ ...@@ -12,8 +12,9 @@
<result property="office" column="office"/> <result property="office" column="office"/>
<result property="position" column="position"/> <result property="position" column="position"/>
<result property="phone" column="phone"/> <result property="phone" column="phone"/>
<result property="sex" column="sex"/>
<result property="accendant" column="accendant"/> <result property="accendant" column="accendant"/>
<result property="creatTime" column="creat_time"/> <result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/> <result property="updateTime" column="update_time"/>
</resultMap> </resultMap>
...@@ -26,7 +27,8 @@ ...@@ -26,7 +27,8 @@
position, position,
phone, phone,
accendant, accendant,
creat_time, sex,
create_time,
update_time update_time
from business_contacts from business_contacts
</sql> </sql>
...@@ -41,9 +43,10 @@ ...@@ -41,9 +43,10 @@
<if test="position != null and position != ''">and position = #{position}</if> <if test="position != null and position != ''">and position = #{position}</if>
<if test="phone != null and phone != ''">and phone = #{phone}</if> <if test="phone != null and phone != ''">and phone = #{phone}</if>
<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="createTime != null ">and create_time = #{createTime}</if>
<if test="sex != null ">and sex = #{sex}</if>
</where> </where>
order by creat_time desc order by update_time desc,id desc
</select> </select>
<select id="selectBusinessContactsById" parameterType="Long" resultMap="BusinessContactsResult"> <select id="selectBusinessContactsById" parameterType="Long" resultMap="BusinessContactsResult">
...@@ -61,8 +64,9 @@ ...@@ -61,8 +64,9 @@
<if test="position != null">position,</if> <if test="position != null">position,</if>
<if test="phone != null">phone,</if> <if test="phone != null">phone,</if>
<if test="accendant != null">accendant,</if> <if test="accendant != null">accendant,</if>
<if test="creatTime != null">creat_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="sex != null">sex,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="businessId != null">#{businessId},</if> <if test="businessId != null">#{businessId},</if>
...@@ -72,8 +76,9 @@ ...@@ -72,8 +76,9 @@
<if test="position != null">#{position},</if> <if test="position != null">#{position},</if>
<if test="phone != null">#{phone},</if> <if test="phone != null">#{phone},</if>
<if test="accendant != null">#{accendant},</if> <if test="accendant != null">#{accendant},</if>
<if test="creatTime != null">#{creatTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="sex != null">#{sex},</if>
</trim> </trim>
</insert> </insert>
...@@ -87,8 +92,9 @@ ...@@ -87,8 +92,9 @@
<if test="position != null">position = #{position},</if> <if test="position != null">position = #{position},</if>
<if test="phone != null">phone = #{phone},</if> <if test="phone != null">phone = #{phone},</if>
<if test="accendant != null">accendant = #{accendant},</if> <if test="accendant != null">accendant = #{accendant},</if>
<if test="creatTime != null">creat_time = #{creatTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="sex != null">sex = #{sex},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
......
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
<if test="constructionPhone != null">construction_phone = #{constructionPhone},</if> <if test="constructionPhone != null">construction_phone = #{constructionPhone},</if>
<if test="supervisorUnit != null">supervisor_unit = #{supervisorUnit},</if> <if test="supervisorUnit != null">supervisor_unit = #{supervisorUnit},</if>
<if test="supervisorPrincipal != null">supervisor_principal = #{supervisorPrincipal},</if> <if test="supervisorPrincipal != null">supervisor_principal = #{supervisorPrincipal},</if>
<if test="supervisorPhone != null">evaluation_bid_council = #{supervisorPhone},</if> <if test="supervisorPhone != null">supervisor_phone = #{supervisorPhone},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
ct.performance_characteristic, ct.other_ms_characteistic, ct.create_id, ct.create_time, ct.update_id, ct.update_time ct.performance_characteristic, ct.other_ms_characteistic, ct.create_id, ct.create_time, ct.update_id, ct.update_time
</sql> </sql>
<select id="selectList" resultType="com.dsk.system.domain.customer.vo.CustomerListVo"> <select id="selectList1" resultType="com.dsk.system.domain.customer.vo.CustomerListVo">
select select
u.nick_name followUser, u.nick_name followUser,
<include refid="Base_Bean"></include> <include refid="Base_Bean"></include>
...@@ -21,6 +21,26 @@ ...@@ -21,6 +21,26 @@
<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="selectList" resultType="com.dsk.system.domain.customer.vo.CustomerListVo">
select
u.nick_name followUser, bi1.num reserveProject, bi2.num followProject, bi3.num cooperationProject,
<include refid="Base_Bean"></include>
from customer ct
join customer_user ctu on ct.customer_id = ctu.customer_id
join sys_user u on ctu.user_id = u.user_id
left join (
select count(status) num,customer_id from business_info where `status` = 0 group by customer_id
) bi1 on bi1.customer_id = ct.customer_id
left join (
select count(status) num,customer_id from business_info where `status` = 1 group by customer_id
) bi2 on bi2.customer_id = ct.customer_id
left join (
select count(status) num,customer_id from business_info where `status` = 2 group by customer_id
) bi3 on bi3.customer_id = ct.customer_id
where ctu.user_id = #{dto.userId}
<if test="dto.companyName != null and dto.companyName != '' "> and ct.company_name like concat('%',#{dto.companyName},'%')</if>
</select>
<select id="selectUserList" resultType="com.dsk.system.domain.customer.Customer"> <select id="selectUserList" resultType="com.dsk.system.domain.customer.Customer">
select select
ct.customer_id, ct.company_name ct.customer_id, ct.company_name
......
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