RISK UPDATE

master
james.zhao 6 years ago
parent 4182a60245
commit 05874968ee

@ -33,6 +33,7 @@ import au.com.royalpay.payment.manage.notice.core.NoticePartner;
import au.com.royalpay.payment.manage.openim.core.CustomerServiceService;
import au.com.royalpay.payment.manage.pushMessage.APNSMessageHelper;
import au.com.royalpay.payment.manage.pushMessage.bean.AppManagerMessageBuilder;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskBusinessService;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskProcessLogService;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskUploadService;
import au.com.royalpay.payment.manage.riskbusiness.enums.RiskResultTypeEnum;
@ -182,6 +183,8 @@ public class RetailAppServiceImp implements RetailAppService {
@Resource
private RiskProcessLogService riskProcessLogService;
@Resource
private RiskBusinessService riskBusinessService;
@Resource
private RiskUploadService riskUploadService;
private Map<String, AppMsgSender> senderMap = new HashMap<>();
@ -1871,6 +1874,11 @@ public class RetailAppServiceImp implements RetailAppService {
@Override
public void submitMaterial(JSONObject material, JSONObject device) {
riskUploadService.submitMaterial(material);
JSONObject event = riskBusinessService.getRiskEventDetail(material.getString("risk_id"));
//材料审核通过后可以重新提交
if(event.getIntValue("result_type")==3){
return;
}
JSONObject account = clientAccountMapper.findById(device.getString("account_id"));
if (account == null)
account = new JSONObject();

@ -65,7 +65,7 @@ public interface RiskBusinessService {
*
* @param params
*/
void updateRiskEvent(JSONObject params);
void updateRiskEvent(JSONObject params,JSONObject manager);
/**
*

@ -151,13 +151,14 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
if (manager != null && ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
params.put("bd_id", manager.getString("manager_id"));
List<Integer> orderTypes = Arrays.asList(RiskOrderTypeEnum.WECHAT_ORDER.getOrderType(),
RiskOrderTypeEnum.ALIPAY_ORDER.getOrderType());
RiskOrderTypeEnum.ALIPAY_ORDER.getOrderType(),RiskOrderTypeEnum.ROYALPAY_ORDER.getOrderType());
params.put("order_types", orderTypes);
List<Integer> resultTypes = Arrays.asList(RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType(),
RiskResultTypeEnum.WAIT_FOR_AUDIT.getResultType(),
RiskResultTypeEnum.MATERIAL_AUDIT_PASS.getResultType(),
RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType());
RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType(),
RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
params.put("result_types", resultTypes);
}
@ -374,7 +375,24 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
}
@Override
public void updateRiskEvent(JSONObject params) {
public void updateRiskEvent(JSONObject params,JSONObject manager) {
if(StringUtils.isNotBlank(params.getString("channel_result"))){
JSONObject risk = riskEventMapper.findById(params.getString("risk_id"));
//填写渠道处理结果时候,支付宝、微信和内部调单在材料审核通过前无法填写渠道处理结果
if(params.getIntValue("result_type") < RiskResultTypeEnum.MATERIAL_AUDIT_PASS.getResultType() && params.getIntValue("order_type") < RiskOrderTypeEnum.WARNING_ORDER.getOrderType()){
throw new BadRequestException("请先提交渠道方材料进行审核!");
}
//渠道处理结果不一样,才会记录操作并更改事件单状态为渠道方处理结果
if(risk.getString("channel_result")==null || !risk.getString("channel_result").equals(params.getString("channel_result"))){
params.put("result_type",RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
riskProcessLogService.addRiskProcessLog(params.getString("risk_id"),
manager.getString("manager_id"),
manager.getString("display_name"),
RiskResultTypeEnum.ALREADY_HANDLED.getRemark() + ":"+ params.getString("channel_result"),
params.getIntValue("result_type"),
RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
}
}
params = getEvent(params);
riskEventMapper.update(params);
riskOrdersMapper.clearOrders(params.getString("risk_id"));

@ -47,7 +47,7 @@ public class RiskUploadServiceIpml implements RiskUploadService {
String riskId = material.getString("risk_id");
JSONObject event = riskEventMapper.findById(riskId);
Integer resultType = event.getInteger("result_type");
if (!resultType.equals(RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType()) && !resultType.equals(RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType())) {
if (!resultType.equals(RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType()) && !resultType.equals(RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType()) && !resultType.equals(RiskResultTypeEnum.MATERIAL_AUDIT_PASS.getResultType())) {
throw new BadRequestException("Committed Already");
}
material.put("update_time", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
@ -67,8 +67,15 @@ public class RiskUploadServiceIpml implements RiskUploadService {
}
}
}
event.put("result_type", RiskResultTypeEnum.WAIT_FOR_AUDIT.getResultType());
riskEventMapper.update(event);
if(event.getIntValue("result_type")!= RiskResultTypeEnum.MATERIAL_AUDIT_PASS.getResultType()){
event.put("result_type", RiskResultTypeEnum.WAIT_FOR_AUDIT.getResultType());
riskEventMapper.update(event);
}
//材料审核通过的保持原状态
// if(event.getIntValue("result_type")== RiskResultTypeEnum.MATERIAL_AUDIT_PASS.getResultType()){
// event.put("result_type", RiskResultTypeEnum.MATERIAL_AUDIT_PASS.getResultType());
// riskEventMapper.update(event);
// }
}
@Override

@ -19,9 +19,9 @@ public enum RiskResultTypeEnum {
"风控事件已创建",
"已发送邮件,资料完善中",
"资料已提交,等待审核",
"材料审核通过",
"风控初审完成,已提交渠道方审核",
"材料打回",
"已处理"
"渠道方处理结果"
};
RiskResultTypeEnum(Integer resultType) {

@ -86,8 +86,8 @@ public class RiskBusinessController {
}
@PutMapping(value = "events")
public void UpdateRiskEvent(@RequestBody JSONObject params) {
riskBusinessService.updateRiskEvent(params);
public void UpdateRiskEvent(@RequestBody JSONObject params,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
riskBusinessService.updateRiskEvent(params,manager);
}
@PutMapping(value = "events/pass")
@ -137,7 +137,7 @@ public class RiskBusinessController {
//1:禁用渠道;2:禁用商户
riskBusinessService.sendWxMess(params, channel, 1);
}
riskBusinessService.updateRiskEvent(params);
riskBusinessService.updateRiskEvent(params,manager);
}
@PutMapping(value = "/partner/{isValid}")
@ -157,7 +157,7 @@ public class RiskBusinessController {
clientManager.revertClient(clientMoniker, manager);
params.put("result_type", RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
}
riskBusinessService.updateRiskEvent(params);
riskBusinessService.updateRiskEvent(params,manager);
}
@RequestMapping(value = "/{risk_id}/urge",method = RequestMethod.PUT)

@ -51,6 +51,11 @@ public class RiskFileUploadController {
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
// riskUploadService.checkUploadMailKey(codeKey, material.getString("risk_id"));
riskUploadService.submitMaterial(material);
JSONObject event = riskBusinessService.getRiskEventDetail(material.getString("risk_id"));
//材料可以重新提交
if(event.getIntValue("result_type")==3){
return;
}
riskProcessLogService.addRiskProcessLog(material.getString("risk_id"),
manager.getString("manager_id"),
manager.getString("display_name"),

@ -14,7 +14,8 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
var orderTypesMapForBD = {
"1": "微信调单",
"2": "支付宝调单"
"2": "支付宝调单",
"3": "RoyalPay调单"
};
var royalpayOrderTypesMap = {
@ -31,7 +32,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
"0": "未处理",
"1": "已发送邮件",
"2": "已提交材料,等待审核",
"3": "材料审核通过",
"3": "风控初审完成,已提交渠道方审核",
"4": "材料审核不通过,已打回",
"5": "已处理"
};
@ -40,7 +41,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
"0": "未处理",
"1": "资料完善中",
"2": "等待风控",
"3": "材料通过",
"3": "风控初审完成,已提交渠道方审核",
"4": "材料打回",
"5": "已处理"
};
@ -48,7 +49,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
var resultTypeSearchMapForBD = {
"1": "材料待上传",
"2": "材料已提交",
"3": "材料通过",
"3": "风控初审完成,已提交渠道方审核",
"4": "材料打回",
"5": "已处理"
};
@ -517,7 +518,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
};
// BD是否可上传
$scope.uploadShowFlag = ($scope.riskEvent.result_type == 1 || $scope.riskEvent.result_type == 4) ? true : false;
$scope.uploadShowFlag = ($scope.riskEvent.result_type == 1 || $scope.riskEvent.result_type == 3 || $scope.riskEvent.result_type == 4) ? true : false;
//if (!$scope.uploadShowFlag)
$scope.loadRiskMaterial();
}
@ -557,7 +558,8 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
};
$scope.loadRiskMaterial();
$scope.uploadShowFlag = ($scope.riskEvent.result_type == 1 || $scope.riskEvent.result_type == 4) ? true : false;
//审核通过也要可以传图片
$scope.uploadShowFlag = ($scope.riskEvent.result_type == 1 || $scope.riskEvent.result_type == 3 || $scope.riskEvent.result_type == 4) ? true : false;
// 材料上传
$scope.uploadFile = function(files, index) {

@ -538,20 +538,20 @@
for="channel-result-input">Channel Handle Result
</label>
<div class="col-sm-8">
<!--
<input class="form-control"
<textarea class="form-control"
ng-model="riskEventEdit.channel_result"
type="text"
name="description"
id="channel-result-input">
-->
<select class="form-control"
name="channel_result"
ng-model="riskEventEdit.channel_result"
id="channel-result-input"
ng-options="item for item in channelResults">
<option value="">Please Choose</option>
</select>
name="channel_result"
id="channel-result-input"/>
<!--<select class="form-control"-->
<!--name="channel_result"-->
<!--ng-model="riskEventEdit.channel_result"-->
<!--id="channel-result-input"-->
<!--ng-options="item for item in channelResults">-->
<!--<option value="">Please Choose</option>-->
<!--</select>-->
</div>
</div>
</div>

@ -1,6 +1,15 @@
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="box-body table-responsive pad">
<small ng-repeat="log in riskEvent.process_logs">
<div class="btn-group-vertical" style="margin-top: 5px">
<button type="button" class="btn btn-xs btn-primary" ng-class="{'btn-danger': log.result_type_to == 4, 'btn-success': log.result_type_to == 3, 'btn-warning': log.result_type_to == 1}">{{log.remark}}</button>
<button type="button" class="btn btn-xs btn-primary" ng-class="{'btn-danger': log.result_type_to == 4, 'btn-success': log.result_type_to == 3, 'btn-warning': log.result_type_to == 1}">{{log.operator}} | {{log.create_time}}</button>
</div>
<i class="fa fa-arrow-right" aria-hidden="true" style="margin-top: 5px" ng-if="riskEvent.process_logs.length > ($index + 1)"></i>
</small>
</div>
<!-- 调单信息 -->
<div class="box">
<div class="box-header">

Loading…
Cancel
Save