From 935b8b1883db9e77fbe9dad4053f9b5a65f433a7 Mon Sep 17 00:00:00 2001 From: river <1376754470@qq.com> Date: Tue, 5 Jan 2021 14:13:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E6=95=88=E7=8E=87=E3=80=81?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BB=9F=E8=AE=A1=E3=80=81=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E3=80=81=E4=BA=BA=E5=8A=9B=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dq-financial-crms/pom.xml | 7 ++ .../model/request/CompanyCustomerRequest.java | 2 +- .../mapper/crms/CompanyCustomerDao.xml | 4 +- .../controller/DgEfficiencyController.java | 1 + .../controller/DgStatisticsController.java | 20 ++-- .../DgStatisticsExcelRefuseResponse.java | 76 +++++++++++++ .../response/DgStatisticsExcelResponse.java | 69 ++++++++++++ .../PersonalEfficiencyListResponse.java | 3 + .../service/impl/DgEfficiencyServiceImpl.java | 10 +- .../service/impl/DgStatisticsServiceImpl.java | 47 ++++++-- .../service/impl/EmployeeServiceImpl.java | 42 +++++++- .../model/response/PromptSuccess.java | 4 +- .../domain/crms/ext/CompanyTemplate.java | 101 +++++++----------- .../domain/crms/ext/CustomerCompanyVO.java | 94 ++++++---------- .../hrms/response/EmployeeExcelResponse.java | 53 +++++++++ 15 files changed, 379 insertions(+), 154 deletions(-) create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelRefuseResponse.java create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelResponse.java create mode 100644 dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/EmployeeExcelResponse.java diff --git a/dq-financial-crms/pom.xml b/dq-financial-crms/pom.xml index 54f97d16..4ced7f50 100644 --- a/dq-financial-crms/pom.xml +++ b/dq-financial-crms/pom.xml @@ -24,6 +24,7 @@ 0.0.1-SNAPSHOT compile + com.daqing.financial dq-financial-api @@ -65,6 +66,12 @@ maven-compiler-plugin 3.8.1 + + org.springframework.security + spring-security-core + 5.3.4.RELEASE + compile + 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 2b911495..a321465e 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 @@ -68,7 +68,7 @@ public class CompanyCustomerRequest implements Serializable { @ApiModelProperty(value = "联系人") private String linkman; - @ApiModelProperty(value = "联系人的联系电话") + @ApiModelProperty(value = "联系人电话") private String linkPhone; @ApiModelProperty(value = "经营地址") diff --git a/dq-financial-crms/src/main/resources/mapper/crms/CompanyCustomerDao.xml b/dq-financial-crms/src/main/resources/mapper/crms/CompanyCustomerDao.xml index f481e16e..7acd5e86 100644 --- a/dq-financial-crms/src/main/resources/mapper/crms/CompanyCustomerDao.xml +++ b/dq-financial-crms/src/main/resources/mapper/crms/CompanyCustomerDao.xml @@ -33,9 +33,7 @@ diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java index b26c3ef9..11fc1836 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java @@ -39,6 +39,7 @@ public class DgEfficiencyController { @PostMapping("/team") @ApiOperation(value = "团队效率", notes = "团队效率") public ResponseResult queryList(@RequestBody DgEfficiencyTeamRequest dgEfficiencyTeamRequest) { + return ResponseResult.SUCCESS(dgEfficiencyService.queryList(dgEfficiencyTeamRequest)); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgStatisticsController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgStatisticsController.java index 1218375e..8db0079d 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgStatisticsController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgStatisticsController.java @@ -23,7 +23,7 @@ import javax.servlet.http.HttpServletResponse; */ @RestController @RequestMapping("/guarantee/statistics") -@Api(value = "担保业务统计",tags = "提供业务统计增删改查的方法") +@Api(value = "担保业务统计", tags = "提供业务统计增删改查的方法") public class DgStatisticsController { @Autowired @@ -33,18 +33,18 @@ public class DgStatisticsController { * 列表 */ @GetMapping("/list") - @ApiOperation(value = "业务统计列表",notes = "业务统计列表",response = DgStatisticsListResponse.class) + @ApiOperation(value = "业务统计列表", notes = "业务统计列表", response = DgStatisticsListResponse.class) public ResponseResult list(@RequestParam("page") Integer page, @RequestParam("size") Integer size, DgStatisticsRequest dgStatisticsRequest) { - return ResponseResult.SUCCESS(iDgStatisticsService.list(page,size,dgStatisticsRequest)); + return ResponseResult.SUCCESS(iDgStatisticsService.list(page, size, dgStatisticsRequest)); } /** * 列表导出 */ - @ApiOperation(value = "统计列表导出",notes = "统计列表导出") + @ApiOperation(value = "统计列表导出", notes = "统计列表导出") @GetMapping("/excelExport") - public ResponseResult excelExport(HttpServletResponse response){ + public ResponseResult excelExport(HttpServletResponse response) { Boolean result = iDgStatisticsService.excelExport(response); @@ -55,18 +55,18 @@ public class DgStatisticsController { * 拒绝列表 */ @GetMapping("/listRefuse") - @ApiOperation(value = "业务统计拒绝列表",notes = "业务统计拒绝列表",response = DgStatisticsListRefuseResponse.class) + @ApiOperation(value = "业务统计拒绝列表", notes = "业务统计拒绝列表", response = DgStatisticsListRefuseResponse.class) public ResponseResult listRefuse(@RequestParam("page") Integer page, - @RequestParam("size") Integer size, DgStatisticsRequest dgStatisticsRequest) { - return ResponseResult.SUCCESS(iDgStatisticsService.listRefuse(page,size,dgStatisticsRequest)); + @RequestParam("size") Integer size, DgStatisticsRequest dgStatisticsRequest) { + return ResponseResult.SUCCESS(iDgStatisticsService.listRefuse(page, size, dgStatisticsRequest)); } /** * 拒绝列表导出 */ - @ApiOperation(value = "统计拒绝列表导出",notes = "统计拒绝列表导出") + @ApiOperation(value = "统计拒绝列表导出", notes = "统计拒绝列表导出") @GetMapping("/excelExportRefuse") - public ResponseResult excelExportRefuse(HttpServletResponse response){ + public ResponseResult excelExportRefuse(HttpServletResponse response) { Boolean result = iDgStatisticsService.excelExportRefuse(response); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelRefuseResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelRefuseResponse.java new file mode 100644 index 00000000..b393322c --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelRefuseResponse.java @@ -0,0 +1,76 @@ +package com.daqing.financial.guarantee.model.response; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.metadata.BaseRowModel; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.ToString; + +import java.io.Serializable; +import java.util.Date; + +/** + * 业务统计拒绝列表导出到excel实体类 + * + * @auther River + * @date 2021/1/4 15:11 + */ +@Data +@ToString +public class DgStatisticsExcelRefuseResponse extends BaseRowModel implements Serializable { + + @ApiModelProperty("业务编号") + @ExcelProperty(value = "业务编号",index = 0) + private String businessCode; + + @ApiModelProperty("客户姓名") + @ExcelProperty(value = "客户姓名",index = 1) + private String name; + + @ApiModelProperty("客户联系方式") + @ExcelProperty(value = "联系电话",index = 2) + private String phone; + + @ApiModelProperty("业务类型") + @ExcelProperty(value = "产品类型",index = 3) + private String businessType; + + @ApiModelProperty("申请额度") + @ExcelProperty(value = "金额",index = 4) + private Double applyAmount; + + @ApiModelProperty("申请期限") + @ExcelProperty(value = "期数",index = 5) + private String applyTime; + + @ApiModelProperty("申请日期") + @ExcelProperty(value = "申请日期",index = 6) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date createTime; + + @ApiModelProperty("拒绝人") + @ExcelProperty(value = "当前审批人",index = 7) + private String refuseName; + + @ApiModelProperty("拒绝节点id") + @ExcelProperty(value = "任务节点",index = 8) + private Integer processId; + + @ApiModelProperty("拒绝时间") + @ExcelProperty(value = "拒绝时间",index = 9) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date refuseTime; + + @ApiModelProperty("拒绝原因") + @ExcelProperty(value = "拒绝原因",index = 10) + private String refuseOpinion; + + @ApiModelProperty("提单人姓名") + @ExcelProperty(value = "提单人",index = 11) + private String employeeName; + + @ApiModelProperty("部门") + @ExcelProperty(value = "所属部门",index = 12) + private String department; +} 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 new file mode 100644 index 00000000..e3852870 --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsExcelResponse.java @@ -0,0 +1,69 @@ +package com.daqing.financial.guarantee.model.response; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.metadata.BaseRowModel; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.ToString; + +import java.io.Serializable; +import java.util.Date; + +/** + * 业务统计列表导出到excel实体类 + * + * @auther River + * @date 2021/1/4 14:48 + */ +@Data +@ToString +public class DgStatisticsExcelResponse extends BaseRowModel implements Serializable { + + @ApiModelProperty("业务编号") + @ExcelProperty(value = "业务编号",index = 0) + private String businessCode; + + @ApiModelProperty("客户姓名") + @ExcelProperty(value = "客户姓名",index = 1) + private String name; + + @ApiModelProperty("客户联系方式") + @ExcelProperty(value = "联系电话",index = 2) + private String phone; + + @ApiModelProperty("业务类型") + @ExcelProperty(value = "产品类型",index = 3) + private String businessType; + + @ApiModelProperty("申请额度") + @ExcelProperty(value = "金额",index = 4) + private Double applyAmount; + + @ApiModelProperty("申请期限") + @ExcelProperty(value = "期数",index = 5) + private String applyTime; + + @ApiModelProperty("申请日期") + @ExcelProperty(value = "申请日期",index = 6) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date createTime; + + @ApiModelProperty("完成任务节点id") + @ExcelProperty(value = "完成任务节点id",index = 7) + private Integer processId; + + @ApiModelProperty("最新操作时间") + @ExcelProperty(value = "任务分配时间",index = 8) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date operationTime; + + @ApiModelProperty("提单人姓名") + @ExcelProperty(value = "提单人",index = 9) + private String employeeName; + + @ApiModelProperty("部门") + @ExcelProperty(value = "所属部门",index = 10) + private String department; + +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java index 3e75a3cd..5b3fe186 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java @@ -6,9 +6,12 @@ import com.daqing.framework.utils.excel.ApprovalStatusConverter; import com.daqing.framework.utils.excel.BusinessStatusConverter; import com.daqing.framework.utils.excel.OperatingStatusConverter; import com.daqing.framework.utils.excel.TaskNodeConverter; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.Date; + /** * @Author chen * @DATE 2020/12/28 16:31 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 650df9b9..601ed40b 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 @@ -13,6 +13,7 @@ import org.springframework.stereotype.Service; import com.daqing.framework.domain.guarantee.po.DgTeamEfficiencyPO; + import java.text.SimpleDateFormat; import java.util.*; @@ -147,6 +148,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpltimeList = dgAuditProcessMapper.selectTenDays(Integer.parseInt(userId)); + List timeList = dgAuditProcessMapper.selectTenDays(Integer.parseInt(userId)); //近十天审批数目的值的数组 - ListapprovalList = dgAuditProcessMapper.selectApprovalNum(Integer.parseInt(userId)); + List approvalList = dgAuditProcessMapper.selectApprovalNum(Integer.parseInt(userId)); Map map = new HashMap(); - map.put("timeArr",timeList); - map.put("approvalNumArr",approvalList); + map.put("timeArr", timeList); + map.put("approvalNumArr", approvalList); return map; } } \ No newline at end of file diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgStatisticsServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgStatisticsServiceImpl.java index 36549508..0a7b1e04 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgStatisticsServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgStatisticsServiceImpl.java @@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.daqing.financial.guarantee.feign.HrmsFeignService; import com.daqing.financial.guarantee.mapper.DgStatisticsMapper; import com.daqing.financial.guarantee.model.request.DgStatisticsRequest; +import com.daqing.financial.guarantee.model.response.DgStatisticsExcelRefuseResponse; +import com.daqing.financial.guarantee.model.response.DgStatisticsExcelResponse; import com.daqing.financial.guarantee.model.response.DgStatisticsListRefuseResponse; import com.daqing.financial.guarantee.model.response.DgStatisticsListResponse; import com.daqing.financial.guarantee.service.IDgStatisticsService; @@ -130,8 +132,25 @@ public class DgStatisticsServiceImpl extends ServiceImpl> empAndDeptList = hrmsFeignService.getEmployeeAndDeptById(ids); if (empAndDeptList.getData() != null) { List listResponse = this.jointStatistics(dgStatisticsPOList, empAndDeptList.getData()); + List excelResponse = new ArrayList<>(); + for (DgStatisticsListResponse dgStatisticsListResponse : listResponse) { + DgStatisticsExcelResponse dgStatisticsExcelResponse = new DgStatisticsExcelResponse(); + StringBuilder stringBuilder = new StringBuilder(); + if (dgStatisticsListResponse.getDepartment() != null && dgStatisticsListResponse.getDepartment().size() != 0) { + for (int i = 0; i < dgStatisticsListResponse.getDepartment().size(); i++) { + if (i == dgStatisticsListResponse.getDepartment().size() - 1) { + stringBuilder.append(dgStatisticsListResponse.getDepartment().get(i)); + } else { + stringBuilder.append(dgStatisticsListResponse.getDepartment().get(i)).append(","); + } + } + } + dgStatisticsExcelResponse.setDepartment(stringBuilder.toString()); + BeanUtils.copyProperties(dgStatisticsListResponse, dgStatisticsExcelResponse); + excelResponse.add(dgStatisticsExcelResponse); + } try { - ExcelUtil.writeExcelWithSheets(response, listResponse, "业务统计信息一览表", "statistics", new DgStatisticsListResponse()) + ExcelUtil.writeExcelWithSheets(response, excelResponse, "业务统计信息一览表", "statistics", new DgStatisticsExcelResponse()) .finish(); } catch (Exception e) { ExceptionCast.cast(CrmsCode.CUSTOMER_EXPORT_EXSIT); @@ -255,18 +274,34 @@ public class DgStatisticsServiceImpl extends ServiceImpl listResponse = this.jointRefuseStatistics(statisticsRefusePOList, empAndDeptList.getData()); + List excelResponse = new ArrayList<>(); + for (DgStatisticsListRefuseResponse listRefuseResponse : listResponse) { + DgStatisticsExcelRefuseResponse excelRefuseResponse = new DgStatisticsExcelRefuseResponse(); + StringBuilder stringBuilder = new StringBuilder(); + if (listRefuseResponse.getDepartment() != null && listRefuseResponse.getDepartment().size() != 0) { + for (int i = 0; i < listRefuseResponse.getDepartment().size(); i++) { + if (i == listRefuseResponse.getDepartment().size() - 1) { + stringBuilder.append(listRefuseResponse.getDepartment().get(i)); + } else { + stringBuilder.append(listRefuseResponse.getDepartment().get(i)).append(","); + } + } + } + excelRefuseResponse.setDepartment(stringBuilder.toString()); + BeanUtils.copyProperties(listRefuseResponse, excelRefuseResponse); + excelResponse.add(excelRefuseResponse); + } try { - ExcelUtil.writeExcelWithSheets(response, listResponse, "业务统计拒绝信息一览表", "statisticsRefuse", new DgStatisticsListRefuseResponse()) + ExcelUtil.writeExcelWithSheets(response, excelResponse, "业务统计拒绝信息一览表", "statisticsRefuse", new DgStatisticsExcelRefuseResponse()) .finish(); } catch (Exception e) { ExceptionCast.cast(CrmsCode.CUSTOMER_EXPORT_EXSIT); } - return true; - } else { - return false; } + return false; + } else { + return false; } - return false; } private List jointStatistics(List dgStatisticsPOList, List empAndDeptList) { diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java index 28b5354b..1dbe44db 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java @@ -13,6 +13,7 @@ import com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse; import com.daqing.framework.domain.hrms.*; import com.daqing.framework.domain.hrms.ext.*; import com.daqing.framework.domain.hrms.request.EmployeeRequest; +import com.daqing.framework.domain.hrms.response.EmployeeExcelResponse; import com.daqing.framework.domain.hrms.response.HrmsCode; import com.daqing.framework.domain.hrms.response.RolePermissionResponse; import com.daqing.framework.exception.ExceptionCast; @@ -402,7 +403,46 @@ public class EmployeeServiceImpl extends ServiceImpl list = this.getBaseMapper().excelList(); - ExcelUtil.writeExcelWithSheets(response, list, "员工信息一览表", "employee", new EmployeeListVO()) + List excelResponse = new ArrayList<>(); + for (EmployeeListVO employee : list) { + EmployeeExcelResponse employeeExcelResponse = new EmployeeExcelResponse(); + if (employee.getDepartmentNameList() != null && employee.getDepartmentNameList().size() != 0) { + StringBuilder stringBuilder = new StringBuilder(); + for (int i = 0; i < employee.getDepartmentNameList().size(); i++) { + if (i == employee.getDepartmentNameList().size() - 1) { + stringBuilder.append(employee.getDepartmentNameList().get(i)); + } else { + stringBuilder.append(employee.getDepartmentNameList().get(i)).append(","); + } + } + employeeExcelResponse.setDepartmentNameList(stringBuilder.toString()); + } + if (employee.getPositionNameList() != null && employee.getPositionNameList().size() != 0) { + StringBuilder stringBuilder = new StringBuilder(); + for (int i = 0; i < employee.getPositionNameList().size(); i++) { + if (i == employee.getPositionNameList().size() - 1) { + stringBuilder.append(employee.getPositionNameList().get(i)); + } else { + stringBuilder.append(employee.getPositionNameList().get(i)).append(","); + } + } + employeeExcelResponse.setPositionNameList(stringBuilder.toString()); + } + if (employee.getRoleNameList() != null && employee.getRoleNameList().size() != 0) { + StringBuilder stringBuilder = new StringBuilder(); + for (int i = 0; i < employee.getRoleNameList().size(); i++) { + if (i == employee.getRoleNameList().size() - 1) { + stringBuilder.append(employee.getRoleNameList().get(i)); + } else { + stringBuilder.append(employee.getRoleNameList().get(i)).append(","); + } + } + employeeExcelResponse.setRoleNameList(stringBuilder.toString()); + } + BeanUtils.copyProperties(employee, employeeExcelResponse); + excelResponse.add(employeeExcelResponse); + } + ExcelUtil.writeExcelWithSheets(response, excelResponse, "员工信息一览表", "employee", new EmployeeExcelResponse()) .finish(); return true; } catch (Exception e) { diff --git a/dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java b/dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java index 9ab0ce68..824725c6 100644 --- a/dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java +++ b/dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java @@ -98,9 +98,9 @@ public class PromptSuccess { public static final String DB_B_NAME = "担保部B角"; // 担保部B角 - public static final String PERSONAL_START_CODE = "DQCZ-0001"; + public static final String PERSONAL_START_CODE = "DQCZ-0000"; - public static final String COMPANY_START_CODE = "DQCQ-0001"; + public static final String COMPANY_START_CODE = "DQCQ-0000"; public static final String PERSONAL_CODE = "DQCZ-"; 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 4fefa138..5d31bfbc 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 @@ -6,10 +6,14 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.ToString; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; import java.io.Serializable; +import java.util.Date; /** * 导出excel模板(企业类型) + * * @auther River * @date 2020/10/9 11:38 */ @@ -19,93 +23,64 @@ public class CompanyTemplate extends BaseRowModel implements Serializable { /** * 客户经理 */ - @ExcelProperty(value = "客户经理(请填写本公司存在的员工姓名)",index = 0) + @ExcelProperty(value = "客户经理(请填写本公司存在的员工姓名)", index = 0) private String manager; /** * 客户名称 */ - @ExcelProperty(value = "姓名",index = 1) + @ExcelProperty(value = "客户名称", index = 1) private String name; - /** - * 联系地址 - */ - @ExcelProperty(value = "地址",index = 2) - private String addr; - /** - * 联系电话 - */ - @ExcelProperty(value = "电话",index = 3) + + @ExcelProperty(value = "社会统一代码", index = 2) + private String socialUnifiedCode; + + @ExcelProperty(value = "联系电话", index = 3) private String phone; - /** - * 注册资金 - */ - @ExcelProperty(value = "注册资金",index = 4) + + @ExcelProperty(value = "注册时间(eg:2020-02-20)", index = 4) + private Date registerTime; + + @ExcelProperty(value = "注册资金", index = 5) private String registeredCapital; - /** - * 所属行业 - */ - @ExcelProperty(value = "所属行业",index = 5) - private String industry; - /** - * 成立年限 - */ - @ExcelProperty(value = "成立年限",index = 6) - private Integer years; - /** - * 所在区域 - */ - @ExcelProperty(value = "所在区域",index = 7) - private String region; - /** - * 股东名称 - */ - @ExcelProperty(value = "股东名称",index = 8) - private String shareholder; - /** - * 关联企业 - */ - @ExcelProperty(value = "关联企业",index = 9) - private String affiliatedCompany; - /** - * 员工个数 - */ - @ExcelProperty(value = "员工个数",index = 10) + + @ExcelProperty(value = "员工人数", index = 6) private String empNum; - /** - * 联系人 - */ - @ExcelProperty(value = "联系人",index = 11) + + @ExcelProperty(value = "注册地址", index = 7) + private String registerAddr; + + @ExcelProperty(value = "联系人", index = 8) private String linkman; - /** - * 业务来源 - */ - @ExcelProperty(value = "业务来源",index = 12) + + @ExcelProperty(value = "联系人的联系电话", index = 9) + private String linkPhone; + + @ExcelProperty(value = "经营地址", index = 10) + private String businessAddr; + + @ExcelProperty(value = "业务来源", index = 11) private String businessSource; - /** - * 经营范围 - */ - @ExcelProperty(value = "经营范围",index = 13) + @ExcelProperty(value = "经营范围", index = 12) private String businessScope; - /** * 法人-姓名 */ - @ExcelProperty(value = "法人-姓名",index = 14) + @ExcelProperty(value = "法人-姓名", index = 13) private String legalName; - @ExcelProperty(value = "法人-性别 1、男,0、女",index = 15) + @ExcelProperty(value = "法人-性别 1、男,0、女", index = 14) private Integer legalGender; - @ExcelProperty(value = "法人-身份证号",index = 16) + @ExcelProperty(value = "法人-身份证号", index = 15) private String legalIdNumber; - @ExcelProperty(value = "法人-户口所在地",index = 17) + @ExcelProperty(value = "法人-户口所在地", index = 16) private String legalHukouAddr; - @ExcelProperty(value = "法人-联系电话",index = 18) + @ExcelProperty(value = "法人-联系电话", index = 17) private String legalPhone; - @ExcelProperty(value = "法人-家庭住址",index = 19) + @ExcelProperty(value = "法人-家庭住址", index = 18) private String legalHomeAddr; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyVO.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyVO.java index be9bec0b..6db6ae44 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyVO.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyVO.java @@ -35,89 +35,55 @@ public class CustomerCompanyVO extends BaseRowModel implements Serializable { */ @ExcelProperty(value = "姓名",index = 2) private String name; - /** - * 联系地址 - */ - @ExcelProperty(value = "地址",index = 3) - private String addr; - /** - * 联系电话 - */ - @ExcelProperty(value = "电话",index = 4) + + @ExcelProperty(value = "社会统一代码", index = 3) + private String socialUnifiedCode; + + @ExcelProperty(value = "联系电话", index = 4) private String phone; - /** - * 注册资金 - */ - @ExcelProperty(value = "注册资金",index = 5) + + @ExcelProperty(value = "注册时间", index = 5) + private Date registerTime; + + @ExcelProperty(value = "注册资金", index = 6) private String registeredCapital; - /** - * 所属行业 - */ - @ExcelProperty(value = "所属行业",index = 6) - private String industry; - /** - * 成立年限 - */ - @ExcelProperty(value = "成立年限",index = 7) - private Integer years; - /** - * 所在区域 - */ - @ExcelProperty(value = "所在区域",index = 8) - private String region; - /** - * 股东名称 - */ - @ExcelProperty(value = "股东名称",index = 9) - private String shareholder; - /** - * 关联企业 - */ - @ExcelProperty(value = "关联企业",index = 10) - private String affiliatedCompany; - /** - * 员工个数 - */ - @ExcelProperty(value = "员工个数",index = 11) + + @ExcelProperty(value = "员工人数", index = 7) private String empNum; - /** - * 联系人 - */ - @ExcelProperty(value = "联系人",index = 12) + + @ExcelProperty(value = "注册地址", index = 8) + private String registerAddr; + + @ExcelProperty(value = "联系人", index = 9) private String linkman; - /** - * 业务来源 - */ - @ExcelProperty(value = "业务来源",index = 13) - private String businessSource; - @ExcelProperty(value = "经营范围",index = 14) - private String businessScope; + @ExcelProperty(value = "联系人的联系电话", index = 10) + private String linkPhone; - @ExcelProperty(value = "经营地址",index = 15) + @ExcelProperty(value = "经营地址", index = 11) private String businessAddr; - @ExcelProperty(value = "注册时间",index = 16) - private Date registerTime; + @ExcelProperty(value = "业务来源", index = 12) + private String businessSource; - @ExcelProperty(value = "注册地址",index = 17) - private String registerAddr; + @ExcelProperty(value = "经营范围", index = 13) + private String businessScope; - @ExcelProperty(value = "法人-身份证号",index = 18) + @ExcelProperty(value = "法人-身份证号",index = 14) private String legalIdNumber; - @ExcelProperty(value = "法人-户口所在地",index = 19) + @ExcelProperty(value = "法人-户口所在地",index = 15) private String legalHukouAddr; - @ExcelProperty(value = "法人-联系电话",index = 20) + @ExcelProperty(value = "法人-联系电话",index = 16) private String legalPhone; - @ExcelProperty(value = "法人-家庭住址",index = 21) + @ExcelProperty(value = "法人-家庭住址",index = 17) private String legalHomeAddr; - @ExcelProperty(value = "法人-性别 1、男,0、女",index = 22) + @ExcelProperty(value = "法人-性别 1、男,0、女",index = 18) private Integer legalGender; - @ExcelProperty(value = "法人-姓名",index = 23) + @ExcelProperty(value = "法人-姓名",index = 19) private String legalName; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/EmployeeExcelResponse.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/EmployeeExcelResponse.java new file mode 100644 index 00000000..5d560827 --- /dev/null +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/EmployeeExcelResponse.java @@ -0,0 +1,53 @@ +package com.daqing.framework.domain.hrms.response; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.metadata.BaseRowModel; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.ToString; +import org.springframework.data.annotation.Transient; + +import java.io.Serializable; +import java.util.Date; + +/** + * 员工列表导出到excel实体类 + * + * @auther River + * @date 2021/1/4 15:27 + */ +@Data +@ToString +public class EmployeeExcelResponse extends BaseRowModel implements Serializable { + + @ApiModelProperty("姓名") + @ExcelProperty(value = "姓名",index = 0) + private String name; + + @ExcelProperty(value = "账号",index = 1) + @ApiModelProperty("账号") + private String account; + + @ExcelProperty(value = "工号",index = 2) + @ApiModelProperty("工号") + private String jobNumber; + + @ExcelProperty(value = "部门",index = 3) + @ApiModelProperty("部门") + @Transient + private String departmentNameList; + + @ExcelProperty(value = "职位",index = 4) + @ApiModelProperty("职位") + private String positionNameList; + + @ExcelProperty(value = "角色",index = 5) + @ApiModelProperty("角色") + private String roleNameList; + + @ExcelProperty(value = "创建时间",index = 6) + @ApiModelProperty("创建时间") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date createTime; +}