From 994d506543a6f4b427ea60e9cf9390bb5757da26 Mon Sep 17 00:00:00 2001 From: river <1376754470@qq.com> Date: Thu, 7 Jan 2021 10:54:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=A2=E9=98=9F=E6=95=88?= =?UTF-8?q?=E7=8E=87=E6=97=B6=E9=97=B4=E7=AD=9B=E9=80=89=E3=80=81=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E5=AF=BC=E5=85=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/request/CompanyCustomerRequest.java | 2 +- .../service/impl/CustomerServiceImpl.java | 24 +++++----- .../response/DgStatisticsExcelResponse.java | 2 +- .../service/impl/DgEfficiencyServiceImpl.java | 5 ++- .../model/response/ResponseResult.java | 2 +- .../com/daqing/framework/util/Md5Util.java | 16 +++++++ .../domain/crms/ext/CompanyTemplate.java | 44 +++++++++---------- .../domain/crms/ext/PersonalTemplate.java | 44 +++++++++---------- 8 files changed, 76 insertions(+), 63 deletions(-) diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java index a276f795..1341ca13 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java @@ -32,7 +32,7 @@ public class CompanyCustomerRequest implements Serializable { @ApiModelProperty(value = "客户类型") private Integer type; - @ApiModelProperty(value = "客户经理人ids") + @ApiModelProperty(value = "客户经理人id") private Long manager; @NotNull(message = "客户名称不能为空") diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java index ce8e8d7f..0ee98a22 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java @@ -361,15 +361,15 @@ public class CustomerServiceImpl extends ServiceImpl personalList = ExcelUtil.readExcel(excel, new PersonalTemplate(), 1); List companyList = ExcelUtil.readExcel(excel, new CompanyTemplate(), 2); - List nameList = hrmsFeignService.listEmployeeName().getData(); + /*List nameList = hrmsFeignService.listEmployeeName().getData();*/ CustomerPersonalTOI customerPersonalTOI; - ManagerName manager; // 客户名称 + /*ManagerName manager; // 客户名称*/ // 个人类型 for (Object personal : personalList) { customerPersonalTOI = new CustomerPersonalTOI(); customerPersonalTOI.setType(0); BeanUtils.copyProperties(personal, customerPersonalTOI); - manager = new ManagerName(); + /*manager = new ManagerName(); BeanUtils.copyProperties(personal, manager); // 根据客户经理名称找到对应的员工id if (nameList != null && manager.getManager() != null) { @@ -378,20 +378,20 @@ public class CustomerServiceImpl extends ServiceImpl().FAIL("导入数据失败,员工" + manager.getManager() + "不存在"); - }*/ - } + } + }*/ this.saveCustomerPersonal(customerPersonalTOI); } // 企业类型 for (Object company : companyList) { CompanyCustomerRequest companyCustomerRequest = new CompanyCustomerRequest(); - manager = new ManagerName(); + /*manager = new ManagerName();*/ companyCustomerRequest.setType(1); companyCustomerRequest.setIsExistRelated(0); BeanUtils.copyProperties(company, companyCustomerRequest); - BeanUtils.copyProperties(company, manager); + /*BeanUtils.copyProperties(company, manager); // 根据客户经理名称找到对应的员工id if (nameList != null && manager.getManager() != null) { for (EmployeeVO employeeVO : nameList) { @@ -399,16 +399,16 @@ public class CustomerServiceImpl extends ServiceImpl().FAIL("导入数据失败,员工" + manager.getManager() + "不存在"); - }*/ - } + } + }*/ this.insertCompany(companyCustomerRequest); // this.saveCustomerCompany(customerCompanyTOI); } return ResponseResult.SUCCESS(); } catch (Exception e) { - return new ResponseResult().FAIL("导入数据失败,请检查文件和数据格式或稍后再试"); + return ResponseResult.FAIL("EXPORT FAIL"); } } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelResponse.java index 52aecfe2..bcdd9e79 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelResponse.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelResponse.java @@ -51,7 +51,7 @@ public class DgStatisticsExcelResponse extends BaseRowModel implements Serializa private Date createTime; @ApiModelProperty("完成任务节点id") - @ExcelProperty(value = "完成任务节点id", index = 7, converter = ProcessIdConverter.class) + @ExcelProperty(value = "完成任务节点", index = 7, converter = ProcessIdConverter.class) private Integer processId; @ApiModelProperty("最新操作时间") diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java index 6c64d8be..ac094246 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java @@ -141,9 +141,10 @@ public class DgEfficiencyServiceImpl extends ServiceImpl> HashMap> hashMap = new HashMap<>(); String time; // 时间差 Integer processId; // 业务节点id diff --git a/dq-framework-common/src/main/java/com/daqing/framework/model/response/ResponseResult.java b/dq-framework-common/src/main/java/com/daqing/framework/model/response/ResponseResult.java index db643785..b04b8237 100644 --- a/dq-framework-common/src/main/java/com/daqing/framework/model/response/ResponseResult.java +++ b/dq-framework-common/src/main/java/com/daqing/framework/model/response/ResponseResult.java @@ -57,7 +57,7 @@ public class ResponseResult { } public static ResponseResult FAIL(Object t) { - return new ResponseResult<>(false, 99999, t, "操作失败,请检查客户经理是否为公司已存在员工或者文件和数据格式!"); + return new ResponseResult<>(false, 99999, t, "操作失败,请检查文件或者数据格式是否正确!"); } public ResponseResult SUCCESS_DATA(T t){ diff --git a/dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java b/dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java index 5c51ef13..029e1cc0 100644 --- a/dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java +++ b/dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java @@ -5,6 +5,10 @@ import org.springframework.util.DigestUtils; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; +import java.sql.Timestamp; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; /** * @author zcw @@ -30,5 +34,17 @@ public class Md5Util { //System.out.println(s); //System.out.println(md5("1234564")); System.out.println(md5("Aa123420")); + + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Date date = new Date(); + try { + date = simpleDateFormat.parse("2021-01-06"); + } catch (ParseException e) { + e.printStackTrace(); + } + Timestamp time = DateUtils.getDayEndTime(date); + System.out.println(time); + System.out.println(simpleDateFormat.format(time)); } } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CompanyTemplate.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CompanyTemplate.java index 5d31bfbc..a6f82569 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CompanyTemplate.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CompanyTemplate.java @@ -20,67 +20,65 @@ import java.util.Date; @Data @ToString public class CompanyTemplate extends BaseRowModel implements Serializable { - /** - * 客户经理 - */ - @ExcelProperty(value = "客户经理(请填写本公司存在的员工姓名)", index = 0) - private String manager; + + /*@ExcelProperty(value = "客户经理(请填写本公司存在的员工姓名)", index = 0) + private String manager;*/ /** * 客户名称 */ - @ExcelProperty(value = "客户名称", index = 1) + @ExcelProperty(value = "客户名称", index = 0) private String name; - @ExcelProperty(value = "社会统一代码", index = 2) + @ExcelProperty(value = "社会统一代码", index = 1) private String socialUnifiedCode; - @ExcelProperty(value = "联系电话", index = 3) + @ExcelProperty(value = "联系电话", index = 2) private String phone; - @ExcelProperty(value = "注册时间(eg:2020-02-20)", index = 4) + @ExcelProperty(value = "注册时间(eg:2020-02-20)", index = 3) private Date registerTime; - @ExcelProperty(value = "注册资金", index = 5) + @ExcelProperty(value = "注册资金", index = 4) private String registeredCapital; - @ExcelProperty(value = "员工人数", index = 6) + @ExcelProperty(value = "员工人数", index = 5) private String empNum; - @ExcelProperty(value = "注册地址", index = 7) + @ExcelProperty(value = "注册地址", index = 6) private String registerAddr; - @ExcelProperty(value = "联系人", index = 8) + @ExcelProperty(value = "联系人", index = 7) private String linkman; - @ExcelProperty(value = "联系人的联系电话", index = 9) + @ExcelProperty(value = "联系人的联系电话", index = 8) private String linkPhone; - @ExcelProperty(value = "经营地址", index = 10) + @ExcelProperty(value = "经营地址", index = 9) private String businessAddr; - @ExcelProperty(value = "业务来源", index = 11) + @ExcelProperty(value = "业务来源", index = 10) private String businessSource; - @ExcelProperty(value = "经营范围", index = 12) + @ExcelProperty(value = "经营范围", index = 11) private String businessScope; /** * 法人-姓名 */ - @ExcelProperty(value = "法人-姓名", index = 13) + @ExcelProperty(value = "法人-姓名", index = 12) private String legalName; - @ExcelProperty(value = "法人-性别 1、男,0、女", index = 14) + @ExcelProperty(value = "法人-性别 1、男,0、女", index = 13) private Integer legalGender; - @ExcelProperty(value = "法人-身份证号", index = 15) + @ExcelProperty(value = "法人-身份证号", index = 14) private String legalIdNumber; - @ExcelProperty(value = "法人-户口所在地", index = 16) + @ExcelProperty(value = "法人-户口所在地", index = 15) private String legalHukouAddr; - @ExcelProperty(value = "法人-联系电话", index = 17) + @ExcelProperty(value = "法人-联系电话", index = 16) private String legalPhone; - @ExcelProperty(value = "法人-家庭住址", index = 18) + @ExcelProperty(value = "法人-家庭住址", index = 17) private String legalHomeAddr; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/PersonalTemplate.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/PersonalTemplate.java index 702584c8..ccaa6b86 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/PersonalTemplate.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/PersonalTemplate.java @@ -16,118 +16,116 @@ import java.io.Serializable; @Data @ToString public class PersonalTemplate extends BaseRowModel implements Serializable { - /** - * 客户经理 - */ - @NotNull(message = "客户经理不能为空") + + /*@NotNull(message = "客户经理不能为空") @ExcelProperty(value = "客户经理(请填写本公司存在的员工姓名)",index = 0) - private String manager; + private String manager;*/ /** * 客户名称 */ @NotNull(message = "客户名称不能为空") - @ExcelProperty(value = "姓名",index = 1) + @ExcelProperty(value = "姓名",index = 0) private String name; /** * 联系地址 */ @NotNull(message = "联系地址不能为空") - @ExcelProperty(value = "地址",index = 2) + @ExcelProperty(value = "地址",index = 1) private String addr; /** * 联系电话 */ @NotNull(message = "联系电话不能为空") - @ExcelProperty(value = "电话",index = 3) + @ExcelProperty(value = "电话",index = 2) private String phone; /** * 身份证号 */ @NotNull(message = "身份证号不能为空") - @ExcelProperty(value = "身份证号",index = 4) + @ExcelProperty(value = "身份证号",index = 3) private String idCard; /** * 年龄 */ @NotNull(message = "年龄不能为空") - @ExcelProperty(value = "年龄",index = 5) + @ExcelProperty(value = "年龄",index = 4) private Integer age; /** * 性别:1、男,0、女 */ @NotNull(message = "性别不能为空") - @ExcelProperty(value = "性别(1:男,0:女)",index = 6) + @ExcelProperty(value = "性别(1:男,0:女)",index = 5) private Integer gender; /** * 婚姻状况:1、已婚,0、未婚 */ @NotNull(message = "婚姻状况不能为空") - @ExcelProperty(value = "婚姻状况(0:未婚,1:已婚,2:离异,3:再婚)",index = 7) + @ExcelProperty(value = "婚姻状况(0:未婚,1:已婚,2:离异,3:再婚)",index = 6) private Integer maritalStatus; /** * 学历 */ @NotNull(message = "学历不能为空") - @ExcelProperty(value = "学历(0:本科,1:大专,2:高职,3:中专,4:其他)",index = 8) + @ExcelProperty(value = "学历(0:本科,1:大专,2:高职,3:中专,4:其他)",index = 7) private Integer education; /** * 工作单位 */ @NotNull(message = "工作单位不能为空") - @ExcelProperty(value = "工作单位",index = 9) + @ExcelProperty(value = "工作单位",index = 8) private String employer; /** * 职务 */ @NotNull(message = "职务不能为空") - @ExcelProperty(value = "职务",index = 10) + @ExcelProperty(value = "职务",index = 9) private String position; /** * 工作年限 */ @NotNull(message = "工作年限不能为空") - @ExcelProperty(value = "工作年限",index = 11) + @ExcelProperty(value = "工作年限",index = 10) private Integer workingYears; /** * 社保账号 */ @NotNull(message = "社保账号不能为空") - @ExcelProperty(value = "社保账号",index = 12) + @ExcelProperty(value = "社保账号",index = 11) private String socialSecurityNum; /** * 居住情况 */ @NotNull(message = "居住情况不能为空") - @ExcelProperty(value = "居住情况",index = 13) + @ExcelProperty(value = "居住情况",index = 12) private String livingSituation; /** * 户籍地址 */ @NotNull(message = "户籍地址不能为空") - @ExcelProperty(value = "户籍地址",index = 14) + @ExcelProperty(value = "户籍地址",index = 13) private String residenceAddr; /** * 业务来源 */ @NotNull(message = "业务来源不能为空") - @ExcelProperty(value = "业务来源",index = 15) + @ExcelProperty(value = "业务来源",index = 14) private String businessSource; /** * 紧急联系人 */ @NotNull(message = "紧急联系人不能为空") - @ExcelProperty(value = "紧急联系人",index = 16) + @ExcelProperty(value = "紧急联系人",index = 15) private String emergencyLinkman; /** * 紧急联系人关系 */ @NotNull(message = "紧急联系人关系不能为空") - @ExcelProperty(value = "紧急联系人关系",index = 17) + @ExcelProperty(value = "紧急联系人关系",index = 16) private String emergencyLinkmanRelationship; /** * 紧急联系人电话 */ @NotNull(message = "紧急联系人电话不能为空") - @ExcelProperty(value = "紧急联系人电话",index = 18) + @ExcelProperty(value = "紧急联系人电话",index = 17) private String emergencyLinkmanPhone; }