Commit 7c75febc authored by yexiong.wang's avatar yexiong.wang

edit

parent 0e94179c
...@@ -21,9 +21,11 @@ import cn.quantgroup.customer.service.http.IHttpService; ...@@ -21,9 +21,11 @@ import cn.quantgroup.customer.service.http.IHttpService;
import cn.quantgroup.customer.util.IdUtil; import cn.quantgroup.customer.util.IdUtil;
import cn.quantgroup.user.retbean.XUser; import cn.quantgroup.user.retbean.XUser;
import cn.quantgroup.user.vo.UserSysResult; import cn.quantgroup.user.vo.UserSysResult;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.google.common.reflect.TypeToken; import com.google.common.reflect.TypeToken;
import com.google.gson.Gson;
import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.core.types.dsl.BooleanExpression;
import com.querydsl.core.types.dsl.Expressions; import com.querydsl.core.types.dsl.Expressions;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -39,11 +41,8 @@ import org.springframework.web.multipart.MultipartFile; ...@@ -39,11 +41,8 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.List;
import static cn.quantgroup.customer.constant.Constant.GSON;
@Slf4j @Slf4j
@Service @Service
...@@ -68,7 +67,7 @@ public class VccServiceImpl implements IVccService { ...@@ -68,7 +67,7 @@ public class VccServiceImpl implements IVccService {
@Override @Override
public JsonResult queryPage(UserPreRepayInfoQuery query) throws Exception{ public JsonResult queryPage(UserPreRepayInfoQuery query) throws Exception{
String url = talosHttp + "/vcc/offline_pre_repay/query_page"; String url = talosHttp + "/vcc/offline_pre_repay/query_page";
JSONObject param = JSONObject.parseObject(GSON.toJson(query)); JSONObject param = JSONObject.parseObject(JSON.toJSONString(query));
log.info("queryPage | 开始请求talos获取预还款的详情,param={}",param); log.info("queryPage | 开始请求talos获取预还款的详情,param={}",param);
String post = httpService.post(url, param); String post = httpService.post(url, param);
log.info("queryPage | 请求talos结束,param={},result={}",param,post); log.info("queryPage | 请求talos结束,param={},result={}",param,post);
...@@ -83,7 +82,7 @@ public class VccServiceImpl implements IVccService { ...@@ -83,7 +82,7 @@ public class VccServiceImpl implements IVccService {
} }
JSONObject data = jsonObject.getJSONObject("data"); JSONObject data = jsonObject.getJSONObject("data");
JSONArray list = data.getJSONArray("list"); JSONArray list = data.getJSONArray("list");
List<QueryPreOfflineRepayVo> voList = GSON.fromJson(list.toString(), new TypeToken<List<QueryPreOfflineRepayVo>>() { List<QueryPreOfflineRepayVo> voList = new Gson().fromJson(list.toString(), new TypeToken<List<QueryPreOfflineRepayVo>>() {
}.getType()); }.getType());
for (int i = 0;i<voList.size();i++){ for (int i = 0;i<voList.size();i++){
if (1 == query.getRepayType()){ if (1 == query.getRepayType()){
...@@ -93,7 +92,7 @@ public class VccServiceImpl implements IVccService { ...@@ -93,7 +92,7 @@ public class VccServiceImpl implements IVccService {
List<OfflineRepaySubmitRecord> byUserIdEqualsAndRepayTypeEquals = offlineRepaySubmitRecordRepo.findByUserIdEqualsAndRepayTypeEquals(voList.get(i).getUserId(), 1); List<OfflineRepaySubmitRecord> byUserIdEqualsAndRepayTypeEquals = offlineRepaySubmitRecordRepo.findByUserIdEqualsAndRepayTypeEquals(voList.get(i).getUserId(), 1);
if (!CollectionUtils.isEmpty(byUserIdEqualsAndRepayTypeEquals)){ if (!CollectionUtils.isEmpty(byUserIdEqualsAndRepayTypeEquals)){
for (OfflineRepaySubmitRecord record:byUserIdEqualsAndRepayTypeEquals){ for (OfflineRepaySubmitRecord record:byUserIdEqualsAndRepayTypeEquals){
List<ApplyBill> billList = GSON.fromJson(record.getBills(), new TypeToken<List<ApplyBill>>() { List<ApplyBill> billList = new Gson().fromJson(record.getBills(), new TypeToken<List<ApplyBill>>() {
}.getType()); }.getType());
log.info("billList={},applyBill={}",billList,applyBill); log.info("billList={},applyBill={}",billList,applyBill);
if (billList.contains(applyBill)){ if (billList.contains(applyBill)){
...@@ -151,7 +150,7 @@ public class VccServiceImpl implements IVccService { ...@@ -151,7 +150,7 @@ public class VccServiceImpl implements IVccService {
List<OfflineRepaySubmitRecord> byUserIdEqualsAndRepayTypeEquals = offlineRepaySubmitRecordRepo.findByUserIdEqualsAndRepayTypeEqualsAndApprovalStatusNot(param.getUserId(), 1,2); List<OfflineRepaySubmitRecord> byUserIdEqualsAndRepayTypeEquals = offlineRepaySubmitRecordRepo.findByUserIdEqualsAndRepayTypeEqualsAndApprovalStatusNot(param.getUserId(), 1,2);
if (!CollectionUtils.isEmpty(byUserIdEqualsAndRepayTypeEquals)){ if (!CollectionUtils.isEmpty(byUserIdEqualsAndRepayTypeEquals)){
for (OfflineRepaySubmitRecord record:byUserIdEqualsAndRepayTypeEquals){ for (OfflineRepaySubmitRecord record:byUserIdEqualsAndRepayTypeEquals){
List<ApplyBill> billList = GSON.fromJson(record.getBills(), new TypeToken<List<ApplyBill>>() { List<ApplyBill> billList = new Gson().fromJson(record.getBills(), new TypeToken<List<ApplyBill>>() {
}.getType()); }.getType());
if (!Collections.disjoint(list,billList)){ if (!Collections.disjoint(list,billList)){
log.error("saveSubmitRecord | 提交时发现已经提交过了,请确认,newBills={},existBills={}",list.toString(),billList.toString()); log.error("saveSubmitRecord | 提交时发现已经提交过了,请确认,newBills={},existBills={}",list.toString(),billList.toString());
...@@ -195,7 +194,7 @@ public class VccServiceImpl implements IVccService { ...@@ -195,7 +194,7 @@ public class VccServiceImpl implements IVccService {
} }
OfflineRepaySubmitParam param = new OfflineRepaySubmitParam(); OfflineRepaySubmitParam param = new OfflineRepaySubmitParam();
BeanUtils.copyProperties(bySerialNoEquals,param); BeanUtils.copyProperties(bySerialNoEquals,param);
List<ApplyBill> billList = GSON.fromJson(bySerialNoEquals.getBills(), new TypeToken<List<ApplyBill>>() { List<ApplyBill> billList = new Gson().fromJson(bySerialNoEquals.getBills(), new TypeToken<List<ApplyBill>>() {
}.getType()); }.getType());
param.setList(billList); param.setList(billList);
String[] split = bySerialNoEquals.getCredentialsAddress().split(","); String[] split = bySerialNoEquals.getCredentialsAddress().split(",");
...@@ -238,7 +237,7 @@ public class VccServiceImpl implements IVccService { ...@@ -238,7 +237,7 @@ public class VccServiceImpl implements IVccService {
// } // }
if ( 1 == bySerialNoEquals.getRepayType()){ if ( 1 == bySerialNoEquals.getRepayType()){
//月还账单 //月还账单
List<ApplyBill> billList = GSON.fromJson(bySerialNoEquals.getBills(), new TypeToken<List<ApplyBill>>() { List<ApplyBill> billList = new Gson().fromJson(bySerialNoEquals.getBills(), new TypeToken<List<ApplyBill>>() {
}.getType()); }.getType());
StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder = new StringBuilder();
for (ApplyBill applyBill:billList){ for (ApplyBill applyBill:billList){
...@@ -331,7 +330,7 @@ public class VccServiceImpl implements IVccService { ...@@ -331,7 +330,7 @@ public class VccServiceImpl implements IVccService {
submitRecordVo.setApprovalStatusName(ApprovalStatus.getDescByValue(submitRecordVo.getApprovalStatus())); submitRecordVo.setApprovalStatusName(ApprovalStatus.getDescByValue(submitRecordVo.getApprovalStatus()));
if ( 1 == submitRecordVo.getRepayType()) { if ( 1 == submitRecordVo.getRepayType()) {
//月还账单 //月还账单
List<ApplyBill> billList = GSON.fromJson(submitRecordVo.getBills(), new TypeToken<List<ApplyBill>>() { List<ApplyBill> billList = new Gson().fromJson(submitRecordVo.getBills(), new TypeToken<List<ApplyBill>>() {
}.getType()); }.getType());
StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder = new StringBuilder();
for (ApplyBill applyBill : billList) { for (ApplyBill applyBill : billList) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment