Merge remote-tracking branch 'origin/master'

master
river 4 years ago
commit ffe0f97821
  1. 2
      dq-financial-crms/src/main/resources/bootstrap.properties
  2. 37
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java
  3. 7
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java
  4. 14
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  5. 2
      dq-financial-guarantee/src/main/resources/bootstrap.properties
  6. 2
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgCopyUserMapper.xml
  7. 8
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java
  8. 2
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java
  9. 2
      dq-financial-hrms-auth/src/main/resources/bootstrap.properties
  10. 2
      dq-financial-hrms/src/main/resources/bootstrap.properties
  11. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/LoginRequest.java
  12. 2
      dq-govern-gateway/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

@ -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("客户");
}
}
}

@ -172,14 +172,7 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMap
@Override
public int updateRepaymentEntry() {
//查询当前日期超过应还款日时的数据
//List<AlRepaymentEntryRes>list = this.baseMapper.selectOverDueDays();
//查询所有数据
//List<AlRepaymentEntry> list = this.baseMapper.selectList(new QueryWrapper<>());
List<AlRepaymentEntryRes>list = 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");

@ -356,8 +356,15 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
@Override
public int updateBusinessApplication(BusinessApplicationRequest businessApplication) {
//根据社会统一信用代码判断是否可以申请业务,同一客户如果有一笔业务在业务流程在进行中,则不能再申请
this.repeatBusiness(businessApplication);
//根据业务id以及type查询对应的记录
DgApplyAmountList dgApplyAmountList = dgApplyAmountListMapper.selectOne(new QueryWrapper<DgApplyAmountList>()
.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<DgApplyAmountInfoM
this.baseMapper.updateById(dgApplyAmountInfo);
//业务员操作即可处理-------------------------------
//根据业务id以及type查询对应的记录
DgApplyAmountList dgApplyAmountList = dgApplyAmountListMapper.selectOne(new QueryWrapper<DgApplyAmountList>()
.eq("business_id", businessApplication.getBusinessId()).eq("type", 1));
//草稿状态下,新增业务状态到业务状态表,同时新增一条记录到担保经理处理
if(dgApplyAmountList.getStatus().equals(StatusCode.SP_DRAFT)){

@ -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

@ -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

@ -241,7 +241,11 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity>
}
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<UserLoginDao, UserEntity>
//查询员工数据
int count2 = userLoginDao.selectUserEmpCount(md5UnionId);
if(identify==0){//员工小程序登录
loginRequest.setType(2);
loginRequest.setType(4);
if(count<=0 || count2<=0){//如果微信绑定的不是员工
return ResponseResult.FAIL(60001,"您的账号没有权限,无法登录!");
}

@ -51,6 +51,8 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> 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<String ,Object> baseMap = HttpUtils.doGet(accessTokenUrl);

@ -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

@ -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

@ -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)")

@ -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

Loading…
Cancel
Save