风控调整log和e-charts

master
james.zhao 6 years ago
parent 7f86b075c6
commit 2b63577b34

@ -167,4 +167,6 @@ public interface RetailAppService {
JSONObject getStyle(); JSONObject getStyle();
void cancelCouponAccuessLog(String accuess_id, String remark); void cancelCouponAccuessLog(String accuess_id, String remark);
void submitMaterial(JSONObject material, JSONObject device);
} }

@ -33,6 +33,9 @@ import au.com.royalpay.payment.manage.notice.core.NoticePartner;
import au.com.royalpay.payment.manage.openim.core.CustomerServiceService; import au.com.royalpay.payment.manage.openim.core.CustomerServiceService;
import au.com.royalpay.payment.manage.pushMessage.APNSMessageHelper; import au.com.royalpay.payment.manage.pushMessage.APNSMessageHelper;
import au.com.royalpay.payment.manage.pushMessage.bean.AppManagerMessageBuilder; import au.com.royalpay.payment.manage.pushMessage.bean.AppManagerMessageBuilder;
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;
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean; import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import au.com.royalpay.payment.manage.signin.core.SignInAccountService; import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
import au.com.royalpay.payment.manage.signin.core.impls.SignInAccountServiceImpl; import au.com.royalpay.payment.manage.signin.core.impls.SignInAccountServiceImpl;
@ -176,6 +179,10 @@ public class RetailAppServiceImp implements RetailAppService {
private CouponAccuessLogMapper couponAccuessLogMapper; private CouponAccuessLogMapper couponAccuessLogMapper;
@Resource @Resource
private CouponValidateService couponValidateService; private CouponValidateService couponValidateService;
@Resource
private RiskProcessLogService riskProcessLogService;
@Resource
private RiskUploadService riskUploadService;
private Map<String, AppMsgSender> senderMap = new HashMap<>(); private Map<String, AppMsgSender> senderMap = new HashMap<>();
private final String fileName[] = { "client_bank_file", "client_id_file", "client_company_file" }; private final String fileName[] = { "client_bank_file", "client_id_file", "client_company_file" };
@ -1378,6 +1385,10 @@ public class RetailAppServiceImp implements RetailAppService {
if (Hf.containsKey("channel")) { if (Hf.containsKey("channel")) {
channels.add(Hf); channels.add(Hf);
} }
JSONObject Yeepay = getChannel(clientId, now, "Yeepay");
if (Yeepay.containsKey("channel")) {
channels.add(Yeepay);
}
res.put("channels", channels); res.put("channels", channels);
return res; return res;
} }
@ -1857,4 +1868,18 @@ public class RetailAppServiceImp implements RetailAppService {
return sourceStr; return sourceStr;
} }
@Override
public void submitMaterial(JSONObject material, JSONObject device) {
riskUploadService.submitMaterial(material);
JSONObject account = clientAccountMapper.findById(device.getString("account_id"));
if (account == null)
account = new JSONObject();
riskProcessLogService.addRiskProcessLog(material.getString("risk_id"),
account.getString("account_id"),
account.getString("display_name"),
RiskResultTypeEnum.WAIT_FOR_AUDIT.getRemark(),
RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType(),
RiskResultTypeEnum.WAIT_FOR_AUDIT.getResultType());
}
} }

@ -29,8 +29,11 @@ import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.http.HttpUtils; import au.com.royalpay.payment.tools.http.HttpUtils;
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig; import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
import au.com.royalpay.payment.tools.merchants.beans.UpdateSurchargeDTO; import au.com.royalpay.payment.tools.merchants.beans.UpdateSurchargeDTO;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.lang3.time.DateUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -40,9 +43,6 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.ParseException; import java.text.ParseException;
import java.util.Arrays; import java.util.Arrays;
@ -50,6 +50,10 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import static au.com.royalpay.payment.tools.CommonConsts.RETAIL_DEVICE; import static au.com.royalpay.payment.tools.CommonConsts.RETAIL_DEVICE;
/** /**
@ -631,8 +635,8 @@ public class RetailAppController {
* @param material * @param material
*/ */
@PostMapping(value = "/risk/business/events") @PostMapping(value = "/risk/business/events")
public void uploadMaterial(@RequestBody JSONObject material) { public void uploadMaterial(@RequestBody JSONObject material, @ModelAttribute(RETAIL_DEVICE) JSONObject device) {
riskUploadService.submitMaterial(material); retailAppService.submitMaterial(material, device);
} }
@RequestMapping(value = "/risk/business/upload/files", method = RequestMethod.POST) @RequestMapping(value = "/risk/business/upload/files", method = RequestMethod.POST)

@ -38,6 +38,10 @@ public interface TransactionMapper {
@AdvanceSelect(addonWhereClause = "refund_id is null and system_generate=0 and transaction_type = 'Credit'") @AdvanceSelect(addonWhereClause = "refund_id is null and system_generate=0 and transaction_type = 'Credit'")
JSONObject findIncomeByOrderId(@Param("order_id") String orderId); JSONObject findIncomeByOrderId(@Param("order_id") String orderId);
@AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "transaction_type = 'Credit'")
JSONObject findByOrderId(@Param("order_id") String orderId);
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "refund_id is null and system_generate=1") @AdvanceSelect(addonWhereClause = "refund_id is null and system_generate=1")
JSONObject findSystemIncomeByOrderId(@Param("order_id") String orderId); JSONObject findSystemIncomeByOrderId(@Param("order_id") String orderId);

@ -28,6 +28,10 @@ public interface RiskEventMapper {
PageList<JSONObject> listRisksByPage(JSONObject params, PageBounds pageBounds); PageList<JSONObject> listRisksByPage(JSONObject params, PageBounds pageBounds);
List<JSONObject> analysisByIndustry(JSONObject params);
List<JSONObject> analysisByAmount(JSONObject params);
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)
JSONObject findById(@Param("risk_id") String riskId); JSONObject findById(@Param("risk_id") String riskId);

@ -0,0 +1,16 @@
package au.com.royalpay.payment.manage.mappers.riskbusiness;
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
@AutoMapper(tablename = "risk_orders", pkName = "risk_order_id")
public interface RiskOrdersMapper {
@AutoSql(type= SqlType.INSERT)
void save(JSONObject params);
@AutoSql(type = SqlType.DELETE)
void clearOrders(@Param("risk_id") String riskId);
}

@ -0,0 +1,24 @@
package au.com.royalpay.payment.manage.mappers.riskbusiness;
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.apache.ibatis.annotations.Param;
/**
* @Description:
* @Author: lujian
* @Date: 2018/11/22 15:32
*/
@AutoMapper(tablename = "risk_process_log", pkName = "risk_process_id")
public interface RiskProcessLogMapper {
@AutoSql(type = SqlType.SELECT)
PageList<JSONObject> getRiskProcessLogs(@Param("risk_id") String riskId, PageBounds pagination);
@AutoSql(type = SqlType.INSERT)
void addRiskProcessLog(JSONObject log);
}

@ -38,9 +38,17 @@ public class RiskEventQuery {
// 收到调单邮件日期 // 收到调单邮件日期
private String receiveEmailDate; private String receiveEmailDate;
private String receiveEmailDateBegin;
private String receiveEmailDateEnd;
// 邮件回复截止日期 // 邮件回复截止日期
private String replyEmailDate; private String replyEmailDate;
private String replyEmailDateBegin;
private String replyEmailDateEnd;
private Integer page = 1; private Integer page = 1;
// 金额区间 // 金额区间
@ -135,6 +143,38 @@ public class RiskEventQuery {
this.replyEmailDate = replyEmailDate; this.replyEmailDate = replyEmailDate;
} }
public String getReceiveEmailDateBegin() {
return receiveEmailDateBegin;
}
public void setReceiveEmailDateBegin(String receiveEmailDateBegin) {
this.receiveEmailDateBegin = receiveEmailDateBegin;
}
public String getReceiveEmailDateEnd() {
return receiveEmailDateEnd;
}
public void setReceiveEmailDateEnd(String receiveEmailDateEnd) {
this.receiveEmailDateEnd = receiveEmailDateEnd;
}
public String getReplyEmailDateBegin() {
return replyEmailDateBegin;
}
public void setReplyEmailDateBegin(String replyEmailDateBegin) {
this.replyEmailDateBegin = replyEmailDateBegin;
}
public String getReplyEmailDateEnd() {
return replyEmailDateEnd;
}
public void setReplyEmailDateEnd(String replyEmailDateEnd) {
this.replyEmailDateEnd = replyEmailDateEnd;
}
public Integer getPage() { public Integer getPage() {
return page; return page;
} }
@ -184,6 +224,22 @@ public class RiskEventQuery {
params.put("reply_email_date", replyEmailDate); params.put("reply_email_date", replyEmailDate);
} }
if (receiveEmailDateBegin != null) {
params.put("receive_email_date_begin", receiveEmailDateBegin);
}
if (receiveEmailDateEnd != null) {
params.put("receive_email_date_end", receiveEmailDateEnd);
}
if (replyEmailDateBegin != null) {
params.put("reply_email_date_begin", replyEmailDateBegin);
}
if (replyEmailDateEnd != null) {
params.put("reply_email_date_end", replyEmailDateEnd);
}
if (page != null && page > 0) { if (page != null && page > 0) {
params.put("page", page); params.put("page", page);
} }

@ -27,6 +27,20 @@ public interface RiskBusinessService {
*/ */
JSONObject getRiskEventsByPage(JSONObject params, JSONObject manager); JSONObject getRiskEventsByPage(JSONObject params, JSONObject manager);
/**
*
* @param params
* @return
*/
List<JSONObject> analysisByIndustry(JSONObject params, JSONObject manager);
/**
*
* @param params
* @return
*/
List<JSONObject> analysisByAmount(JSONObject params, JSONObject manager);
/** /**
* *
* @param riskId * @param riskId
@ -68,8 +82,10 @@ public interface RiskBusinessService {
/** /**
* *
* @param riskId * @param riskId
* @param refuseDescription
* @throws IOException
*/ */
void sendRefuseEmail(String riskId) throws IOException; void sendRefuseEmail(String riskId, String refuseDescription) throws IOException;
/** /**
* *
@ -110,5 +126,9 @@ public interface RiskBusinessService {
*/ */
JSONObject getRiskEventMaterialsRemark(String riskId); JSONObject getRiskEventMaterialsRemark(String riskId);
JSONObject riskEventMaterialPass(JSONObject params, JSONObject manager);
JSONObject updateIsSendClient(String riskId); JSONObject updateIsSendClient(String riskId);
void completeOrderAmount();
} }

@ -0,0 +1,28 @@
package au.com.royalpay.payment.manage.riskbusiness.core;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
/**
* @Description:
* @Author: lujian
* @Date: 2018/11/22 15:40
*/
public interface RiskProcessLogService {
/**
*
* @param riskId
* @return
*/
PageList<JSONObject> getRiskProcessLogs(String riskId);
/**
*
* @param log
*/
void addRiskProcessLog(JSONObject log);
void addRiskProcessLog(String riskId, String operatorId, String operator, String remark, int resultTypeFrom, int resultTypeTo);
}

