From 44ad7c97c47fd170386045cc1a476bedbc48dcdf Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Tue, 12 Jan 2021 14:42:23 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../request/BusinessApplicationRequest.java | 3 + .../impl/DgApplyAmountInfoServiceImpl.java | 2 + .../HrmsAccessRecordsLogController.java | 20 +++ .../dao/HrmsAccessRecordsLogMapper.java | 17 +++ .../hrauth/feign/HrmsFeignService.java | 11 +- .../hrauth/model/HrmsAccessRecordsLog.java | 57 +++++++++ .../service/IHrmsAccessRecordsLogService.java | 16 +++ .../impl/HrmsAccessRecordsLogServiceImpl.java | 20 +++ .../service/impl/UserLoginServiceImpl.java | 33 ++++- .../hrauth/util/MyBatisPlusCodeGenerator.java | 115 ++++++++++++++++++ .../hrauth/HrmsAccessRecordsLogMapper.xml | 15 +++ .../domain/guarantee/DgApplyAmountInfo.java | 5 + .../hrauth/HrmsAccessRecordsLogMapper.xml | 15 +++ 13 files changed, 321 insertions(+), 8 deletions(-) create mode 100644 dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/HrmsAccessRecordsLogController.java create mode 100644 dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/HrmsAccessRecordsLogMapper.java create mode 100644 dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/model/HrmsAccessRecordsLog.java create mode 100644 dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/IHrmsAccessRecordsLogService.java create mode 100644 dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/HrmsAccessRecordsLogServiceImpl.java create mode 100644 dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/MyBatisPlusCodeGenerator.java create mode 100644 dq-financial-hrms-auth/src/main/resources/mapper/hrauth/HrmsAccessRecordsLogMapper.xml create mode 100644 dq_financial_hrms/src/main/resources/mapper/hrauth/HrmsAccessRecordsLogMapper.xml diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java index dc9e7872..38e76380 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java @@ -206,4 +206,7 @@ public class BusinessApplicationRequest implements Serializable { @ApiModelProperty(value = "是否存在关联人") private Integer isExistRelated; + @ApiModelProperty(value = "申请类型:0->员工申请;1->客户申请") + private Integer applyType; + } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java index 334e4e4e..a03750ce 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java @@ -145,6 +145,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl + * 访问记录表 前端控制器 + *

+ * + * @author Qyq + * @since 2021-01-12 + */ +@Controller +@RequestMapping("/hrms-access-records-log") +public class HrmsAccessRecordsLogController { + +} diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/HrmsAccessRecordsLogMapper.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/HrmsAccessRecordsLogMapper.java new file mode 100644 index 00000000..b467c85d --- /dev/null +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/HrmsAccessRecordsLogMapper.java @@ -0,0 +1,17 @@ +package com.daqing.financial.hrauth.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.daqing.financial.hrauth.model.HrmsAccessRecordsLog; +import org.apache.ibatis.annotations.Mapper; + +/** + *

+ * 访问记录表 Mapper 接口 + *

+ * + * @author Qyq + * @since 2021-01-12 + */ +@Mapper +public interface HrmsAccessRecordsLogMapper extends BaseMapper { +} diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/feign/HrmsFeignService.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/feign/HrmsFeignService.java index df96dd99..03bf45a1 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/feign/HrmsFeignService.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/feign/HrmsFeignService.java @@ -6,10 +6,7 @@ import com.daqing.framework.domain.hrms.RolePermissionEntity; import com.daqing.framework.model.response.ResponseResult; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.stereotype.Component; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -29,4 +26,10 @@ public interface HrmsFeignService { @GetMapping("/hrms/permission/queryRolePermissionList") ResponseResult> queryRolePermissionList(@RequestParam("id") Long id); + + /** + * 根据userId获取用户名以及部门名称 + */ + @PostMapping("hrms/employee/getAccountAndDeptNameById") + ResponseResult getAccountAndDeptNameById(@RequestBody List ids); } diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/model/HrmsAccessRecordsLog.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/model/HrmsAccessRecordsLog.java new file mode 100644 index 00000000..9712061b --- /dev/null +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/model/HrmsAccessRecordsLog.java @@ -0,0 +1,57 @@ +package com.daqing.financial.hrauth.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + *

+ * 访问记录表 + *

+ * + * @author Qyq + * @since 2021-01-12 + */ +@Data +@TableName("hrms_access_records_log") +public class HrmsAccessRecordsLog implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + /** + * 账号 + */ + private String account; + + /** + * 姓名 + */ + private String name; + + /** + * 部门名称 + */ + @TableField("deptName") + private String deptName; + + /** + * 用户端类型:0->PC;1->小程序; + */ + private Integer type; + + /** + * 登录时间 + */ + private Date loginTime; +} diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/IHrmsAccessRecordsLogService.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/IHrmsAccessRecordsLogService.java new file mode 100644 index 00000000..f3665a55 --- /dev/null +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/IHrmsAccessRecordsLogService.java @@ -0,0 +1,16 @@ +package com.daqing.financial.hrauth.service; + +import com.daqing.financial.hrauth.model.HrmsAccessRecordsLog; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 访问记录表 服务类 + *

+ * + * @author Qyq + * @since 2021-01-12 + */ +public interface IHrmsAccessRecordsLogService extends IService { + +} diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/HrmsAccessRecordsLogServiceImpl.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/HrmsAccessRecordsLogServiceImpl.java new file mode 100644 index 00000000..a4e3c4e8 --- /dev/null +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/HrmsAccessRecordsLogServiceImpl.java @@ -0,0 +1,20 @@ +package com.daqing.financial.hrauth.service.impl; + +import com.daqing.financial.hrauth.model.HrmsAccessRecordsLog; +import com.daqing.financial.hrauth.dao.HrmsAccessRecordsLogMapper; +import com.daqing.financial.hrauth.service.IHrmsAccessRecordsLogService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 访问记录表 服务实现类 + *

