This commit is contained in:
mx 2024-12-27 19:42:37 +08:00
parent 0de750f5a0
commit 53109729e9
12 changed files with 65 additions and 28 deletions

View File

@ -42,9 +42,14 @@ spring:
driverClassName: com.mysql.cj.jdbc.Driver driverClassName: com.mysql.cj.jdbc.Driver
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562 # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题) # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
url: jdbc:mysql://192.168.18.119:3308/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
url: jdbc:mysql://124.236.46.74:9100/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
username: root username: root
password: Ps123456 password: rwWhYfCe3Tzhatep
# url: jdbc:mysql://192.168.18.119:3308/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
# username: root
# password: Ps123456
# url: jdbc:mysql://47.95.38.123:3306/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # url: jdbc:mysql://47.95.38.123:3306/pusongplus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
# username: root # username: root
# password: Ps123456@ # password: Ps123456@
@ -94,13 +99,13 @@ spring:
spring.data: spring.data:
redis: redis:
# 地址 # 地址
host: 192.168.18.119 host: 124.236.46.74
# 端口默认为6379 # 端口默认为6379
port: 6378 port: 9101
# 数据库索引 # 数据库索引
database: 8 database: 8
# 密码(如没有密码请注释掉) # 密码(如没有密码请注释掉)
password: 12345 password: redis_PhRr2K
# 连接超时时间 # 连接超时时间
timeout: 10s timeout: 10s
# 是否开启ssl # 是否开启ssl

View File

@ -50,8 +50,8 @@ public class PsCustomController extends BaseController {
*/ */
@SaCheckPermission("business:customInfo:list") @SaCheckPermission("business:customInfo:list")
@GetMapping("/listByLoginUser") @GetMapping("/listByLoginUser")
public TableDataInfo<List<Map<String,Object>>> listByLoginUser(String customName, String customMobile, String companyName, PageQuery pageQuery) { public TableDataInfo<List<Map<String,Object>>> listByLoginUser(String customName, String customMobile, String companyName, String companyServiceName, PageQuery pageQuery) {
return psCustomInfoService.listByLoginUser(customName, customMobile, companyName, pageQuery); return psCustomInfoService.listByLoginUser(customName, customMobile, companyName, companyServiceName, pageQuery);
} }
/** /**

View File

@ -11,6 +11,7 @@ import com.pusong.business.domain.vo.TaskPlanVo;
import com.pusong.business.service.IPsContractInfoService; import com.pusong.business.service.IPsContractInfoService;
import com.pusong.business.service.IPsTaskService; import com.pusong.business.service.IPsTaskService;
import com.pusong.common.core.domain.R; import com.pusong.common.core.domain.R;
import com.pusong.common.core.utils.DateUtils;
import com.pusong.common.core.validate.QueryGroup; import com.pusong.common.core.validate.QueryGroup;
import com.pusong.common.idempotent.annotation.RepeatSubmit; import com.pusong.common.idempotent.annotation.RepeatSubmit;
import com.pusong.common.log.annotation.Log; import com.pusong.common.log.annotation.Log;
@ -115,8 +116,9 @@ public class PsTaskController extends BaseController {
@Log(title = "主任务完成") @Log(title = "主任务完成")
@SaCheckPermission("business:task:list") @SaCheckPermission("business:task:list")
@GetMapping("/mainFinish") @GetMapping("/mainFinish")
public R<Void> mainFinish(@NotNull Long id, Date firstFilingTime) { public R<Void> mainFinish(@NotNull Long id, String firstFilingTime) {
contractInfoService.finish(psTaskMainService.finishMain(id, firstFilingTime)); Date date = DateUtils.parseDate(firstFilingTime);
contractInfoService.finish(psTaskMainService.finishMain(id, date));
return R.ok(); return R.ok();
} }

View File

@ -5,6 +5,7 @@ import com.pusong.business.domain.PsCompanyInfo;
import com.pusong.common.core.validate.AddGroup; import com.pusong.common.core.validate.AddGroup;
import com.pusong.common.core.validate.EditGroup; import com.pusong.common.core.validate.EditGroup;
import com.pusong.common.core.validate.QueryGroup; import com.pusong.common.core.validate.QueryGroup;
import com.pusong.common.json.utils.JsonUtils;
import com.pusong.common.mybatis.core.domain.BaseEntity; import com.pusong.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper; import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
@ -64,6 +65,8 @@ public class PsCompanyQueryBo extends BaseEntity {
*/ */
private Integer type; private Integer type;
@JsonFormat(pattern = "yyyy-MM")
private String firstFilingTime;
} }

View File

