0320-北仑:企业九维数据+客户分层导入+消息提醒;版本更新通知公告限制部门可见
This commit is contained in:
@@ -18,8 +18,10 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.rmi.ServerException;
|
||||
@@ -220,4 +222,18 @@ public class MyCustomerController extends BaseController {
|
||||
}
|
||||
return AjaxResult.success(iSysCampaignGroupCustomerService.appointCustCamp( custId, custName, custIdc, custPhone, custIsn,socialCreditCode,lpName, campaignId, custType));
|
||||
}
|
||||
|
||||
@Log(title = "我的客户-异步导入企业客户价值分层", businessType = com.ruoyi.common.enums.BusinessType.IMPORT)
|
||||
@PostMapping(value = "/importBusinessCustLevelAsync", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
@ApiOperation("异步导入企业客户价值分层")
|
||||
public AjaxResult importBusinessCustLevelAsync(@RequestPart("file") MultipartFile file) {
|
||||
return AjaxResult.success("导入任务已提交,后台正在处理", myCustomerService.importBusinessCustLevelAsync(file));
|
||||
}
|
||||
|
||||
@Log(title = "我的客户-查询企业客户价值分层导入状态")
|
||||
@GetMapping("/importBusinessCustLevelStatus/{taskId}")
|
||||
@ApiOperation("查询企业客户价值分层导入状态")
|
||||
public AjaxResult importBusinessCustLevelStatus(@PathVariable String taskId) {
|
||||
return AjaxResult.success(myCustomerService.getBusinessCustLevelImportStatus(taskId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.ibs.customerselect.domain;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BusinessCustLevelImportExcelDTO {
|
||||
|
||||
@ExcelProperty("统信码")
|
||||
private String socialCreditCode;
|
||||
|
||||
@ExcelProperty("价值分层")
|
||||
private String custLevel;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ruoyi.ibs.customerselect.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class BusinessCustLevelImportTaskVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 0-处理中 1-成功 2-失败
|
||||
*/
|
||||
private String status;
|
||||
|
||||
private String message;
|
||||
|
||||
private Integer totalCount;
|
||||
|
||||
private Integer successCount;
|
||||
|
||||
private Integer ignoredCount;
|
||||
|
||||
private String userName;
|
||||
|
||||
private String createTime;
|
||||
|
||||
private String finishTime;
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.ibs.customerselect.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.common.core.domain.entity.CustInfoBusiness;
|
||||
import com.ruoyi.ibs.customerselect.domain.BusinessCustLevelImportExcelDTO;
|
||||
import com.ruoyi.ibs.customerselect.domain.CustBaseInfo;
|
||||
import com.ruoyi.ibs.customerselect.domain.CustInfoDeleteFromAnchor;
|
||||
import com.ruoyi.ibs.customerselect.domain.CustInfoUpdateFromAnchor;
|
||||
@@ -242,4 +243,10 @@ public interface CustInfoBusinessMapper extends BaseMapper<CustInfoBusiness>
|
||||
public int insertCustomersToBusinessByScCode(List<SysGroupCustomer> sysGroupCustomers);
|
||||
|
||||
List<CustInfoBusiness> selectRecord(String socialCreditCode);
|
||||
|
||||
List<String> selectExistingSocialCreditCodes(@Param("socialCreditCodes") List<String> socialCreditCodes,
|
||||
@Param("deptCode") String deptCode);
|
||||
|
||||
int batchUpdateCustLevelBySocialCreditCode(@Param("list") List<BusinessCustLevelImportExcelDTO> list,
|
||||
@Param("deptCode") String deptCode);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.ibs.customerselect.service;
|
||||
|
||||
import com.ruoyi.ibs.customerselect.domain.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -41,4 +42,8 @@ public interface IMyCustomerService {
|
||||
public CustListSearchVo selectCustomListSearchVo(CustBaseInfo sysCustomerBasedata);
|
||||
|
||||
MerchantMcspInfo selectmerchantMessage(String custId);
|
||||
|
||||
String importBusinessCustLevelAsync(MultipartFile file);
|
||||
|
||||
BusinessCustLevelImportTaskVO getBusinessCustLevelImportStatus(String taskId);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
package com.ruoyi.ibs.customerselect.service.Impl;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.CustInfoBusiness;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.uuid.IdUtils;
|
||||
import com.ruoyi.ibs.dashboard.service.NotificationService;
|
||||
import com.ruoyi.ibs.customerselect.domain.BusinessCustLevelImportExcelDTO;
|
||||
import com.ruoyi.ibs.customerselect.domain.BusinessCustLevelImportTaskVO;
|
||||
import com.ruoyi.ibs.customerselect.domain.*;
|
||||
import com.ruoyi.ibs.customerselect.domain.vo.GridRelateVO;
|
||||
import com.ruoyi.ibs.customerselect.mapper.CustInfoBusinessMapper;
|
||||
@@ -32,9 +38,16 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -45,6 +58,10 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
public class MyCustomerServiceImpl implements IMyCustomerService {
|
||||
|
||||
private static final String BUSINESS_CUST_LEVEL_IMPORT_TASK_KEY = "BUSINESS_CUST_LEVEL_IMPORT_TASK_";
|
||||
private static final int BUSINESS_CUST_LEVEL_IMPORT_BATCH_SIZE = 1000;
|
||||
private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
@Autowired
|
||||
private CustInfoBusinessMapper custInfoBusinessMapper;
|
||||
|
||||
@@ -80,6 +97,12 @@ public class MyCustomerServiceImpl implements IMyCustomerService {
|
||||
@Resource
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Resource
|
||||
private NotificationService notificationService;
|
||||
|
||||
@Resource(name = "excelImportExecutor")
|
||||
private ExecutorService excelImportExecutor;
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(MyCustomerServiceImpl.class);
|
||||
|
||||
/**
|
||||
@@ -467,5 +490,154 @@ public class MyCustomerServiceImpl implements IMyCustomerService {
|
||||
return merchantMcspInfoMapper.selectOne(new LambdaQueryWrapper<MerchantMcspInfo>().eq(MerchantMcspInfo::getCustId,custId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String importBusinessCustLevelAsync(MultipartFile file) {
|
||||
if (file == null || file.isEmpty()) {
|
||||
throw new ServiceException("导入文件不能为空");
|
||||
}
|
||||
byte[] fileBytes;
|
||||
try {
|
||||
fileBytes = file.getBytes();
|
||||
} catch (IOException e) {
|
||||
throw new ServiceException("读取导入文件失败");
|
||||
}
|
||||
String taskId = IdUtils.fastSimpleUUID();
|
||||
String userName = SecurityUtils.getUsername();
|
||||
String deptCode = SecurityUtils.getHeadId();
|
||||
BusinessCustLevelImportTaskVO taskVO = new BusinessCustLevelImportTaskVO();
|
||||
taskVO.setStatus("0");
|
||||
taskVO.setMessage("导入任务已提交,后台正在处理");
|
||||
taskVO.setTotalCount(0);
|
||||
taskVO.setSuccessCount(0);
|
||||
taskVO.setIgnoredCount(0);
|
||||
taskVO.setUserName(userName);
|
||||
taskVO.setCreateTime(formatNow());
|
||||
cacheBusinessCustLevelImportTask(taskId, taskVO);
|
||||
excelImportExecutor.submit(() -> doImportBusinessCustLevel(taskId, userName, deptCode, fileBytes));
|
||||
return taskId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessCustLevelImportTaskVO getBusinessCustLevelImportStatus(String taskId) {
|
||||
BusinessCustLevelImportTaskVO taskVO = redisCache.getCacheObject(getBusinessCustLevelImportTaskKey(taskId));
|
||||
if (taskVO == null) {
|
||||
throw new ServiceException("导入任务不存在或已过期");
|
||||
}
|
||||
return taskVO;
|
||||
}
|
||||
|
||||
private void doImportBusinessCustLevel(String taskId, String userName, String deptCode, byte[] fileBytes) {
|
||||
BusinessCustLevelImportTaskVO taskVO = redisCache.getCacheObject(getBusinessCustLevelImportTaskKey(taskId));
|
||||
if (taskVO == null) {
|
||||
taskVO = new BusinessCustLevelImportTaskVO();
|
||||
taskVO.setUserName(userName);
|
||||
taskVO.setCreateTime(formatNow());
|
||||
}
|
||||
try {
|
||||
List<BusinessCustLevelImportExcelDTO> importRows = EasyExcel.read(new ByteArrayInputStream(fileBytes))
|
||||
.head(BusinessCustLevelImportExcelDTO.class)
|
||||
.sheet()
|
||||
.doReadSync();
|
||||
|
||||
Map<String, String> levelMap = new LinkedHashMap<>();
|
||||
if (importRows != null) {
|
||||
for (BusinessCustLevelImportExcelDTO row : importRows) {
|
||||
String socialCreditCode = normalizeImportCell(row.getSocialCreditCode());
|
||||
String custLevel = normalizeImportCell(row.getCustLevel());
|
||||
if (StringUtils.isEmpty(socialCreditCode)) {
|
||||
continue;
|
||||
}
|
||||
levelMap.put(socialCreditCode, custLevel);
|
||||
}
|
||||
}
|
||||
|
||||
if (levelMap.isEmpty()) {
|
||||
throw new ServiceException("Excel中未识别到有效的统信码和价值分层数据");
|
||||
}
|
||||
|
||||
List<String> existingSocialCreditCodes = getExistingBusinessSocialCreditCodes(new ArrayList<>(levelMap.keySet()), deptCode);
|
||||
Set<String> existingCodeSet = new HashSet<>(existingSocialCreditCodes);
|
||||
List<BusinessCustLevelImportExcelDTO> updateList = new ArrayList<>();
|
||||
for (Map.Entry<String, String> entry : levelMap.entrySet()) {
|
||||
if (!existingCodeSet.contains(entry.getKey())) {
|
||||
continue;
|
||||
}
|
||||
BusinessCustLevelImportExcelDTO dto = new BusinessCustLevelImportExcelDTO();
|
||||
dto.setSocialCreditCode(entry.getKey());
|
||||
dto.setCustLevel(entry.getValue());
|
||||
updateList.add(dto);
|
||||
}
|
||||
|
||||
batchUpdateBusinessCustLevel(updateList, deptCode);
|
||||
|
||||
int totalCount = levelMap.size();
|
||||
int successCount = updateList.size();
|
||||
int ignoredCount = totalCount - successCount;
|
||||
String message = String.format("公司客户视图分层分类数据导入完成,成功更新%d条,忽略%d条", successCount, ignoredCount);
|
||||
|
||||
taskVO.setStatus("1");
|
||||
taskVO.setMessage(message);
|
||||
taskVO.setTotalCount(totalCount);
|
||||
taskVO.setSuccessCount(successCount);
|
||||
taskVO.setIgnoredCount(ignoredCount);
|
||||
taskVO.setFinishTime(formatNow());
|
||||
cacheBusinessCustLevelImportTask(taskId, taskVO);
|
||||
notificationService.sendNotification(userName, message);
|
||||
} catch (Exception e) {
|
||||
String errorMsg = StringUtils.isNotEmpty(e.getMessage()) ? e.getMessage() : "导入失败,请检查文件内容";
|
||||
taskVO.setStatus("2");
|
||||
taskVO.setMessage(errorMsg);
|
||||
taskVO.setFinishTime(formatNow());
|
||||
cacheBusinessCustLevelImportTask(taskId, taskVO);
|
||||
notificationService.sendNotification(userName, "公司客户视图分层分类数据导入失败:" + errorMsg);
|
||||
logger.error("公司客户视图分层分类数据导入失败,taskId={}", taskId, e);
|
||||
}
|
||||
}
|
||||
|
||||
private void batchUpdateBusinessCustLevel(List<BusinessCustLevelImportExcelDTO> updateList, String deptCode) {
|
||||
if (updateList == null || updateList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < updateList.size(); i += BUSINESS_CUST_LEVEL_IMPORT_BATCH_SIZE) {
|
||||
int endIndex = Math.min(i + BUSINESS_CUST_LEVEL_IMPORT_BATCH_SIZE, updateList.size());
|
||||
custInfoBusinessMapper.batchUpdateCustLevelBySocialCreditCode(updateList.subList(i, endIndex), deptCode);
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> getExistingBusinessSocialCreditCodes(List<String> socialCreditCodes, String deptCode) {
|
||||
if (socialCreditCodes == null || socialCreditCodes.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<String> existingSocialCreditCodes = new ArrayList<>();
|
||||
for (int i = 0; i < socialCreditCodes.size(); i += BUSINESS_CUST_LEVEL_IMPORT_BATCH_SIZE) {
|
||||
int endIndex = Math.min(i + BUSINESS_CUST_LEVEL_IMPORT_BATCH_SIZE, socialCreditCodes.size());
|
||||
List<String> batchCodes = socialCreditCodes.subList(i, endIndex);
|
||||
List<String> batchResult = custInfoBusinessMapper.selectExistingSocialCreditCodes(batchCodes, deptCode);
|
||||
if (batchResult != null && !batchResult.isEmpty()) {
|
||||
existingSocialCreditCodes.addAll(batchResult);
|
||||
}
|
||||
}
|
||||
return existingSocialCreditCodes;
|
||||
}
|
||||
|
||||
private void cacheBusinessCustLevelImportTask(String taskId, BusinessCustLevelImportTaskVO taskVO) {
|
||||
redisCache.setCacheObject(getBusinessCustLevelImportTaskKey(taskId), taskVO, 24, TimeUnit.HOURS);
|
||||
}
|
||||
|
||||
private String getBusinessCustLevelImportTaskKey(String taskId) {
|
||||
return BUSINESS_CUST_LEVEL_IMPORT_TASK_KEY + taskId;
|
||||
}
|
||||
|
||||
private String normalizeImportCell(String value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
String trimmedValue = value.trim();
|
||||
return trimmedValue.isEmpty() ? null : trimmedValue;
|
||||
}
|
||||
|
||||
private String formatNow() {
|
||||
return LocalDateTime.now().format(DATE_TIME_FORMATTER);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -173,6 +173,7 @@ public class DashboardController extends BaseController {
|
||||
public TableDataInfo list(SysNotice notice)
|
||||
{
|
||||
startPage();
|
||||
notice.setCurrentHeadDeptId(SecurityUtils.getHeadId() + "000");
|
||||
List<SysNotice> list = noticeService.selectNoticeList(notice);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@@ -23,44 +23,58 @@ public class Ent9vPortraitOrc implements Serializable {
|
||||
private String uniscid;
|
||||
|
||||
/** 客户内码 */
|
||||
@TableField("cst_id")
|
||||
private String cstId;
|
||||
|
||||
/** 机构号 */
|
||||
@TableField("org_no")
|
||||
private String orgNo;
|
||||
|
||||
/** score_1合规经营 */
|
||||
@TableField("score_1")
|
||||
private BigDecimal score1;
|
||||
|
||||
/** score_2风险准入 */
|
||||
@TableField("score_2")
|
||||
private BigDecimal score2;
|
||||
|
||||
/** score_3高管信用评价 */
|
||||
@TableField("score_3")
|
||||
private String score3;
|
||||
|
||||
/** score_4股东信用评价 */
|
||||
@TableField("score_4")
|
||||
private BigDecimal score4;
|
||||
|
||||
/** score_5社会贡献度 */
|
||||
@TableField("score_5")
|
||||
private BigDecimal score5;
|
||||
|
||||
/** score_6稳定经营 */
|
||||
@TableField("score_6")
|
||||
private BigDecimal score6;
|
||||
|
||||
/** score_7经营能力 */
|
||||
@TableField("score_7")
|
||||
private BigDecimal score7;
|
||||
|
||||
/** score_8偿债能力 */
|
||||
@TableField("score_8")
|
||||
private BigDecimal score8;
|
||||
|
||||
/** score_9潜在代偿资源 */
|
||||
@TableField("score_9")
|
||||
private BigDecimal score9;
|
||||
|
||||
/** 九维总分 */
|
||||
@TableField("score_all")
|
||||
private BigDecimal scoreAll;
|
||||
|
||||
/** 九维总分排名 */
|
||||
@TableField("score_all_rank")
|
||||
private BigDecimal scoreAllRank;
|
||||
|
||||
/** 会计日期 */
|
||||
@TableField("dat_dt")
|
||||
private String datDt;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.ibs.list.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -21,206 +22,294 @@ public class NineVFinalInfoOrc implements Serializable {
|
||||
private String uniscid;
|
||||
|
||||
/** 机构号 */
|
||||
@TableField("org_no")
|
||||
private String orgNo;
|
||||
|
||||
/** 一、企业合规经营模块 */
|
||||
|
||||
/** 是否存在经营异常名录信息 */
|
||||
@TableField("score_1_1")
|
||||
private String score11;
|
||||
|
||||
/** 是否存在严重违法失信企业名单信息 */
|
||||
@TableField("score_1_2")
|
||||
private String score12;
|
||||
|
||||
/** 企业环境行为信仰登记是否为"E"或D */
|
||||
@TableField("score_1_3")
|
||||
private String score13;
|
||||
|
||||
/** 是否存在税务重大税收违法黑名单信息 */
|
||||
@TableField("score_1_4")
|
||||
private String score14;
|
||||
|
||||
/** 是否存在拖欠工资黑名单 */
|
||||
@TableField("score_1_5")
|
||||
private String score15;
|
||||
|
||||
/** 是否存在工商吊销企业信息 */
|
||||
@TableField("score_1_6")
|
||||
private String score16;
|
||||
|
||||
/** 二、企业风险准入模块 */
|
||||
|
||||
/** 是否存在注销企业信息 */
|
||||
@TableField("score_2_1")
|
||||
private String score21;
|
||||
|
||||
/** 是否存在执行案件信息 */
|
||||
@TableField("score_2_2")
|
||||
private String score22;
|
||||
|
||||
/** 是否存在查封信息 */
|
||||
@TableField("score_2_3")
|
||||
private String score23;
|
||||
|
||||
/** 是否存在单位未履行生效裁判信息 */
|
||||
@TableField("score_2_4")
|
||||
private String score24;
|
||||
|
||||
/** 是否存在企业破产清算信息 */
|
||||
@TableField("score_2_5")
|
||||
private String score25;
|
||||
|
||||
/** 是否失信被执行人 */
|
||||
@TableField("score_2_6")
|
||||
private String score26;
|
||||
|
||||
/** 是否为诉讼案件被告 */
|
||||
@TableField("score_2_7")
|
||||
private String score27;
|
||||
|
||||
/** 三、高管信用评价模块 */
|
||||
|
||||
/** 是否存在查封信息(score_3) */
|
||||
@TableField("score_3_1")
|
||||
private String score31;
|
||||
|
||||
/** 是否存在执行案件信息(score_3) */
|
||||
@TableField("score_3_2")
|
||||
private String score32;
|
||||
|
||||
/** 是否存在个人未履行生效裁判信息 */
|
||||
@TableField("score_3_3")
|
||||
private String score33;
|
||||
|
||||
/** 是否存在拖欠工资黑名单(score_3) */
|
||||
@TableField("score_3_4")
|
||||
private String score34;
|
||||
|
||||
/** 是否失信被执行人(score_3) */
|
||||
@TableField("score_3_5")
|
||||
private String score35;
|
||||
|
||||
/** 是否存在刑事案件被告人生效判决信息 */
|
||||
@TableField("score_3_6")
|
||||
private String score36;
|
||||
|
||||
/** 是否为诉讼案件被告(score_3) */
|
||||
@TableField("score_3_7")
|
||||
private String score37;
|
||||
|
||||
/** 四、股东信用评价模块 */
|
||||
|
||||
/** 是否存在查封信息(score_4) */
|
||||
@TableField("score_4_1")
|
||||
private String score41;
|
||||
|
||||
/** 是否存在执行案件信息(score_4) */
|
||||
@TableField("score_4_2")
|
||||
private String score42;
|
||||
|
||||
/** 是否存在个人未履行生效裁判信息(score_4) */
|
||||
@TableField("score_4_3")
|
||||
private String score43;
|
||||
|
||||
/** 是否存在拖欠工资黑名单(score_4) */
|
||||
@TableField("score_4_4")
|
||||
private String score44;
|
||||
|
||||
/** 是否失信被执行人(score_4) */
|
||||
@TableField("score_4_5")
|
||||
private String score45;
|
||||
|
||||
/** 是否存在刑事案件被告人生效判决信息(score_4) */
|
||||
@TableField("score_4_6")
|
||||
private String score46;
|
||||
|
||||
/** 是否为诉讼案件被告(score_4) */
|
||||
@TableField("score_4_7")
|
||||
private String score47;
|
||||
|
||||
/** 是否存在企业未履行生效裁判信息 */
|
||||
@TableField("score_4_8")
|
||||
private String score48;
|
||||
|
||||
/** 五、企业社会贡献度模块 */
|
||||
|
||||
/** 前12个月纳税金额 */
|
||||
@TableField("score_5_1")
|
||||
private String score51;
|
||||
|
||||
/** 纳税等级 */
|
||||
@TableField("score_5_2")
|
||||
private String score52;
|
||||
|
||||
/** 缴纳社保人数 */
|
||||
@TableField("score_5_3")
|
||||
private String score53;
|
||||
|
||||
/** 公积金缴纳人数 */
|
||||
@TableField("score_5_4")
|
||||
private String score54;
|
||||
|
||||
/** 是否为出口退税生产清单企业 */
|
||||
@TableField("score_5_5")
|
||||
private String score55;
|
||||
|
||||
/** 六、企业稳定经营模块 */
|
||||
|
||||
/** 市场主体经营年限 */
|
||||
@TableField("score_6_1")
|
||||
private String score61;
|
||||
|
||||
/** 股东(或发起人)或投资人信息认缴出资人数 */
|
||||
@TableField("score_6_2")
|
||||
private String score62;
|
||||
|
||||
/** 最大股东持股占比 */
|
||||
@TableField("score_6_3")
|
||||
private String score63;
|
||||
|
||||
/** 近三年法定代表人变更次数 */
|
||||
@TableField("score_6_4")
|
||||
private String score64;
|
||||
|
||||
/** 近三年股东变更次数 */
|
||||
@TableField("score_6_5")
|
||||
private String score65;
|
||||
|
||||
/** 近三年经营范围变更次数 */
|
||||
@TableField("score_6_6")
|
||||
private String score66;
|
||||
|
||||
/** 近三年经营地址变更次数 */
|
||||
@TableField("score_6_7")
|
||||
private String score67;
|
||||
|
||||
/** 近三年缴税年数 */
|
||||
@TableField("score_6_8")
|
||||
private String score68;
|
||||
|
||||
/** 法人户籍 */
|
||||
@TableField("score_6_9")
|
||||
private String score69;
|
||||
|
||||
/** 法人婚姻状况 */
|
||||
@TableField("score_6_10")
|
||||
private String score610;
|
||||
|
||||
/** 七、企业经营能力模块 */
|
||||
|
||||
/** 上年增值税金额 */
|
||||
@TableField("score_7_1")
|
||||
private String score71;
|
||||
|
||||
/** 今年增值税同比变动 */
|
||||
@TableField("score_7_2")
|
||||
private String score72;
|
||||
|
||||
/** 上年企业所得税金额 */
|
||||
@TableField("score_7_3")
|
||||
private String score73;
|
||||
|
||||
/** 今年所得税同比变动 */
|
||||
@TableField("score_7_4")
|
||||
private String score74;
|
||||
|
||||
/** 缴纳社保人数同比变动 */
|
||||
@TableField("score_7_5")
|
||||
private String score75;
|
||||
|
||||
/** 公积金缴纳人数同比变动 */
|
||||
@TableField("score_7_6")
|
||||
private String score76;
|
||||
|
||||
/** 当年纳税金额同比变动 */
|
||||
@TableField("score_7_7")
|
||||
private String score77;
|
||||
|
||||
/** 上年出口退税金额 */
|
||||
@TableField("score_7_8")
|
||||
private String score78;
|
||||
|
||||
/** 八、企业偿债能力模块 */
|
||||
|
||||
/** 房产套数 */
|
||||
@TableField("score_8_1")
|
||||
private String score81;
|
||||
|
||||
/** 房产面积 */
|
||||
@TableField("score_8_2")
|
||||
private String score82;
|
||||
|
||||
/** 未抵押房产套数 */
|
||||
@TableField("score_8_3")
|
||||
private String score83;
|
||||
|
||||
/** 未抵押房产面积 */
|
||||
@TableField("score_8_4")
|
||||
private String score84;
|
||||
|
||||
/** 已抵押房产被担保债权数额 */
|
||||
@TableField("score_8_5")
|
||||
private String score85;
|
||||
|
||||
/** 企业车产金额 */
|
||||
@TableField("score_8_6")
|
||||
private String score86;
|
||||
|
||||
/** 九、潜在代偿资源模块 */
|
||||
|
||||
/** 法人及股东房产面积合计 */
|
||||
@TableField("score_9_1")
|
||||
private String score91;
|
||||
|
||||
/** 法人及股东房产套数合计 */
|
||||
@TableField("score_9_2")
|
||||
private String score92;
|
||||
|
||||
/** 法人及股东未抵押房产套数合计 */
|
||||
@TableField("score_9_3")
|
||||
private String score93;
|
||||
|
||||
/** 法人及股东未抵押房产面积 */
|
||||
@TableField("score_9_4")
|
||||
private String score94;
|
||||
|
||||
/** 法人及股东已抵押房产被担保债权数额合计 */
|
||||
@TableField("score_9_5")
|
||||
private String score95;
|
||||
|
||||
/** 法人代表车产金额 */
|
||||
@TableField("score_9_6")
|
||||
private String score96;
|
||||
|
||||
/** 十、企业环境信用模块 */
|
||||
|
||||
/** 生态信用扣分 */
|
||||
@TableField("score_b015")
|
||||
private String scoreB015;
|
||||
|
||||
/** 列入环境失信黑名单时间 */
|
||||
@TableField("score_b016_time")
|
||||
private String scoreB016Time;
|
||||
|
||||
/** 列入环境失信黑名单原因 */
|
||||
@TableField("score_b016_reason")
|
||||
private String scoreB016Reason;
|
||||
|
||||
/** 环境行为信用评价等级 */
|
||||
@TableField("score_a020")
|
||||
private String scoreA020;
|
||||
}
|
||||
|
||||
@@ -148,15 +148,15 @@ public class CustInfoBusinessServiceImpl implements ICustInfoBusinessService
|
||||
custInfoBusinessVo.setTagManual(TreeNode.convertToTreeByParentId(tagCreateVos));
|
||||
|
||||
// 仅当登录机构为825时,查询九维画像数据
|
||||
// if ("825".equals(getHeadId())) {
|
||||
// LambdaQueryWrapper<Ent9vPortraitOrc> portraitWrapper = new LambdaQueryWrapper<>();
|
||||
// portraitWrapper.eq(Ent9vPortraitOrc::getUniscid, custInfoBusiness.getSocialCreditCode());
|
||||
// custInfoBusinessVo.setEnt9vPortrait(ent9vPortraitOrcMapper.selectOne(portraitWrapper));
|
||||
//
|
||||
// LambdaQueryWrapper<NineVFinalInfoOrc> finalInfoWrapper = new LambdaQueryWrapper<>();
|
||||
// finalInfoWrapper.eq(NineVFinalInfoOrc::getUniscid, custInfoBusiness.getSocialCreditCode());
|
||||
// custInfoBusinessVo.setNineVFinalInfo(nineVFinalInfoOrcMapper.selectOne(finalInfoWrapper));
|
||||
// }
|
||||
if ("965".equals(getHeadId())) {
|
||||
LambdaQueryWrapper<Ent9vPortraitOrc> portraitWrapper = new LambdaQueryWrapper<>();
|
||||
portraitWrapper.eq(Ent9vPortraitOrc::getUniscid, custInfoBusiness.getSocialCreditCode());
|
||||
custInfoBusinessVo.setEnt9vPortrait(ent9vPortraitOrcMapper.selectOne(portraitWrapper));
|
||||
|
||||
LambdaQueryWrapper<NineVFinalInfoOrc> finalInfoWrapper = new LambdaQueryWrapper<>();
|
||||
finalInfoWrapper.eq(NineVFinalInfoOrc::getUniscid, custInfoBusiness.getSocialCreditCode());
|
||||
custInfoBusinessVo.setNineVFinalInfo(nineVFinalInfoOrcMapper.selectOne(finalInfoWrapper));
|
||||
}
|
||||
}
|
||||
return custInfoBusinessVo;
|
||||
}
|
||||
|
||||
@@ -857,6 +857,28 @@
|
||||
select id,cust_name from cust_info_business where social_credit_code = #{socialCreditCode}
|
||||
</select>
|
||||
|
||||
<select id="selectExistingSocialCreditCodes" resultType="java.lang.String">
|
||||
select social_credit_code
|
||||
from cust_info_business_${deptCode}
|
||||
where social_credit_code in
|
||||
<foreach item="socialCreditCode" collection="socialCreditCodes" open="(" separator="," close=")">
|
||||
#{socialCreditCode}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<update id="batchUpdateCustLevelBySocialCreditCode">
|
||||
update cust_info_business_${deptCode}
|
||||
set cust_level = case social_credit_code
|
||||
<foreach item="item" collection="list">
|
||||
when #{item.socialCreditCode} then #{item.custLevel}
|
||||
</foreach>
|
||||
end
|
||||
where social_credit_code in
|
||||
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||
#{item.socialCreditCode}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<insert id="insertCustomersToBusinessByScCode" parameterType="java.util.List">
|
||||
INSERT INTO cust_info_business
|
||||
(cust_id,cust_name, social_credit_code, update_by, update_time, cust_phone, industry, asset, credit)
|
||||
@@ -866,4 +888,4 @@
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user