@ -10,6 +10,7 @@ import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.mappers.riskbusiness.RiskEventMapper; import au.com.royalpay.payment.manage.mappers.riskbusiness.RiskEventMapper;
import au.com.royalpay.payment.manage.mappers.riskbusiness.RiskFileMapper; import au.com.royalpay.payment.manage.mappers.riskbusiness.RiskFileMapper;
import au.com.royalpay.payment.manage.mappers.riskbusiness.RiskMaterialMapper; import au.com.royalpay.payment.manage.mappers.riskbusiness.RiskMaterialMapper;
import au.com.royalpay.payment.manage.mappers.riskbusiness.RiskOrdersMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientDeviceTokenMapper; import au.com.royalpay.payment.manage.mappers.system.ClientDeviceTokenMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper; import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientBDMapper; import au.com.royalpay.payment.manage.mappers.system.ClientBDMapper;
@ -17,6 +18,8 @@ import au.com.royalpay.payment.manage.notice.core.MailService;
import au.com.royalpay.payment.manage.pushMessage.APNSMessageHelper; import au.com.royalpay.payment.manage.pushMessage.APNSMessageHelper;
import au.com.royalpay.payment.manage.pushMessage.bean.AppManagerMessageBuilder; 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.RiskBusinessService;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskMaterialService;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskProcessLogService;
import au.com.royalpay.payment.manage.riskbusiness.enums.RiskEmailStatusEnum; import au.com.royalpay.payment.manage.riskbusiness.enums.RiskEmailStatusEnum;
import au.com.royalpay.payment.manage.riskbusiness.enums.RiskResultTypeEnum; import au.com.royalpay.payment.manage.riskbusiness.enums.RiskResultTypeEnum;
import au.com.royalpay.payment.manage.signin.beans.TodoNotice; import au.com.royalpay.payment.manage.signin.beans.TodoNotice;
@ -95,11 +98,18 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
private RoyalThreadPoolExecutor royalThreadPoolExecutor; private RoyalThreadPoolExecutor royalThreadPoolExecutor;
private final String UPLOAD_MAIL_PREFIX = "UPLOAD_MAIL"; private final String UPLOAD_MAIL_PREFIX = "UPLOAD_MAIL";
@Resource
private RiskProcessLogService riskProcessLogService;
@Resource @Resource
private RiskMaterialMapper riskMaterialMapper; private RiskMaterialMapper riskMaterialMapper;
@Resource @Resource
private RiskMaterialService riskMaterialService;
@Resource
private RiskFileMapper riskFileMapper; private RiskFileMapper riskFileMapper;
@Resource @Resource
private RiskOrdersMapper riskOrdersMapper;
@Resource
private ClientDeviceTokenMapper clientDeviceTokenMapper; private ClientDeviceTokenMapper clientDeviceTokenMapper;
@Resource @Resource
private AppMessageLogMapper appMessageLogMapper; private AppMessageLogMapper appMessageLogMapper;
@ -172,6 +182,49 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
return PageListUtils.buildPageListResult(riskEvents); return PageListUtils.buildPageListResult(riskEvents);
} }
@Override
public List<JSONObject> analysisByIndustry(JSONObject params, JSONObject manager) {
List<JSONObject> industryAnalysis = riskEventMapper.analysisByIndustry(params);
for(JSONObject industry:industryAnalysis){
if(StringUtils.isBlank(industry.getString("industry"))){
industry.put("industry","未知行业");
}
}
return industryAnalysis;
}
private List<String> industryArray(){
List<String> industryArray = new ArrayList<>();
industryArray.add("鞋包服饰");
industryArray.add("机票行业");
industryArray.add("软件服务");
industryArray.add("旅游票务");
industryArray.add("国际租车");
industryArray.add("医疗服务(出国)");
industryArray.add("医疗服务(不出国)");
industryArray.add("留学教育(网络教育)");
industryArray.add("留学教育(一年及以下)");
industryArray.add("其它货物贸易行业");
industryArray.add("文具/办公用品");
industryArray.add("综合商城");
industryArray.add("酒店行业");
industryArray.add("教育行业");
industryArray.add("国际物流");
industryArray.add("数码电器");
industryArray.add("母婴");
industryArray.add("化妆品");
industryArray.add("食品");
industryArray.add("留学教育(一年以上)");
industryArray.add("其它服务行业");
industryArray.add("未知行业");
return industryArray;
}
@Override
public List<JSONObject> analysisByAmount(JSONObject params, JSONObject manager) {
return riskEventMapper.analysisByAmount(params);
}
@Override @Override
public JSONObject getRiskEventDetail(String riskId) { public JSONObject getRiskEventDetail(String riskId) {
@ -259,7 +312,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
// 将订单order_id存入数据库方便后面快速查询 // 将订单order_id存入数据库方便后面快速查询
JSONObject orderInfo = transactionList.get(0); JSONObject orderInfo = transactionList.get(0);
realOrderIdList.add(orderInfo.getString("order_id")); realOrderIdList.add(orderInfo.getString("order_id"));
orderAmountList.add(orderInfo.getString("transaction_amount")); orderAmountList.add(orderInfo.getString("clearing_amount"));
} }
params.put("order_amounts", StringUtils.join(orderAmountList, ",")); params.put("order_amounts", StringUtils.join(orderAmountList, ","));
params.put("real_order_ids", StringUtils.join(realOrderIdList, ",")); params.put("real_order_ids", StringUtils.join(realOrderIdList, ","));
@ -271,12 +324,37 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
public void addRiskEvent(JSONObject params, JSONObject manager) { public void addRiskEvent(JSONObject params, JSONObject manager) {
params = getEvent(params); params = getEvent(params);
riskEventMapper.save(params); riskEventMapper.save(params);
setRiskOrders(params);
params = riskEventMapper.findAll(params).get(0);
riskProcessLogService.addRiskProcessLog(params.getString("risk_id"),
params.getString("fillin_id"),
params.getString("fillin_person"),
RiskResultTypeEnum.NOT_HANDLED.getRemark(),
RiskResultTypeEnum.NOT_HANDLED.getResultType(),
RiskResultTypeEnum.NOT_HANDLED.getResultType());
}
private void setRiskOrders(JSONObject params){
if(StringUtils.isNotBlank(params.getString("order_ids"))){
String riskId = params.getString("risk_id");
String orderIds = params.getString("real_order_ids");
for(String orderId : orderIds.split(",")){
JSONObject order = transactionMapper.findByOrderId(orderId);
JSONObject riskOrder = new JSONObject();
riskOrder.put("risk_id",riskId);
riskOrder.put("order_id",orderId);
riskOrder.put("clearing_amount",order.getString("clearing_amount"));
riskOrdersMapper.save(riskOrder);
}
}
} }
@Override @Override
public void updateRiskEvent(JSONObject params) { public void updateRiskEvent(JSONObject params) {
params = getEvent(params); params = getEvent(params);
riskEventMapper.update(params); riskEventMapper.update(params);
riskOrdersMapper.clearOrders(params.getString("risk_id"));
setRiskOrders(params);
} }
@Override @Override
@ -321,13 +399,17 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
Context ctx = getMailContext(event); Context ctx = getMailContext(event);
final List<String> emailsTos = (List<String>)ctx.getVariable("emailsTos"); final List<String> emailsTos = (List<String>)ctx.getVariable("emailsTos");
final List<String> emailsCcs = ctx.getVariable("emailsCcs")==null?new ArrayList<>():(List<String>)ctx.getVariable("emailsCcs"); final List<String> emailsCcs = ctx.getVariable("emailsCcs")==null?new ArrayList<>():(List<String>)ctx.getVariable("emailsCcs");
final List<String> emailsBccs = ctx.getVariable("emailsBccs") == null ? new ArrayList<>() : (List<String>) ctx.getVariable("emailsBccs");
final String title = (String)ctx.getVariable("title"); final String title = (String)ctx.getVariable("title");
final String content = thymeleaf.process("mail/risk_upload_mail.html", ctx); final String content = thymeleaf.process("mail/risk_upload_mail.html", ctx);
final String uploadUrl = (String)ctx.getVariable("uploadUrl"); final String uploadUrl = (String)ctx.getVariable("uploadUrl");
royalThreadPoolExecutor.execute(() -> { royalThreadPoolExecutor.execute(() -> {
try { try {
String emailId = mailService.sendRiskEmail(title, emailsTos.isEmpty() ? "" : StringUtils.join(emailsTos, ","), String emailId = mailService.sendRiskEmail(title,
emailsCcs.isEmpty() ? "" : StringUtils.join(emailsCcs, ","), "",content, null,event.getIntValue("order_type")); emailsTos.isEmpty() ? "" : StringUtils.join(emailsTos, ","),
emailsCcs.isEmpty() ? "" : StringUtils.join(emailsCcs, ","),
emailsBccs.isEmpty() ? "" : StringUtils.join(emailsBccs, ","),
content, null,event.getIntValue("order_type"));
event.put("email_status", RiskEmailStatusEnum.ALREADY_SEND.getEmailStatus()); event.put("email_status", RiskEmailStatusEnum.ALREADY_SEND.getEmailStatus());
event.put("result_type", RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType()); event.put("result_type", RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType());
event.put("submit_url",uploadUrl); event.put("submit_url",uploadUrl);
@ -336,6 +418,12 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
event.put("result_type", RiskResultTypeEnum.ALREADY_HANDLED.getResultType()); event.put("result_type", RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
} }
riskEventMapper.update(event); riskEventMapper.update(event);
riskProcessLogService.addRiskProcessLog(event.getString("risk_id"),
event.getString("fillin_id"),
event.getString("fillin_person"),
RiskResultTypeEnum.SEND_EMAIL_TO_BD.getRemark(),
RiskResultTypeEnum.NOT_HANDLED.getResultType(),
RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType());
if(event.getIntValue("is_send_client") == 1){ if(event.getIntValue("is_send_client") == 1){
sendAppRiskMessage(event); sendAppRiskMessage(event);
} }
@ -403,8 +491,11 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
} }
@Override @Override
public void sendRefuseEmail(String riskId) throws IOException { public void sendRefuseEmail(String riskId, String refuseDescription) throws IOException {
JSONObject event = getRiskEventDetail(riskId); JSONObject event = getRiskEventDetail(riskId);
if (RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType().intValue() == event.getIntValue("result_type")) {
throw new BadRequestException("Refused Already!");
}
Context ctx = getMailContext(event); Context ctx = getMailContext(event);
ctx.setVariable("refuse",true); ctx.setVariable("refuse",true);
ctx.setVariable("refuse_description", riskMaterialMapper.findAllMaterials(riskId).get(0).getString("refuse_description")); ctx.setVariable("refuse_description", riskMaterialMapper.findAllMaterials(riskId).get(0).getString("refuse_description"));
@ -416,10 +507,18 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
try { try {
String emailId = mailService.sendRiskEmail("You need to resubmit risk materials", emailsTos.isEmpty() ? "" : StringUtils.join(emailsTos, ","), String emailId = mailService.sendRiskEmail("You need to resubmit risk materials", emailsTos.isEmpty() ? "" : StringUtils.join(emailsTos, ","),
emailsCcs.isEmpty() ? "" : StringUtils.join(emailsCcs, ","), "",content, null,event.getIntValue("order_type")); emailsCcs.isEmpty() ? "" : StringUtils.join(emailsCcs, ","), "",content, null,event.getIntValue("order_type"));
event.put("email_status",2); event.put("email_status",RiskEmailStatusEnum.BACK_AND_SEND.getEmailStatus());
event.put("result_type",RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType()); event.put("result_type",RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType());
event.put("submit_url",uploadUrl); event.put("submit_url",uploadUrl);
riskEventMapper.update(event); riskEventMapper.update(event);
riskMaterialService.updateRiskMaterial(riskId, refuseDescription);
// 日志记录
riskProcessLogService.addRiskProcessLog(riskId,
event.getString("fillin_id"),
event.getString("fillin_person"),
RiskResultTypeEnum.MATERIAL_NOT_PASS.getRemark(),
RiskResultTypeEnum.WAIT_FOR_AUDIT.getResultType(),
RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType());
} catch (Exception e) { } catch (Exception e) {
throw new EmailException("Email Sending Failed", e); throw new EmailException("Email Sending Failed", e);
} }
@ -462,14 +561,13 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
expireDay = "3"; expireDay = "3";
} }
)*/ )*/
// 原来设定的过期时间是7天,现在改成半个月 // 原来设定的过期时间是7天
String expireDay = "180"; String expireDay = "3650";
stringRedisTemplate.boundValueOps(getRiskUploadKey(codeKey)).set(codeKeyValue, Long.parseLong(expireDay), TimeUnit.DAYS); stringRedisTemplate.boundValueOps(getRiskUploadKey(codeKey)).set(codeKeyValue, Long.parseLong(expireDay), TimeUnit.DAYS);
String uploadUrl = PlatformEnvironment.getEnv().concatUrl("/risk/upload/") + event.getString("risk_id") + "/" + codeKey; String uploadUrl = PlatformEnvironment.getEnv().concatUrl("/risk/upload/") + event.getString("risk_id") + "/" + codeKey;
int orderType = event.getIntValue("order_type"); int orderType = event.getIntValue("order_type");
if (orderType == 1 || orderType == 2) if (orderType == 1 || orderType == 2)
uploadUrl = PlatformEnvironment.getEnv().concatUrl("/manage.html#/analysis/monitoring/") + event.getString("risk_id") + "/bd/detail?codeKey=" + codeKey; uploadUrl = PlatformEnvironment.getEnv().concatUrl("/manage.html#/analysis/monitoring/") + event.getString("risk_id") + "/bd/detail?codeKey=" + codeKey;
//uploadUrl = "localhost:9009" + "/manage.html#/analysis/monitoring/" + event.getString("risk_id") + "/bd/detail";
List<JSONObject> bds = clientBDMapper.listClientBDInfoAvailable(client.getIntValue("client_id"), new Date()); List<JSONObject> bds = clientBDMapper.listClientBDInfoAvailable(client.getIntValue("client_id"), new Date());
List<String> bdNames = new ArrayList<>(); List<String> bdNames = new ArrayList<>();
List<String> bdEmails = new ArrayList<>(); List<String> bdEmails = new ArrayList<>();
@ -509,6 +607,19 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
} }
List<JSONObject> orders = new ArrayList(); List<JSONObject> orders = new ArrayList();
int isSendClient = event.getIntValue("is_send_client"); int isSendClient = event.getIntValue("is_send_client");
ctx.setVariable("emailsTos", bdEmails);
if (isSendClient == 1) {
ctx.setVariable("emailsTos", clientEmails);
ctx.setVariable("emailsCcs", bdEmails);
if (orderType == RiskOrderTypeEnum.ROYALPAY_ORDER.getOrderType().intValue()) {
ctx.setVariable("emailsBccs", Arrays.asList(
// "locky@royalpay.com.au ", "zoe.tao@royalpay.com.au", "leo.huang@royalpay.com.au",
// "mona.zhang@royalpay.com.au", "weixinfengkong@royalpay.com.au", "thomas.li@royalpay.com.au"
"18852852189@139.com", "1370256381@qq.com"
));
}
}
switch (event.getIntValue("order_type")){ switch (event.getIntValue("order_type")){
case 1: case 1:
case 2: case 2:
@ -521,7 +632,6 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
} }
ctx.setVariable("orders", orders); ctx.setVariable("orders", orders);
ctx.setVariable("title","Your merchants needs to submit risk materials"); ctx.setVariable("title","Your merchants needs to submit risk materials");
ctx.setVariable("emailsTos", bdEmails);
break; break;
case 3: case 3:
for(String orderId : realOrderIds){ for(String orderId : realOrderIds){
@ -548,12 +658,6 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
// ctx.setVariable("files",attachList); // ctx.setVariable("files",attachList);
case 4: case 4:
ctx.setVariable("title","RoyalPay风控调查 — " + client.getString("short_name")); ctx.setVariable("title","RoyalPay风控调查 — " + client.getString("short_name"));
ctx.setVariable("emailsTos", bdEmails);
if (isSendClient == 1) {
ctx.setVariable("emailsTos", clientEmails);
ctx.setVariable("emailsCcs", bdEmails);
}
break; break;
} }
return ctx; return ctx;
@ -861,11 +965,27 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
} }
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
result.put("material", materialItemList); result.put("material", materialItemList);
if (material != null && material.containsKey("description")) if (material != null && material.containsKey("description")) {
result.put("description", material.getString("description")); result.put("description", material.getString("description"));
}
if (material != null && material.containsKey("refuse_description")) {
result.put("refuse_description", material.getString("refuse_description"));
}
return result; return result;
} }
@Override
public JSONObject riskEventMaterialPass(JSONObject params, JSONObject manager) {
riskEventMapper.update(params);
riskProcessLogService.addRiskProcessLog(params.getString("risk_id"),
manager.getString("manager_id"),
manager.getString("display_name"),
RiskResultTypeEnum.MATERIAL_AUDIT_PASS.getRemark(),
params.getIntValue("result_type"),
RiskResultTypeEnum.MATERIAL_AUDIT_PASS.getResultType());
return params;
}
@Override @Override
public JSONObject updateIsSendClient(String riskId) { public JSONObject updateIsSendClient(String riskId) {
JSONObject event = riskEventMapper.findById(riskId); JSONObject event = riskEventMapper.findById(riskId);
@ -874,4 +994,23 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
event = riskEventMapper.findById(riskId); event = riskEventMapper.findById(riskId);
return event; return event;
} }
@Override
public void completeOrderAmount() {
List<JSONObject> riskEventList = getRiskEvents(null);
for(JSONObject riskEvent:riskEventList){
if(riskEvent.getIntValue("order_type")==4 || StringUtils.isBlank(riskEvent.getString("real_order_ids"))){
continue;
}
String[] order_ids=riskEvent.getString("real_order_ids").split(",");
for(String orderId : order_ids){
JSONObject transaction = transactionMapper.findByOrderId(orderId);
JSONObject riskOrder = new JSONObject();
riskOrder.put("risk_id",riskEvent.getString("risk_id"));
riskOrder.put("order_id",transaction.getString("order_id"));
riskOrder.put("clearing_amount",transaction.getString("clearing_amount"));
riskOrdersMapper.save(riskOrder);
}
}
}
} }