@ -101,7 +101,7 @@ public class PsContractInfoBo {
/** /**
* 是否续费 * 是否续费
* o新签 1续费 * o新签(新客户) 1续费 2新签老客户
*/ */
private String isDue; private String isDue;

View File

@ -47,7 +47,7 @@ public class PsTaskQueryBo extends BaseEntity {
/** /**
* 销售经理姓名 * 销售经理姓名
*/ */
private String customManagerName; private String customManagerName;
/** /**
* 服务项目编码集合 * 服务项目编码集合
*/ */
@ -55,30 +55,30 @@ public class PsTaskQueryBo extends BaseEntity {
/** /**
* 执行者姓名 * 执行者姓名
*/ */
private String executor; private String executor;
/** /**
* 所属区域公司地址 * 所属区域公司地址
*/ */
private String companyAdress; private String companyAdress;
/** /**
* 法人手机号 * 法人手机号
*/ */
private String mobile; private String mobile;
/** /**
* 法人身份证号 * 法人身份证号
*/ */
private String idNo; private String idNo;
/** /**
* 法人身份证号 * 法人身份证号
*/ */
private String name; private String name;
/** /**
* 任务委派类型1内勤,2外勤,3特勤 查询子任务列表时使用 * 任务委派类型1内勤,2外勤,3特勤 查询子任务列表时使用
*/ */
@NotBlank(message = "任务委派类型不能为空", groups = {QueryGroup.class}) @NotBlank(message = "任务委派类型不能为空", groups = {QueryGroup.class})
private String appointType; private String appointType;
/** /**
* 任务类型 * 任务类型
*/ */

View File

@ -281,4 +281,6 @@ public class PsCompanyInfoVo implements Serializable {
* 首次申报时间 * 首次申报时间
*/ */
private Date firstFilingTime; private Date firstFilingTime;
private String taskRemark;
} }

View File

@ -32,7 +32,7 @@ public interface IPsCustomInfoService {
* 查询登陆人下所有的客户名称和id * 查询登陆人下所有的客户名称和id
* @return 客户id和姓名 * @return 客户id和姓名
*/ */
TableDataInfo listByLoginUser(String customName, String customMobile, String companyName, PageQuery pageQuery); TableDataInfo listByLoginUser(String customName, String customMobile, String companyName, String companyServiceName, PageQuery pageQuery);
/** /**
* 分页查询客户基本信息列表 * 分页查询客户基本信息列表
* *

View File

@ -154,8 +154,11 @@ public class PsCompanyInfoServiceImpl implements IPsCompanyInfoService {
lqw.like(bo.getCompanyName() != null,"com.company_name", bo.getCompanyName()); lqw.like(bo.getCompanyName() != null,"com.company_name", bo.getCompanyName());
lqw.eq(bo.getServiceStatus() != null,"com.service_status", bo.getServiceStatus()); lqw.eq(bo.getServiceStatus() != null,"com.service_status", bo.getServiceStatus());
lqw.between(bo.getParams().get("beginTime") != null && bo.getParams().get("endTime") != null, if (bo.getFirstFilingTime() != null){
"com.first_filing_time", bo.getParams().get("beginTime"), bo.getParams().get("endTime")); Date endTimeByMonth = DateUtils.getEndTimeByMonth(DateUtils.parseDate(bo.getFirstFilingTime()));
lqw.between("com.first_filing_time", bo.getFirstFilingTime(), endTimeByMonth);
}
String followUserSql = ""; String followUserSql = "";

View File

@ -112,6 +112,13 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
@Override @Override
@Transactional//开启事务 @Transactional//开启事务
public String createContract(PsContractInfoBo bo, Integer type) { public String createContract(PsContractInfoBo bo, Integer type) {
if ("0".equals(bo.getIsDue())){
bo.setIsOldCus((byte) 0);
}else if ("2".equals(bo.getIsDue())){
bo.setIsOldCus((byte) 1);
bo.setIsDue("0");
}
if (bo.getFirstPartyType() == PsContractInfoBo.FIRSTPARTYTYPE.INDIVIDUALS.getType()){ if (bo.getFirstPartyType() == PsContractInfoBo.FIRSTPARTYTYPE.INDIVIDUALS.getType()){
bo.setContactPersonName(bo.getCompanyInfoBo().getLegalPersonName()); bo.setContactPersonName(bo.getCompanyInfoBo().getLegalPersonName());
bo.setContactPersonPhone(bo.getCompanyInfoBo().getLegalPersonPhone()); bo.setContactPersonPhone(bo.getCompanyInfoBo().getLegalPersonPhone());
@ -221,6 +228,13 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
* @return 是否新增成功 * @return 是否新增成功
*/ */
public Long preview(PsContractInfoBo bo){ public Long preview(PsContractInfoBo bo){
if ("0".equals(bo.getIsDue())){
bo.setIsOldCus((byte) 0);
}else if ("2".equals(bo.getIsDue())){
bo.setIsOldCus((byte) 1);
bo.setIsDue("0");
}
//3.如果已存在合同则进行修改否则新增 //3.如果已存在合同则进行修改否则新增
PsContractInfo add = new PsContractInfo(); PsContractInfo add = new PsContractInfo();
add.setContractCode(getContractCode());//合同编码 add.setContractCode(getContractCode());//合同编码

View File

@ -72,7 +72,7 @@ public class PsCustomInfoServiceImpl implements IPsCustomInfoService {
* @return 客户id和姓名 * @return 客户id和姓名
*/ */
@Override @Override
public TableDataInfo listByLoginUser(String customName, String customMobile, String companyName, PageQuery pageQuery) { public TableDataInfo listByLoginUser(String customName, String customMobile, String companyName, String companyServiceName, PageQuery pageQuery) {
//查询客户基本信息 //查询客户基本信息
Page<PsCustomInfoVo> list = baseMapper.selectPageCustomerList(pageQuery.build() Page<PsCustomInfoVo> list = baseMapper.selectPageCustomerList(pageQuery.build()
, new QueryWrapper<PsCustomInfo>() , new QueryWrapper<PsCustomInfo>()
@ -82,14 +82,21 @@ public class PsCustomInfoServiceImpl implements IPsCustomInfoService {
.isNotNull("info.custom_name") .isNotNull("info.custom_name")
.ne("info.custom_name","") .ne("info.custom_name","")
.ne("info.custom_name","") .ne("info.custom_name","")
.and(StringUtils.isNotBlank(customName) || StringUtils.isNotBlank(customMobile) || StringUtils.isNotBlank(companyName) // .and(StringUtils.isNotBlank(customName) || StringUtils.isNotBlank(customMobile) || StringUtils.isNotBlank(companyName)
, wq -> wq.like(StringUtils.isNotBlank(customName), "info.custom_name", customName) // , wq -> wq.like(StringUtils.isNotBlank(customName), "info.custom_name", customName)
.or() // .or()
.like(StringUtils.isNotBlank(customMobile), "info.custom_mobile", customMobile) // .like(StringUtils.isNotBlank(customMobile), "info.custom_mobile", customMobile)
.or() // .or()
.exists(StringUtils.isNotBlank(companyName), "select 1 from ps_company_info where ps_company_info.custom_id = ps_custom_info.id and ps_company_info.del_flag = 0 and company_type = 2 and company_name like '%" + companyName + "%'") // .exists(StringUtils.isNotBlank(companyName), "select 1 from ps_company_info where ps_company_info.custom_id = info.id and ps_company_info.del_flag = 0 and company_type = 1 and company_name like '%" + companyName + "%'")
// .exists(StringUtils.isNotBlank(companyServiceName), "select 1 from ps_company_info where ps_company_info.custom_id = info.id and ps_company_info.del_flag = 0 and company_type = 2 and company_name like '%" + companyServiceName + "%'")
//
// )
.like(StringUtils.isNotBlank(customName), "info.custom_name", customName)
.like(StringUtils.isNotBlank(customMobile), "info.custom_mobile", customMobile)
.exists(StringUtils.isNotBlank(companyName), "select 1 from ps_company_info where ps_company_info.custom_id = info.id and ps_company_info.del_flag = 0 and company_type = 1 and company_name like '%" + companyName + "%'")
.exists(StringUtils.isNotBlank(companyServiceName), "select 1 from ps_company_info where ps_company_info.custom_id = info.id and ps_company_info.del_flag = 0 and company_type = 2 and company_name like '%" + companyServiceName + "%'")
)); );
if (list.getRecords().isEmpty()){ if (list.getRecords().isEmpty()){
TableDataInfo tableDataInfo = new TableDataInfo(); TableDataInfo tableDataInfo = new TableDataInfo();
tableDataInfo.setRows(null); tableDataInfo.setRows(null);

View File

@ -105,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
--pcc.contract_code contract_code, 必须在 com.*, 上边否则company里的 contract_code值会被com表的字段覆盖 --pcc.contract_code contract_code, 必须在 com.*, 上边否则company里的 contract_code值会被com表的字段覆盖
pcc.contract_code, pcc.contract_code,
pcc.id pcc_id, pcc.id pcc_id,
pcc.task_remark,
com.*, com.*,
bus.business_amount bus_business_amount, bus.business_amount bus_business_amount,
bus.business_desc bus_business_desc, bus.business_desc bus_business_desc,