diff --git a/dq-financial-api/pom.xml b/dq-financial-api/pom.xml
index e0c617c1..90eb2948 100644
--- a/dq-financial-api/pom.xml
+++ b/dq-financial-api/pom.xml
@@ -27,6 +27,12 @@
spring-boot-starter-web
2.1.8.RELEASE
+
\ No newline at end of file
diff --git a/dq-financial-api/src/main/java/com/daqing/financial/guarantee/DgStatisticsControllerApi.java b/dq-financial-api/src/main/java/com/daqing/financial/guarantee/DgStatisticsControllerApi.java
new file mode 100644
index 00000000..7d8796ad
--- /dev/null
+++ b/dq-financial-api/src/main/java/com/daqing/financial/guarantee/DgStatisticsControllerApi.java
@@ -0,0 +1,11 @@
+package com.daqing.financial.guarantee;
+
+import io.swagger.annotations.Api;
+
+/**
+ * @auther River
+ * @date 2020/11/5 14:29
+ */
+@Api(value = "担保业务统计",tags = "提供业务统计增删改查的方法")
+public interface DgStatisticsControllerApi {
+}
diff --git a/dq-financial-api/src/main/java/com/daqing/financial/hrms/DeptControllerApi.java b/dq-financial-api/src/main/java/com/daqing/financial/hrms/DeptControllerApi.java
index 5a4f2ed1..4d72d6e9 100644
--- a/dq-financial-api/src/main/java/com/daqing/financial/hrms/DeptControllerApi.java
+++ b/dq-financial-api/src/main/java/com/daqing/financial/hrms/DeptControllerApi.java
@@ -2,6 +2,7 @@ package com.daqing.financial.hrms;
import com.daqing.framework.domain.crms.ext.CustomerCompanyVO;
import com.daqing.framework.domain.hrms.DeptEntity;
+import com.daqing.framework.domain.hrms.ext.EmployeeVO;
import com.daqing.framework.domain.hrms.request.DeptAddRequest;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
@@ -65,4 +66,10 @@ public interface DeptControllerApi {
*/
@ApiOperation(value = "查询该部门下所有子部门及部门下的的员工", notes = "查询该部门下所有子部门及部门下的的员工")
ResponseResult children(Long id);
+
+ /**
+ * 根据部门id查询该部门下所有员工
+ */
+ @ApiOperation(value = "根据部门id查询该部门下所有员工",notes = "根据部门id查询该部门下所有员工",response = EmployeeVO.class)
+ ResponseResult listEmployeeByDeptId(Long deptId);
}
diff --git a/dq-financial-api/src/main/java/com/daqing/financial/hrms/PositionControllerApi.java b/dq-financial-api/src/main/java/com/daqing/financial/hrms/PositionControllerApi.java
index 1a95caa5..a5a2fa0d 100644
--- a/dq-financial-api/src/main/java/com/daqing/financial/hrms/PositionControllerApi.java
+++ b/dq-financial-api/src/main/java/com/daqing/financial/hrms/PositionControllerApi.java
@@ -7,6 +7,8 @@ import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
+import java.util.List;
+
/**
* @Author: gongsj.
* @Description: 职位信息管理controllerApi定义
@@ -49,7 +51,7 @@ public interface PositionControllerApi {
* 所有的职位id和名称
*/
@ApiOperation(value = "所有的职位id和名称", notes = "所有的职位id和名称")
- ResponseResult listPositionIdAndName();
+ ResponseResult listPositionIdAndName(List deptIds);
/**
* 所有的角色id和名称
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/DqFinancialGuaranteeApplication.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/DqFinancialGuaranteeApplication.java
index 1eefe4f1..743e22a9 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/DqFinancialGuaranteeApplication.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/DqFinancialGuaranteeApplication.java
@@ -9,12 +9,10 @@ import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableFeignClients(basePackages = "com.daqing.financial.guarantee.feign")
-//@EnableDiscoveryClient
+@EnableDiscoveryClient
@SpringBootApplication
-//@EnableScheduling
+@EnableScheduling
@EnableSwagger2
-//@ComponentScan(basePackages = "com.daqing.financial.guarantee.mapper")
-@ComponentScan(basePackages = "com.daqing")
public class DqFinancialGuaranteeApplication {
public static void main(String[] args) {
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/config/IPageConfig.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/config/IPageConfig.java
index e631d647..29169b16 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/config/IPageConfig.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/config/IPageConfig.java
@@ -4,6 +4,10 @@ import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+/**
+ * @auther River
+ * @date 2020/11/5 14:38
+ */
@Configuration
public class IPageConfig {
@Bean
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
new file mode 100644
index 00000000..5e207256
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgStatisticsController.java
@@ -0,0 +1,74 @@
+package com.daqing.financial.guarantee.controller;
+
+import com.daqing.financial.guarantee.DgStatisticsControllerApi;
+import com.daqing.financial.guarantee.model.request.DgStatisticsRequest;
+import com.daqing.financial.guarantee.model.response.DgStatisticsListRefuseResponse;
+import com.daqing.financial.guarantee.model.response.DgStatisticsListResponse;
+import com.daqing.financial.guarantee.service.IDgStatisticsService;
+import com.daqing.framework.model.response.ResponseResult;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * 业务统计
+ *
+ * @auther River
+ * @date 2020/11/5 14:18
+ */
+@RestController
+@RequestMapping("/guarantee/statistics")
+public class DgStatisticsController implements DgStatisticsControllerApi {
+
+ @Autowired
+ private IDgStatisticsService iDgStatisticsService;
+
+ /**
+ * 列表
+ */
+ @GetMapping("/list")
+ @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));
+ }
+
+ /**
+ * 列表导出
+ */
+ @ApiOperation(value = "统计列表导出",notes = "统计列表导出")
+ @GetMapping("/excelExport")
+ public ResponseResult excelExport(HttpServletResponse response){
+
+ Boolean result = iDgStatisticsService.excelExport(response);
+
+ return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
+ }
+
+ /**
+ * 拒绝列表
+ */
+ @GetMapping("/listRefuse")
+ @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));
+ }
+
+ /**
+ * 拒绝列表导出
+ */
+ @ApiOperation(value = "统计拒绝列表导出",notes = "统计拒绝列表导出")
+ @GetMapping("/excelExportRefuse")
+ public ResponseResult excelExportRefuse(HttpServletResponse response){
+
+ Boolean result = iDgStatisticsService.excelExportRefuse(response);
+
+ return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
+ }
+}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/CrmsFeignService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/CrmsFeignService.java
index 0368dd4b..e69de29b 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/CrmsFeignService.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/CrmsFeignService.java
@@ -1,27 +0,0 @@
-package com.daqing.financial.guarantee.feign;
-
-import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
-import com.daqing.framework.model.response.ResponseResult;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import java.util.Map;
-
-/**
- * 这是一个声明式的远程调用
- */
-@FeignClient(value = "dq-financial-crms", contextId = "guaranteeToCrms")
-public interface CrmsFeignService {
-
- /**
- * 根据客户编号/客户名称获取企业信息
- * @param
- * @return
- */
- @PostMapping("/crms/customer/queryCustomerInfoById")
- ResponseResult queryCustomerInfoById(@RequestBody DgApplyAmountInfoRequest applyAmountInfo);
-
-}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/HrmsFeignService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/HrmsFeignService.java
new file mode 100644
index 00000000..5bbda15d
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/HrmsFeignService.java
@@ -0,0 +1,36 @@
+package com.daqing.financial.guarantee.feign;
+
+import com.daqing.framework.domain.hrms.ext.EmployeeTO;
+import com.daqing.framework.domain.hrms.ext.EmployeeVO;
+import com.daqing.framework.model.response.ResponseResult;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 这是一个声明式的远程调用
+ */
+@FeignClient(value = "dq-financial-hrms", contextId = "guaranteeToHrms")
+public interface HrmsFeignService {
+
+ /**
+ * 根据客户编号/客户名称获取企业信息
+ */
+// @GetMapping("/crms/customer/list")
+// ResponseResult list(@RequestParam Map params);
+
+ /**
+ * 根据id集合获取对应的员工id、姓名、部门名称
+ */
+ @GetMapping("/hrms/employee/getEmployeeAndDeptById") // 远程调用传递集合类型的参数必须以数组封装,不然会导致数据接收不完整
+ ResponseResult> getEmployeeAndDeptById(@RequestParam("ids") Long[] ids);
+
+ /**
+ * 根据部门id获取该部门下所有员工信息
+ */
+ @GetMapping("/hrms/dept/listEmployeeByDeptId")
+ ResponseResult> listEmployeeByDeptId(@RequestParam("deptId") Long deptId);
+}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgStatisticsMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgStatisticsMapper.java
new file mode 100644
index 00000000..87a23a7b
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgStatisticsMapper.java
@@ -0,0 +1,23 @@
+package com.daqing.financial.guarantee.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.daqing.financial.guarantee.model.request.DgStatisticsRequest;
+import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
+import com.daqing.framework.domain.guarantee.po.DgStatisticsPO;
+import com.daqing.framework.domain.guarantee.po.DgStatisticsRefusePO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @auther River
+ * @date 2020/11/5 15:06
+ */
+@Mapper
+public interface DgStatisticsMapper extends BaseMapper {
+
+ IPage list(Page page, @Param("sr") DgStatisticsRequest dgStatisticsRequest);
+
+ IPage listRefuse(Page page, @Param("sr") DgStatisticsRequest dgStatisticsRequest);
+}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgStatisticsRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgStatisticsRequest.java
new file mode 100644
index 00000000..e4ab59e3
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgStatisticsRequest.java
@@ -0,0 +1,48 @@
+package com.daqing.financial.guarantee.model.request;
+
+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;
+
+/**
+ * 业务统计请求参数
+ *
+ * @auther River
+ * @date 2020/11/5 14:39
+ */
+@Data
+@ToString
+public class DgStatisticsRequest implements Serializable {
+
+ @ApiModelProperty("部门id")
+ private Integer deptId;
+
+ @ApiModelProperty("业务类型")
+ private String type;
+
+ @ApiModelProperty("提单人员工id")
+ private Integer empId;
+
+ @ApiModelProperty("申请时间,固定类型,0:今天,1:昨天,2:本周,3:本月,4:本年")
+ private Integer createFixedTime;
+
+ @ApiModelProperty("申请时间,自定义时间")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date createCustomTime;
+
+ @ApiModelProperty("客户名称或者编号")
+ private String codeOrName;
+
+ @ApiModelProperty("辅助字段,不用管,起始时间")
+ private String startTime;
+
+ @ApiModelProperty("辅助字段,不用管,结束时间")
+ private String endTime;
+
+ @ApiModelProperty("辅助字段,不用管,流程状态")
+ private String status;
+}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsListRefuseResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsListRefuseResponse.java
new file mode 100644
index 00000000..c265b9a9
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsListRefuseResponse.java
@@ -0,0 +1,77 @@
+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;
+import java.util.List;
+
+/**
+ * 业务统计拒绝列表
+ *
+ * @auther River
+ * @date 2020/11/9 17:50
+ */
+@Data
+@ToString
+public class DgStatisticsListRefuseResponse 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 HH:mm", timezone = "GMT+8")
+ private Date createTime;
+
+ @ApiModelProperty("拒绝人")
+ @ExcelProperty(value = "当前审批人",index = 7)
+ private String empName;
+
+ @ApiModelProperty("节点状态")
+ @ExcelProperty(value = "任务节点",index = 8)
+ private String status;
+
+ @ApiModelProperty("拒绝时间")
+ @ExcelProperty(value = "任务分配时间",index = 9)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ private Date dateTime;
+
+ @ApiModelProperty("拒绝原因")
+ @ExcelProperty(value = "拒绝原因",index = 10)
+ private String remark;
+
+ @ApiModelProperty("提单人姓名")
+ @ExcelProperty(value = "提单人",index = 11)
+ private String employeeName;
+
+ @ApiModelProperty("部门")
+ @ExcelProperty(value = "所属部门",index = 12)
+ private List department;
+}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsListResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsListResponse.java
new file mode 100644
index 00000000..a6ee9a46
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsListResponse.java
@@ -0,0 +1,74 @@
+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;
+import java.util.List;
+
+/**
+ * 业务统计列表
+ *
+ * @auther River
+ * @date 2020/11/6 16:37
+ */
+@Data
+@ToString
+public class DgStatisticsListResponse 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 HH:mm", timezone = "GMT+8")
+ private Date createTime;
+
+ @ApiModelProperty("审批人")
+ @ExcelProperty(value = "当前审批人",index = 7)
+ private String empName;
+
+ @ApiModelProperty("节点状态")
+ @ExcelProperty(value = "任务节点",index = 8)
+ private String status;
+
+ @ApiModelProperty("达到时间")
+ @ExcelProperty(value = "任务分配时间",index = 9)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ private Date dateTime;
+
+ @ApiModelProperty("提单人姓名")
+ @ExcelProperty(value = "提单人",index = 10)
+ private String employeeName;
+
+ @ApiModelProperty("部门")
+ @ExcelProperty(value = "所属部门",index = 11)
+ private List department;
+
+}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgStatisticsService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgStatisticsService.java
new file mode 100644
index 00000000..7b1da9d9
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgStatisticsService.java
@@ -0,0 +1,23 @@
+package com.daqing.financial.guarantee.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.daqing.financial.guarantee.model.request.DgStatisticsRequest;
+import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
+import com.daqing.framework.utils.PageUtils;
+
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * @auther River
+ * @date 2020/11/5 15:35
+ */
+public interface IDgStatisticsService extends IService {
+
+ PageUtils list(Integer page, Integer size, DgStatisticsRequest dgStatisticsRequest);
+
+ Boolean excelExport(HttpServletResponse response);
+
+ PageUtils listRefuse(Integer page,Integer size, DgStatisticsRequest dgStatisticsRequest);
+
+ Boolean excelExportRefuse(HttpServletResponse response);
+}
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
new file mode 100644
index 00000000..199c3e6c
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgStatisticsServiceImpl.java
@@ -0,0 +1,373 @@
+package com.daqing.financial.guarantee.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+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.DgStatisticsListRefuseResponse;
+import com.daqing.financial.guarantee.model.response.DgStatisticsListResponse;
+import com.daqing.financial.guarantee.service.IDgStatisticsService;
+import com.daqing.financial.guarantee.util.DateUtils;
+import com.daqing.framework.domain.crms.response.CrmsCode;
+import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
+import com.daqing.framework.domain.guarantee.po.DgStatisticsPO;
+import com.daqing.framework.domain.guarantee.po.DgStatisticsRefusePO;
+import com.daqing.framework.domain.hrms.ext.EmployeeTO;
+import com.daqing.framework.domain.hrms.ext.EmployeeVO;
+import com.daqing.framework.exception.ExceptionCast;
+import com.daqing.framework.model.response.PromptSuccess;
+import com.daqing.framework.model.response.ResponseResult;
+import com.daqing.framework.utils.PageUtils;
+import com.daqing.framework.utils.excel.ExcelUtil;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * @auther River
+ * @date 2020/11/5 15:36
+ */
+@Service
+public class DgStatisticsServiceImpl extends ServiceImpl implements IDgStatisticsService {
+
+ @Autowired
+ private HrmsFeignService hrmsFeignService;
+
+ /**
+ * 列表
+ */
+ @Override
+ public PageUtils list(Integer page, Integer size, DgStatisticsRequest dgStatisticsRequest) {
+ if (page == null || size == null){
+ page = 1;
+ size = 10;
+ }
+ // 时间筛选(固定时间)
+ if (dgStatisticsRequest.getCreateFixedTime() != null && dgStatisticsRequest.getCreateCustomTime() == null){
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ switch (dgStatisticsRequest.getCreateFixedTime()){
+ case 0 :
+ dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getDayBegin()));
+ dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getDayEnd()));// 今天
+ break;
+ case 1 :
+ dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfYesterday()));
+ dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfYesterDay()));// 昨天
+ break;
+ case 2 :
+ dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfWeek()));
+ dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfWeek()));// 本周
+ break;
+ case 3 :
+ dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfMonth()));
+ dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfMonth()));// 本月
+ break;
+ case 4 :
+ dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfYear()));
+ dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfYear()));// 本年
+ break;
+ default :
+ dgStatisticsRequest.setStartTime(null);
+ dgStatisticsRequest.setEndTime(null);
+ }
+ }
+ // 时间筛选(自定义时间)
+ if (dgStatisticsRequest.getCreateCustomTime() != null){
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getDayStartTime(dgStatisticsRequest.getCreateCustomTime())));
+ dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getDayEndTime(dgStatisticsRequest.getCreateCustomTime())));
+ }
+ // 查询列表
+ IPage iPage = this.getBaseMapper().list(new Page(page, size), dgStatisticsRequest);
+ List dgStatisticsPOList = iPage.getRecords();
+ if (dgStatisticsPOList == null){
+ return null;
+ }
+ // 部门筛选
+ if (dgStatisticsRequest.getDeptId() != null && dgStatisticsRequest.getEmpId() == null){
+ ResponseResult> result = hrmsFeignService.listEmployeeByDeptId(dgStatisticsRequest.getDeptId().longValue());
+ if (result.getData() == null || result.getData().size() == 0){
+ return null;
+ }
+ for (int i = 0;i < dgStatisticsPOList.size();i++){
+ boolean flag = false;
+ for (EmployeeVO employeeVO : result.getData()) {
+ if (Objects.equals(dgStatisticsPOList.get(i).getPresenterId().longValue(),employeeVO.getId())){
+ flag = true;
+ }
+ }
+ if (!flag){
+ dgStatisticsPOList.remove(i);
+ i--; // 索引要减一,不然会触发"快速失败"异常
+ }
+ }
+ iPage.setTotal(dgStatisticsPOList.size());
+ iPage.setSize(iPage.getTotal() % size == 0 ? iPage.getTotal() / size : iPage.getTotal() / size + 1);
+ }
+ // 提单人筛选
+ if (dgStatisticsRequest.getEmpId() != null){
+ for (int i = 0;i < dgStatisticsPOList.size();i++){
+ if (!Objects.equals(dgStatisticsPOList.get(i).getPresenterId(),dgStatisticsRequest.getEmpId())){
+ dgStatisticsPOList.remove(i);
+ i--;// 索引要减一,不然会触发"快速失败"异常
+ }
+ }
+ iPage.setTotal(dgStatisticsPOList.size());
+ iPage.setSize(iPage.getTotal() % size == 0 ? iPage.getTotal() / size : iPage.getTotal() / size + 1);
+ }
+ // 获取所有的提单人id
+ Integer[] presenterIds = dgStatisticsPOList.stream().map(DgStatisticsPO::getPresenterId).toArray(Integer[]::new);
+ if (presenterIds.length != 0){
+ // 强制类型转换
+ Long[] ids = new Long[presenterIds.length];
+ for (int i = 0;i < presenterIds.length;i++){
+ ids[i] = presenterIds[i].longValue();
+ }
+ ResponseResult> empAndDeptList = hrmsFeignService.getEmployeeAndDeptById(ids);
+ if (empAndDeptList.getData() != null){
+ List listResponse = this.jointStatistics(dgStatisticsPOList, empAndDeptList.getData());
+ IPage iPages = new Page<>();
+ BeanUtils.copyProperties(iPage,iPages);
+ iPages.setRecords(listResponse);
+ return new PageUtils(iPages);
+ }else {
+ return new PageUtils(iPage);
+ }
+ }else {
+ return new PageUtils(iPage);
+ }
+ }
+
+ /**
+ * 列表导出
+ */
+ @Override
+ public Boolean excelExport(HttpServletResponse response) {
+
+ IPage list = this.getBaseMapper().list(new Page(), new DgStatisticsRequest());
+ List dgStatisticsPOList = list.getRecords();
+ if (dgStatisticsPOList == null){
+ return false;
+ }
+ Integer[] presenterIds = dgStatisticsPOList.stream().map(DgStatisticsPO::getPresenterId).toArray(Integer[]::new);
+ if (presenterIds.length != 0) {
+ // 强制类型转换
+ Long[] ids = new Long[presenterIds.length];
+ for (int i = 0; i < presenterIds.length; i++) {
+ ids[i] = presenterIds[i].longValue();
+ }
+ ResponseResult> empAndDeptList = hrmsFeignService.getEmployeeAndDeptById(ids);
+ if (empAndDeptList.getData() != null) {
+ List listResponse = this.jointStatistics(dgStatisticsPOList, empAndDeptList.getData());
+ try {
+ ExcelUtil.writeExcelWithSheets(response,listResponse,"业务统计信息一览表","statistics",new DgStatisticsListResponse())
+ .finish();
+ }catch (Exception e){
+ ExceptionCast.cast(CrmsCode.CUSTOMER_EXPORT_EXSIT);
+ }
+ return true;
+ }else {
+ return false;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * 拒绝列表
+ */
+ @Override
+ public PageUtils listRefuse(Integer page, Integer size, DgStatisticsRequest dgStatisticsRequest) {
+ if (page == null || size == null){
+ page = 1;
+ size = 10;
+ }
+ // 时间筛选(固定时间)
+ if (dgStatisticsRequest.getCreateFixedTime() != null && dgStatisticsRequest.getCreateCustomTime() == null){
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ switch (dgStatisticsRequest.getCreateFixedTime()){
+ case 0 :
+ dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getDayBegin()));
+ dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getDayEnd()));// 今天
+ break;
+ case 1 :
+ dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfYesterday()));
+ dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfYesterDay()));// 昨天
+ break;
+ case 2 :
+ dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfWeek()));
+ dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfWeek()));// 本周
+ break;
+ case 3 :
+ dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfMonth()));
+ dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfMonth()));// 本月
+ break;
+ case 4 :
+ dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfYear()));
+ dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfYear()));// 本年
+ break;
+ default :
+ dgStatisticsRequest.setStartTime(null);
+ dgStatisticsRequest.setEndTime(null);
+ }
+ }
+ // 时间筛选(自定义时间)
+ if (dgStatisticsRequest.getCreateCustomTime() != null){
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getDayStartTime(dgStatisticsRequest.getCreateCustomTime())));
+ dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getDayEndTime(dgStatisticsRequest.getCreateCustomTime())));
+ }
+ // 拒绝列表
+ dgStatisticsRequest.setStatus(PromptSuccess.STATUS_REFUSE);
+ IPage iPage = this.getBaseMapper().listRefuse(new Page(page, size), dgStatisticsRequest);
+ List dgStatisticsRefusePOList = iPage.getRecords();
+ if (dgStatisticsRefusePOList == null){
+ return null;
+ }
+ // 部门筛选
+ if (dgStatisticsRequest.getDeptId() != null && dgStatisticsRequest.getEmpId() == null){
+ ResponseResult> result = hrmsFeignService.listEmployeeByDeptId(dgStatisticsRequest.getDeptId().longValue());
+ if (result.getData() == null || result.getData().size() == 0){
+ return null;
+ }
+ for (int i = 0;i < dgStatisticsRefusePOList.size();i++){
+ boolean flag = false;
+ for (EmployeeVO employeeVO : result.getData()) {
+ if (Objects.equals(dgStatisticsRefusePOList.get(i).getPresenterId().longValue(),employeeVO.getId())){
+ flag = true;
+ }
+ }
+ if (!flag){
+ dgStatisticsRefusePOList.remove(i);
+ i--; // 索引要减一,不然会触发"快速失败"异常
+ }
+ }
+ iPage.setTotal(dgStatisticsRefusePOList.size());
+ iPage.setSize(iPage.getTotal() % size == 0 ? iPage.getTotal() / size : iPage.getTotal() / size + 1);
+ }
+ // 提单人筛选
+ if (dgStatisticsRequest.getEmpId() != null){
+ for (int i = 0;i < dgStatisticsRefusePOList.size();i++){
+ if (!Objects.equals(dgStatisticsRefusePOList.get(i).getPresenterId(),dgStatisticsRequest.getEmpId())){
+ dgStatisticsRefusePOList.remove(i);
+ i--;// 索引要减一,不然会触发"快速失败"异常
+ }
+ }
+ iPage.setTotal(dgStatisticsRefusePOList.size());
+ iPage.setSize(iPage.getTotal() % size == 0 ? iPage.getTotal() / size : iPage.getTotal() / size + 1);
+ }
+ // 获取所有的提单人id
+ Integer[] presenterIds = dgStatisticsRefusePOList.stream().map(DgStatisticsRefusePO::getPresenterId).toArray(Integer[]::new);
+ if (presenterIds.length != 0){
+ // 强制类型转换
+ Long[] ids = new Long[presenterIds.length];
+ for (int i = 0;i < presenterIds.length;i++){
+ ids[i] = presenterIds[i].longValue();
+ }
+ ResponseResult> empAndDeptList = hrmsFeignService.getEmployeeAndDeptById(ids);
+ if (empAndDeptList.getData() != null){
+ List listResponse = this.jointRefuseStatistics(dgStatisticsRefusePOList, empAndDeptList.getData());
+ IPage iPages = new Page<>();
+ BeanUtils.copyProperties(iPage,iPages);
+ iPages.setRecords(listResponse);
+ return new PageUtils(iPages);
+ }else {
+ return new PageUtils(iPage);
+ }
+ }else {
+ return new PageUtils(iPage);
+ }
+ }
+
+ /**
+ * 拒绝列表导出
+ */
+ @Override
+ public Boolean excelExportRefuse(HttpServletResponse response) {
+ DgStatisticsRequest dgStatisticsRequest = new DgStatisticsRequest();
+ dgStatisticsRequest.setStatus(PromptSuccess.STATUS_REFUSE);
+ // 列表查询
+ IPage listRefuse = this.getBaseMapper().listRefuse(new Page(), dgStatisticsRequest);
+ List statisticsRefusePOList = listRefuse.getRecords();
+ if (statisticsRefusePOList == null){
+ return false;
+ }
+ Integer[] presenterIds = statisticsRefusePOList.stream().map(DgStatisticsRefusePO::getPresenterId).toArray(Integer[]::new);
+ if (presenterIds.length != 0) {
+ // 强制类型转换
+ Long[] ids = new Long[presenterIds.length];
+ for (int i = 0; i < presenterIds.length; i++) {
+ ids[i] = presenterIds[i].longValue();
+ }
+ ResponseResult> empAndDeptList = hrmsFeignService.getEmployeeAndDeptById(ids);
+ if (empAndDeptList.getData() != null) {
+ // 提单人姓名、部门拼装
+ List listResponse = this.jointRefuseStatistics(statisticsRefusePOList, empAndDeptList.getData());
+ try {
+ ExcelUtil.writeExcelWithSheets(response,listResponse,"业务统计拒绝信息一览表","statisticsRefuse",new DgStatisticsListRefuseResponse())
+ .finish();
+ }catch (Exception e){
+ ExceptionCast.cast(CrmsCode.CUSTOMER_EXPORT_EXSIT);
+ }
+ return true;
+ }else {
+ return false;
+ }
+ }
+ return false;
+ }
+
+ private List jointStatistics(List dgStatisticsPOList,List empAndDeptList){
+ // 用于拼装业务统计列表
+ List listResponse = new ArrayList<>();
+ DgStatisticsListResponse dgStatisticsListResponse;
+ for (DgStatisticsPO dgStatisticsPO : dgStatisticsPOList) {
+ // 每一个客户对应一个不同的对象
+ dgStatisticsListResponse = new DgStatisticsListResponse();
+ for (EmployeeTO employeeTO : empAndDeptList) {
+ if (Objects.equals(dgStatisticsPO.getPresenterId().longValue(),employeeTO.getId())){
+ BeanUtils.copyProperties(dgStatisticsPO,dgStatisticsListResponse);
+ dgStatisticsListResponse.setEmployeeName(employeeTO.getEmpName());
+ dgStatisticsListResponse.setDepartment(employeeTO.getDeptNames());
+ listResponse.add(dgStatisticsListResponse);
+ }
+ }
+ if (dgStatisticsListResponse.getEmployeeName() == null || dgStatisticsListResponse.getEmployeeName().length() == 0){
+ BeanUtils.copyProperties(dgStatisticsPO,dgStatisticsListResponse);
+ listResponse.add(dgStatisticsListResponse);
+ }
+ }
+ return listResponse;
+ }
+
+ private List jointRefuseStatistics(List dgStatisticsRefusePOList, List empAndDeptList){
+ // 用于拼装业务统计列表
+ List listResponse = new ArrayList<>();
+ DgStatisticsListRefuseResponse dgStatisticsListRefuseResponse;
+ for (DgStatisticsRefusePO dgStatisticsRefusePO : dgStatisticsRefusePOList) {
+ // 每一个客户对应一个不同的对象
+ dgStatisticsListRefuseResponse = new DgStatisticsListRefuseResponse();
+ for (EmployeeTO employeeTO : empAndDeptList) {
+ if (Objects.equals(dgStatisticsRefusePO.getPresenterId().longValue(),employeeTO.getId())){
+ BeanUtils.copyProperties(dgStatisticsRefusePO,dgStatisticsListRefuseResponse);
+ dgStatisticsListRefuseResponse.setEmployeeName(employeeTO.getEmpName());
+ dgStatisticsListRefuseResponse.setDepartment(employeeTO.getDeptNames());
+ listResponse.add(dgStatisticsListRefuseResponse);
+ }
+ }
+ if (dgStatisticsListRefuseResponse.getEmployeeName() == null || dgStatisticsListRefuseResponse.getEmployeeName().length() == 0){
+ BeanUtils.copyProperties(dgStatisticsRefusePO,dgStatisticsListRefuseResponse);
+ listResponse.add(dgStatisticsListRefuseResponse);
+ }
+ }
+ return listResponse;
+ }
+}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/DateUtils.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/DateUtils.java
new file mode 100644
index 00000000..0e1f6c45
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/DateUtils.java
@@ -0,0 +1,326 @@
+package com.daqing.financial.guarantee.util;
+
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.List;
+
+/**
+ * @auther River
+ * @date 2020/11/9 15:53
+ */
+public class DateUtils {
+
+ //获取当天的开始时间
+ public static java.util.Date getDayBegin() {
+ Calendar cal = new GregorianCalendar();
+ cal.set(Calendar.HOUR_OF_DAY, 0);
+ cal.set(Calendar.MINUTE, 0);
+ cal.set(Calendar.SECOND, 0);
+ cal.set(Calendar.MILLISECOND, 0);
+ return cal.getTime();
+ }
+
+ //获取当天的结束时间
+ public static java.util.Date getDayEnd() {
+ Calendar cal = new GregorianCalendar();
+ cal.set(Calendar.HOUR_OF_DAY, 23);
+ cal.set(Calendar.MINUTE, 59);
+ cal.set(Calendar.SECOND, 59);
+ return cal.getTime();
+ }
+
+ //获取昨天的开始时间
+ public static Date getBeginDayOfYesterday() {
+ Calendar cal = new GregorianCalendar();
+ cal.setTime(getDayBegin());
+ cal.add(Calendar.DAY_OF_MONTH, -1);
+ return cal.getTime();
+ }
+
+ //获取昨天的结束时间
+ public static Date getEndDayOfYesterDay() {
+ Calendar cal = new GregorianCalendar();
+ cal.setTime(getDayEnd());
+ cal.add(Calendar.DAY_OF_MONTH, -1);
+ return cal.getTime();
+ }
+
+ //获取明天的开始时间
+ public static Date getBeginDayOfTomorrow() {
+ Calendar cal = new GregorianCalendar();
+ cal.setTime(getDayBegin());
+ cal.add(Calendar.DAY_OF_MONTH, 1);
+
+ return cal.getTime();
+ }
+
+ //获取明天的结束时间
+ public static Date getEndDayOfTomorrow() {
+ Calendar cal = new GregorianCalendar();
+ cal.setTime(getDayEnd());
+ cal.add(Calendar.DAY_OF_MONTH, 1);
+ return cal.getTime();
+ }
+
+ //获取本周的开始时间
+ @SuppressWarnings("unused")
+ public static Date getBeginDayOfWeek() {
+ Date date = new Date();
+ if (date == null) {
+ return null;
+ }
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ int dayofweek = cal.get(Calendar.DAY_OF_WEEK);
+ if (dayofweek == 1) {
+ dayofweek += 7;
+ }
+ cal.add(Calendar.DATE, 2 - dayofweek);
+ return getDayStartTime(cal.getTime());
+ }
+
+ //获取本周的结束时间
+ public static Date getEndDayOfWeek() {
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(getBeginDayOfWeek());
+ cal.add(Calendar.DAY_OF_WEEK, 6);
+ Date weekEndSta = cal.getTime();
+ return getDayEndTime(weekEndSta);
+ }
+
+ //获取上周的开始时间
+ @SuppressWarnings("unused")
+ public static Date getBeginDayOfLastWeek() {
+ Date date = new Date();
+ if (date == null) {
+ return null;
+ }
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ int dayofweek = cal.get(Calendar.DAY_OF_WEEK);
+ if (dayofweek == 1) {
+ dayofweek += 7;
+ }
+ cal.add(Calendar.DATE, 2 - dayofweek - 7);
+ return getDayStartTime(cal.getTime());
+ }
+
+ //获取上周的结束时间
+ public static Date getEndDayOfLastWeek() {
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(getBeginDayOfLastWeek());
+ cal.add(Calendar.DAY_OF_WEEK, 6);
+ Date weekEndSta = cal.getTime();
+ return getDayEndTime(weekEndSta);
+ }
+
+ //获取本月的开始时间
+ public static Date getBeginDayOfMonth() {
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(getNowYear(), getNowMonth() - 1, 1);
+ return getDayStartTime(calendar.getTime());
+ }
+
+ //获取本月的结束时间
+ public static Date getEndDayOfMonth() {
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(getNowYear(), getNowMonth() - 1, 1);
+ int day = calendar.getActualMaximum(5);
+ calendar.set(getNowYear(), getNowMonth() - 1, day);
+ return getDayEndTime(calendar.getTime());
+ }
+
+ //获取上月的开始时间
+ public static Date getBeginDayOfLastMonth() {
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(getNowYear(), getNowMonth() - 2, 1);
+ return getDayStartTime(calendar.getTime());
+ }
+
+ //获取上月的结束时间
+ public static Date getEndDayOfLastMonth() {
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(getNowYear(), getNowMonth() - 2, 1);
+ int day = calendar.getActualMaximum(5);
+ calendar.set(getNowYear(), getNowMonth() - 2, day);
+ return getDayEndTime(calendar.getTime());
+ }
+
+ //获取本年的开始时间
+ public static java.util.Date getBeginDayOfYear() {
+ Calendar cal = Calendar.getInstance();
+ cal.set(Calendar.YEAR, getNowYear());
+ // cal.set
+ cal.set(Calendar.MONTH, Calendar.JANUARY);
+ cal.set(Calendar.DATE, 1);
+
+ return getDayStartTime(cal.getTime());
+ }
+
+ //获取本年的结束时间
+ public static java.util.Date getEndDayOfYear() {
+ Calendar cal = Calendar.getInstance();
+ cal.set(Calendar.YEAR, getNowYear());
+ cal.set(Calendar.MONTH, Calendar.DECEMBER);
+ cal.set(Calendar.DATE, 31);
+ return getDayEndTime(cal.getTime());
+ }
+
+ //获取某个日期的开始时间
+ public static Timestamp getDayStartTime(Date d) {
+ Calendar calendar = Calendar.getInstance();
+ if (null != d) calendar.setTime(d);
+ calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH), 0, 0, 0);
+ calendar.set(Calendar.MILLISECOND, 0);
+ return new Timestamp(calendar.getTimeInMillis());
+ }
+
+ //获取某个日期的结束时间
+ public static Timestamp getDayEndTime(Date d) {
+ Calendar calendar = Calendar.getInstance();
+ if (null != d) calendar.setTime(d);
+ calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH), 23, 59, 59);
+ calendar.set(Calendar.MILLISECOND, 999);
+ return new Timestamp(calendar.getTimeInMillis());
+ }
+
+ //获取今年是哪一年
+ public static Integer getNowYear() {
+ Date date = new Date();
+ GregorianCalendar gc = (GregorianCalendar) Calendar.getInstance();
+ gc.setTime(date);
+ return Integer.valueOf(gc.get(1));
+ }
+
+ //获取本月是哪一月
+ public static int getNowMonth() {
+ Date date = new Date();
+ GregorianCalendar gc = (GregorianCalendar) Calendar.getInstance();
+ gc.setTime(date);
+ return gc.get(2) + 1;
+ }
+
+ //两个日期相减得到的天数
+ public static int getDiffDays(Date beginDate, Date endDate) {
+
+ if (beginDate == null || endDate == null) {
+ throw new IllegalArgumentException("getDiffDays param is null!");
+ }
+
+ long diff = (endDate.getTime() - beginDate.getTime())
+ / (1000 * 60 * 60 * 24);
+
+ int days = new Long(diff).intValue();
+
+ return days;
+ }
+
+ //两个日期相减得到的毫秒数
+ public static long dateDiff(Date beginDate, Date endDate) {
+ long date1ms = beginDate.getTime();
+ long date2ms = endDate.getTime();
+ return date2ms - date1ms;
+ }
+
+ //获取两个日期中的最大日期
+ public static Date max(Date beginDate, Date endDate) {
+ if (beginDate == null) {
+ return endDate;
+ }
+ if (endDate == null) {
+ return beginDate;
+ }
+ if (beginDate.after(endDate)) {
+ return beginDate;
+ }
+ return endDate;
+ }
+
+ //获取两个日期中的最小日期
+ public static Date min(Date beginDate, Date endDate) {
+ if (beginDate == null) {
+ return endDate;
+ }
+ if (endDate == null) {
+ return beginDate;
+ }
+ if (beginDate.after(endDate)) {
+ return endDate;
+ }
+ return beginDate;
+ }
+
+ //返回某月该季度的第一个月
+ public static Date getFirstSeasonDate(Date date) {
+ final int[] SEASON = {1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4};
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ int sean = SEASON[cal.get(Calendar.MONTH)];
+ cal.set(Calendar.MONTH, sean * 3 - 3);
+ return cal.getTime();
+ }
+
+ //返回某个日期下几天的日期
+ public static Date getNextDay(Date date, int i) {
+ Calendar cal = new GregorianCalendar();
+ cal.setTime(date);
+ cal.set(Calendar.DATE, cal.get(Calendar.DATE) + i);
+ return cal.getTime();
+ }
+
+ //返回某个日期前几天的日期
+ public static Date getFrontDay(Date date, int i) {
+ Calendar cal = new GregorianCalendar();
+ cal.setTime(date);
+ cal.set(Calendar.DATE, cal.get(Calendar.DATE) - i);
+ return cal.getTime();
+ }
+
+ //获取某年某月到某年某月按天的切片日期集合(间隔天数的集合)
+ @SuppressWarnings({"rawtypes", "unchecked"})
+ public static List getTimeList(int beginYear, int beginMonth, int endYear,
+ int endMonth, int k) {
+ List list = new ArrayList();
+ if (beginYear == endYear) {
+ for (int j = beginMonth; j <= endMonth; j++) {
+ list.add(getTimeList(beginYear, j, k));
+
+ }
+ } else {
+ {
+ for (int j = beginMonth; j < 12; j++) {
+ list.add(getTimeList(beginYear, j, k));
+ }
+
+ for (int i = beginYear + 1; i < endYear; i++) {
+ for (int j = 0; j < 12; j++) {
+ list.add(getTimeList(i, j, k));
+ }
+ }
+ for (int j = 0; j <= endMonth; j++) {
+ list.add(getTimeList(endYear, j, k));
+ }
+ }
+ }
+ return list;
+ }
+
+ //获取某年某月按天切片日期集合(某个月间隔多少天的日期集合)
+ @SuppressWarnings({"unchecked", "rawtypes"})
+ public static List getTimeList(int beginYear, int beginMonth, int k) {
+ List list = new ArrayList();
+ Calendar begincal = new GregorianCalendar(beginYear, beginMonth, 1);
+ int max = begincal.getActualMaximum(Calendar.DATE);
+ for (int i = 1; i < max; i = i + k) {
+ list.add(begincal.getTime());
+ begincal.add(Calendar.DATE, k);
+ }
+ begincal = new GregorianCalendar(beginYear, beginMonth, max);
+ list.add(begincal.getTime());
+ return list;
+ }
+}
+
diff --git a/dq-financial-guarantee/src/main/resources/bootstrap.properties b/dq-financial-guarantee/src/main/resources/bootstrap.properties
index f5c96118..b57d1313 100644
--- a/dq-financial-guarantee/src/main/resources/bootstrap.properties
+++ b/dq-financial-guarantee/src/main/resources/bootstrap.properties
@@ -13,6 +13,9 @@ spring.cloud.nacos.config.ext-config[1].data-id=datasource.yml
spring.cloud.nacos.config.ext-config[1].group=dev
spring.cloud.nacos.config.ext-config[1].refresh=true
+spring.cloud.nacos.config.ext-config[2].data-id=mybatis.yml
+spring.cloud.nacos.config.ext-config[2].group=dev
+spring.cloud.nacos.config.ext-config[2].refresh=true
spring.redis.host=127.0.0.1
spring.redis.port=6379
diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
index 161597b0..1fe65e95 100644
--- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
+++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
@@ -7,6 +7,7 @@
+
diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgStatisticsMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgStatisticsMapper.xml
new file mode 100644
index 00000000..6a20fed8
--- /dev/null
+++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgStatisticsMapper.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/DeptController.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/DeptController.java
index 8ca6fc2f..491ae2e0 100644
--- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/DeptController.java
+++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/DeptController.java
@@ -116,6 +116,16 @@ public class DeptController implements DeptControllerApi {
return new ResponseResult().SUCCESS(deptService.getDepartmentAndEmployee(id));
}
+ /**
+ * 根据部门id获取该部门下所有的员工
+ */
+ @GetMapping("/listEmployeeByDeptId")
+ @Override
+ public ResponseResult listEmployeeByDeptId(@RequestParam("deptId") Long deptId) {
+
+ return ResponseResult.SUCCESS(deptService.listEmployeeByDeptId(deptId));
+ }
+
/**
* 根据员工id获取对应部门下所有的客户经理
*/
@@ -124,4 +134,6 @@ public class DeptController implements DeptControllerApi {
return new ResponseResult>().SUCCESS(deptService.listEmployeeById(id));
}
+
+
}
diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/PositionController.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/PositionController.java
index e1f506a8..fc374572 100644
--- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/PositionController.java
+++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/PositionController.java
@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
+import java.util.List;
/**
@@ -70,10 +71,11 @@ public class PositionController implements PositionControllerApi {
/**
* 所有的职位id和名称
*/
- @GetMapping("/listPositionIdAndName")
+ @PostMapping("/listPositionIdAndName")
@Override
- public ResponseResult listPositionIdAndName() {
- return new ResponseResult().SUCCESS(positionService.listPositionIdAndName());
+ public ResponseResult listPositionIdAndName(@RequestBody List deptIds) {
+
+ return ResponseResult.SUCCESS(positionService.listPositionIdAndName(deptIds));
}
/**
diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/DeptDao.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/DeptDao.java
index ba11e47d..f735e8a0 100644
--- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/DeptDao.java
+++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/DeptDao.java
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.framework.domain.hrms.DepartmentVO;
import com.daqing.framework.domain.hrms.DeptEntity;
import com.daqing.framework.domain.hrms.EmployeeEntity;
+import com.daqing.framework.domain.hrms.ext.EmployeeVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -31,4 +32,6 @@ public interface DeptDao extends BaseMapper {
List listDepartmentIdAndName();
List listEmployeeById(Long id);
+
+ List listEmployeeByDeptId(Long deptId);
}
diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java
index d34e846f..f199eb0d 100644
--- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java
+++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java
@@ -88,4 +88,6 @@ public interface EmployeeDao extends BaseMapper {
Integer userAccountCount(String account);
Integer employeeJobNumberCount(String jobNumber);
+
+ EmployeeRepetition getEmployeeRepetitionByEmpId(Long empId);
}
diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/PositionDao.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/PositionDao.java
index e801c033..9117160f 100644
--- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/PositionDao.java
+++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/PositionDao.java
@@ -27,4 +27,6 @@ public interface PositionDao extends BaseMapper {
IPage pageByCondition(Page page, @Param("queryMsg") String queryMsg);
List listPositionIdAndName();
+
+ List listPositionIdAndNameByDeptId(@Param("deptIds") List deptIds);
}
diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/DeptService.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/DeptService.java
index bc9c4c8a..4906aff4 100644
--- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/DeptService.java
+++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/DeptService.java
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.framework.domain.hrms.DepartmentVO;
import com.daqing.framework.domain.hrms.DeptEntity;
import com.daqing.framework.domain.hrms.EmployeeEntity;
+import com.daqing.framework.domain.hrms.ext.EmployeeVO;
import com.daqing.framework.domain.hrms.request.DeptAddRequest;
import java.util.List;
@@ -31,5 +32,6 @@ public interface DeptService extends IService {
List listEmployeeById(Long id);
+ List listEmployeeByDeptId(Long deptId);
}
diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/PositionService.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/PositionService.java
index 9a6f7838..8258fef0 100644
--- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/PositionService.java
+++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/PositionService.java
@@ -29,7 +29,7 @@ public interface PositionService extends IService {
void removePositionByIds(List asList);
- List listPositionIdAndName();
+ List listPositionIdAndName(List deptIds);
List listRoleIdAndName();
}
diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/DeptServiceImpl.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/DeptServiceImpl.java
index e56db68d..771c2981 100644
--- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/DeptServiceImpl.java
+++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/DeptServiceImpl.java
@@ -206,4 +206,12 @@ public class DeptServiceImpl extends ServiceImpl implements
return this.getBaseMapper().listEmployeeById(id);
}
+
+ /**
+ * 根据部门id获取该部门所有的员工id和姓名
+ */
+ public List listEmployeeByDeptId(Long deptId){
+
+ return this.getBaseMapper().listEmployeeByDeptId(deptId);
+ }
}
\ No newline at end of file
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 ab5a6fee..a5fc28ab 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
@@ -273,26 +273,35 @@ public class EmployeeServiceImpl extends ServiceImpl 0){
- ExceptionCast.cast(HrmsCode.EMPLOYEE_JOB_NUMBER_EXIST);
- }
- Integer accountCount = this.getBaseMapper().userAccountCount(employeeInfoVO.getAccount());
- if (accountCount > 0){
- ExceptionCast.cast(HrmsCode.EMPLOYEE_USER_ACCOUNT_EXIST);
+ // 工号判重,修改判重先要判断是否与原来相同
+ EmployeeRepetition employeeRepetition = this.getBaseMapper().getEmployeeRepetitionByEmpId(employeeInfoVO.getId());
+ if (employeeRepetition != null && !Objects.equals(employeeInfoVO.getJobNumber(),employeeRepetition.getJobNumber())){
+ Integer numberCount = this.getBaseMapper().employeeJobNumberCount(employeeInfoVO.getJobNumber());
+ if (numberCount > 0){
+ ExceptionCast.cast(HrmsCode.EMPLOYEE_JOB_NUMBER_EXIST);
+ }
}
- String name = employeeInfoVO.getName();
- for (int i = 0;i < PromptSuccess.LETTERS.length;i++){
- Integer nameCount = this.getBaseMapper().employeeNameCount(name);
- if (nameCount > 0){
- name = employeeInfoVO.getName() + PromptSuccess.LETTERS[i];
- }else {
- employeeInfoVO.setName(name);
- break;
+ // 账号判重
+ if (employeeRepetition != null && !Objects.equals(employeeInfoVO.getAccount(),employeeRepetition.getAccount())){
+ Integer accountCount = this.getBaseMapper().userAccountCount(employeeInfoVO.getAccount());
+ if (accountCount > 0){
+ ExceptionCast.cast(HrmsCode.EMPLOYEE_USER_ACCOUNT_EXIST);
}
- if (i == PromptSuccess.LETTERS.length - 1){
- ExceptionCast.cast(HrmsCode.EMPLOYEE_REPETITION_EXCEED);
+ }
+ // 姓名判重,如果重复,自动在后面加字母"A、B、C、D、E"
+ if (employeeRepetition != null && !Objects.equals(employeeInfoVO.getName(),employeeRepetition.getName())){
+ String name = employeeInfoVO.getName();
+ for (int i = 0;i < PromptSuccess.LETTERS.length;i++){
+ Integer nameCount = this.getBaseMapper().employeeNameCount(name);
+ if (nameCount > 0){
+ name = employeeInfoVO.getName() + PromptSuccess.LETTERS[i];
+ }else {
+ employeeInfoVO.setName(name);
+ break;
+ }
+ if (i == PromptSuccess.LETTERS.length - 1){
+ ExceptionCast.cast(HrmsCode.EMPLOYEE_REPETITION_EXCEED);
+ }
}
}
String account = employeeInfoVO.getAccount();
diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/PositionServiceImpl.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/PositionServiceImpl.java
index e6c07f82..7f694f1d 100644
--- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/PositionServiceImpl.java
+++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/PositionServiceImpl.java
@@ -28,9 +28,7 @@ import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
import java.util.stream.Collectors;
@@ -173,8 +171,24 @@ public class PositionServiceImpl extends ServiceImpl listPositionIdAndName() {
- return this.getBaseMapper().listPositionIdAndName();
+ public List listPositionIdAndName(List deptIds) {
+ if (deptIds == null || deptIds.size() == 0){
+ ExceptionCast.cast(CommonCode.INVALID_PARAM);
+ }
+ List positionList = this.getBaseMapper().listPositionIdAndNameByDeptId(deptIds);
+ if (positionList == null || positionList.size() == 0){
+ return null;
+ }
+ // 去重
+ HashMap map = new HashMap<>();
+ for (PositionVO position : positionList) {
+ map.put(position.getId(),position);
+ }
+ positionList.clear();
+ for (Long key : map.keySet()) {
+ positionList.add(map.get(key));
+ }
+ return positionList;
}
/**
diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/UserServiceImpl.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/UserServiceImpl.java
index 498b2b3a..64c5c5d9 100644
--- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/UserServiceImpl.java
+++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/UserServiceImpl.java
@@ -1,6 +1,5 @@
package com.daqing.financial.hrms.service.impl;
-import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.hrms.dao.EmployeeDao;
import com.daqing.financial.hrms.dao.UserDao;
@@ -11,7 +10,6 @@ import com.daqing.framework.domain.hrms.ext.EmployeeAndUserVO;
import com.daqing.framework.domain.hrms.response.HrmsCode;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.response.PromptSuccess;
-import com.daqing.framework.util.HttpUtils;
import com.daqing.framework.util.Md5Util;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.util.SendSMS;
@@ -23,13 +21,10 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.multipart.MultipartFile;
-
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
import java.io.*;
-import java.util.Map;
import java.util.Objects;
import java.util.UUID;
diff --git a/dq-financial-hrms/src/main/resources/mapper/hrms/DeptDao.xml b/dq-financial-hrms/src/main/resources/mapper/hrms/DeptDao.xml
index 7790fcec..7fa73de1 100644
--- a/dq-financial-hrms/src/main/resources/mapper/hrms/DeptDao.xml
+++ b/dq-financial-hrms/src/main/resources/mapper/hrms/DeptDao.xml
@@ -63,4 +63,17 @@
)
+
+
\ No newline at end of file
diff --git a/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml b/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml
index 806d6978..afb2c37a 100644
--- a/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml
+++ b/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml
@@ -493,4 +493,13 @@
AND e.job_number = #{jobNumber}
+
+
\ No newline at end of file
diff --git a/dq-financial-hrms/src/main/resources/mapper/hrms/PositionDao.xml b/dq-financial-hrms/src/main/resources/mapper/hrms/PositionDao.xml
index f95fb17a..9cf3737d 100644
--- a/dq-financial-hrms/src/main/resources/mapper/hrms/PositionDao.xml
+++ b/dq-financial-hrms/src/main/resources/mapper/hrms/PositionDao.xml
@@ -84,4 +84,17 @@
+
+
\ No newline at end of file
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 47fb33e8..eb759786 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
@@ -36,6 +36,8 @@ public class PromptSuccess {
public static final String[] LETTERS = {"A","B","C","D","E"}; // 员工姓名重复时自动加的字母,可再添加
+ public static final String STATUS_REFUSE = "拒绝";
+
public static final String ENCLOSUREFILE_URL_PATH = "http://www.huorantech.cn/enclosureFile/"; // 附件文件存放路径
public static final String FILE_URL_PATH = "//usr//local//nginx//html//admin//enclosureFile//"; // 附件文件存放路径
diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java
index 4bdadcad..adfc4e89 100644
--- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java
+++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java
@@ -38,6 +38,11 @@ public class DgAuditProcess implements Serializable {
*/
private Integer empId;
+ /**
+ * 贷款信息表id
+ */
+ private Integer dgApplyAmountInfoId;
+
/**
* 部门名称
*/
diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBusinessType.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBusinessType.java
new file mode 100644
index 00000000..28917988
--- /dev/null
+++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBusinessType.java
@@ -0,0 +1,35 @@
+package com.daqing.framework.domain.guarantee;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 业务类型
+ *
+ * @auther River
+ * @date 2020/11/5 15:17
+ */
+@Data
+@ToString
+public class DgBusinessType implements Serializable {
+
+
+ private Integer id;
+
+ /**
+ * 业务类型名称
+ */
+ private String name;
+
+ /**
+ * 关联的客户表id
+ */
+ private Integer companyId;
+
+ private Date createTime;
+
+ private Date updateTime;
+}
diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgEfficiencyTeamPO.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgEfficiencyTeamPO.java
new file mode 100644
index 00000000..164da03e
--- /dev/null
+++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgEfficiencyTeamPO.java
@@ -0,0 +1,52 @@
+package com.daqing.framework.domain.guarantee.po;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 业务效率团队
+ *
+ * @auther River
+ * @date 2020/11/10 11:50
+ */
+@Data
+@ToString
+public class DgEfficiencyTeamPO implements Serializable {
+
+ /**
+ * id
+ */
+ private Integer id;
+
+ /**
+ * 提单人id
+ */
+ private Integer presenterId;
+
+ /**
+ * 客户名称
+ */
+ private String name;
+
+ /**
+ * 申请日期
+ */
+ private Date createTime;
+
+ /**
+ * 当前审批人
+ */
+ private String empName;
+
+ /**
+ * 任务节点
+ */
+ private String status;
+
+ /**
+ * 完成时间
+ */
+}
diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgStatisticsPO.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgStatisticsPO.java
new file mode 100644
index 00000000..691e2649
--- /dev/null
+++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgStatisticsPO.java
@@ -0,0 +1,71 @@
+package com.daqing.framework.domain.guarantee.po;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.util.Date;
+
+
+/**
+ * @auther River
+ * @date 2020/11/6 14:32
+ */
+@Data
+@ToString
+public class DgStatisticsPO {
+
+ /**
+ * 客户名称
+ */
+ private String name;
+
+ /**
+ * 客户联系方式
+ */
+ private String phone;
+
+ /**
+ * 提单人id
+ */
+ private Integer presenterId;
+
+ /**
+ * 申请额度
+ */
+ private Double applyAmount;
+
+ /**
+ * 申请期限
+ */
+ private String applyTime;
+
+ /**
+ * 业务类型
+ */
+ private String businessType;
+
+ /**
+ * 业务编号
+ */
+ private String businessCode;
+
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+ /**
+ * 审批人
+ */
+ private String empName;
+
+ /**
+ * 节点状态
+ */
+ private String status;
+
+ /**
+ * 达到时间
+ */
+ private Date dateTime;
+}
diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgStatisticsRefusePO.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgStatisticsRefusePO.java
new file mode 100644
index 00000000..d3707bbe
--- /dev/null
+++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgStatisticsRefusePO.java
@@ -0,0 +1,76 @@
+package com.daqing.framework.domain.guarantee.po;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @auther River
+ * @date 2020/11/9 17:39
+ */
+@Data
+@ToString
+public class DgStatisticsRefusePO implements Serializable {
+
+ /**
+ * 客户名称
+ */
+ private String name;
+
+ /**
+ * 客户联系方式
+ */
+ private String phone;
+
+ /**
+ * 提单人id
+ */
+ private Integer presenterId;
+
+ /**
+ * 申请额度
+ */
+ private Double applyAmount;
+
+ /**
+ * 申请期限
+ */
+ private String applyTime;
+
+ /**
+ * 业务类型
+ */
+ private String businessType;
+
+ /**
+ * 业务编号
+ */
+ private String businessCode;
+
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+ /**
+ * 拒绝人
+ */
+ private String empName;
+
+ /**
+ * 节点状态
+ */
+ private String status;
+
+ /**
+ * 达到时间
+ */
+ private Date dateTime;
+
+ /**
+ * 拒绝原因
+ */
+ private String remark;
+}
diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/ext/EmployeeRepetition.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/ext/EmployeeRepetition.java
new file mode 100644
index 00000000..559ade5d
--- /dev/null
+++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/ext/EmployeeRepetition.java
@@ -0,0 +1,30 @@
+package com.daqing.framework.domain.hrms.ext;
+
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * 员工姓名、工号、账号重复信息判断
+ *
+ * @auther River
+ * @date 2020/11/4 17:45
+ */
+@Data
+@ToString
+public class EmployeeRepetition {
+
+ /**
+ * 姓名
+ */
+ private String name;
+
+ /**
+ * 工号
+ */
+ private String jobNumber;
+
+ /**
+ * 账号
+ */
+ private String account;
+}
diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/ext/EmployeeVO.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/ext/EmployeeVO.java
index 82ccda76..0133a565 100644
--- a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/ext/EmployeeVO.java
+++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/ext/EmployeeVO.java
@@ -1,5 +1,6 @@
package com.daqing.framework.domain.hrms.ext;
+import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
@@ -13,13 +14,12 @@ import java.io.Serializable;
@ToString
public class EmployeeVO implements Serializable{
- /**
- * id
- */
+ @ApiModelProperty("id")
private Long id;
/**
* 员工姓名
*/
+ @ApiModelProperty("姓名")
private String name;
}