Commit 0a56bcd9 authored by danfuman's avatar danfuman

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys...

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys into V20231129-中建一局二公司
parents 07a32ab2 784188c7
...@@ -189,7 +189,7 @@ sms: ...@@ -189,7 +189,7 @@ sms:
territory: ap-guangzhou territory: ap-guangzhou
dsk: dsk:
exportBackUrl: http://172.17.0.12:9099/prod-api/export/backUrl exportBackUrl: http://111.204.34.145:9098/export/backUrl
sa-token: sa-token:
......
...@@ -49,12 +49,9 @@ spring: ...@@ -49,12 +49,9 @@ 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.0.79:3306/dsk_operate_sys?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://172.17.0.73:3306/cscec_bms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai
# username: dev username: dsktest
# password: 8AXjjCHZ666! password: Dsk!@#-2024Mysql
url: jdbc:mysql://rds-szh.dsk.com/dos?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: dsk_api_szh
password: j1nxbVPF0QS*B57C
# 从库数据源 # 从库数据源
# slave: # slave:
# lazy: true # lazy: true
...@@ -104,13 +101,13 @@ spring: ...@@ -104,13 +101,13 @@ spring:
--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉) --- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
spring: spring:
redis: redis:
host: redis-szh.dsk.com host: 172.17.0.73
# 端口,默认为6379 # 端口,默认为6379
port: 6379 port: 6379
# 数据库索引 # 数据库索引
database: 13 database: 13
# 密码 # 密码
password: Xi8$r*@d7zn5FaP2 password: Dsk!@#-2024Redis
# 密码(如没有密码请注释掉) # 密码(如没有密码请注释掉)
# password: # password:
# 连接超时时间 # 连接超时时间
...@@ -174,7 +171,7 @@ sms: ...@@ -174,7 +171,7 @@ sms:
#阿里云的accessKeySecret #阿里云的accessKeySecret
accessKeySecret: L7VANFwqaTludkczLsg9jhvidk0e28 accessKeySecret: L7VANFwqaTludkczLsg9jhvidk0e28
#短信签名 #短信签名
signature: 大司空信息科技 signature: 中建一局二公司
tencent: tencent:
#请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置 #请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
requestUrl: sms.tencentcloudapi.com requestUrl: sms.tencentcloudapi.com
...@@ -191,4 +188,4 @@ sms: ...@@ -191,4 +188,4 @@ sms:
dsk: dsk:
# exportBackUrl: https://szhapi.jiansheku.com/export/backUrl # exportBackUrl: https://szhapi.jiansheku.com/export/backUrl
exportBackUrl: http://172.17.0.12:9099/prod-api/export/backUrl exportBackUrl: http://111.204.34.145:9098/export/backUrl
\ No newline at end of file \ No newline at end of file
...@@ -189,7 +189,7 @@ sms: ...@@ -189,7 +189,7 @@ sms:
territory: ap-guangzhou territory: ap-guangzhou
dsk: dsk:
exportBackUrl: http://172.17.0.12:9099/prod-api/export/backUrl exportBackUrl: http://111.204.34.145:9098/export/backUrl
sa-token: sa-token:
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录) # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
......
...@@ -205,6 +205,7 @@ tenant: ...@@ -205,6 +205,7 @@ tenant:
- cb_subject - cb_subject
- cb_project_other - cb_project_other
- s_materiel_project - s_materiel_project
- labor_leader_customer_risk
# MyBatisPlus配置 # MyBatisPlus配置
# https://baomidou.com/config/ # https://baomidou.com/config/
......
...@@ -6,6 +6,7 @@ import com.dsk.common.core.domain.PageQuery; ...@@ -6,6 +6,7 @@ import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.domain.R; import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo; import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.utils.poi.ExcelUtil; import com.dsk.common.utils.poi.ExcelUtil;
import com.dsk.cscec.domain.bo.AddDCustomerLaborLeaderBo;
import com.dsk.cscec.domain.bo.AdvisoryBodyBo; import com.dsk.cscec.domain.bo.AdvisoryBodyBo;
import com.dsk.cscec.domain.bo.CustomerCooperationBo; import com.dsk.cscec.domain.bo.CustomerCooperationBo;
import com.dsk.cscec.domain.bo.CustomerInfoBo; import com.dsk.cscec.domain.bo.CustomerInfoBo;
...@@ -83,8 +84,24 @@ public class CustomerInfoController extends BaseController { ...@@ -83,8 +84,24 @@ public class CustomerInfoController extends BaseController {
* 查询供应商基本情况 * 查询供应商基本情况
*/ */
@GetMapping("/queryBasicInfo") @GetMapping("/queryBasicInfo")
public R<Map<String,Long>> queryBasicInfo() { public R<Map<String, Long>> queryBasicInfo() {
return R.ok(iCustomerInfoService.queryBasicInfo()); return R.ok(iCustomerInfoService.queryBasicInfo());
} }
/**
* 校验劳务队长身份证号是否存在
*/
@GetMapping("/checkLaborLeaderIdExist/{laborLeaderId}")
public R<List<CustomerInfoVo>> checkLaborLeaderIdExist(@PathVariable String laborLeaderId) {
return R.ok(iCustomerInfoService.checkLaborLeaderIdExist(laborLeaderId));
}
/**
* 添加劳务队队长
*/
@PostMapping("addLaborLeader")
public R<Void> addLaborLeader(@RequestBody AddDCustomerLaborLeaderBo bo) {
return toAjax(iCustomerInfoService.addLaborLeader(bo));
}
} }
package com.dsk.cscec.controller;
import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.cscec.domain.LaborLeaderCustomerRisk;
import com.dsk.cscec.domain.bo.AddLaborLeaderCustomerRiskBo;
import com.dsk.cscec.domain.bo.QueryLaborLeaderCustomerRisk;
import com.dsk.cscec.service.LaborLeaderCustomerRiskService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* 劳务队长供应商挂靠风险表(LaborLeaderCustomerRisk)表控制层
*
* @author sxk
* @since 2024-06-04 17:28:40
*/
@RestController
@RequestMapping("laborLeaderCustomerRisk")
public class LaborLeaderCustomerRiskController extends BaseController {
/**
* 服务对象
*/
@Resource
private LaborLeaderCustomerRiskService baseService;
/**
* 添加挂靠风险记录
*/
@PostMapping("/addRiskRecord")
public R<Void> addRiskRecord(@Validated @RequestBody AddLaborLeaderCustomerRiskBo addBo) {
return toAjax(baseService.addRiskRecord(addBo));
}
/**
* 查询挂靠风险列表
*/
@GetMapping("/queryRiskList")
public TableDataInfo<LaborLeaderCustomerRisk> queryRiskList(QueryLaborLeaderCustomerRisk queryBo, PageQuery pageQuery) {
return baseService.queryRiskList(queryBo, pageQuery);
}
}
package com.dsk.cscec.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.dsk.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* 劳务队长供应商挂靠风险表(LaborLeaderCustomerRisk)实体类
*
* @author sxk
* @since 2024-06-04 17:28:40
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LaborLeaderCustomerRisk extends BaseEntity implements Serializable {
private static final long serialVersionUID = -52043090383272703L;
/**
* 风险ID
*/
@TableId(value = "risk_id")
private Long riskId;
/**
* 供应商企业ID
*/
private Integer customerCid;
/**
* 劳务队长姓名
*/
private String leaderName;
/**
* 劳务队长身份证号
*/
private String laborCaptainIdCard;
/**
* 劳务队长联系电话
*/
private String laborCaptainPhone;
/**
* 挂靠单位(供应商名称)
*/
private String customerName;
/**
* 不良事由
*/
private String badReason;
/**
* 不良行为情形
*/
private String badBehaviorSituation;
/**
* 数据来源(0:自主添加,1:系统添加)
*/
private Integer dataSource;
}
package com.dsk.cscec.domain.bo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
/**
* @author sxk
* @date 2024.06.04
* @time 14:25
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AddDCustomerLaborLeaderBo {
/**
* ipm供应商名称
*/
@NotBlank(message = "供应商名称不能为空")
private String cusomerName;
/**
* 统一社会信用代码
*/
private String unifySocialCode;
/**
* 队长名称
*/
@NotBlank(message = "劳务队长姓名不能为空")
private String leaderName;
/**
* 劳务队长身份证号
*/
@NotBlank(message = "劳务队长身份证号不能为空")
private String laborCaptainIdcard;
/**
* 劳务队长联系电话
*/
@NotBlank(message = "劳务队长联系电话不能为空")
private String laborCaptainPhone;
/**
* 队伍规模人数
*/
private Double serviceTeamPersonnum;
}
package com.dsk.cscec.domain.bo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* @author sxk
* @date 2024.06.05
* @time 09:21
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AddLaborLeaderCustomerRiskBo {
/**
* 劳务队长姓名
*/
@NotBlank(message = "劳务队长姓名不能为空")
private String leaderName;
/**
* 劳务队长身份证号
*/
@NotBlank(message = "劳务队长身份证号不能为空")
private String laborCaptainIdCard;
/**
* 劳务队长联系电话
*/
@NotBlank(message = "劳务队长联系电话不能为空")
private String laborCaptainPhone;
/**
* 挂靠单位(供应商名称)
*/
@NotBlank(message = "挂靠单位名称不能为空")
private String customerName;
/**
* 不良事由
*/
@NotBlank(message = "不良事由不能为空")
private String badReason;
/**
* 不良行为情形
*/
@NotBlank(message = "不良行为情形不能为空")
private String badBehaviorSituation;
/**
* 数据来源(0:自主添加,1:系统添加)
*/
@NotNull(message = "数据来源不能为空")
private Integer dataSource;
}
...@@ -30,7 +30,10 @@ public class AdvisoryBodyBo extends BaseEntity { ...@@ -30,7 +30,10 @@ public class AdvisoryBodyBo extends BaseEntity {
* 咨询机构名称 * 咨询机构名称
*/ */
private String advisoryBodyName; private String advisoryBodyName;
/**
* 项目名称
*/
private String projectName;
/** /**
* 项目承接单位id * 项目承接单位id
*/ */
......
...@@ -3,7 +3,6 @@ package com.dsk.cscec.domain.bo; ...@@ -3,7 +3,6 @@ package com.dsk.cscec.domain.bo;
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 lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
import java.util.Date; import java.util.Date;
...@@ -92,6 +91,13 @@ public class CustomerInfoBo extends BaseEntity { ...@@ -92,6 +91,13 @@ public class CustomerInfoBo extends BaseEntity {
* 队长名称 * 队长名称
*/ */
private String leaderName; private String leaderName;
/**
* 队长身份证号
*/
private String laborCaptainIdCard;
/**
* 是否身份证查重
*/
private Boolean isIdCardRepeat;
} }
package com.dsk.cscec.domain.bo;
import com.dsk.cscec.domain.LaborLeaderCustomerRisk;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @author sxk
* @date 2024.06.05
* @time 10:00
*/
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class QueryLaborLeaderCustomerRisk extends LaborLeaderCustomerRisk {
/**
* 发生开始日期
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date startDate;
/**
* 发生结束日期
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date endDate;
}
package com.dsk.cscec.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dsk.cscec.domain.DProject;
import com.dsk.cscec.domain.LaborLeaderCustomerRisk;
import org.apache.ibatis.annotations.Param;
/**
* 劳务队长供应商挂靠风险表(LaborLeaderCustomerRisk)表数据库访问层
*
* @author makejava
* @since 2024-06-04 17:28:40
*/
public interface LaborLeaderCustomerRiskMapper extends BaseMapper<LaborLeaderCustomerRisk> {
/**
* 查询挂靠风险列表
*/
Page<LaborLeaderCustomerRisk> queryRiskList(@Param("page") Page<LaborLeaderCustomerRisk> page, @Param(Constants.WRAPPER) QueryWrapper<DProject> wrapper);
}
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.dsk.common.core.domain.PageQuery; import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.page.TableDataInfo; import com.dsk.common.core.page.TableDataInfo;
import com.dsk.cscec.domain.DCustomer; import com.dsk.cscec.domain.DCustomer;
import com.dsk.cscec.domain.bo.AddDCustomerLaborLeaderBo;
import com.dsk.cscec.domain.bo.AdvisoryBodyBo; import com.dsk.cscec.domain.bo.AdvisoryBodyBo;
import com.dsk.cscec.domain.bo.CustomerCooperationBo; import com.dsk.cscec.domain.bo.CustomerCooperationBo;
import com.dsk.cscec.domain.bo.CustomerInfoBo; import com.dsk.cscec.domain.bo.CustomerInfoBo;
...@@ -12,6 +13,7 @@ import com.dsk.cscec.domain.vo.CustomerApproveVo; ...@@ -12,6 +13,7 @@ import com.dsk.cscec.domain.vo.CustomerApproveVo;
import com.dsk.cscec.domain.vo.CustomerCooperationVo; import com.dsk.cscec.domain.vo.CustomerCooperationVo;
import com.dsk.cscec.domain.vo.CustomerInfoVo; import com.dsk.cscec.domain.vo.CustomerInfoVo;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -64,4 +66,14 @@ public interface ICustomerInfoService extends IService<DCustomer> { ...@@ -64,4 +66,14 @@ public interface ICustomerInfoService extends IService<DCustomer> {
* 查询供应商基本情况 * 查询供应商基本情况
*/ */
Map<String, Long> queryBasicInfo(); Map<String, Long> queryBasicInfo();
/**
* 校验劳务队长身份证号是否存在
*/
List<CustomerInfoVo> checkLaborLeaderIdExist(String laborLeaderId);
/**
* 添加劳务队队长
*/
Integer addLaborLeader(AddDCustomerLaborLeaderBo bo);
} }
package com.dsk.cscec.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.cscec.domain.LaborLeaderCustomerRisk;
import com.dsk.cscec.domain.bo.AddLaborLeaderCustomerRiskBo;
import com.dsk.cscec.domain.bo.QueryLaborLeaderCustomerRisk;
/**
* 劳务队长供应商挂靠风险表(LaborLeaderCustomerRisk)表服务接口
*
* @author sxk
* @since 2024-06-04 17:28:40
*/
public interface LaborLeaderCustomerRiskService extends IService<LaborLeaderCustomerRisk> {
/**
* 添加挂靠风险记录
*/
Integer addRiskRecord(AddLaborLeaderCustomerRiskBo addBo);
/**
* 查询挂靠风险列表
*/
TableDataInfo<LaborLeaderCustomerRisk> queryRiskList(QueryLaborLeaderCustomerRisk queryBo, PageQuery pageQuery);
}
package com.dsk.cscec.service.impl; package com.dsk.cscec.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.lang.Assert; import cn.hutool.core.lang.Assert;
import cn.hutool.core.map.MapUtil; import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
...@@ -14,6 +15,7 @@ import com.dsk.common.core.page.TableDataInfo; ...@@ -14,6 +15,7 @@ import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.utils.StringUtils; import com.dsk.common.utils.StringUtils;
import com.dsk.cscec.constant.AdvisoryBodyManageQueryConstants; import com.dsk.cscec.constant.AdvisoryBodyManageQueryConstants;
import com.dsk.cscec.domain.DCustomer; import com.dsk.cscec.domain.DCustomer;
import com.dsk.cscec.domain.bo.AddDCustomerLaborLeaderBo;
import com.dsk.cscec.domain.bo.AdvisoryBodyBo; import com.dsk.cscec.domain.bo.AdvisoryBodyBo;
import com.dsk.cscec.domain.bo.CustomerCooperationBo; import com.dsk.cscec.domain.bo.CustomerCooperationBo;
import com.dsk.cscec.domain.bo.CustomerInfoBo; import com.dsk.cscec.domain.bo.CustomerInfoBo;
...@@ -24,11 +26,13 @@ import com.dsk.cscec.mapper.DSubcontractMapper; ...@@ -24,11 +26,13 @@ import com.dsk.cscec.mapper.DSubcontractMapper;
import com.dsk.cscec.service.ICustomerInfoService; import com.dsk.cscec.service.ICustomerInfoService;
import com.dsk.search.service.BusinessOpportunityRadarService; import com.dsk.search.service.BusinessOpportunityRadarService;
import jodd.util.StringUtil; import jodd.util.StringUtil;
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.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import javax.annotation.Resource;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -39,17 +43,13 @@ import java.util.Map; ...@@ -39,17 +43,13 @@ import java.util.Map;
*/ */
@Service @Service
public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer> implements ICustomerInfoService { public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer> implements ICustomerInfoService {
@Resource
@Autowired
private DSubcontractMapper subcontractMapper; private DSubcontractMapper subcontractMapper;
@Resource
@Autowired
private BusinessOpportunityRadarService opportunityRadarService; private BusinessOpportunityRadarService opportunityRadarService;
@Resource
@Autowired
private AdvisoryBodyMapper advisoryBodyMapper; private AdvisoryBodyMapper advisoryBodyMapper;
@Resource
@Autowired
private DSubcontractMapper dSubcontractMapper; private DSubcontractMapper dSubcontractMapper;
@Override @Override
...@@ -213,12 +213,12 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto ...@@ -213,12 +213,12 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
Long lwfbCount = baseMapper.selectCount(new LambdaQueryWrapper<DCustomer>() Long lwfbCount = baseMapper.selectCount(new LambdaQueryWrapper<DCustomer>()
.eq(DCustomer::getRecommendOrgId, "F17305B4EA4444CBAB12892C7B99E475") .eq(DCustomer::getRecommendOrgId, "F17305B4EA4444CBAB12892C7B99E475")
.eq(DCustomer::getCustomerClass, "劳务分包") .eq(DCustomer::getCustomerClass, "劳务分包")
.eq(DCustomer::getServiceTeamLogo,"N")); .eq(DCustomer::getServiceTeamLogo, "N"));
//劳务分包队伍数量 //劳务分包队伍数量
Long lwfbdwCount = baseMapper.selectCount(new LambdaQueryWrapper<DCustomer>() Long lwfbdwCount = baseMapper.selectCount(new LambdaQueryWrapper<DCustomer>()
.eq(DCustomer::getRecommendOrgId, "F17305B4EA4444CBAB12892C7B99E475") .eq(DCustomer::getRecommendOrgId, "F17305B4EA4444CBAB12892C7B99E475")
.eq(DCustomer::getCustomerClass, "劳务分包") .eq(DCustomer::getCustomerClass, "劳务分包")
.eq(DCustomer::getServiceTeamLogo,"Y")); .eq(DCustomer::getServiceTeamLogo, "Y"));
infoMap.put("customerTotal", zyfbCount + jxsgCount + wzsbCount + lwfbCount + lwfbdwCount); infoMap.put("customerTotal", zyfbCount + jxsgCount + wzsbCount + lwfbCount + lwfbdwCount);
infoMap.put("zyfbCount", zyfbCount); infoMap.put("zyfbCount", zyfbCount);
infoMap.put("jxsgCount", jxsgCount); infoMap.put("jxsgCount", jxsgCount);
...@@ -227,4 +227,107 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto ...@@ -227,4 +227,107 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
infoMap.put("lwfbdwCount", lwfbdwCount); infoMap.put("lwfbdwCount", lwfbdwCount);
return infoMap; return infoMap;
} }
/**
* 校验劳务队长身份证号是否存在
*/
@Override
public List<CustomerInfoVo> checkLaborLeaderIdExist(String laborLeaderId) {
List<DCustomer> leaderList = baseMapper.selectList(new LambdaQueryWrapper<DCustomer>()
.eq(DCustomer::getLaborCaptainIdcard, laborLeaderId)
.eq(DCustomer::getCustomerClass, "劳务分包")
.eq(DCustomer::getServiceTeamLogo, "Y")
.eq(DCustomer::getRecommendOrgId, AdvisoryBodyManageQueryConstants.LEVEL1_COMPANY_ID));
if (!leaderList.isEmpty()) {
List<CustomerInfoVo> voList = BeanUtil.copyToList(leaderList, CustomerInfoVo.class);
voList.parallelStream().forEach(item -> {
DCustomerListVo vo = subcontractMapper.selectStatisticByCustomerId(item.getCustomerId());
//企业合作数量
item.setEnterpriseCooperationCount(vo.getEnterpriseCooperationCount());
//项目合作数量
item.setProjectCooperationCount(vo.getProjectCooperationCount());
try {
Map<String, Object> map = opportunityRadarService.enterpriseByName(item.getCustomerName());
if (!ObjectUtils.isEmpty(map.get("data"))) {
Map<String, Object> data = BeanUtil.beanToMap(map.get("data"));
Integer companyId = MapUtil.getInt(data, "jskEid");
item.setCompanyId(companyId);
}
} catch (Exception e) {
log.error("CustomerInfoServiceImpl.checkLaborLeaderIdExist() error:" + e);
}
});
return voList;
}
return null;
}
/**
* 添加劳务队队长
*/
@Override
@Transactional(rollbackFor = Exception.class)
public Integer addLaborLeader(AddDCustomerLaborLeaderBo bo) {
DCustomer customer = BeanUtil.toBean(bo, DCustomer.class);
//如果数据库中存在该供应商,则填充相应信息
DCustomer originCustomer = baseMapper.selectList(new LambdaQueryWrapper<DCustomer>()
.eq(DCustomer::getCusomerName, bo.getCusomerName())
.orderByDesc(DCustomer::getApproveDate2)).get(0);
if (ObjectUtil.isNotNull(originCustomer)) {
//财务客商编码
customer.setFinCustomerCode(originCustomer.getFinCustomerCode());
//法人代表
customer.setRepresentative(originCustomer.getRepresentative());
//工商注册号
customer.setRegisterNo(originCustomer.getRegisterNo());
//注册资金
customer.setRegisterCapital(originCustomer.getRegisterCapital());
//注册地区域
customer.setRegisterRegion(originCustomer.getRegisterRegion());
//省份
customer.setRegisterProvince(originCustomer.getRegisterProvince());
//城市
customer.setRegisterCity(originCustomer.getRegisterCity());
//联系人
customer.setContactPerson(originCustomer.getContactPerson());
//电话
customer.setContactPhone(originCustomer.getContactPhone());
//一体化客商类型
customer.setFinCustomerType(originCustomer.getFinCustomerType());
//客商性质
customer.setCustomerKind(originCustomer.getCustomerKind());
//是否业主
customer.setIsowner(originCustomer.getIsowner());
//是否供应商
customer.setIscustomer(originCustomer.getIscustomer());
//税率类型
customer.setTaxType(originCustomer.getTaxType());
//是否冻结
customer.setIsfreeze(originCustomer.getIsfreeze());
} else {
//填充省市信息
Map<String, Object> map = opportunityRadarService.enterpriseByName(bo.getCusomerName());
if (!ObjectUtils.isEmpty(map.get("data"))) {
Map<String, Object> data = BeanUtil.beanToMap(map.get("data"));
customer.setRegisterProvince(MapUtil.getStr(data, "province"));
customer.setRegisterCity(MapUtil.getStr(data, "city"));
}
}
customer.setCustomerKey(baseMapper.selectOne(new LambdaQueryWrapper<DCustomer>()
.orderByDesc(DCustomer::getCustomerKey)
.last("LIMIT 1")).getCustomerKey() + 1);
customer.setCustomerName(bo.getCusomerName());
customer.setFinCustomerName(bo.getCusomerName());
customer.setRecommendOrgId(AdvisoryBodyManageQueryConstants.LEVEL1_COMPANY_ID);
customer.setRecommendOrg(AdvisoryBodyManageQueryConstants.LEVEL1_COMPANY_NAME);
customer.setTaxNumber(bo.getUnifySocialCode());
customer.setBusinessLicense(bo.getUnifySocialCode());
customer.setOrgnizationCode(bo.getUnifySocialCode());
DateTime now = new DateTime();
customer.setApproveDate2(now);
customer.setUpdateDate(now.toDateStr());
customer.setLoadTime(now);
customer.setCustomerClass("劳务分包");
return baseMapper.insert(customer);
}
} }
package com.dsk.cscec.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.utils.StringUtils;
import com.dsk.cscec.domain.DProject;
import com.dsk.cscec.domain.LaborLeaderCustomerRisk;
import com.dsk.cscec.domain.bo.AddLaborLeaderCustomerRiskBo;
import com.dsk.cscec.domain.bo.QueryLaborLeaderCustomerRisk;
import com.dsk.cscec.mapper.LaborLeaderCustomerRiskMapper;
import com.dsk.cscec.service.LaborLeaderCustomerRiskService;
import com.dsk.search.service.BusinessOpportunityRadarService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import javax.annotation.Resource;
import java.util.Map;
/**
* 劳务队长供应商挂靠风险表(LaborLeaderCustomerRisk)表服务实现类
*
* @author makejava
* @since 2024-06-04 17:28:40
*/
@Service("laborLeaderCustomerRiskService")
public class LaborLeaderCustomerRiskServiceImpl extends ServiceImpl<LaborLeaderCustomerRiskMapper, LaborLeaderCustomerRisk> implements LaborLeaderCustomerRiskService {
@Resource
private LaborLeaderCustomerRiskMapper baseMapper;
@Resource
private BusinessOpportunityRadarService opportunityRadarService;
/**
* 添加挂靠风险记录
*/
@Override
@Transactional(rollbackFor = Exception.class)
public Integer addRiskRecord(AddLaborLeaderCustomerRiskBo addBo) {
LaborLeaderCustomerRisk risk = BeanUtil.toBean(addBo, LaborLeaderCustomerRisk.class);
risk.setRiskId(IdUtil.getSnowflakeNextId());
//查询供应商cid
Map<String, Object> map = opportunityRadarService.enterpriseByName(addBo.getCustomerName());
if (!ObjectUtils.isEmpty(map.get("data"))) {
Map<String, Object> data = BeanUtil.beanToMap(map.get("data"));
Integer companyId = MapUtil.getInt(data, "jskEid");
Assert.notNull(companyId, "挂靠单位不存在或请填写完整单位名称");
risk.setCustomerCid(companyId);
}
risk.setLeaderName(addBo.getLeaderName());
risk.setLaborCaptainIdCard(addBo.getLaborCaptainIdCard());
risk.setLaborCaptainPhone(addBo.getLaborCaptainPhone());
risk.setCustomerName(addBo.getCustomerName());
risk.setBadReason("挂靠风险");
risk.setBadBehaviorSituation(addBo.getLeaderName() + "已存在于" + addBo.getCustomerName() + ",存在挂靠风险");
return baseMapper.insert(risk);
}
/**
* 查询挂靠风险列表
*/
@Override
public TableDataInfo<LaborLeaderCustomerRisk> queryRiskList(QueryLaborLeaderCustomerRisk queryBo, PageQuery pageQuery) {
QueryWrapper<DProject> wrapper = Wrappers.query();
wrapper
.like(StringUtils.isNotBlank(queryBo.getLeaderName()), "leader_name", queryBo.getLeaderName())
.like(StringUtils.isNotBlank(queryBo.getCustomerName()), "customer_name", queryBo.getCustomerName())
.gt(ObjectUtil.isNotNull(queryBo.getStartDate()), "create_time", queryBo.getStartDate())
.lt(ObjectUtil.isNotNull(queryBo.getEndDate()), "create_time", queryBo.getEndDate())
.between(ObjectUtil.isNotNull(queryBo.getStartDate()) && ObjectUtil.isNotNull(queryBo.getEndDate()),
"create_time",
queryBo.getStartDate(),
queryBo.getEndDate())
.orderByDesc("create_time");
Page<LaborLeaderCustomerRisk> page = baseMapper.queryRiskList(pageQuery.build(), wrapper);
page.getRecords().parallelStream().forEach(item -> {
//关键字标红
if (StringUtils.isNotBlank(queryBo.getLeaderName())) {
item.setLeaderName(StringUtils.markInRed(item.getLeaderName(), queryBo.getLeaderName()));
}
if (StringUtils.isNotBlank(queryBo.getCustomerName())) {
item.setCustomerName(StringUtils.markInRed(item.getCustomerName(), queryBo.getCustomerName()));
}
});
return TableDataInfo.build(page);
}
}
...@@ -16,9 +16,12 @@ ...@@ -16,9 +16,12 @@
dp.project_name,dp.project_code,dp.province_name,dp.city_name,dp.isinvestproject,dp.project_type1, dp.project_name,dp.project_code,dp.province_name,dp.city_name,dp.isinvestproject,dp.project_type1,
dp.project_type2,dp.contract_value,dp.owner_name,dp.contract_org_name,dp.contract_sign_date dp.project_type2,dp.contract_value,dp.owner_name,dp.contract_org_name,dp.contract_sign_date
from advisory_body_project abp from advisory_body_project abp
left join advisory_body ab on ab.advisory_body_id = abp.advisory_body_id left join advisory_body ab on ab.advisory_body_cid = abp.advisory_body_cid
left join d_project dp on dp.project_key = abp.project_key left join d_project dp on dp.project_key = abp.project_key
<where> <where>
<if test="bo.projectName != null and bo.projectName != ''">
and dp.project_name like concat('%',#{bo.projectName},'%')
</if>
<if test="bo.advisoryBodyId != null and bo.advisoryBodyId != ''"> <if test="bo.advisoryBodyId != null and bo.advisoryBodyId != ''">
and ab.advisory_body_id = #{bo.advisoryBodyId} and ab.advisory_body_id = #{bo.advisoryBodyId}
</if> </if>
......
...@@ -113,6 +113,9 @@ ...@@ -113,6 +113,9 @@
<if test="bo.leaderName != null and bo.leaderName != ''"> <if test="bo.leaderName != null and bo.leaderName != ''">
and leader_name like concat('%',#{bo.leaderName},'%') and leader_name like concat('%',#{bo.leaderName},'%')
</if> </if>
<if test="bo.laborCaptainIdCard != null and bo.laborCaptainIdCard != ''">
and labor_captain_idcard like concat('%',#{bo.laborCaptainIdCard},'%')
</if>
<if test="bo.customerName != null and bo.customerName != '' "> <if test="bo.customerName != null and bo.customerName != '' ">
and customer_name like concat('%',#{bo.customerName},'%') and customer_name like concat('%',#{bo.customerName},'%')
</if> </if>
...@@ -180,6 +183,15 @@ ...@@ -180,6 +183,15 @@
<if test="bo.approveDate2End != null"> <if test="bo.approveDate2End != null">
and date(approve_date2) &lt;= #{bo.approveDate2End} and date(approve_date2) &lt;= #{bo.approveDate2End}
</if> </if>
<if test="bo.isIdCardRepeat == true">
and labor_captain_idcard in (select labor_captain_idcard
from d_customer
where recommend_org_id = 'F17305B4EA4444CBAB12892C7B99E475'
and customer_class = '劳务分包'
and leader_name is not null
group by labor_captain_idcard
having count(*) > 1)
</if>
order by approve_date2 desc order by approve_date2 desc
</select> </select>
<select id="selectBusinessLicense" resultType="com.dsk.cscec.domain.vo.CertificateVo"> <select id="selectBusinessLicense" resultType="com.dsk.cscec.domain.vo.CertificateVo">
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dsk.cscec.mapper.LaborLeaderCustomerRiskMapper">
<select id="queryRiskList" resultType="com.dsk.cscec.domain.LaborLeaderCustomerRisk">
select risk_id,
customer_cid,
leader_name,
labor_captain_id_card,
labor_captain_phone,
customer_name,
bad_reason,
bad_behavior_situation,
data_source,
create_time
from labor_leader_customer_risk ${ew.getCustomSqlSegment}
</select>
</mapper>
\ No newline at end of file
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