+ * + * @author Qyq + * @since 2021-01-12 + */ +@Service +public class HrmsAccessRecordsLogServiceImpl extends ServiceImpl implements IHrmsAccessRecordsLogService { + +} diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java index 3b69347c..2bf6381c 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java @@ -1,14 +1,18 @@ package com.daqing.financial.hrauth.service.impl; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.daqing.financial.hrauth.config.WeChatConfig; import com.daqing.financial.hrauth.dao.AuthEmployeeRoleDao; +import com.daqing.financial.hrauth.dao.HrmsAccessRecordsLogMapper; import com.daqing.financial.hrauth.dao.UserLoginDao; import com.daqing.financial.hrauth.feign.HrmsFeignService; +import com.daqing.financial.hrauth.model.HrmsAccessRecordsLog; import com.daqing.financial.hrauth.service.LoginLogService; import com.daqing.financial.hrauth.service.TokenService; import com.daqing.financial.hrauth.service.UserLoginService; +import com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse; import com.daqing.framework.domain.hrms.*; import com.daqing.framework.domain.hrms.request.*; import com.daqing.framework.domain.hrms.response.HrmsCode; @@ -27,10 +31,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @auther River @@ -57,6 +58,9 @@ public class UserLoginServiceImpl extends ServiceImpl @Resource private AuthEmployeeRoleDao authEmployeeRoleDao; + @Resource + private HrmsAccessRecordsLogMapper hrmsAccessRecordsLogMapper; + /* @Autowired private OdcProperties properties;*/ @@ -208,6 +212,27 @@ public class UserLoginServiceImpl extends ServiceImpl headImg = employeeEntity.getHeadPortaritUrl(); System.out.println("headImg================"+headImg); + //根据用户id查询部门名称 + List arr = new ArrayList<>(); + arr.add(userEntity.getId().intValue()); + //根据提单人id查询其部门名称 + ResponseResult res = hrmsFeignService.getAccountAndDeptNameById(arr); + List employeeMessage = new ArrayList(); + if(res.getData() != null){ + employeeMessage = (List) res.getData(); + } + //新增一条PC端的访问记录 + HrmsAccessRecordsLog recordsLog = new HrmsAccessRecordsLog(); + for(LinkedHashMap res2 : employeeMessage) { + //recordsLog.setDeptName(res2.getDeptName()); + recordsLog.setDeptName(JSONObject.toJSONString(res2.get("deptName")).replace("\"", "")); + } + recordsLog.setAccount(userEntity.getAccount()); + recordsLog.setName(name); + recordsLog.setType(1); + recordsLog.setLoginTime(new Date()); + hrmsAccessRecordsLogMapper.insert(recordsLog); + //返回用户信息 LoginResponse loginResponse = new LoginResponse(); loginResponse.setAccount(name); diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/MyBatisPlusCodeGenerator.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/MyBatisPlusCodeGenerator.java new file mode 100644 index 00000000..10c79913 --- /dev/null +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/MyBatisPlusCodeGenerator.java @@ -0,0 +1,115 @@ +package com.daqing.financial.hrauth.util; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.core.toolkit.StringPool; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.baomidou.mybatisplus.generator.AutoGenerator; +import com.baomidou.mybatisplus.generator.InjectionConfig; +import com.baomidou.mybatisplus.generator.config.*; +import com.baomidou.mybatisplus.generator.config.po.TableInfo; +import com.baomidou.mybatisplus.generator.config.rules.DateType; +import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; +import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine; + +import java.util.ArrayList; +import java.util.List; + +/** + * @Author: LvFang + * @Date: Created in 2019/6/11. + * @Description: + */ +public class MyBatisPlusCodeGenerator { + + //包名 + public static final String PACKAGE_NAME = "com.daqing.financial.hrauth"; + + public static void main(String[] args) { + String[] tables = new String[] {"hrms_access_records_log"};//表名数组 + String[] tablePrefixs = new String[] {""};//去掉前缀 + executeCode(PACKAGE_NAME,tables,tablePrefixs); + } + + private static void executeCode(String pack,String[] tables,String[] tablePrefixs) { + // 代码生成器 + AutoGenerator mpg = new AutoGenerator(); + + // 全局配置 + GlobalConfig gc = new GlobalConfig(); + // 是否覆盖已有文件 + gc.setFileOverride(false); + // 生成文件的输出目录 + String projectPath = System.getProperty("user.dir");//user.dir 表示当前工程路径无需替换 + gc.setOutputDir(projectPath + "/dq-financial-hrms-auth/src/main/java"); + //设置bean命名规范 + gc.setEntityName("%s"); + // 开发人员 + gc.setAuthor("Qyq"); + // 是否打开输出目录 + gc.setOpen(false); + // 开启 BaseResultMap + gc.setBaseResultMap(true); + // 指定生成的主键的ID类型 + gc.setIdType(IdType.ID_WORKER); + // 时间类型对应策略: 只使用 java.util.date 代替 + gc.setDateType(DateType.ONLY_DATE); + mpg.setGlobalConfig(gc); + + // 数据源配置 + DataSourceConfig config= new DataSourceConfig(); + // 从试图获取 + config.setUrl("jdbc:mysql://192.168.31.140:3306/dq_financial_hrms?serverTimezone=UTC"); + config.setDriverName("com.mysql.cj.jdbc.Driver"); + config.setUsername("root"); + config.setPassword("root"); + mpg.setDataSource(config); + + // 包配置 + PackageConfig pc = new PackageConfig(); + // 父包名。如果为空,将下面子包名必须写全部, 否则就只需写子包名 + pc.setParent(pack); + // Entity包名 + pc.setEntity("hrms"); + mpg.setPackageInfo(pc); + + // 自定义配置 + InjectionConfig cfg = new InjectionConfig() { + @Override + public void initMap() { + // to do nothing + } + }; + List focList = new ArrayList<>(); + focList.add(new FileOutConfig("/templates/mapper.xml.ftl") { + public String outputFile(TableInfo tableInfo) { + // 自定义输入文件名称 + if (StringUtils.isEmpty(pc.getModuleName())) { + return projectPath + "/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/" + tableInfo.getXmlName() + StringPool.DOT_XML; + }else { + return projectPath + "/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/" + pc.getModuleName() + "/" + tableInfo.getXmlName() + StringPool.DOT_XML; + } + } + }); + cfg.setFileOutConfigList(focList); + mpg.setCfg(cfg); + mpg.setTemplate(new TemplateConfig().setXml(null)); + + // 策略配置 + StrategyConfig strategy = new StrategyConfig(); + // 数据库表映射到实体的命名策略: 下划线转驼峰命名 + strategy.setNaming(NamingStrategy.underline_to_camel); + // 数据库表字段映射到实体的命名策略: 下划线转驼峰命名 + strategy.setColumnNaming(NamingStrategy.underline_to_camel); + // 【实体】是否为lombok模型(默认 false) + strategy.setEntityLombokModel(false); + // 需要包含的表名,允许正则表达式(与exclude二选一配置) + strategy.setInclude(tables); + // 驼峰转连字符 + strategy.setControllerMappingHyphenStyle(true); + // 表前缀 + strategy.setTablePrefix(tablePrefixs); + mpg.setStrategy(strategy); + mpg.setTemplateEngine(new FreemarkerTemplateEngine()); + mpg.execute(); + } +} diff --git a/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/HrmsAccessRecordsLogMapper.xml b/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/HrmsAccessRecordsLogMapper.xml new file mode 100644 index 00000000..829bcc6e --- /dev/null +++ b/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/HrmsAccessRecordsLogMapper.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java index 723a419a..67c333ba 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java @@ -126,4 +126,9 @@ public class DgApplyAmountInfo implements Serializable { */ private String businessCode; + /** + * 申请类型 + */ + private Integer applyType; + } diff --git a/dq_financial_hrms/src/main/resources/mapper/hrauth/HrmsAccessRecordsLogMapper.xml b/dq_financial_hrms/src/main/resources/mapper/hrauth/HrmsAccessRecordsLogMapper.xml new file mode 100644 index 00000000..a5118b31 --- /dev/null +++ b/dq_financial_hrms/src/main/resources/mapper/hrauth/HrmsAccessRecordsLogMapper.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + From 53a21037f21e1bd4c15153546351f7e8ff560bed Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Tue, 12 Jan 2021 17:38:18 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DgApplyAmountInfoController.java | 10 ----- .../controller/DgAuditProcessController.java | 33 ++++++++++++++-- .../controller/DgEfficiencyController.java | 7 +--- .../mapper/DgAuditProcessMapper.java | 4 ++ .../guarantee/model/response/ApprovalNum.java | 26 +++++++++++++ .../response/TodayApprovalRecordResponse.java | 38 +++++++++++++++++++ .../service/IDgAuditProcessService.java | 3 ++ .../impl/DgApplyAmountInfoServiceImpl.java | 12 ++++-- .../DgAssetsInvestigationServiceImpl.java | 11 ++++-- .../impl/DgAuditProcessServiceImpl.java | 25 ++++++++++++ .../DgComplianceInvestigationServiceImpl.java | 24 ++++++------ ...gGuaranteeLetterAssignUserServiceImpl.java | 36 ++++++++++++------ .../DgLoanCommitteeConsiderServiceImpl.java | 6 +-- .../service/impl/DgLoanNoticeServiceImpl.java | 6 ++- .../DgMessageInvestigationServiceImpl.java | 18 ++++++--- ...aymentConfirmationConsiderServiceImpl.java | 18 ++++++--- .../DgWorkConferenceConsiderServiceImpl.java | 8 ++-- .../guarantee/util/AuditProcessUtil.java | 5 ++- .../mapper/guarantee/DgAuditProcessMapper.xml | 33 ++++++++++++++++ .../com/daqing/framework/util/Md5Util.java | 22 +++++------ 20 files changed, 262 insertions(+), 83 deletions(-) create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/ApprovalNum.java create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/TodayApprovalRecordResponse.java diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java index 97a9e1d3..a18ba1ef 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java @@ -1,8 +1,5 @@ package com.daqing.financial.guarantee.controller; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.daqing.financial.guarantee.DgApplyAmountInfoControllerApi; import com.daqing.financial.guarantee.feign.CrmsFeignService; @@ -10,18 +7,13 @@ import com.daqing.financial.guarantee.feign.HrmsFeignService; import com.daqing.financial.guarantee.model.request.ApplyAmountListRequest; import com.daqing.financial.guarantee.model.request.ApprovalBusinessRequest; import com.daqing.financial.guarantee.model.request.BusinessApplicationRequest; -import com.daqing.financial.guarantee.model.request.GuaranteeLetterListRequest; import com.daqing.financial.guarantee.model.response.BusinessApplicationDetailResponse; import com.daqing.financial.guarantee.model.response.BusinessApplicationExportResponse; import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse; -import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse; import com.daqing.financial.guarantee.service.IDgApplyAmountInfoService; import com.daqing.financial.guarantee.service.IDgApplyAmountListService; import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest; import com.daqing.framework.domain.guarantee.DgApplyField; -import com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse; -import com.daqing.framework.domain.hrms.UserEntity; -import com.daqing.framework.domain.hrms.ext.EmployeeTO; import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.util.JwtUtils; @@ -32,9 +24,7 @@ import io.jsonwebtoken.Claims; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; -import io.swagger.models.auth.In; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.beanutils.ConvertUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.context.request.RequestContextHolder; diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java index e8b2877b..1fde595c 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java @@ -1,13 +1,14 @@ package com.daqing.financial.guarantee.controller; - import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.daqing.financial.guarantee.feign.HrmsFeignService; +import com.daqing.financial.guarantee.model.response.ApprovalNum; +import com.daqing.financial.guarantee.model.response.TodayApprovalRecordResponse; import com.daqing.financial.guarantee.service.IDgAuditProcessService; +import com.daqing.financial.guarantee.util.R; import com.daqing.framework.domain.guarantee.DgAuditProcess; import com.daqing.framework.domain.guarantee.po.ProcessPO; -import com.daqing.framework.domain.hrms.RoleEntity; import com.daqing.framework.model.response.ResponseResult; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -15,7 +16,6 @@ import io.swagger.annotations.ApiParam; 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; @@ -82,4 +82,31 @@ public class DgAuditProcessController { return ResponseResult.SUCCESS(processPO); } + @ApiOperation(value = "今日审批记录") + @GetMapping("todayApprovalRecord") + public R nowadaysAuditProcess(){ + List approvalRecords = auditProcessService.todayApprovalRecord(); + ApprovalNum approvalNum = new ApprovalNum(); + //统计状态个数 + approvalRecords.forEach(todayApprovalRecordResponse -> { + if (todayApprovalRecordResponse.getStatus()!=null){ + switch (todayApprovalRecordResponse.getStatus()){ + case "0": + approvalNum.setInitiateNum(approvalNum.getInitiateNum()+1); + break; + case "2": + approvalNum.setAgreed(approvalNum.getAgreed()+1); + break; + case "3": + approvalNum.setRejected(approvalNum.getRejected()+1); + break; + case "4": + approvalNum.setTurnDown(approvalNum.getTurnDown()+1); + break; + } + } + }); + return R.ok().data("approvalRecords",approvalRecords).data("approvalNum",approvalNum); + } + } 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 25eea017..34bf9764 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 @@ -18,11 +18,7 @@ import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import com.daqing.financial.guarantee.service.IDgEfficiencyService; -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.*; + import javax.servlet.http.HttpServletResponse; import java.util.List; @@ -31,7 +27,6 @@ import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; -import java.util.stream.Collectors; /** * 流程效率 diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java index 579c7e09..6d23a65e 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java @@ -2,9 +2,11 @@ package com.daqing.financial.guarantee.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.daqing.financial.guarantee.model.response.EfficiencyApprovalResponse; +import com.daqing.financial.guarantee.model.response.TodayApprovalRecordResponse; import com.daqing.framework.domain.guarantee.DgAuditProcess; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import org.springframework.beans.factory.annotation.Autowired; import java.util.List; @@ -26,4 +28,6 @@ public interface DgAuditProcessMapper extends BaseMapper { List selectTenDays(Integer userId); List selectApprovalNum(int parseInt); + + List selectTodayApprovalRecord(@Param("userId")String userId,@Param("startTime")String startTime,@Param("endTime")String endTime); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/ApprovalNum.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/ApprovalNum.java new file mode 100644 index 00000000..1f9e717c --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/ApprovalNum.java @@ -0,0 +1,26 @@ +package com.daqing.financial.guarantee.model.response; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author chen + * @DATE 2021/1/12 17:10 + * @Version 1.0 + */ +@Data +public class ApprovalNum { + + @ApiModelProperty("已发起数") + private Integer initiateNum = 0; + + @ApiModelProperty("已同意数") + private Integer agreed = 0; + + @ApiModelProperty("已拒绝数") + private Integer rejected = 0; + + @ApiModelProperty("已驳回数") + private Integer turnDown = 0; + +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/TodayApprovalRecordResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/TodayApprovalRecordResponse.java new file mode 100644 index 00000000..b0971c07 --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/TodayApprovalRecordResponse.java @@ -0,0 +1,38 @@ +package com.daqing.financial.guarantee.model.response; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @Author chen + * @DATE 2021/1/12 14:19 + * @Version 1.0 + */ +@Data +public class TodayApprovalRecordResponse { + + @ApiModelProperty("业务编号") + private String businessNumber; + + @ApiModelProperty("客户名称") + private String clientName; + + @ApiModelProperty("申请金额") + private BigDecimal applicationAmount; + + @ApiModelProperty("申请期限") + private String applicationDeadline; + + @ApiModelProperty("任务节点") + private String taskNode; + + @ApiModelProperty("处理时间") + private Date processingTime; + + @ApiModelProperty("状态") + private String status; + +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAuditProcessService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAuditProcessService.java index b99d6c4b..2f55ce9f 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAuditProcessService.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAuditProcessService.java @@ -1,6 +1,7 @@ package com.daqing.financial.guarantee.service; import com.baomidou.mybatisplus.extension.service.IService; +import com.daqing.financial.guarantee.model.response.TodayApprovalRecordResponse; import com.daqing.framework.domain.guarantee.DgAuditProcess; import java.util.List; @@ -18,4 +19,6 @@ public interface IDgAuditProcessService extends IService { List queryProcessList(String businessId,String processId); List getProcessId(String businessId); + + List todayApprovalRecord(); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java index a03750ce..e51674ad 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java @@ -250,7 +250,8 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl getProcessId(String businessId) { return baseMapper.selectProcessId(businessId); } + + @Override + public List todayApprovalRecord() { + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String startTime = dateFormat.format(DateUtils.getDayBegin()); + String endTime = dateFormat.format(DateUtils.getDayEnd()); + String userId = this.getUserId(); + return baseMapper.selectTodayApprovalRecord(userId,startTime,endTime); + } + + /** + * 获取当前登录用户信息 + */ + private String getUserId() { + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + String token = request.getHeader("token"); + return RedisUtil.get("dq:token:" + token); + } } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java index b9b8de4d..d490d159 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java @@ -140,7 +140,7 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl 0){ //获取之前指定的a角用户 @@ -241,7 +242,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //更新a角 @@ -301,7 +303,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //根据业务id查询贷审会数据 @@ -342,7 +345,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //更新法规部经理数据 @@ -468,7 +473,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //更新法规部经理数据 @@ -531,7 +537,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ QueryWrapper tempB = new QueryWrapper<>(); @@ -581,7 +588,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ QueryWrapper tempB = new QueryWrapper<>(); @@ -623,7 +631,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //更新b用户的审核状态为驳回,操作状态为已处理 @@ -673,7 +682,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ QueryWrapper tempB = new QueryWrapper<>(); @@ -724,7 +734,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ QueryWrapper tempB = new QueryWrapper<>(); @@ -766,7 +777,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //更新a用户的审核状态为驳回,操作状态为已处理 diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanCommitteeConsiderServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanCommitteeConsiderServiceImpl.java index ebb2c6c3..fbfd9365 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanCommitteeConsiderServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanCommitteeConsiderServiceImpl.java @@ -148,7 +148,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl 0){ QueryWrapper businessProcessStatusQueryWrapper = new QueryWrapper<>(); @@ -141,7 +142,8 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl 0){ QueryWrapper queryWrapper = new QueryWrapper<>(); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java index 6bd3f0ed..defc13b7 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java @@ -153,7 +153,9 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl() .eq("business_id",messageInvestigation.getBusinessId()).eq("type",2)); - }else if(investigateMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW ){ + }else if(investigateMessageRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)){ //判断信息部专员是否调查通过,如果通过,修改信息部经理操作状态为待处理 DgMessageInvestigation messageInvestigation2 = new DgMessageInvestigation(); messageInvestigation2.setOperatingStatus(StatusCode.CZ_ON_HAND); @@ -309,7 +311,9 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl() .eq("business_id",messageInvestigation.getBusinessId()).eq("type",2)); - }else if(approvalMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==2){//信息部经理审核通过 + }else if(approvalMessageRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==2){//信息部经理审核通过 //根据主键id查询业务id DgMessageInvestigation messageInvestigation2 = this.getBaseMapper().selectById(approvalMessageRequest.getId()); @@ -409,7 +413,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl 0){ @@ -185,7 +186,8 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ QueryWrapper wrapperTemp = new QueryWrapper<>(); @@ -215,7 +217,8 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ //更新法规部经理数据 @@ -279,7 +282,8 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ @@ -324,7 +328,8 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ QueryWrapper queryWrapperCwb = new QueryWrapper<>(); @@ -360,7 +365,8 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ QueryWrapper queryWrapperT = new QueryWrapper<>(); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java index f36bd107..d0103a53 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java @@ -157,7 +157,7 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl + + + + + + + + + + + + + + diff --git a/dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java b/dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java index 58fad167..7a6e421f 100644 --- a/dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java +++ b/dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java @@ -35,16 +35,16 @@ public class Md5Util { //System.out.println(md5("1234564")); System.out.println(md5("Aa123420")); - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - Date date = new Date(); - try { - date = simpleDateFormat.parse("2021-01-06"); - } catch (ParseException e) { - e.printStackTrace(); - } -/* Timestamp time = DateUtils.getDayEndTime(date); - System.out.println(time); - System.out.println(simpleDateFormat.format(time));*/ + // SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); + // SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + // Date date = new Date(); + // try { + // date = simpleDateFormat.parse("2021-01-06"); + // } catch (ParseException e) { + // e.printStackTrace(); + // } + // Timestamp time = DateUtils.getDayEndTime(date); + // System.out.println(time); + // System.out.println(simpleDateFormat.format(time)); } } From e4035189d8cb0d0c9f38f5466702e8e198e1558d Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Wed, 13 Jan 2021 10:12:03 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DgGuaranteeAssignUserServiceImpl.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java index 8453ea63..109cde3a 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java @@ -541,7 +541,9 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl