|
@@ -5,6 +5,12 @@ import com.lframework.starter.common.exceptions.impl.DefaultClientException; |
|
@@ -5,6 +5,12 @@ import com.lframework.starter.common.exceptions.impl.DefaultClientException; |
|
5
|
import com.lframework.starter.common.utils.StringUtil;
|
5
|
import com.lframework.starter.common.utils.StringUtil;
|
|
6
|
import com.lframework.starter.web.core.components.excel.ExcelImportListener;
|
6
|
import com.lframework.starter.web.core.components.excel.ExcelImportListener;
|
|
7
|
import com.lframework.starter.web.core.utils.ApplicationUtil;
|
7
|
import com.lframework.starter.web.core.utils.ApplicationUtil;
|
|
|
|
8
|
+import com.lframework.starter.web.core.utils.IdUtil;
|
|
|
|
9
|
+import com.lframework.starter.web.inner.entity.SysDept;
|
|
|
|
10
|
+import com.lframework.starter.web.inner.entity.SysUser;
|
|
|
|
11
|
+import com.lframework.starter.web.inner.service.system.SysDeptService;
|
|
|
|
12
|
+import com.lframework.starter.web.inner.service.system.SysUserService;
|
|
|
|
13
|
+import com.lframework.starter.web.inner.vo.system.user.QuerySysUserVo;
|
|
8
|
import com.lframework.xingyun.basedata.entity.Customer;
|
14
|
import com.lframework.xingyun.basedata.entity.Customer;
|
|
9
|
import com.lframework.xingyun.basedata.service.customer.CustomerService;
|
15
|
import com.lframework.xingyun.basedata.service.customer.CustomerService;
|
|
10
|
import com.lframework.xingyun.sc.entity.CustomerCredit;
|
16
|
import com.lframework.xingyun.sc.entity.CustomerCredit;
|
|
@@ -12,11 +18,16 @@ import com.lframework.xingyun.sc.service.customer.CustomerCreditService; |
|
@@ -12,11 +18,16 @@ import com.lframework.xingyun.sc.service.customer.CustomerCreditService; |
|
12
|
import com.lframework.xingyun.sc.vo.customer.credit.*;
|
18
|
import com.lframework.xingyun.sc.vo.customer.credit.*;
|
|
13
|
import lombok.extern.slf4j.Slf4j;
|
19
|
import lombok.extern.slf4j.Slf4j;
|
|
14
|
import org.apache.commons.collections.CollectionUtils;
|
20
|
import org.apache.commons.collections.CollectionUtils;
|
|
15
|
-
|
|
|
|
16
|
-import javax.annotation.Resource;
|
21
|
+import java.math.BigDecimal;
|
|
|
|
22
|
+import java.time.LocalDate;
|
|
|
|
23
|
+import java.time.format.DateTimeFormatter;
|
|
|
|
24
|
+import java.time.format.DateTimeParseException;
|
|
17
|
import java.util.ArrayList;
|
25
|
import java.util.ArrayList;
|
|
18
|
import java.util.Arrays;
|
26
|
import java.util.Arrays;
|
|
19
|
import java.util.List;
|
27
|
import java.util.List;
|
|
|
|
28
|
+import java.util.UUID;
|
|
|
|
29
|
+import java.util.regex.Matcher;
|
|
|
|
30
|
+import java.util.regex.Pattern;
|
|
20
|
|
31
|
|
|
21
|
@Slf4j
|
32
|
@Slf4j
|
|
22
|
public class CustomerCreditImportListener extends ExcelImportListener<CustomerCreditImportModel> {
|
33
|
public class CustomerCreditImportListener extends ExcelImportListener<CustomerCreditImportModel> {
|
|
@@ -24,16 +35,83 @@ public class CustomerCreditImportListener extends ExcelImportListener<CustomerCr |
|
@@ -24,16 +35,83 @@ public class CustomerCreditImportListener extends ExcelImportListener<CustomerCr |
|
24
|
|
35
|
|
|
25
|
private List<String> checkList = new ArrayList<>();
|
36
|
private List<String> checkList = new ArrayList<>();
|
|
26
|
private List<String> checkNameList = new ArrayList<>();
|
37
|
private List<String> checkNameList = new ArrayList<>();
|
|
|
|
38
|
+ private static final Pattern WAN_PATTERN = Pattern.compile("^([+-]?\\d+(?:\\.\\d+)?)万(元)?$");
|
|
27
|
|
39
|
|
|
28
|
|
40
|
|
|
29
|
@Override
|
41
|
@Override
|
|
30
|
protected void doInvoke(CustomerCreditImportModel data, AnalysisContext context) {
|
42
|
protected void doInvoke(CustomerCreditImportModel data, AnalysisContext context) {
|
|
31
|
CustomerService customerService = ApplicationUtil.getBean(CustomerService.class);
|
43
|
CustomerService customerService = ApplicationUtil.getBean(CustomerService.class);
|
|
|
|
44
|
+ SysDeptService sysDeptService = ApplicationUtil.getBean(SysDeptService.class);
|
|
|
|
45
|
+ SysUserService sysUserService = ApplicationUtil.getBean(SysUserService.class);
|
|
32
|
List<String> validValues = Arrays.asList("AAA", "AA", "A", "BBB", "BB", "B", "C", "D");
|
46
|
List<String> validValues = Arrays.asList("AAA", "AA", "A", "BBB", "BB", "B", "C", "D");
|
|
33
|
if (StringUtil.isBlank(data.getCode())) {
|
47
|
if (StringUtil.isBlank(data.getCode())) {
|
|
34
|
throw new DefaultClientException(
|
48
|
throw new DefaultClientException(
|
|
35
|
"第" + context.readRowHolder().getRowIndex() + "行“编号”不能为空");
|
49
|
"第" + context.readRowHolder().getRowIndex() + "行“编号”不能为空");
|
|
36
|
}
|
50
|
}
|
|
|
|
51
|
+ if (StringUtil.isBlank(data.getDeptName())) {
|
|
|
|
52
|
+ throw new DefaultClientException(
|
|
|
|
53
|
+ "第" + context.readRowHolder().getRowIndex() + "行“办事处”不能为空");
|
|
|
|
54
|
+ } else {
|
|
|
|
55
|
+ List<SysDept> deptByName = sysDeptService.getDeptByName(data.getDeptName());
|
|
|
|
56
|
+ if (CollectionUtils.isEmpty(deptByName)) {
|
|
|
|
57
|
+ throw new DefaultClientException(
|
|
|
|
58
|
+ "第" + context.readRowHolder().getRowIndex() + "行“办事处”不存在");
|
|
|
|
59
|
+ } else {
|
|
|
|
60
|
+ if (deptByName.size() > 1) {
|
|
|
|
61
|
+ throw new DefaultClientException(
|
|
|
|
62
|
+ "第" + context.readRowHolder().getRowIndex() + "行“办事处”存在多个同名办事处");
|
|
|
|
63
|
+ } else {
|
|
|
|
64
|
+ SysDept sysDept = deptByName.get(0);
|
|
|
|
65
|
+ data.setDeptId(sysDept.getId());
|
|
|
|
66
|
+ }
|
|
|
|
67
|
+ }
|
|
|
|
68
|
+ }
|
|
|
|
69
|
+ if (StringUtil.isBlank(data.getRegionName())) {
|
|
|
|
70
|
+ throw new DefaultClientException(
|
|
|
|
71
|
+ "第" + context.readRowHolder().getRowIndex() + "行“区域”不能为空");
|
|
|
|
72
|
+ } else {
|
|
|
|
73
|
+ List<SysDept> regionByName = sysDeptService.getDeptByName(data.getRegionName());
|
|
|
|
74
|
+ if (CollectionUtils.isEmpty(regionByName)) {
|
|
|
|
75
|
+ throw new DefaultClientException(
|
|
|
|
76
|
+ "第" + context.readRowHolder().getRowIndex() + "行“区域”不存在");
|
|
|
|
77
|
+ } else {
|
|
|
|
78
|
+ if (regionByName.size() > 1) {
|
|
|
|
79
|
+ throw new DefaultClientException(
|
|
|
|
80
|
+ "第" + context.readRowHolder().getRowIndex() + "行“区域”存在多个同名区域");
|
|
|
|
81
|
+ } else {
|
|
|
|
82
|
+ SysDept sysDept = regionByName.get(0);
|
|
|
|
83
|
+ data.setRegion(sysDept.getId());
|
|
|
|
84
|
+ }
|
|
|
|
85
|
+ }
|
|
|
|
86
|
+ }
|
|
|
|
87
|
+ if (StringUtil.isBlank(data.getCustomerShortName())) {
|
|
|
|
88
|
+ throw new DefaultClientException(
|
|
|
|
89
|
+ "第" + context.readRowHolder().getRowIndex() + "行“简写名称”不能为空");
|
|
|
|
90
|
+ }
|
|
|
|
91
|
+ if (StringUtil.isBlank(data.getRegisterDateStr())) {
|
|
|
|
92
|
+ throw new DefaultClientException(
|
|
|
|
93
|
+ "第" + context.readRowHolder().getRowIndex() + "行“登记日期”不能为空");
|
|
|
|
94
|
+ } else {
|
|
|
|
95
|
+ String dateStr = data.getRegisterDateStr().trim();
|
|
|
|
96
|
+ try {
|
|
|
|
97
|
+ LocalDate localDate = LocalDate.parse(dateStr, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
|
|
|
98
|
+ data.setRegisterDate(localDate);
|
|
|
|
99
|
+ } catch (DateTimeParseException e) {
|
|
|
|
100
|
+ try {
|
|
|
|
101
|
+ LocalDate localDate = LocalDate.parse(dateStr, DateTimeFormatter.ofPattern("yyyy/M/d"));
|
|
|
|
102
|
+ data.setRegisterDate(localDate);
|
|
|
|
103
|
+ } catch (DateTimeParseException ex) {
|
|
|
|
104
|
+ try {
|
|
|
|
105
|
+ // 支持 "2025年12月3日" 或 "2025年12月03日"
|
|
|
|
106
|
+ LocalDate localDate = LocalDate.parse(dateStr, DateTimeFormatter.ofPattern("yyyy'年'M'月'd'日'"));
|
|
|
|
107
|
+ data.setRegisterDate(localDate);
|
|
|
|
108
|
+ } catch (DateTimeParseException ex2) {
|
|
|
|
109
|
+ throw new DefaultClientException(
|
|
|
|
110
|
+ "第" + context.readRowHolder().getRowIndex() + "行登记日期格式错误!");
|
|
|
|
111
|
+ }
|
|
|
|
112
|
+ }
|
|
|
|
113
|
+ }
|
|
|
|
114
|
+ }
|
|
37
|
if (checkList.contains(data.getCode())) {
|
115
|
if (checkList.contains(data.getCode())) {
|
|
38
|
throw new DefaultClientException(
|
116
|
throw new DefaultClientException(
|
|
39
|
"第" + context.readRowHolder().getRowIndex() + "行“编号”与第" + (checkList.indexOf(data.getCode()) + 1) + "行重复");
|
117
|
"第" + context.readRowHolder().getRowIndex() + "行“编号”与第" + (checkList.indexOf(data.getCode()) + 1) + "行重复");
|
|
@@ -65,26 +143,131 @@ public class CustomerCreditImportListener extends ExcelImportListener<CustomerCr |
|
@@ -65,26 +143,131 @@ public class CustomerCreditImportListener extends ExcelImportListener<CustomerCr |
|
65
|
}
|
143
|
}
|
|
66
|
}
|
144
|
}
|
|
67
|
checkNameList.add(data.getName());
|
145
|
checkNameList.add(data.getName());
|
|
68
|
- if (StringUtil.isBlank(data.getCompanySuggestedCategory())) {
|
146
|
+ //企业类型
|
|
|
|
147
|
+ if (StringUtil.isBlank(data.getEnterpriseType())) {
|
|
69
|
throw new DefaultClientException(
|
148
|
throw new DefaultClientException(
|
|
70
|
- "第" + context.readRowHolder().getRowIndex() + "行“客户分类”不能为空");
|
149
|
+ "第" + context.readRowHolder().getRowIndex() + "行“企业类型”不能为空");
|
|
|
|
150
|
+ } else {
|
|
|
|
151
|
+ if ("经销商".equals(data.getEnterpriseType())) {
|
|
|
|
152
|
+ data.setEnterpriseType("DEALER");
|
|
|
|
153
|
+ } else if ("终端".equals(data.getEnterpriseType())) {
|
|
|
|
154
|
+ data.setEnterpriseType("TERMINAL");
|
|
|
|
155
|
+ } else {
|
|
|
|
156
|
+ throw new DefaultClientException(
|
|
|
|
157
|
+ "第" + context.readRowHolder().getRowIndex() + "行“企业类型”不存在");
|
|
|
|
158
|
+ }
|
|
71
|
}
|
159
|
}
|
|
72
|
- if (StringUtil.isNotEmpty(data.getCompanySuggestedCategory()) && !validValues.contains(data.getCompanySuggestedCategory())) {
|
|
|
|
73
|
- throw new DefaultClientException(
|
|
|
|
74
|
- "第" + context.readRowHolder().getRowIndex() + "行“客户分类”只能为:AAA、AA、A、BBB、BB、B、C、D");
|
160
|
+ //注册资本
|
|
|
|
161
|
+ if (data.getRegisteredCapitalStr() != null) {
|
|
|
|
162
|
+ try {
|
|
|
|
163
|
+ data.setRegisteredCapital(new BigDecimal(data.getRegisteredCapitalStr()));
|
|
|
|
164
|
+ } catch (NumberFormatException ignored) {
|
|
|
|
165
|
+ Matcher matcher = WAN_PATTERN.matcher(data.getRegisteredCapitalStr());
|
|
|
|
166
|
+ if (matcher.matches()) {
|
|
|
|
167
|
+ BigDecimal number = new BigDecimal(matcher.group(1));
|
|
|
|
168
|
+ data.setRegisteredCapital(number);
|
|
|
|
169
|
+ } else {
|
|
|
|
170
|
+ throw new DefaultClientException(
|
|
|
|
171
|
+ "第" + context.readRowHolder().getRowIndex() + "行“注册资本”格式错误");
|
|
|
|
172
|
+ }
|
|
|
|
173
|
+ }
|
|
75
|
}
|
174
|
}
|
|
76
|
- if (StringUtil.isBlank(data.getCompanyCreditLimit())) {
|
175
|
+ //注册时间
|
|
|
|
176
|
+ if (data.getRegistrationTimeStr() != null) {
|
|
|
|
177
|
+ String dateStr = data.getRegistrationTimeStr().trim();
|
|
|
|
178
|
+ try {
|
|
|
|
179
|
+ LocalDate localDate = LocalDate.parse(dateStr, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
|
|
|
180
|
+ data.setRegistrationTime(localDate);
|
|
|
|
181
|
+ } catch (DateTimeParseException e) {
|
|
|
|
182
|
+ try {
|
|
|
|
183
|
+ LocalDate localDate = LocalDate.parse(dateStr, DateTimeFormatter.ofPattern("yyyy/M/d"));
|
|
|
|
184
|
+ data.setRegistrationTime(localDate);
|
|
|
|
185
|
+ } catch (DateTimeParseException ex) {
|
|
|
|
186
|
+ try {
|
|
|
|
187
|
+ // 支持 "2025年12月3日" 或 "2025年12月03日"
|
|
|
|
188
|
+ LocalDate localDate = LocalDate.parse(dateStr, DateTimeFormatter.ofPattern("yyyy'年'M'月'd'日'"));
|
|
|
|
189
|
+ data.setRegistrationTime(localDate);
|
|
|
|
190
|
+ } catch (DateTimeParseException ex2) {
|
|
|
|
191
|
+ throw new DefaultClientException(
|
|
|
|
192
|
+ "第" + context.readRowHolder().getRowIndex() + "行注册时间格式错误!");
|
|
|
|
193
|
+ }
|
|
|
|
194
|
+ }
|
|
|
|
195
|
+ }
|
|
|
|
196
|
+ }
|
|
|
|
197
|
+ //年龄
|
|
|
|
198
|
+ if (StringUtil.isNotEmpty(data.getAge1()) && !data.getAge1().matches("^[1-9]\\d*$")) {
|
|
77
|
throw new DefaultClientException(
|
199
|
throw new DefaultClientException(
|
|
78
|
- "第" + context.readRowHolder().getRowIndex() + "行“授信额度”不能为空");
|
200
|
+ "第" + context.readRowHolder().getRowIndex() + "行”年龄“格式错误!");
|
|
|
|
201
|
+ }
|
|
|
|
202
|
+ //性别
|
|
|
|
203
|
+ if (StringUtil.isNotEmpty(data.getSex1())) {
|
|
|
|
204
|
+ if ("男".equals(data.getSex1())) {
|
|
|
|
205
|
+ data.setSex1("1");
|
|
|
|
206
|
+ } else if ("女".equals(data.getSex1())) {
|
|
|
|
207
|
+ data.setSex1("2");
|
|
|
|
208
|
+ } else {
|
|
|
|
209
|
+ throw new DefaultClientException(
|
|
|
|
210
|
+ "第" + context.readRowHolder().getRowIndex() + "行”性别“格式错误!");
|
|
|
|
211
|
+ }
|
|
79
|
}
|
212
|
}
|
|
80
|
- if (StringUtil.isBlank(data.getCompanyMaterialSupplyPlan())) {
|
213
|
+ //年龄
|
|
|
|
214
|
+ if (StringUtil.isNotEmpty(data.getAge2()) && !data.getAge2().matches("^[1-9]\\d*$")) {
|
|
81
|
throw new DefaultClientException(
|
215
|
throw new DefaultClientException(
|
|
82
|
- "第" + context.readRowHolder().getRowIndex() + "行“加工操作方案”不能为空");
|
216
|
+ "第" + context.readRowHolder().getRowIndex() + "行”年龄“格式错误!");
|
|
83
|
}
|
217
|
}
|
|
84
|
- if (StringUtil.isBlank(data.getCompanySettlementPeriod())) {
|
218
|
+ //性别
|
|
|
|
219
|
+ if (StringUtil.isNotEmpty(data.getSex2())) {
|
|
|
|
220
|
+ if ("男".equals(data.getSex2())) {
|
|
|
|
221
|
+ data.setSex2("1");
|
|
|
|
222
|
+ } else if ("女".equals(data.getSex2())) {
|
|
|
|
223
|
+ data.setSex2("2");
|
|
|
|
224
|
+ } else {
|
|
|
|
225
|
+ throw new DefaultClientException(
|
|
|
|
226
|
+ "第" + context.readRowHolder().getRowIndex() + "行”性别“格式错误!");
|
|
|
|
227
|
+ }
|
|
|
|
228
|
+ }
|
|
|
|
229
|
+ //员工人数
|
|
|
|
230
|
+ if (data.getEmployeeCountStr() != null) {
|
|
|
|
231
|
+ try {
|
|
|
|
232
|
+ data.setEmployeeCount(Integer.parseInt(data.getEmployeeCountStr()));
|
|
|
|
233
|
+ } catch (Exception e) {
|
|
|
|
234
|
+ throw new DefaultClientException(
|
|
|
|
235
|
+ "第" + context.readRowHolder().getRowIndex() + "行”员工人数“格式错误!");
|
|
|
|
236
|
+ }
|
|
|
|
237
|
+ }
|
|
|
|
238
|
+ //结算期限
|
|
|
|
239
|
+ if (StringUtil.isBlank(data.getSettlementPeriod())) {
|
|
85
|
throw new DefaultClientException(
|
240
|
throw new DefaultClientException(
|
|
86
|
"第" + context.readRowHolder().getRowIndex() + "行“结算期限”不能为空");
|
241
|
"第" + context.readRowHolder().getRowIndex() + "行“结算期限”不能为空");
|
|
87
|
}
|
242
|
}
|
|
|
|
243
|
+ //建议客户分类
|
|
|
|
244
|
+ if (StringUtil.isNotEmpty(data.getSuggestedCategory()) && !validValues.contains(data.getSuggestedCategory())) {
|
|
|
|
245
|
+ throw new DefaultClientException(
|
|
|
|
246
|
+ "第" + context.readRowHolder().getRowIndex() + "行“建议客户分类”只能为:AAA、AA、A、BBB、BB、B、C、D");
|
|
|
|
247
|
+ }
|
|
|
|
248
|
+ //授信额度
|
|
|
|
249
|
+ if (StringUtil.isBlank(data.getCreditLimit())) {
|
|
|
|
250
|
+ throw new DefaultClientException(
|
|
|
|
251
|
+ "第" + context.readRowHolder().getRowIndex() + "行“授信额度”不能为空");
|
|
|
|
252
|
+ }
|
|
|
|
253
|
+ //调查人
|
|
|
|
254
|
+ if (StringUtil.isNotEmpty(data.getInvestigatorName())) {
|
|
|
|
255
|
+ QuerySysUserVo vo = new QuerySysUserVo();
|
|
|
|
256
|
+ vo.setName(data.getInvestigatorName());
|
|
|
|
257
|
+ List<SysUser> sysUsers = sysUserService.query(vo);
|
|
|
|
258
|
+ if (CollectionUtils.isEmpty(sysUsers)) {
|
|
|
|
259
|
+ throw new DefaultClientException(
|
|
|
|
260
|
+ "第" + context.readRowHolder().getRowIndex() + "行“调查人”不存在");
|
|
|
|
261
|
+ } else {
|
|
|
|
262
|
+ if (sysUsers.size() > 1) {
|
|
|
|
263
|
+ throw new DefaultClientException(
|
|
|
|
264
|
+ "第" + context.readRowHolder().getRowIndex() + "行“调查人”系统在存在多个");
|
|
|
|
265
|
+ } else {
|
|
|
|
266
|
+ SysUser sysUser = sysUsers.get(0);
|
|
|
|
267
|
+ data.setInvestigator(sysUser.getId());
|
|
|
|
268
|
+ }
|
|
|
|
269
|
+ }
|
|
|
|
270
|
+ }
|
|
88
|
QueryCustomerCreditVo vo = new QueryCustomerCreditVo();
|
271
|
QueryCustomerCreditVo vo = new QueryCustomerCreditVo();
|
|
89
|
vo.setSerialNumber(data.getCode());
|
272
|
vo.setSerialNumber(data.getCode());
|
|
90
|
CustomerCreditService customerCreditService = ApplicationUtil.getBean(CustomerCreditService.class);
|
273
|
CustomerCreditService customerCreditService = ApplicationUtil.getBean(CustomerCreditService.class);
|
|
@@ -108,18 +291,131 @@ public class CustomerCreditImportListener extends ExcelImportListener<CustomerCr |
|
@@ -108,18 +291,131 @@ public class CustomerCreditImportListener extends ExcelImportListener<CustomerCr |
|
108
|
createCustomerCreditVo.setStatus("PASS");
|
291
|
createCustomerCreditVo.setStatus("PASS");
|
|
109
|
//编号
|
292
|
//编号
|
|
110
|
createCustomerCreditVo.setSerialNumber(data.getCode());
|
293
|
createCustomerCreditVo.setSerialNumber(data.getCode());
|
|
|
|
294
|
+ //区域
|
|
|
|
295
|
+ createCustomerCreditVo.setRegion(data.getRegion());
|
|
|
|
296
|
+ //办事处
|
|
|
|
297
|
+ createCustomerCreditVo.setDeptId(data.getDeptId());
|
|
|
|
298
|
+ //简写名称
|
|
|
|
299
|
+ createCustomerCreditVo.setCustomerShortName(data.getCustomerShortName());
|
|
|
|
300
|
+ //登记日期
|
|
|
|
301
|
+ createCustomerCreditVo.setRegisterDate(data.getRegisterDate());
|
|
111
|
//客户id
|
302
|
//客户id
|
|
112
|
createCustomerCreditVo.setCompanyId(data.getCompanyId());
|
303
|
createCustomerCreditVo.setCompanyId(data.getCompanyId());
|
|
113
|
- //客户分类
|
|
|
|
114
|
- createCustomerCreditVo.setCompanySuggestedCategory(data.getCompanySuggestedCategory());
|
|
|
|
115
|
- //授信额度
|
|
|
|
116
|
- createCustomerCreditVo.setCompanyCreditLimit(data.getCompanyCreditLimit());
|
|
|
|
117
|
- //加工操作方案
|
|
|
|
118
|
- createCustomerCreditVo.setCompanyMaterialSupplyPlan(data.getCompanyMaterialSupplyPlan());
|
304
|
+ //企业类型
|
|
|
|
305
|
+ createCustomerCreditVo.setEnterpriseType(data.getEnterpriseType());
|
|
|
|
306
|
+ //企业性质
|
|
|
|
307
|
+ createCustomerCreditVo.setCompanyNature(data.getCompanyNature());
|
|
|
|
308
|
+ //注册地址
|
|
|
|
309
|
+ createCustomerCreditVo.setCompanyAddress(data.getCompanyAddress());
|
|
|
|
310
|
+ //注册资本
|
|
|
|
311
|
+ createCustomerCreditVo.setRegisteredCapital(data.getRegisteredCapital());
|
|
|
|
312
|
+ //账号
|
|
|
|
313
|
+ createCustomerCreditVo.setBankAccount(data.getBankAccount());
|
|
|
|
314
|
+ //开户行
|
|
|
|
315
|
+ createCustomerCreditVo.setBankName(data.getBankName());
|
|
|
|
316
|
+ //税号
|
|
|
|
317
|
+ createCustomerCreditVo.setTaxNumber(data.getTaxNumber());
|
|
|
|
318
|
+ //注册时间
|
|
|
|
319
|
+ createCustomerCreditVo.setRegistrationTime(data.getRegistrationTime());
|
|
|
|
320
|
+ //经营年限
|
|
|
|
321
|
+ createCustomerCreditVo.setBusinessYears(data.getBusinessYears());
|
|
|
|
322
|
+ //经营场地属性
|
|
|
|
323
|
+ createCustomerCreditVo.setBusinessProperty(data.getBusinessProperty());
|
|
|
|
324
|
+ //经营范围
|
|
|
|
325
|
+ createCustomerCreditVo.setBusinessScope(data.getBusinessScope());
|
|
|
|
326
|
+ //占地面积
|
|
|
|
327
|
+ createCustomerCreditVo.setLandArea(data.getLandArea());
|
|
|
|
328
|
+ //仓储条件
|
|
|
|
329
|
+ createCustomerCreditVo.setStorageConditions(data.getStorageConditions());
|
|
|
|
330
|
+ //员工人数
|
|
|
|
331
|
+ createCustomerCreditVo.setEmployeeCount(data.getEmployeeCount());
|
|
|
|
332
|
+ //设备属性
|
|
|
|
333
|
+ createCustomerCreditVo.setEquipmentAttributes(data.getEquipmentAttributes());
|
|
|
|
334
|
+ //资产评估
|
|
|
|
335
|
+ createCustomerCreditVo.setAssetEvaluation(data.getAssetEvaluation());
|
|
|
|
336
|
+ //上年度销售额
|
|
|
|
337
|
+ createCustomerCreditVo.setLastYearSales(data.getLastYearSales());
|
|
|
|
338
|
+ //月均销量
|
|
|
|
339
|
+ createCustomerCreditVo.setMonthlyAvgSales(data.getMonthlyAvgSales());
|
|
|
|
340
|
+ //销项发票所开品名与计量单位
|
|
|
|
341
|
+ createCustomerCreditVo.setInvoiceItemUnit(data.getInvoiceItemUnit());
|
|
|
|
342
|
+ //认证证书
|
|
|
|
343
|
+ createCustomerCreditVo.setCertificationCertificate(data.getCertificationCertificate());
|
|
|
|
344
|
+ //我司售于产品与经营范围是否匹配
|
|
|
|
345
|
+ createCustomerCreditVo.setProductMatch(data.getProductMatch());
|
|
|
|
346
|
+ //主要客户
|
|
|
|
347
|
+ createCustomerCreditVo.setMajorCustomers(data.getMajorCustomers());
|
|
|
|
348
|
+ //主营项目
|
|
|
|
349
|
+ createCustomerCreditVo.setMainProjects(data.getMainProjects());
|
|
|
|
350
|
+ //从事行业
|
|
|
|
351
|
+ createCustomerCreditVo.setIndustryInvolved(data.getIndustryInvolved());
|
|
|
|
352
|
+ //在该行业中的经验
|
|
|
|
353
|
+ createCustomerCreditVo.setIndustryExperience(data.getIndustryExperience());
|
|
|
|
354
|
+ //是否与其他企业有经济纠纷 违规信息 拖欠员工薪资等
|
|
|
|
355
|
+ createCustomerCreditVo.setHasDispute(data.getHasDispute());
|
|
|
|
356
|
+ //与我司合作时间
|
|
|
|
357
|
+ createCustomerCreditVo.setCooperationStartDate(data.getCooperationStartDate());
|
|
|
|
358
|
+ //月均操作量
|
|
|
|
359
|
+ createCustomerCreditVo.setMonthlyAvgVolume(data.getMonthlyAvgVolume());
|
|
|
|
360
|
+ //是否口头协议操作
|
|
|
|
361
|
+ createCustomerCreditVo.setIsVerbalAgreement(data.getIsVerbalAgreement());
|
|
|
|
362
|
+ //是否签订其他协议(列举)
|
|
|
|
363
|
+ createCustomerCreditVo.setOtherAgreements(data.getOtherAgreements());
|
|
|
|
364
|
+ //与我司操作是否签订长年合同
|
|
|
|
365
|
+ createCustomerCreditVo.setHasLongTermContract(data.getHasLongTermContract());
|
|
|
|
366
|
+ //合同类型
|
|
|
|
367
|
+ createCustomerCreditVo.setContractType(data.getContractType());
|
|
|
|
368
|
+ //是否有过中断及中断原因
|
|
|
|
369
|
+ createCustomerCreditVo.setHasInterruption(data.getHasInterruption());
|
|
119
|
//结算期限
|
370
|
//结算期限
|
|
120
|
- createCustomerCreditVo.setCompanySettlementPeriod(data.getCompanySettlementPeriod());
|
371
|
+ createCustomerCreditVo.setSettlementPeriod(data.getSettlementPeriod());
|
|
|
|
372
|
+ //加工操作方案
|
|
|
|
373
|
+ createCustomerCreditVo.setMaterialSupplyPlan(data.getMaterialSupplyPlan());
|
|
|
|
374
|
+ //建议客户分类
|
|
|
|
375
|
+ createCustomerCreditVo.setSuggestedCategory(data.getSuggestedCategory());
|
|
|
|
376
|
+ //授信额度
|
|
|
|
377
|
+ createCustomerCreditVo.setCreditLimit(data.getCreditLimit());
|
|
|
|
378
|
+ //调查人
|
|
|
|
379
|
+ createCustomerCreditVo.setInvestigator(data.getInvestigator());
|
|
121
|
//导入标识
|
380
|
//导入标识
|
|
122
|
createCustomerCreditVo.setImportType("IMPORT");
|
381
|
createCustomerCreditVo.setImportType("IMPORT");
|
|
|
|
382
|
+ List<CreateCorePersonnelVo> corePersonnelList = new ArrayList<>();
|
|
|
|
383
|
+ if (StringUtil.isNotEmpty(data.getUserName1()) || StringUtil.isNotEmpty(data.getAge1())
|
|
|
|
384
|
+ || StringUtil.isNotEmpty(data.getSex1()) || StringUtil.isNotEmpty(data.getNativePlace1())
|
|
|
|
385
|
+ || StringUtil.isNotEmpty(data.getAddress1()) || StringUtil.isNotEmpty(data.getMobile1())
|
|
|
|
386
|
+ || StringUtil.isNotEmpty(data.getPhone1()) || StringUtil.isNotEmpty(data.getEmail1())) {
|
|
|
|
387
|
+ CreateCorePersonnelVo createCorePersonnelVo = new CreateCorePersonnelVo();
|
|
|
|
388
|
+ createCorePersonnelVo.setPersonId(IdUtil.getId());
|
|
|
|
389
|
+ createCorePersonnelVo.setName(data.getUserName1());
|
|
|
|
390
|
+ createCorePersonnelVo.setAge(data.getAge1());
|
|
|
|
391
|
+ createCorePersonnelVo.setSex(data.getSex1());
|
|
|
|
392
|
+ createCorePersonnelVo.setNativePlace(data.getNativePlace1());
|
|
|
|
393
|
+ createCorePersonnelVo.setAddress(data.getAddress1());
|
|
|
|
394
|
+ createCorePersonnelVo.setMobile(data.getMobile1());
|
|
|
|
395
|
+ createCorePersonnelVo.setPhone(data.getPhone1());
|
|
|
|
396
|
+ createCorePersonnelVo.setEmail(data.getEmail1());
|
|
|
|
397
|
+ createCorePersonnelVo.setPosition("法定代表人");
|
|
|
|
398
|
+ corePersonnelList.add(createCorePersonnelVo);
|
|
|
|
399
|
+ }
|
|
|
|
400
|
+ if (StringUtil.isNotEmpty(data.getUserName2()) || StringUtil.isNotEmpty(data.getAge2())
|
|
|
|
401
|
+ || StringUtil.isNotEmpty(data.getSex2()) || StringUtil.isNotEmpty(data.getNativePlace2())
|
|
|
|
402
|
+ || StringUtil.isNotEmpty(data.getAddress2()) || StringUtil.isNotEmpty(data.getMobile2())
|
|
|
|
403
|
+ || StringUtil.isNotEmpty(data.getPhone2()) || StringUtil.isNotEmpty(data.getEmail2())
|
|
|
|
404
|
+ || StringUtil.isNotEmpty(data.getPosition2())) {
|
|
|
|
405
|
+ CreateCorePersonnelVo createCorePersonnelVo = new CreateCorePersonnelVo();
|
|
|
|
406
|
+ createCorePersonnelVo.setPersonId(IdUtil.getId());
|
|
|
|
407
|
+ createCorePersonnelVo.setName(data.getUserName2());
|
|
|
|
408
|
+ createCorePersonnelVo.setAge(data.getAge2());
|
|
|
|
409
|
+ createCorePersonnelVo.setSex(data.getSex2());
|
|
|
|
410
|
+ createCorePersonnelVo.setNativePlace(data.getNativePlace2());
|
|
|
|
411
|
+ createCorePersonnelVo.setAddress(data.getAddress2());
|
|
|
|
412
|
+ createCorePersonnelVo.setMobile(data.getMobile2());
|
|
|
|
413
|
+ createCorePersonnelVo.setPhone(data.getPhone2());
|
|
|
|
414
|
+ createCorePersonnelVo.setEmail(data.getEmail2());
|
|
|
|
415
|
+ createCorePersonnelVo.setPosition(data.getPosition2());
|
|
|
|
416
|
+ corePersonnelList.add(createCorePersonnelVo);
|
|
|
|
417
|
+ }
|
|
|
|
418
|
+ createCustomerCreditVo.setCorePersonnelList(corePersonnelList);
|
|
123
|
|
419
|
|
|
124
|
customerCreditService.create(createCustomerCreditVo);
|
420
|
customerCreditService.create(createCustomerCreditVo);
|
|
125
|
|
421
|
|