diff --git a/dq-financial-crms/src/main/resources/bootstrap.properties b/dq-financial-crms/src/main/resources/bootstrap.properties index d96f785e..f255f463 100644 --- a/dq-financial-crms/src/main/resources/bootstrap.properties +++ b/dq-financial-crms/src/main/resources/bootstrap.properties @@ -1,7 +1,7 @@ #服务名称 spring.application.name=dq-financial-crms #配置中心地址 -spring.cloud.nacos.config.server-addr=192.168.31.140:8848 +spring.cloud.nacos.config.server-addr=127.0.0.1:8848 spring.cloud.nacos.config.file-extension=yml #redis配置 spring.redis.host=127.0.0.1 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 dc0899fd..af4f6d20 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 @@ -37,8 +37,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.IOException; +import java.io.*; import java.util.*; /** @@ -144,6 +143,38 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA return ResponseResult.SUCCESS(list); } + /** + * 下载单个文件 + * + * @param response + * @param fileName + * @return + */ + @RequestMapping("/download") + public String download(HttpServletResponse response, @RequestParam("fileName") String fileName) { + File file = new File(PromptSuccess.FILE_URL_PATH + fileName); + if (file.exists()) { + response.setContentType("application/force-download;charset=UTF-8"); + response.setCharacterEncoding("UTF-8"); + response.setHeader("Content-Disposition", "attachment;fileName =" + fileName); + byte[] buffer = new byte[1024]; + + try (FileInputStream inputStream = new FileInputStream(file); + OutputStream outStream = response.getOutputStream(); + BufferedInputStream buffStream = new BufferedInputStream(inputStream);) { + int i = 0; + while ((i = buffStream.read(buffer)) != -1) { + outStream.write(buffer); + outStream.write(buffer, 0, i); + } + return "download success"; + } catch (Exception e) { + log.error("download error {}", e.getMessage()); + } + } + return null; + } + /** * 删除服务上的文件 * @param filePath 路径 @@ -212,6 +243,8 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA if(response.getPresenterId().equals(res.get("id"))){//如果提单人id相同情况下,就往对象里面赋值 response.setAccount(JSONObject.toJSONString(res.get("account")).replace("\"","")); response.setDeptName(JSONObject.toJSONString(res.get("deptName")).replace("\"","")); + }else{ + response.setAccount("客户"); } } } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java index 52c71b84..9eb024af 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java @@ -172,14 +172,7 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpllist = this.baseMapper.selectOverDueDays(); - //查询所有数据 - //List list = this.baseMapper.selectList(new QueryWrapper<>()); - Listlist = this.baseMapper.selectBind(); - Date date = new Date(); - //long times1 = date.getTime();//当前时间 SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 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 07d6c6a4..aa89198f 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 @@ -356,8 +356,15 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl() + .eq("business_id", businessApplication.getBusinessId()).eq("type", 1)); + //审批状态为草稿或已撤销的情况下进行判断 + if(dgApplyAmountList.getStatus().equals(StatusCode.SP_DRAFT) || dgApplyAmountList.getStatus().equals(StatusCode.SP_RESCINDED)){ + //根据社会统一信用代码判断是否可以申请业务,同一客户如果有一笔业务在业务流程在进行中,则不能再申请 + this.repeatBusiness(businessApplication); + } + //申请贷款相关信息 DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo(); dgApplyAmountInfo.setId(businessApplication.getBusinessId()); @@ -376,9 +383,6 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl() - .eq("business_id", businessApplication.getBusinessId()).eq("type", 1)); //草稿状态下,新增业务状态到业务状态表,同时新增一条记录到担保经理处理 if(dgApplyAmountList.getStatus().equals(StatusCode.SP_DRAFT)){ diff --git a/dq-financial-guarantee/src/main/resources/bootstrap.properties b/dq-financial-guarantee/src/main/resources/bootstrap.properties index 5ac23aac..b9faae67 100644 --- a/dq-financial-guarantee/src/main/resources/bootstrap.properties +++ b/dq-financial-guarantee/src/main/resources/bootstrap.properties @@ -1,7 +1,7 @@ #服务名称 spring.application.name=dq-financial-guarantee #配置中心地址 -spring.cloud.nacos.config.server-addr=192.168.31.140:8848 +spring.cloud.nacos.config.server-addr=127.0.0.1:8848 spring.cloud.nacos.config.file-extension=yml #redis配置 spring.redis.host=127.0.0.1 diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgCopyUserMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgCopyUserMapper.xml index ab195f78..f1184e42 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgCopyUserMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgCopyUserMapper.xml @@ -34,7 +34,7 @@ cf.pic_url FROM dg_copy_user cu - LEFT JOIN dg_copy_for cf ON cu.copy_id = cf.id + JOIN dg_copy_for cf ON cu.copy_id = cf.id LEFT JOIN dg_apply_amount_info aai ON cf.business_id = aai.id LEFT JOIN crms_company_customer ccc ON aai.company_id = ccc.id LEFT JOIN crms_customer cc ON ccc.customer_id = cc.id 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 c1afb9fc..0a03a32c 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 @@ -241,7 +241,11 @@ public class UserLoginServiceImpl extends ServiceImpl } recordsLog.setAccount(userEntity.getAccount()); recordsLog.setName(name); - recordsLog.setType(0);//用户端类型:0->PC;1->小程序; + if(loginRequest.getType()==3 || loginRequest.getType()==4){//小程序登录 + recordsLog.setType(1);//用户端类型:0->PC;1->小程序; + }else{ + recordsLog.setType(0); + } recordsLog.setLoginTime(new Date()); recordsLog.setUserId(userEntity.getId().intValue()); hrmsAccessRecordsLogMapper.insert(recordsLog); @@ -401,7 +405,7 @@ public class UserLoginServiceImpl extends ServiceImpl //查询员工数据 int count2 = userLoginDao.selectUserEmpCount(md5UnionId); if(identify==0){//员工小程序登录 - loginRequest.setType(2); + loginRequest.setType(4); if(count<=0 || count2<=0){//如果微信绑定的不是员工 return ResponseResult.FAIL(60001,"您的账号没有权限,无法登录!"); } diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java index 9c7458cc..46391665 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java @@ -51,6 +51,8 @@ public class UserServiceImpl extends ServiceImpl imple public UserEntity saveWeChatUser(String code,HttpServletResponse response) { String accessTokenUrl = String.format(weChatConfig.getOPEN_ACCESS_TOKEN_URL(),weChatConfig.getOpenAppid(),weChatConfig.getOpenAppsecret(),code); + System.out.println("code===="+code); + System.out.println("accessTokenUrl===="+accessTokenUrl); //获取access_token Map baseMap = HttpUtils.doGet(accessTokenUrl); diff --git a/dq-financial-hrms-auth/src/main/resources/bootstrap.properties b/dq-financial-hrms-auth/src/main/resources/bootstrap.properties index b8985c09..a0715411 100644 --- a/dq-financial-hrms-auth/src/main/resources/bootstrap.properties +++ b/dq-financial-hrms-auth/src/main/resources/bootstrap.properties @@ -1,7 +1,7 @@ #服务名称 spring.application.name=dq-financial-hrms-auth #配置中心地址 -spring.cloud.nacos.config.server-addr=192.168.31.140:8848 +spring.cloud.nacos.config.server-addr=127.0.0.1:8848 spring.cloud.nacos.config.file-extension=yml #redis配置 spring.redis.host=127.0.0.1 diff --git a/dq-financial-hrms/src/main/resources/bootstrap.properties b/dq-financial-hrms/src/main/resources/bootstrap.properties index db27d3dd..71d08eb4 100644 --- a/dq-financial-hrms/src/main/resources/bootstrap.properties +++ b/dq-financial-hrms/src/main/resources/bootstrap.properties @@ -1,7 +1,7 @@ #服务名称 spring.application.name=dq-financial-hrms #配置中心地址 -spring.cloud.nacos.config.server-addr=192.168.31.140:8848 +spring.cloud.nacos.config.server-addr=127.0.0.1:8848 spring.cloud.nacos.config.file-extension=yml #redis配置 spring.redis.host=127.0.0.1 diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/LoginRequest.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/LoginRequest.java index 4350cc08..4db3d5fb 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/LoginRequest.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/LoginRequest.java @@ -11,7 +11,7 @@ public class LoginRequest { @ApiModelProperty(value = "手机号码/账号") private String phone; - @ApiModelProperty(value = "登录类型(1:手机号 2:微信登录 3:客户小程序登录)") + @ApiModelProperty(value = "登录类型(1:手机号 2:微信扫码登录 3:客户小程序登录 4:企业小程序登录)") private int type; @ApiModelProperty(value = "微信唯一编号(unionId)") diff --git a/dq-govern-gateway/src/main/resources/bootstrap.properties b/dq-govern-gateway/src/main/resources/bootstrap.properties index 8cd12f31..b071353a 100644 --- a/dq-govern-gateway/src/main/resources/bootstrap.properties +++ b/dq-govern-gateway/src/main/resources/bootstrap.properties @@ -1,7 +1,7 @@ #服务名称 spring.application.name=dq-govern-gateway #配置中心地址 -spring.cloud.nacos.config.server-addr=192.168.31.140:8848 +spring.cloud.nacos.config.server-addr=127.0.0.1:8848 spring.cloud.nacos.config.file-extension=yml #redis配置 spring.redis.host=127.0.0.1