@ -0,0 +1,45 @@
package au.com.royalpay.payment.manage.riskbusiness.core.impl;
import au.com.royalpay.payment.manage.mappers.riskbusiness.RiskProcessLogMapper;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskProcessLogService;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* @Description:
* @Author: lujian
* @Date: 2018/11/22 15:46
*/
@Service
public class RiskProcessLogServiceImpl implements RiskProcessLogService {
@Resource
private RiskProcessLogMapper riskProcessLogMapper;
@Override
public PageList<JSONObject> getRiskProcessLogs(String riskId) {
return riskProcessLogMapper.getRiskProcessLogs(riskId, new PageBounds(Order.formString("create_time")));
}
@Override
public void addRiskProcessLog(JSONObject log) {
riskProcessLogMapper.addRiskProcessLog(log);
}
@Override
public void addRiskProcessLog(String riskId, String operatorId, String operator, String remark, int resultTypeFrom, int resultTypeTo) {
JSONObject log = new JSONObject();
log.put("risk_id", riskId);
log.put("operator_id", operatorId);
log.put("operator", operator);
log.put("remark", remark);
log.put("result_type_from", resultTypeFrom);
log.put("result_type_to", resultTypeTo);
riskProcessLogMapper.addRiskProcessLog(log);
}
}

@ -7,6 +7,7 @@ import au.com.royalpay.payment.manage.mappers.riskbusiness.RiskMaterialMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper; import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.notice.core.MailService; import au.com.royalpay.payment.manage.notice.core.MailService;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskBusinessService; 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.core.RiskUploadService;
import au.com.royalpay.payment.manage.riskbusiness.enums.RiskResultTypeEnum; import au.com.royalpay.payment.manage.riskbusiness.enums.RiskResultTypeEnum;
import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.BadRequestException;
@ -17,6 +18,7 @@ import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.lang3.time.DateUtils;
import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.thymeleaf.context.Context; import org.thymeleaf.context.Context;
import org.thymeleaf.spring4.SpringTemplateEngine; import org.thymeleaf.spring4.SpringTemplateEngine;
@ -34,15 +36,22 @@ public class RiskUploadServiceIpml implements RiskUploadService {
@Resource @Resource
private RiskEventMapper riskEventMapper; private RiskEventMapper riskEventMapper;
@Resource @Resource
private RiskProcessLogService riskProcessLogService;
@Resource
private StringRedisTemplate stringRedisTemplate; private StringRedisTemplate stringRedisTemplate;
private final String UPLOAD_MAIL_PREFIX = "UPLOAD_MAIL"; private final String UPLOAD_MAIL_PREFIX = "UPLOAD_MAIL";
@Override @Override
public void submitMaterial(JSONObject material) { public void submitMaterial(JSONObject material) {
JSONObject event = riskEventMapper.findById(material.getString("risk_id")); 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())) {
throw new BadRequestException("Committed Already");
}
material.put("update_time", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss")); material.put("update_time", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
riskMaterialMapper.save(material); riskMaterialMapper.save(material);
material.put("material_id",riskMaterialMapper.findAllMaterials(material.getString("risk_id")).get(0).getString("material_id")); material.put("material_id",riskMaterialMapper.findAllMaterials(riskId).get(0).getString("material_id"));
for(int i=1;i<=10;i++){ for(int i=1;i<=10;i++){
if(material.containsKey("file"+i+"_url")){ if(material.containsKey("file"+i+"_url")){
List<String> urls = (List<String>)material.get("file"+i+"_url"); List<String> urls = (List<String>)material.get("file"+i+"_url");
@ -67,16 +76,17 @@ public class RiskUploadServiceIpml implements RiskUploadService {
@Override @Override
public void checkUploadMailKey(String codeKey,String risk_id) { public void checkUploadMailKey(String codeKey,String risk_id) {
JSONObject event = riskEventMapper.findById(risk_id); JSONObject event = riskEventMapper.findById(risk_id);
//到期日前一天的下午6点前url可用 //到期日前一天的下午6点前url可用
try { // try {
String reply = DateFormatUtils.format(DateUtils.addDays(event.getDate("reply_email_date"),-1),"yyyy-MM-dd 18:00:00"); // String reply = DateFormatUtils.format(DateUtils.addDays(event.getDate("reply_email_date"),-1),"yyyy-MM-dd 18:00:00");
if(new Date().after( DateUtils.parseDate(reply,new String[]{"yyyy-MM-dd HH:mm:ss"}))){ // if(new Date().after( DateUtils.parseDate(reply,new String[]{"yyyy-MM-dd HH:mm:ss"}))){
deleteUploadMailKey(codeKey); // deleteUploadMailKey(codeKey);
throw new BadRequestException("Url expired"); // throw new BadRequestException("Url expired");
} // }
} catch (ParseException e) { // } catch (ParseException e) {
e.printStackTrace(); // e.printStackTrace();
} // }
if (StringUtils.isNotEmpty(codeKey)) { if (StringUtils.isNotEmpty(codeKey)) {
String redisUpload = stringRedisTemplate.boundValueOps(getRiskUploadKey(codeKey)).get(); String redisUpload = stringRedisTemplate.boundValueOps(getRiskUploadKey(codeKey)).get();

@ -15,6 +15,15 @@ public enum RiskResultTypeEnum {
private Integer resultType; private Integer resultType;
private static final String[] REMARK_ARR = {
"风控事件已创建",
"已发送邮件,资料完善中",
"资料已提交,等待审核",
"材料审核通过",
"材料打回",
"已处理"
};
RiskResultTypeEnum(Integer resultType) { RiskResultTypeEnum(Integer resultType) {
this.resultType = resultType; this.resultType = resultType;
} }
@ -26,4 +35,8 @@ public enum RiskResultTypeEnum {
public void setResultType(Integer resultType) { public void setResultType(Integer resultType) {
this.resultType = resultType; this.resultType = resultType;
} }
public String getRemark() {
return REMARK_ARR[resultType];
}
} }

@ -6,23 +6,17 @@ import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.riskbusiness.bean.RiskEventQuery; import au.com.royalpay.payment.manage.riskbusiness.bean.RiskEventQuery;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskBusinessService; import au.com.royalpay.payment.manage.riskbusiness.core.RiskBusinessService;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskMaterialService; import au.com.royalpay.payment.manage.riskbusiness.core.RiskMaterialService;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskProcessLogService;
import au.com.royalpay.payment.manage.riskbusiness.enums.RiskResultTypeEnum; import au.com.royalpay.payment.manage.riskbusiness.enums.RiskResultTypeEnum;
import au.com.royalpay.payment.tools.CommonConsts; import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole; import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.sun.org.apache.xerces.internal.impl.dv.xs.BooleanDV;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@ -43,18 +37,34 @@ public class RiskBusinessController {
@Autowired @Autowired
private ClientManager clientManager; private ClientManager clientManager;
@Autowired
private RiskProcessLogService riskProcessLogService;
@GetMapping(value = "events") @GetMapping(value = "events")
public JSONObject getRiskEvents(RiskEventQuery riskEventQuery, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public JSONObject getRiskEvents(RiskEventQuery riskEventQuery, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = riskEventQuery.toJSON(); JSONObject params = riskEventQuery.toJSON();
return riskBusinessService.getRiskEventsByPage(params, manager); return riskBusinessService.getRiskEventsByPage(params, manager);
} }
@GetMapping(value = "events/analysis/industry")
public List<JSONObject> analysisByIndustry(RiskEventQuery riskEventQuery, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = riskEventQuery.toJSON();
return riskBusinessService.analysisByIndustry(params, manager);
}
@GetMapping(value = "events/analysis/amount")
public List<JSONObject> analysisByAmount(RiskEventQuery riskEventQuery, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = riskEventQuery.toJSON();
return riskBusinessService.analysisByAmount(params, manager);
}
@GetMapping(value = "events/{risk_id}") @GetMapping(value = "events/{risk_id}")
public JSONObject getRiskEventDetail(@PathVariable("risk_id") String riskId, public JSONObject getRiskEventDetail(@PathVariable("risk_id") String riskId,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject riskEvent = riskBusinessService.getRiskEventDetail(riskId); JSONObject riskEvent = riskBusinessService.getRiskEventDetail(riskId);
List<JSONObject> tradeLogs = riskBusinessService.getRiskEventOrderList(riskEvent); List<JSONObject> tradeLogs = riskBusinessService.getRiskEventOrderList(riskEvent);
riskEvent.put("tradeLogs", tradeLogs); riskEvent.put("tradeLogs", tradeLogs);
riskEvent.put("process_logs", riskProcessLogService.getRiskProcessLogs(riskId));
return riskEvent; return riskEvent;
} }
@ -71,6 +81,12 @@ public class RiskBusinessController {
riskBusinessService.updateRiskEvent(params); riskBusinessService.updateRiskEvent(params);
} }
@PutMapping(value = "events/pass")
public void riskEventMaterialPass(@RequestBody JSONObject params,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
riskBusinessService.riskEventMaterialPass(params, manager);
}
@GetMapping(value = "/{risk_id}/download/materialsAsZIP") @GetMapping(value = "/{risk_id}/download/materialsAsZIP")
public void downloadComplianceZip(@PathVariable("risk_id") String riskId, HttpServletResponse response) throws Exception { public void downloadComplianceZip(@PathVariable("risk_id") String riskId, HttpServletResponse response) throws Exception {
riskBusinessService.downloadAuditMaterialZiP(riskId, response); riskBusinessService.downloadAuditMaterialZiP(riskId, response);
@ -83,9 +99,8 @@ public class RiskBusinessController {
} }
@RequestMapping(value = "/{risk_id}/refuse",method = RequestMethod.PUT) @RequestMapping(value = "/{risk_id}/refuse",method = RequestMethod.PUT)
public void refuseEmail(@PathVariable String risk_id, @RequestBody JSONObject otherParams) throws IOException { public void refuseEmail(@PathVariable("risk_id") String riskId, @RequestBody JSONObject otherParams) throws IOException {
riskMaterialService.updateRiskMaterial(risk_id, otherParams.getString("refuse_description")); riskBusinessService.sendRefuseEmail(riskId, otherParams.getString("refuse_description"));
riskBusinessService.sendRefuseEmail(risk_id);
} }
@GetMapping(value = "/{risk_id}/material") @GetMapping(value = "/{risk_id}/material")
@ -129,8 +144,8 @@ public class RiskBusinessController {
params.put("result_type", RiskResultTypeEnum.ALREADY_HANDLED.getResultType()); params.put("result_type", RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
} }
riskBusinessService.updateRiskEvent(params); riskBusinessService.updateRiskEvent(params);
} }
@RequestMapping(value = "/{risk_id}/urge",method = RequestMethod.PUT) @RequestMapping(value = "/{risk_id}/urge",method = RequestMethod.PUT)
public void urgeEmail(@PathVariable String risk_id) throws IOException { public void urgeEmail(@PathVariable String risk_id) throws IOException {
riskBusinessService.sendUrgeEmail(risk_id); riskBusinessService.sendUrgeEmail(risk_id);
@ -157,5 +172,11 @@ public class RiskBusinessController {
public JSONObject updateRiskEventIsSendClient(@RequestParam("risk_id") String riskId) { public JSONObject updateRiskEventIsSendClient(@RequestParam("risk_id") String riskId) {
return riskBusinessService.updateIsSendClient(riskId); return riskBusinessService.updateIsSendClient(riskId);
} }
@GetMapping(value = "/complete/event/order_amount")
public String completeOrderAmount() {
riskBusinessService.completeOrderAmount();
return "SUCCESS";
}
} }

@ -1,7 +1,10 @@
package au.com.royalpay.payment.manage.riskbusiness.web; package au.com.royalpay.payment.manage.riskbusiness.web;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskBusinessService; 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.core.RiskUploadService;
import au.com.royalpay.payment.manage.riskbusiness.enums.RiskResultTypeEnum;
import au.com.royalpay.payment.tools.CommonConsts;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
@ -15,6 +18,8 @@ public class RiskFileUploadController {
private RiskUploadService riskUploadService; private RiskUploadService riskUploadService;
@Resource @Resource
private RiskBusinessService riskBusinessService; private RiskBusinessService riskBusinessService;
@Resource
private RiskProcessLogService riskProcessLogService;
/** /**
* *
@ -41,9 +46,17 @@ public class RiskFileUploadController {
* @param material * @param material
*/ */
@RequestMapping(value = "/{codeKey}", method = RequestMethod.POST) @RequestMapping(value = "/{codeKey}", method = RequestMethod.POST)
public void upload(@PathVariable String codeKey, @RequestBody JSONObject material) { public void upload(@PathVariable String codeKey,
@RequestBody JSONObject material,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
// riskUploadService.checkUploadMailKey(codeKey, material.getString("risk_id")); // riskUploadService.checkUploadMailKey(codeKey, material.getString("risk_id"));
riskUploadService.submitMaterial(material); riskUploadService.submitMaterial(material);
riskProcessLogService.addRiskProcessLog(material.getString("risk_id"),
manager.getString("manager_id"),
manager.getString("display_name"),
RiskResultTypeEnum.WAIT_FOR_AUDIT.getRemark(),
RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType(),
RiskResultTypeEnum.WAIT_FOR_AUDIT.getResultType());
riskUploadService.deleteUploadMailKey(codeKey); riskUploadService.deleteUploadMailKey(codeKey);
} }

@ -0,0 +1,33 @@
package au.com.royalpay.payment.manage.riskbusiness.web;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskProcessLogService;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.JsonObject;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.xml.bind.util.JAXBSource;
import java.util.List;
/**
* @Description:
* @Author: lujian
* @Date: 2018/11/22 15:52
*/
@RestController
@RequestMapping(value = "/risk/business/process/logs")
public class RiskProcessLogController {
@Resource
private RiskProcessLogService riskProcessLogService;
@GetMapping(value = "/{risk_id}")
public List<JSONObject> getRiskProcessLogs(@PathVariable("risk_id") String riskId) {
return riskProcessLogService.getRiskProcessLogs(riskId);
}
@PostMapping
public void addRiskProcessLog(@RequestBody JSONObject log) {
riskProcessLogService.addRiskProcessLog(log);
}
}

@ -33,26 +33,11 @@
LEFT JOIN sys_clients sc LEFT JOIN sys_clients sc
ON re.client_moniker = sc.client_moniker ON re.client_moniker = sc.client_moniker
<if test="start_amount != null || end_amount != null"> <if test="start_amount != null || end_amount != null">
RIGHT JOIN( RIGHT JOIN
SELECT distinct re.risk_id (SELECT DISTINCT(risk_id) FROM risk_orders
FROM WHERE #{start_amount} &lt;= clearing_amount AND #{end_amount} &gt; clearing_amount) ro
risk_event re, ON re.risk_id = ro.risk_id
risk_event_help reh
<where>
reh.risk_event_help_id &lt; (LENGTH(re.order_amounts) - LENGTH(REPLACE(re.order_amounts, ',' , ''))) + 1
<if test="start_amount != null">
AND cast(SUBSTRING_INDEX(SUBSTRING_INDEX(order_amounts,',',reh.risk_event_help_id + 1),',',-1) as signed) &gt;= #{start_amount}
</if>
<if test="end_amount != null">
AND cast(SUBSTRING_INDEX(SUBSTRING_INDEX(order_amounts,',',reh.risk_event_help_id + 1),',',-1) as signed) &lt;= #{end_amount}
</if>
</where>
) temp
on re.risk_id = temp.risk_id
</if> </if>
<if test="bd_id != null"> <if test="bd_id != null">
INNER JOIN( INNER JOIN(
SELECT DISTINCT client_id SELECT DISTINCT client_id
@ -110,17 +95,235 @@
AND sc.industry = #{industry} AND sc.industry = #{industry}
</if> </if>
<if test="receive_email_date != null"> <if test="receive_email_date_begin != null">
AND re.receive_email_date = #{receive_email_date} AND re.receive_email_date &gt;= #{receive_email_date_begin}
</if>
<if test="receive_email_date_end != null">
AND re.receive_email_date &lt;= #{receive_email_date_end}
</if>
<if test="reply_email_date_begin != null">
AND re.reply_email_date &gt;= #{reply_email_date_begin}
</if>
<if test="reply_email_date_end != null">
AND re.reply_email_date &lt;= #{reply_email_date_begin}
</if>
<if test="real_order_ids != null">
AND re.real_order_ids = #{real_order_ids}
</if>
</where>
</select>
<select id="analysisByIndustry" resultType="com.alibaba.fastjson.JSONObject">
SELECT
count(*) amount,
CASE sc.industry
WHEN 327
THEN '鞋包服饰'
WHEN 339
THEN '机票行业'
WHEN 356
THEN '软件服务'
WHEN 357
THEN '旅游票务'
WHEN 358
THEN '国际租车'
WHEN 359
THEN '医疗服务(出国)'
WHEN 360
THEN '医疗服务(不出国)'
WHEN 361
THEN '留学教育(网络教育)'
WHEN 362
THEN '留学教育(一年及以下)'
WHEN 338
THEN '其它货物贸易行业'
WHEN 337
THEN '文具/办公用品'
WHEN 336
THEN '综合商城'
WHEN 328
THEN '酒店行业'
WHEN 329
THEN '教育行业'
WHEN 330
THEN '国际物流'
WHEN 332
THEN '数码电器'
WHEN 333
THEN '母婴'
WHEN 334
THEN '化妆品'
WHEN 335
THEN '食品'
WHEN 363
THEN '留学教育(一年以上)'
WHEN 331
THEN '其它服务行业'
WHEN null
THEN '未知行业'
END AS `industry`
FROM risk_event re
LEFT JOIN sys_clients sc
ON re.client_moniker = sc.client_moniker
<if test="start_amount != null || end_amount != null">
RIGHT JOIN
(SELECT DISTINCT(risk_id) FROM risk_orders
WHERE #{start_amount} &lt;= clearing_amount AND #{end_amount} &gt; clearing_amount) ro
ON re.risk_id = ro.risk_id
</if>
<where>
<if test="risk_id != null">
AND re.risk_id = #{risk_id}
</if>
<if test="client_moniker != null">
AND re.client_moniker = #{client_moniker}
</if>
<if test="is_send_client != null">
AND re.is_send_client = #{is_send_client}
</if>
<if test="order_types != null">
<foreach collection="order_types" item="order_type_item" open="and re.order_type in (" close=")" separator=",">
#{order_type_item}
</foreach>
</if>
<if test="order_type != null">
AND re.order_type = #{order_type}
</if>
<if test="result_types != null">
<foreach collection="result_types" item="result_type_item" open="AND re.result_type IN (" close=")" separator=",">
#{result_type_item}
</foreach>
</if>
<if test="result_type != null">
AND re.result_type = #{result_type}
</if>
<if test="order_ids != null">
AND re.order_ids LIKE CONCAT('%', #{order_ids}, '%')
</if>
<if test="sub_merchant_id != null">
AND sc.sub_merchant_id = #{sub_merchant_id}
</if>
<if test="industry != null">
AND sc.industry = #{industry}
</if>
<if test="receive_email_date_begin != null">
AND re.receive_email_date &gt;= #{receive_email_date_begin}
</if>
<if test="receive_email_date_end != null">
AND re.receive_email_date &lt;= #{receive_email_date_end}
</if>
<if test="reply_email_date_begin != null">
AND re.reply_email_date &gt;= #{reply_email_date_begin}
</if>
<if test="reply_email_date_end != null">
AND re.reply_email_date &lt;= #{reply_email_date_begin}
</if>
<if test="real_order_ids != null">
AND re.real_order_ids = #{real_order_ids}
</if>
</where>
GROUP BY sc.industry
</select>
<select id="analysisByAmount" resultType="com.alibaba.fastjson.JSONObject">
SELECT
ELT(INTERVAL(ro.clearing_amount,0, 500, 1000, 1500,2000,2500,3000,3500,4000,4500,5000,5500,6000,6500,7000,7500,8000,8500,9000,999999),
'0-500','500-1000','1000-1500','1500-2000','2000-2500','2500-3000','3000-3500','3500-4000','4000-4500','4500-5000','5000-5500','5500-6000',
'6000-6500','6500-7000','7000-7500','7500-8000','8000-8500','8500-9000','>9000') intervals,COUNT(ro.order_id) amount
FROM risk_event re
LEFT JOIN sys_clients sc
ON re.client_moniker = sc.client_moniker
RIGHT JOIN
(SELECT * FROM risk_orders
<if test="start_amount != null || end_amount != null">
WHERE #{start_amount} &lt;= clearing_amount AND #{end_amount} &gt; clearing_amount
</if>
) ro
ON re.risk_id = ro.risk_id
<where>
<if test="risk_id != null">
AND re.risk_id = #{risk_id}
</if>
<if test="client_moniker != null">
AND re.client_moniker = #{client_moniker}
</if>
<if test="is_send_client != null">
AND re.is_send_client = #{is_send_client}
</if>
<if test="order_types != null">
<foreach collection="order_types" item="order_type_item" open="and re.order_type in (" close=")" separator=",">
#{order_type_item}
</foreach>
</if>
<if test="order_type != null">
AND re.order_type = #{order_type}
</if>
<if test="result_types != null">
<foreach collection="result_types" item="result_type_item" open="AND re.result_type IN (" close=")" separator=",">
#{result_type_item}
</foreach>
</if>
<if test="result_type != null">
AND re.result_type = #{result_type}
</if>
<if test="order_ids != null">
AND re.order_ids LIKE CONCAT('%', #{order_ids}, '%')
</if>
<if test="sub_merchant_id != null">
AND sc.sub_merchant_id = #{sub_merchant_id}
</if>
<if test="industry != null">
AND sc.industry = #{industry}
</if>
<if test="receive_email_date_begin != null">
AND re.receive_email_date &gt;= #{receive_email_date_begin}
</if>
<if test="receive_email_date_end != null">
AND re.receive_email_date &lt;= #{receive_email_date_end}
</if>
<if test="reply_email_date_begin != null">
AND re.reply_email_date &gt;= #{reply_email_date_begin}
</if> </if>
<if test="reply_email_date != null"> <if test="reply_email_date_end != null">
AND re.reply_email_date = #{reply_email_date} AND re.reply_email_date &lt;= #{reply_email_date_begin}
</if> </if>
<if test="real_order_ids != null"> <if test="real_order_ids != null">
AND re.real_order_ids = #{real_order_ids} AND re.real_order_ids = #{real_order_ids}
</if> </if>
</where> </where>
GROUP BY ELT(INTERVAL(ro.clearing_amount,0, 500, 1000, 1500,2000,2500,3000,3500,4000,4500,5000,5500,6000,6500,7000,7500,8000,8500,9000,999999),
'0-500','500-1000','1000-1500','1500-2000','2000-2500','2500-3000','3000-3500','3500-4000','4000-4500','4500-5000','5000-5500','5500-6000',
'6000-6500','6500-7000','7000-7500','7500-8000','8000-8500','8500-9000','>9000')
ORDER BY intervals
</select> </select>
</mapper> </mapper>

@ -128,8 +128,8 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
}]); }]);
app.controller('riskBusinessCtrl', ['$scope', '$state', '$http', '$uibModal', '$filter', 'commonDialog', 'industryMap', app.controller('riskBusinessCtrl', ['$scope', '$state', '$http', '$uibModal', '$filter', 'commonDialog', 'industryMap','chartParser',
function ($scope, $state, $http, $uibModal, $filter, commonDialog, industryMap) { function ($scope, $state, $http, $uibModal, $filter, commonDialog, industryMap, chartParser) {
$scope.orderTypes = orderTypesMap; $scope.orderTypes = orderTypesMap;
$scope.orderTypesForBD = orderTypesMapForBD; $scope.orderTypesForBD = orderTypesMapForBD;
$scope.resultTypes = resultTypesMap; $scope.resultTypes = resultTypesMap;
@ -139,13 +139,20 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.amountSection = amountSectionMap; $scope.amountSection = amountSectionMap;
$scope.pagination = {}; $scope.pagination = {};
$scope.params = {}; $scope.params = {};
var industries = new Array();
angular.forEach($scope.industries, function (industry) {
industries.push(industry.label);
});
industries.push('未知行业');
console.log(industries);
// 加载风险注册事件 // 加载风险注册事件
$scope.loadRiskEvents = function (page) { $scope.loadRiskEvents = function (page) {
var params = angular.copy($scope.params); var params = angular.copy($scope.params);
params.page = page || $scope.pagination.page || 1; params.page = page || $scope.pagination.page || 1;
params.replyEmailDate = $filter('date')(params.replyEmailDate, 'yyyy-MM-dd'); params.replyEmailDateBegin = $filter('date')(params.replyEmailDateBegin, 'yyyy-MM-dd');
params.receiveEmailDate = $filter('date')(params.receiveEmailDate, 'yyyy-MM-dd'); params.replyEmailDateEnd = $filter('date')(params.replyEmailDateEnd, 'yyyy-MM-dd');
params.receiveEmailDateBegin = $filter('date')(params.receiveEmailDateBegin, 'yyyy-MM-dd');
params.receiveEmailDateEnd = $filter('date')(params.receiveEmailDateEnd, 'yyyy-MM-dd');
if (params.section != null) { if (params.section != null) {
var sectionArray = params.section.split('-'); var sectionArray = params.section.split('-');
params.startAmount = sectionArray[0]; params.startAmount = sectionArray[0];
@ -155,6 +162,102 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.riskEvents = resp.data.data; $scope.riskEvents = resp.data.data;
$scope.pagination = resp.data.pagination; $scope.pagination = resp.data.pagination;
}); });
$http.get('/risk/business/events/analysis/industry', {params: params}).then(function (resp) {
$scope.riskEventsByIndustry = resp.data;
$scope.risk_industry_chart = chartParser.parse(industryAmount(industries),$scope.riskEventsByIndustry);
});
$http.get('/risk/business/events/analysis/amount', {params: params}).then(function (resp) {
$scope.riskEventsByAmount = resp.data;
$scope.risk_amount_chart = chartParser.parse(intervalsAmount(),$scope.riskEventsByAmount);
});
};
var industryAmount = function (industries) {
return {
chart: {
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b} : {c}"
},
// color: colors,
legend: {
orient: 'vertical',
left: 'right',
data: industries
}
},
series: [{
basic: {
name: '风控事件单量', type: 'pie',
radius: '80%',
center: ['50%', '58%'],
label:{ //饼图图形上的文本标签
normal:{
show:true,
position:'outer', //标签的位置
textStyle : {
fontWeight : 300 ,
fontSize : 16 //文字的字体大小
},
formatter:'{d}%'
}
},
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
},
column: {key: 'amount', name: 'industry'}
}]
}
};
var intervalsAmount = function () {
return {
chart: {
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b} : {c}"
},
// color: colors,
legend: {
orient: 'vertical',
left: 'right',
data: [ '0-500','500-1000','1000-1500','1500-2000','2000-2500','2500-3000','3000-3500','3500-4000','4000-4500','4500-5000','5000-5500','5500-6000',
'6000-6500','6500-7000','7000-7500','7500-8000','8000-8500','8500-9000','>9000']
}
},
series: [{
basic: {
name: '风控事件单量', type: 'pie',
radius: '80%',
center: ['50%', '58%'],
label:{ //饼图图形上的文本标签
normal:{
show:true,
position:'outer', //标签的位置
textStyle : {
fontWeight : 300 ,
fontSize : 16 //文字的字体大小
},
formatter:'{d}%'
}
},
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
},
column: {key: 'amount', name: 'intervals'}
}]
}
}; };
$scope.loadRiskEvents(1); $scope.loadRiskEvents(1);
@ -170,6 +273,11 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
if (riskEvent.data.is_send_client == 1) if (riskEvent.data.is_send_client == 1)
riskEvent.data.is_send_client = true; riskEvent.data.is_send_client = true;
$scope.riskEvent = riskEvent.data; $scope.riskEvent = riskEvent.data;
$http.get('/risk/business/process/logs/' + $scope.riskEvent.risk_id).then(function (resp) {
$scope.riskEvent.process_logs = resp.data;
});
// 编辑表格的数据保存对象,重新从源数据复制,从而取消保存操作时不会更新视图 // 编辑表格的数据保存对象,重新从源数据复制,从而取消保存操作时不会更新视图
$scope.riskEventEdit = angular.copy(riskEvent.data); $scope.riskEventEdit = angular.copy(riskEvent.data);
//var index = $scope.riskEvent.order_ids.lastIndexOf(","); //var index = $scope.riskEvent.order_ids.lastIndexOf(",");
@ -331,128 +439,11 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
// 以下为BD上传材料相关 // 以下为BD上传材料相关
$scope.material={}; $scope.material={};
$scope.material.update_time=$filter('date')(new Date(), 'yyyy-MM-dd HH:mm:ss'); $scope.uploadFile = function(files, index) {
$scope.material.risk_id = $scope.riskEvent.risk_id;
$scope.uploadFile1 = function (files) {
if (files && files.length) {
var urls = new Array();
var value = 0;
$scope.file1Progress = {value: 0};
for (var i = 0; i < files.length; i++) {
var file = files[i];
Upload.upload({
url: '/attachment/riskFiles',
data: {file: file}
}).then(function (resp) {
urls.push(resp.data.url);
}, function (resp) {
delete $scope.file1Progress;
alert('Upload Failed');
}, function (evt) {
value += parseInt(100 * evt.loaded / evt.total );
$scope.file1Progress.value = value/(files.length*2);
})
}
$scope.material.file1_url = urls;
}
};
$scope.uploadFile2 = function (files) {
if (files && files.length) {
var urls = new Array();
var value = 0;
$scope.file2Progress = {value: 0};
for (var i = 0; i < files.length; i++) {
var file = files[i];
Upload.upload({
url: '/attachment/riskFiles',
data: {file: file}
}).then(function (resp) {
urls.push(resp.data.url);
}, function (resp) {
delete $scope.file2Progress;
alert('Upload Failed');
}, function (evt) {
value += parseInt(100 * evt.loaded / evt.total );
$scope.file2Progress.value = value/(files.length*2);
})
}
$scope.material.file2_url = urls;
}
};
$scope.uploadFile3 = function (files) {
if (files && files.length) {
var urls = new Array();
var value = 0;
$scope.file3Progress = {value: 0};
for (var i = 0; i < files.length; i++) {
var file = files[i];
Upload.upload({
url: '/attachment/riskFiles',
data: {file: file}
}).then(function (resp) {
urls.push(resp.data.url);
}, function (resp) {
delete $scope.file3Progress;
alert('Upload Failed');
}, function (evt) {
value += parseInt(100 * evt.loaded / evt.total );
$scope.file3Progress.value = value/(files.length*2);
})
}
$scope.material.file3_url = urls;
}
};
$scope.uploadFile4 = function (files) {
if (files && files.length) {
var urls = new Array();
var value = 0;
$scope.file4Progress = {value: 0};
for (var i = 0; i < files.length; i++) {
var file = files[i];
Upload.upload({
url: '/attachment/riskFiles',
data: {file: file}
}).then(function (resp) {
urls.push(resp.data.url);
}, function (resp) {
delete $scope.file4Progress;
alert('Upload Failed');
}, function (evt) {
value += parseInt(100 * evt.loaded / evt.total );
$scope.file4Progress.value = value/(files.length*2);
})
}
$scope.material.file4_url = urls;
}
};
$scope.uploadFile5 = function (files) {
if (files && files.length) {
var urls = new Array();
var value = 0;
$scope.file5Progress = {value: 0};
for (var i = 0; i < files.length; i++) {
var file = files[i];
Upload.upload({
url: '/attachment/riskFiles',
data: {file: file}
}).then(function (resp) {
urls.push(resp.data.url);
}, function (resp) {
delete $scope.file5Progress;
alert('Upload Failed');
}, function (evt) {
value += parseInt(100 * evt.loaded / evt.total );
$scope.file5Progress.value = value/(files.length*2);
})
}
$scope.material.file5_url = urls;
}
};
$scope.uploadFile6 = function (files) {
if (files && files.length) { if (files && files.length) {
var urls = new Array(); var urls = new Array();
var value = 0; var value = 0;
$scope.file6Progress = {value: 0}; $scope.allMaterialInfo.material[index].fileProgressValue = 0;
for (var i = 0; i < files.length; i++) { for (var i = 0; i < files.length; i++) {
var file = files[i]; var file = files[i];
Upload.upload({ Upload.upload({
@ -461,18 +452,26 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
}).then(function (resp) { }).then(function (resp) {
urls.push(resp.data.url); urls.push(resp.data.url);
}, function (resp) { }, function (resp) {
delete $scope.file6Progress; delete $scope.allMaterialInfo.material[index].fileProgressValue;
alert('Upload Failed'); alert('Upload Failed');
}, function (evt) { }, function (evt) {
value += parseInt(100 * evt.loaded / evt.total ); value += parseInt(100 * evt.loaded / evt.total );
$scope.file6Progress.value = value/(files.length*2); $scope.allMaterialInfo.material[index].fileProgressValue = value/(files.length*2);
}) })
} }
$scope.material.file6_url = urls; $scope.allMaterialInfo.material[index].uploadFile = urls;
} }
}; };
$scope.submit = function (form) { $scope.submit = function (form) {
var codeKey = $scope.riskEvent.submit_url.substring($scope.riskEvent.submit_url.lastIndexOf('=') + 1) || $scope.riskEvent.submit_url.substring($scope.riskEvent.submit_url.lastIndexOf('/') + 1); var codeKey = $scope.riskEvent.submit_url.substring($scope.riskEvent.submit_url.lastIndexOf('=') + 1) || $scope.riskEvent.submit_url.substring($scope.riskEvent.submit_url.lastIndexOf('/') + 1);
$scope.material.update_time=$filter('date')(new Date(), 'yyyy-MM-dd HH:mm:ss');
$scope.material.risk_id = $scope.riskEvent.risk_id;
for (var i = 0; i < $scope.allMaterialInfo.material.length; i++) {
var key = 'file' + (i + 1) + "_url";
$scope.material[key] = $scope.allMaterialInfo.material[i].uploadFile;
}
$scope.material.description = $scope.allMaterialInfo.description;
$http.post('/risk/upload/' + codeKey, $scope.material).then(function (resp) { $http.post('/risk/upload/' + codeKey, $scope.material).then(function (resp) {
commonDialog.alert({ commonDialog.alert({
title: 'Success', title: 'Success',
@ -491,15 +490,22 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
// 加载提交材料 // 加载提交材料
$scope.loadRiskMaterial = function() { $scope.loadRiskMaterial = function() {
$http.get('/risk/business/' + $scope.riskEvent.risk_id + '/material').then(function(resp) { // $http.get('/risk/business/' + $scope.riskEvent.risk_id + '/material').then(function(resp) {
$scope.material = resp.data; // $scope.material = resp.data;
}) // });
$http.get('/risk/business/' + $scope.riskEvent.risk_id + '/all_material_info').then(function(resp) {
$scope.allMaterialInfo = resp.data;
if ($scope.uploadShowFlag) {
$scope.allMaterialInfo.description = '';
}
});
}; };
// BD是否可上传 // 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 == 4) ? true : false;
if (!$scope.uploadShowFlag) //if (!$scope.uploadShowFlag)
$scope.loadRiskMaterial(); $scope.loadRiskMaterial();
} }
]); ]);
@ -514,29 +520,33 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
// 加载提交材料 // 加载提交材料
// $scope.fileObject = {}; // $scope.fileObject = {};
$scope.loadRiskMaterial = function() { $scope.loadRiskMaterial = function() {
$http.get('/risk/business/' + $scope.riskEvent.risk_id + '/material').then(function(resp) { // $http.get('/risk/business/' + $scope.riskEvent.risk_id + '/material').then(function(resp) {
// $scope.riskMaterial = resp.data;
// $scope.file1 = resp.data.file1;
// $scope.file2 = resp.data.file2;
// $scope.file3 = resp.data.file3;
// $scope.file4 = resp.data.file4;
// $scope.file5 = resp.data.file5;
// $scope.file6 = resp.data.file6;
//
// // for (var i = 1; i <= 10; i++) {
// // var key = "file" + i;
// // if (riskMaterial[key + '_url'] != null)
// // $scope.fileObject[key] = riskMaterial[key + '_url'];
// // }
// // $scope.fileLength = Object.keys($scope.fileObject).length;
// })
$http.get('/risk/business/' + $scope.riskEvent.risk_id + '/all_material_info').then(function(resp) {
$scope.riskMaterial = resp.data; $scope.riskMaterial = resp.data;
$scope.file1 = resp.data.file1; });
$scope.file2 = resp.data.file2;
$scope.file3 = resp.data.file3;
$scope.file4 = resp.data.file4;
$scope.file5 = resp.data.file5;
$scope.file6 = resp.data.file6;
// for (var i = 1; i <= 10; i++) {
// var key = "file" + i;
// if (riskMaterial[key + '_url'] != null)
// $scope.fileObject[key] = riskMaterial[key + '_url'];
// }
// $scope.fileLength = Object.keys($scope.fileObject).length;
})
}; };
$scope.loadRiskMaterial(); $scope.loadRiskMaterial();
// 材料审核 // 材料审核
$scope.auditMaterial = function(auditType) { $scope.auditMaterial = function(auditType) {
var url = '/risk/business/events'; var url = '/risk/business/events/pass';
var warningMessageHTML = '是否确定<span style="color: green; font-weight: bolder; font-size: 20px;">通过</span>该材料?'; var warningMessageHTML = '是否确定<span style="color: green; font-weight: bolder; font-size: 20px;">通过</span>该材料?';
if (auditType == 3) { if (auditType == 3) {
commonDialog.confirm({ commonDialog.confirm({
@ -606,13 +616,19 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
} }
}; };
var array=new Array(); var array=new Array();
var validIndex = 0;
$scope.combineMaterials = function() { $scope.combineMaterials = function() {
for (var i = 0; i < $scope.materials.length; i++) { for (var i = 0; i < $scope.materials.length; i++) {
var value = $scope.materials[i].value;
if (value == '')
continue;
var cr = {}; var cr = {};
cr['question'+(i+1)] = $scope.materials[i].value; cr['question' + (validIndex + 1)] = $scope.materials[i].value;
array[i] = cr; array[validIndex] = cr;
validIndex++;
} }
console.log(JSON.stringify(array)); if (array.length == 0)
return null;
return JSON.stringify(array); return JSON.stringify(array);
}; };
@ -646,7 +662,13 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.riskEvent.is_send_client = $scope.is_send_client; $scope.riskEvent.is_send_client = $scope.is_send_client;
var saveRiskBtn = document.getElementById('save-risk-btn');
var saveRiskBtnInnerHtmlBak = saveRiskBtn.innerHTML;
saveRiskBtn.disabled = true;
saveRiskBtn.innerHTML = "<i class='fa fa-spinner fa-spin '></i> Processing";
$http.post('/risk/business/events', $scope.riskEvent).then(function (resp) { $http.post('/risk/business/events', $scope.riskEvent).then(function (resp) {
saveRiskBtn.innerHTML = saveRiskBtnInnerHtmlBak;
saveRiskBtn.disabled = false;
commonDialog.alert({ commonDialog.alert({
title: 'Success', title: 'Success',
content: 'Register new riskEvent successfully', content: 'Register new riskEvent successfully',
@ -654,6 +676,8 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
}); });
$state.go('^',{}, {reload: true}); $state.go('^',{}, {reload: true});
}, function (resp) { }, function (resp) {
saveRiskBtn.innerHTML = saveRiskBtnInnerHtmlBak;
saveRiskBtn.disabled = false;
commonDialog.alert({ commonDialog.alert({
title: 'Error', title: 'Error',
content: resp.data.message, content: resp.data.message,

@ -42,126 +42,20 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group">
<div class="col-sm-12 text-left">
<p ng-if="riskEvent.order_type==1">1、物流公司发货单据照片
要求:每笔交易对应的物流单必须提供,且单据必须清晰可见<br>
Photos of logistics companies goods-delivery documents
Requirement: The logistics order record corresponding to each transaction must be provided, and details of records should be clearly visible.
</p>
<p ng-if="riskEvent.order_type==3">1.请解释相应的消费场景/业务模式,例如网站商城,扫码支付, 消费者到店支付等;<br>
Please explain the relative payment scenario/business activities, for example, online store, QR code payment, payment at the store, etc;
</p>
</div>
<div class="col-sm-12">
&nbsp;&nbsp;<br>
<div class="col-xs-12">
<a class="col-xs-3 logo-width" ng-repeat="url in file1" target="_blank" ng-href="{{url}}">
<img class="col-xs-12" ng-src="{{url}}">
</a>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12 text-left">
<p ng-if="riskEvent.order_type==1">2、用户购买虚拟物品需要提供聊天记录、订单信息、发货凭证截图、虚拟物品最终消费场景例如何种游戏、软件、提供消费场景网址/下载链接
要求:每笔交易对应的截图必须清晰可见<br>
Users need to provide chat records, order information, screenshots of delivery documents, final consumption scenarios of virtual goods (such as games, software); provide consumer scene URL / download link.
Requirement: The screenshot corresponding to each transaction must be clearly visible.
</p>
<p ng-if="riskEvent.order_type==3">2.提供相应购物清单,订单小票(请提供与被查交易订单号相匹配的交易时间及金额的发票);<br>
Provide related shopping lists, invoices. (Please provide the invoices, amount of which matches that of the abnormal transaction);
</p>
</div>
<div class="col-sm-12">
&nbsp;&nbsp;<br>
<div class="col-xs-12">
<a class="col-xs-3 logo-width" ng-repeat="url in file2" target="_blank" ng-href="{{url}}">
<img class="col-xs-12" ng-src="{{url}}">
</a>
</div>
</div>
</div> <div class="form-group" ng-repeat="item in riskMaterial.material">
<div class="form-group">
<div class="col-sm-12 text-left"> <div class="col-sm-12 text-left">
<p ng-if="riskEvent.order_type==1">3、购物小票/发票存根照片 <p ng-bind="item.question"></p>
照片应清晰,必须显示商户名称、商户地址、购物时间、物品名称
购物金额等<br>
Photos of shopping receipts/ invoice stubs
Requirement: The photos should be clear and must show Merchant name, Business address, Transaction time, Product information, Quantity purchased, etc.
</p>
<p ng-if="riskEvent.order_type==3">3.提供相应的发货证明,报关单(若有消费者在国内购买,请提供物流单据或报关单);<br>
Relative proof of delivery, customs declaration (If the consumer purchased from China, please provide shipping receipt or customs declaration);
</p>
</div> </div>
<div class="col-sm-12"> <div class="col-sm-12">
&nbsp;&nbsp;<br> &nbsp;&nbsp;<br>
<div class="col-xs-12"> <div class="col-xs-12">
<a class="col-xs-3 logo-width" ng-repeat="url in file3" target="_blank" ng-href="{{url}}"> <a class="col-xs-3 logo-width" ng-repeat="url in item.file" target="_blank" ng-href="{{url}}">
<img class="col-xs-12" ng-src="{{url}}"> <img class="col-xs-12" ng-src="{{url}}">
</a> </a>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group">
<div class="col-sm-12 text-left">
<p ng-if="riskEvent.order_type==1">4、显示商户门牌号码和店头名称的照片
要求:清晰可见,至少一张<br>
Photos of Merchant Street number & Merchant name
Requirement: At least one visible photo
</p>
<p ng-if="riskEvent.order_type==3">4.提供您的门店照片(门店照及店铺内的照片各一张, 一张可以看到商户名的门头照,一张可以看到相关商品或服务的店内照片);<br>
Photos of the store ( one of each front-store and in-store);
</p>
</div>
<div class="col-sm-12">
&nbsp;&nbsp;<br>
<div class="col-xs-12">
<a class="col-xs-3 logo-width" ng-repeat="url in file4" target="_blank" ng-href="{{url}}">
<img class="col-xs-12" ng-src="{{url}}">
</a>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12 text-left">
<p ng-if="riskEvent.order_type==1">5、显示商户营业场景所场内部情况如店内商品陈列、收银台等的照片
要求:照片清晰,且能清楚显示商户实际售卖物品或服务,至少三张<br>
Photos of internal environment of merchant business (such as in-store merchandise display, checkout counter, etc.)
Requirements: The photos (at least three) showing merchant activities including actual selling-goods or services obviously
</p>
<p ng-if="riskEvent.order_type==3">5.其他可以还原交易背景的资料,如和消费者的聊天记录等,来佐证被查单号交易的真实性;<br>
Other materials that can verify the payment scenario, for example, chatting history, to prove the truth of the transactions;
</p>
</div>
<div class="col-sm-12">
&nbsp;&nbsp;<br>
<div class="col-xs-12">
<a class="col-xs-3 logo-width" ng-repeat="url in file5" target="_blank" ng-href="{{url}}">
<img class="col-xs-12" ng-src="{{url}}">
</a>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12 text-left">
<p ng-if="riskEvent.order_type==1||riskEvent.order_type==3">6、其他图片<br>
Other pictures
</p>
</div>
<div class="col-sm-12">
&nbsp;&nbsp;<br>
<div class="col-xs-12">
<a class="col-xs-3 logo-width" ng-repeat="url in file6" target="_blank" ng-href="{{url}}">
<img class="col-xs-12" ng-src="{{url}}">
</a>
</div>
</div>
</div>
</div> </div>
</div> </div>

@ -210,9 +210,8 @@
</div> </div>
</div> </div>
<div class="form-group"ng-repeat="material in materials" <div class="form-group" ng-repeat="material in materials"
ng-if="riskEvent.order_type == 2" ng-if="riskEvent.order_type == 2">
ng-class="{'has-error':riskEventForm.client_moniker.$invalid && riskEventForm.client_moniker.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="material{{$index+1}}">Material{{$index + 1}} for="material{{$index+1}}">Material{{$index + 1}}
@ -223,9 +222,7 @@
type="text" type="text"
name="material{{$index+1}}" name="material{{$index+1}}"
id="material{{$index+1}}" id="material{{$index+1}}"
required required>
ng-pattern="/^[a-zA-Z0-9]+$/"
>
</div> </div>
<div class="col-sm-2"> <div class="col-sm-2">
<a class="text-success" ng-click="increase($index)"><i class="fa fa-plus-circle" style="width: 30px"></i></a> <a class="text-success" ng-click="increase($index)"><i class="fa fa-plus-circle" style="width: 30px"></i></a>
@ -249,11 +246,17 @@
</div> </div>
</div> </div>
<div class="btn-group margin-bottom margin-top"> <div class="margin-bottom margin-top">
<button class="btn btn-success" <button class="btn btn-success"
type="button" type="button"
id="save-risk-btn"
ng-click="save(riskEventForm)">Save ng-click="save(riskEventForm)">Save
</button> </button>
<a role="button"
style="margin-left: 10px;"
ui-sref="analysis_monitoring.risk_business"
class="btn btn-warning">cancel
</a>
</div> </div>
</form> </form>
</div> </div>

@ -1,4 +1,15 @@
<div class="content"> <div class="content">
<div class="box box-body" ng-if="riskEvent.process_logs != null">
<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>
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="nav-tabs-custom"> <div class="nav-tabs-custom">

@ -57,200 +57,63 @@
<form novalidate name="uploadForm"> <form novalidate name="uploadForm">
<div class="panel-body"> <div class="panel-body">
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group"> <div class="form-group" ng-if="allMaterialInfo.refuse_description != null">
<div class="col-sm-12 text-left"> <label class="control-label col-sm-2">Refuse Reason</label>
<p ng-if="riskEvent.order_type==1"> <div class="col-sm-10">
1、物流公司发货单据照片 <div class="form-control-static">
要求:每笔交易对应的物流单必须提供,且单据必须清晰可见<br> <p ng-bind="allMaterialInfo.refuse_description"></p>
Photos of logistics companies goods-delivery documents
Requirement: The logistics order record corresponding to each transaction must be provided,
and details of records should be clearly visible.
</p>
<p ng-if="riskEvent.order_type==3">
1.请解释相应的消费场景/业务模式,例如网站商城,扫码支付, 消费者到店支付等;<br>
Please explain the relative payment scenario/business activities,
for example, online store, QR code payment, payment at the store, etc;
</p>
</div>
<div class="col-sm-12">
<div class="col-xs-12" ng-if="uploadShowFlag">
<button class="btn btn-primary" type="button"
ngf-select="uploadFile1($files)" ngf-multiple="true">
<i class="fa fa-upload"></i> Upload
</button>
</div>
&nbsp;&nbsp;<br>
<div class="col-xs-12">
<uib-progressbar value="file1Progress.value" type="success" animate="true" ng-if="file1Progress.value" max="100"
>{{file1Progress.value}}%</uib-progressbar>
<img class="col-xs-3 logo-width" ng-repeat="url in (material.file1 || material.file1_url)" ng-src="{{url}}">
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12 text-left">
<p ng-if="riskEvent.order_type==1">
2、用户购买虚拟物品需要提供聊天记录、订单信息、发货凭证截图、
虚拟物品最终消费场景(例如何种游戏、软件)、提供消费场景网址/下载链接
要求:每笔交易对应的截图必须清晰可见<br>
Users need to provide chat records, order information, screenshots of delivery documents,
final consumption scenarios of virtual goods (such as games, software);
provide consumer scene URL / download link.
Requirement: The screenshot corresponding to each transaction must be clearly visible.
</p>
<p ng-if="riskEvent.order_type==3">
2.提供相应购物清单,订单小票(请提供与被查交易订单号相匹配的交易时间及金额的发票);<br>
Provide related shopping lists, invoices.
(Please provide the invoices, amount of which matches that of the abnormal transaction);
</p>
</div>
<div class="col-sm-12">
<div class="col-xs-12" ng-if="uploadShowFlag">
<button class="btn btn-primary" type="button"
ngf-select="uploadFile2($files)" ngf-multiple="true">
<i class="fa fa-upload"></i> Upload
</button>
</div>
&nbsp;&nbsp;<br>
<div class="col-xs-12">
<uib-progressbar value="file2Progress.value" type="success" animate="true" ng-if="file2Progress.value" max="100"
>{{file2Progress.value}}%</uib-progressbar>
<img class="col-xs-3 logo-width" ng-repeat="url in (material.file2 ||material.file2_url)" ng-src="{{url}}">
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12 text-left">
<p ng-if="riskEvent.order_type==1">
3、购物小票/发票存根照片
照片应清晰,必须显示商户名称、商户地址、购物时间、物品名称
购物金额等<br>
Photos of shopping receipts/ invoice stubs
Requirement: The photos should be clear and must show Merchant name,
Business address, Transaction time, Product information, Quantity purchased, etc.
</p>
<p ng-if="riskEvent.order_type==3">
3.提供相应的发货证明,报关单(若有消费者在国内购买,请提供物流单据或报关单);<br>
Relative proof of delivery, customs declaration
(If the consumer purchased from China, please provide shipping receipt or customs declaration);
</p>
</div>
<div class="col-sm-12">
<div class="col-xs-12" ng-if="uploadShowFlag">
<button class="btn btn-primary" type="button"
ngf-select="uploadFile3($files)" ngf-multiple="true">
<i class="fa fa-upload"></i> Upload
</button>
</div>
&nbsp;&nbsp;<br>
<div class="col-xs-12">
<uib-progressbar value="file3Progress.value" type="success" animate="true" ng-if="file3Progress.value" max="100"
>{{file3Progress.value}}%</uib-progressbar>
<img class="col-xs-3 logo-width" ng-repeat="url in (material.file3 || material.file3_url)" ng-src="{{url}}">
</div> </div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group" ng-repeat="item in allMaterialInfo.material">
<div class="col-sm-12 text-left"> <div class="col-sm-12 text-left">
<p ng-if="riskEvent.order_type==1"> <p>{{item.question}}</p>
4、显示商户门牌号码和店头名称的照片
要求:清晰可见,至少一张<br>
Photos of Merchant Street number & Merchant name
Requirement: At least one visible photo
</p>
<p ng-if="riskEvent.order_type==3">
4.提供您的门店照片(门店照及店铺内的照片各一张, 一张可以看到商户名的门头照,一张可以看到相关商品或服务的店内照片);<br>
Photos of the store ( one of each front-store and in-store);
</p>
</div> </div>
<div class="col-sm-12"> <div class="col-sm-12">
<div class="col-xs-12" ng-if="uploadShowFlag"> <div class="col-xs-12" ng-if="uploadShowFlag">
<button class="btn btn-primary" type="button" <button class="btn btn-primary" type="button"
ngf-select="uploadFile4($files)" ngf-multiple="true"> ngf-select="uploadFile($files, $index)" ngf-multiple="true">
<i class="fa fa-upload"></i> Upload <i class="fa fa-upload"></i> Upload
</button> </button>
</div> </div>
&nbsp;&nbsp;<br> &nbsp;&nbsp;<br>
<div class="col-xs-12"> <div class="col-xs-12">
<uib-progressbar value="file4Progress.value" type="success" animate="true" ng-if="file4Progress.value" max="100" <uib-progressbar value="item.fileProgressValue"
>{{file4Progress.value}}%</uib-progressbar> type="success"
<img class="col-xs-3 logo-width" ng-repeat="url in (material.file4 || material.file4_url)" ng-src="{{url}}"> animate="true"
</div> ng-if="item.fileProgressValue"
</div> max="100"
>{{item.fileProgressValue}}%</uib-progressbar>
</div> <img class="col-xs-3 logo-width"
<div class="form-group"> ng-if="uploadShowFlag"
<div class="col-sm-12 text-left"> ng-repeat="url in item.uploadFile"
<p ng-if="riskEvent.order_type==1"> ng-src="{{url}}">
5、显示商户营业场景所场内部情况如店内商品陈列、收银台等的照片 <img class="col-xs-3 logo-width"
要求:照片清晰,且能清楚显示商户实际售卖物品或服务,至少三张<br> ng-if="!uploadShowFlag"
Photos of internal environment of merchant business ng-repeat="url in item.file"
(such as in-store merchandise display, checkout counter, etc.) ng-src="{{url}}">
Requirements: The photos (at least three)
showing merchant activities including actual selling-goods or services obviously
</p>
<p ng-if="riskEvent.order_type==3">
5.其他可以还原交易背景的资料,如和消费者的聊天记录等,来佐证被查单号交易的真实性;<br>
Other materials that can verify the payment scenario, for example,
chatting history, to prove the truth of the transactions;
</p>
</div>
<div class="col-sm-12">
<div class="col-xs-12" ng-if="uploadShowFlag">
<button class="btn btn-primary" type="button"
ngf-select="uploadFile5($files)" ngf-multiple="true">
<i class="fa fa-upload"></i> Upload
</button>
</div>
&nbsp;&nbsp;<br>
<div class="col-xs-12">
<uib-progressbar value="file5Progress.value" type="success" animate="true" ng-if="file5Progress.value" max="100"
>{{file5Progress.value}}%</uib-progressbar>
<img class="col-xs-3 logo-width" ng-repeat="url in (material.file5 || material.file5_url)" ng-src="{{url}}">
</div> </div>
</div> </div>
</div> </div>
<div class="form-group">
<div class="col-sm-12 text-left">
<p>6、其他图片<br>
Other pictures
</p>
</div>
<div class="col-sm-12">
<div class="col-xs-12" ng-if="uploadShowFlag">
<button class="btn btn-primary" type="button"
ngf-select="uploadFile6($files)" ngf-multiple="true">
<i class="fa fa-upload"></i> Upload
</button>
</div>
&nbsp;&nbsp;<br>
<div class="col-xs-12">
<uib-progressbar value="file6Progress.value" type="success" animate="true" ng-if="file6Progress.value" max="100"
>{{file6Progress.value}}%</uib-progressbar>
<img class="col-xs-3 logo-width" ng-repeat="url in (material.file6 || material.file6_url)" ng-src="{{url}}">
</div>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Description</label> <label class="control-label col-sm-2">Description</label>
<div class="col-sm-10"> <div class="col-sm-10">
<textarea class="form-control" required <textarea class="form-control" required
ng-model="material.description" placeholder="No more than 500" ng-model="allMaterialInfo.description"
placeholder="No more than 500"
name="description" name="description"
ng-disabled="!uploadShowFlag" ng-disabled="!uploadShowFlag"
maxlength="500"></textarea> maxlength="500"></textarea>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</form> </form>
<div style="text-align: center" ng-if="uploadShowFlag"> <div style="text-align: center" ng-if="uploadShowFlag">
<a role="button" style="margin-bottom: 25px;" class="btn btn-success btn-sm ng-scope" ng-disabled="!(material.description)" <a role="button" style="margin-bottom: 25px;" class="btn btn-success btn-sm ng-scope" ng-disabled="!(allMaterialInfo.description)"
ng-click="submit(uploadForm)">Submit</a> ng-click="submit(uploadForm)">Submit</a>
</div> </div>

@ -108,39 +108,75 @@
<!--Receive Email Date--> <!--Receive Email Date-->
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
<label class="control-label col-xs-4 col-sm-4" <label class="control-label col-xs-4 col-sm-4">
for="receive-date-input">Receive Date Receive Date
</label> </label>
<div class="col-xs-6"> <div class="form-control-static form-inline">
<input class="form-control" <div class="col-xs-6">
id="receive-date-input" <div style="display: inline-block">
type="text" <input class="form-control"
ng-model="params.receiveEmailDate" id="receive-date-begin-input"
uib-datepicker-popup type="text"
size="10" ng-model="params.receiveEmailDateBegin"
placeholder="Receive Email Date" uib-datepicker-popup
datepicker-options="{maxDate:today}" size="10"
is-open="ReceiveDate.open" placeholder="From"
ng-click="ReceiveDate.open=true"> datepicker-options="{maxDate:params.receiveEmailDateEnd}"
is-open="receiveEmailDateBegin.open"
ng-click="receiveEmailDateBegin.open=true"></div>
~
<div style="display: inline-block">
<input class="form-control"
id="receive-date-end-input"
type="text"
ng-model="params.receiveEmailDateEnd"
uib-datepicker-popup
size="10"
placeholder="To"
datepicker-options="{minDate:params.receiveEmailDateBegin}"
is-open="receiveEmailDateEnd.open"
ng-click="receiveEmailDateEnd.open=true">
</div>
</div>
</div> </div>
</div> </div>
<!--Reply Email Deadline--> <!--Reply Email Deadline-->
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
<label class="control-label col-xs-4 col-sm-4" <label class="control-label col-xs-4 col-sm-4">
for="reply-deadline-input">Reply Deadline Reply Deadline
</label> </label>
<div class="col-xs-6"> <div class="form-control-static form-inline">
<input class="form-control" <div class="col-xs-6">
id="reply-deadline-input" <div style="display: inline-block">
type="text" <input class="form-control"
ng-model="params.replyEmailDate" id="reply-deadline-begin-input"
uib-datepicker-popup type="text"
size="10" ng-model="params.replyEmailDateBegin"
placeholder="Reply Email Deadline" uib-datepicker-popup
is-open="ReplyDeadline.open" size="10"
ng-click="ReplyDeadline.open=true"> placeholder="From"
is-open="replyEmailDateBegin.open"
datepicker-options="{maxDate:params.replyEmailDateEnd}"
ng-click="replyEmailDateBegin.open=true">
</div>
~
<div style="display: inline-block">
<input class="form-control"
id="reply-deadline-end-input"
type="text"
ng-model="params.replyEmailDateEnd"
uib-datepicker-popup
size="10"
placeholder="To"
is-open="replyEmailDateEnd.open"
datepicker-options="{minDate:params.replyEmailDateBegin}"
ng-click="replyEmailDateEnd.open=true">
</div>
</div>
</div> </div>
</div> </div>
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
@ -160,13 +196,13 @@
<button class="btn btn-primary" <button class="btn btn-primary"
type="button" type="button"
ng-click="loadRiskEvents(1)"> ng-click="loadRiskEvents(1)">
<i class="fa fa-search"></i>Search <i class="fa fa-search"></i> Search
</button> </button>
<a role="button" <a role="button"
class="btn btn-info" class="btn btn-info"
ui-sref=".new_riskEvent" ui-sref=".new_riskEvent"
title="New Event"> title="New Event">
<i class="fa fa-plus"></i>New Event <i class="fa fa-plus"></i> New Event
</a> </a>
</div> </div>
</div> </div>
@ -256,6 +292,28 @@
</div> </div>
</div> </div>
</div> </div>
<div class="box">
<div class="box-header">
<h3 class="box-title" style="display: inline-block; float: left;">RiskEvent Analysis</h3>
</div>
<div class="box-body no-padding table-responsive">
<div class="col-sm-6 col-xs-6">
<p class="text-center">行业占比</p>
<div class="chart" style="height: 400px" echarts="risk_industry_chart"
ng-class="{nodata:risk_industry_chart.nodata}"></div>
</div>
<div class="col-sm-6 col-xs-6">
<p class="text-center">金额分布</p>
<div class="chart" style="height: 400px" echarts="risk_amount_chart"
ng-class="{nodata:risk_amount_chart.nodata}"></div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save