# Conflicts: # src/main/java/au/com/royalpay/payment/manage/customers/core/impls/CouponValidateServiceImpl.java # src/main/java/au/com/royalpay/payment/manage/mappers/payment/OrderMapper.java # src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java # src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java # src/main/resources/au/com/royalpay/payment/manage/mappers/payment/OrderMapper.xmlmaster
commit
c1b5e90235
@ -0,0 +1,18 @@
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@AutoMapper(tablename = "risk_file", pkName = "file_id")
|
||||
public interface RiskFileMapper {
|
||||
@AutoSql(type= SqlType.INSERT)
|
||||
void save(JSONObject file);
|
||||
|
||||
@AutoSql(type= SqlType.SELECT)
|
||||
List<JSONObject> findAllFiles(@Param("material_id") String material_id);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
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;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@AutoMapper(tablename = "risk_material", pkName = "material_id")
|
||||
public interface RiskMaterialMapper {
|
||||
@AutoSql(type = SqlType.INSERT)
|
||||
void save(JSONObject material);
|
||||
|
||||
List<JSONObject> findAllMaterials(@Param("risk_id") String risk_id);
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package au.com.royalpay.payment.manage.riskbusiness.core;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
public interface RiskUploadService {
|
||||
/**
|
||||
* 上传材料
|
||||
* @param material
|
||||
*/
|
||||
void submitMaterial(JSONObject material);
|
||||
|
||||
/**
|
||||
* 删除缓存
|
||||
* @param codeKey
|
||||
*/
|
||||
void deleteUploadMailKey(String codeKey);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param codeKey
|
||||
* @param risk_id
|
||||
*/
|
||||
void checkUploadMailKey(String codeKey,String risk_id);
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package au.com.royalpay.payment.manage.riskbusiness.core.impl;
|
||||
|
||||
import au.com.royalpay.payment.core.exceptions.EmailException;
|
||||
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.RiskMaterialMapper;
|
||||
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
||||
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.RiskUploadService;
|
||||
import au.com.royalpay.payment.manage.riskbusiness.enums.RiskResultTypeEnum;
|
||||
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
||||
import au.com.royalpay.payment.tools.threadpool.RoyalThreadPoolExecutor;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.thymeleaf.context.Context;
|
||||
import org.thymeleaf.spring4.SpringTemplateEngine;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.ParseException;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class RiskUploadServiceIpml implements RiskUploadService {
|
||||
@Resource
|
||||
private RiskMaterialMapper riskMaterialMapper;
|
||||
@Resource
|
||||
private RiskFileMapper riskFileMapper;
|
||||
@Resource
|
||||
private RiskEventMapper riskEventMapper;
|
||||
@Resource
|
||||
private StringRedisTemplate stringRedisTemplate;
|
||||
private final String UPLOAD_MAIL_PREFIX = "UPLOAD_MAIL";
|
||||
|
||||
@Override
|
||||
public void submitMaterial(JSONObject material) {
|
||||
JSONObject event = riskEventMapper.findById(material.getString("risk_id"));
|
||||
riskMaterialMapper.save(material);
|
||||
material.put("material_id",riskMaterialMapper.findAllMaterials(material.getString("risk_id")).get(0).getString("material_id"));
|
||||
for(int i=1;i<=10;i++){
|
||||
if(material.containsKey("file"+i+"_url")){
|
||||
List<String> urls = (List<String>)material.get("file"+i+"_url");
|
||||
for(String url:urls){
|
||||
JSONObject file = new JSONObject();
|
||||
file.put("file_url",url);
|
||||
file.put("file_type",i);
|
||||
file.put("material_id",material.getString("material_id"));
|
||||
riskFileMapper.save(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
event.put("result_type", RiskResultTypeEnum.WAIT_FOR_AUDIT.getResultType());
|
||||
riskEventMapper.update(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteUploadMailKey(String codeKey) {
|
||||
stringRedisTemplate.delete(getRiskUploadKey(codeKey));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkUploadMailKey(String codeKey,String risk_id) {
|
||||
JSONObject event = riskEventMapper.findById(risk_id);
|
||||
//到期日前一天的下午6点前url可用
|
||||
try {
|
||||
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"}))){
|
||||
deleteUploadMailKey(codeKey);
|
||||
throw new BadRequestException("Url expired");
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(codeKey)) {
|
||||
String redisUpload = stringRedisTemplate.boundValueOps(getRiskUploadKey(codeKey)).get();
|
||||
if (redisUpload == null) {
|
||||
throw new BadRequestException("Url expired");
|
||||
}
|
||||
}
|
||||
}
|
||||
private String getRiskUploadKey(String codeKey){
|
||||
return UPLOAD_MAIL_PREFIX + codeKey;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package au.com.royalpay.payment.manage.riskbusiness.enums;
|
||||
|
||||
/**
|
||||
* @Author lvjian
|
||||
* @Date 2018/10/16 22:22
|
||||
*/
|
||||
public enum RiskEmailStatusEnum {
|
||||
NOT_SEND(0),
|
||||
ALREADY_SEND(1),
|
||||
BACK_AND_SEND(2),
|
||||
SEND_EMAIL_AGAIN(3),
|
||||
;
|
||||
|
||||
private Integer emailStatus;
|
||||
|
||||
RiskEmailStatusEnum(Integer emailStatus) {
|
||||
this.emailStatus = emailStatus;
|
||||
}
|
||||
|
||||
public Integer getEmailStatus() {
|
||||
return emailStatus;
|
||||
}
|
||||
|
||||
public void setEmailStatus(Integer emailStatus) {
|
||||
this.emailStatus = emailStatus;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package au.com.royalpay.payment.manage.riskbusiness.enums;
|
||||
|
||||
/**
|
||||
* @Author lvjian
|
||||
* @Date 2018/10/16 20:18
|
||||
*/
|
||||
public enum RiskOrderTypeEnum {
|
||||
|
||||
WECHAT_ORDER(1),
|
||||
ALIPAY_ORDER(2),
|
||||
ROYALPAY_ORDER(3),
|
||||
WARNING_ORDER(4),
|
||||
GENERAL_ORDER(5)
|
||||
;
|
||||
|
||||
private Integer orderType;
|
||||
|
||||
public Integer getOrderType() {
|
||||
return orderType;
|
||||
}
|
||||
|
||||
public void setOrderType(Integer orderType) {
|
||||
this.orderType = orderType;
|
||||
}
|
||||
|
||||
RiskOrderTypeEnum(Integer orderType) {
|
||||
this.orderType = orderType;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package au.com.royalpay.payment.manage.riskbusiness.enums;
|
||||
|
||||
/**
|
||||
* @Author lvjian
|
||||
* @Date 2018/10/16 20:40
|
||||
*/
|
||||
public enum RiskResultTypeEnum {
|
||||
|
||||
NOT_HANDLED(0),
|
||||
SEND_EMAIL_TO_BD(1),
|
||||
WAIT_FOR_AUDIT(2),
|
||||
MATERIAL_AUDIT_PASS(3),
|
||||
MATERIAL_NOT_PASS(4),
|
||||
ALREADY_HANDLED(5);
|
||||
|
||||
private Integer resultType;
|
||||
|
||||
RiskResultTypeEnum(Integer resultType) {
|
||||
this.resultType = resultType;
|
||||
}
|
||||
|
||||
public Integer getResultType() {
|
||||
return resultType;
|
||||
}
|
||||
|
||||
public void setResultType(Integer resultType) {
|
||||
this.resultType = resultType;
|
||||
}
|
||||
}
|
@ -1,28 +1,132 @@
|
||||
package au.com.royalpay.payment.manage.riskbusiness.web;
|
||||
|
||||
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
|
||||
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
||||
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.core.RiskBusinessService;
|
||||
import au.com.royalpay.payment.manage.riskbusiness.enums.RiskResultTypeEnum;
|
||||
import au.com.royalpay.payment.tools.CommonConsts;
|
||||
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
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.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 风控业务
|
||||
* @Author lvjian
|
||||
* @Date 2018/10/10 1:12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/risk/business/")
|
||||
@ManagerMapping(value = "/risk/business/", role = {ManagerRole.OPERATOR, ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.RISK_MANAGER})
|
||||
public class RiskBusinessController {
|
||||
|
||||
@ManagerMapping(value = "event", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
|
||||
public String testHello() {
|
||||
return "Hello";
|
||||
@Autowired
|
||||
private RiskBusinessService riskBusinessService;
|
||||
|
||||
@Autowired
|
||||
private ClientManager clientManager;
|
||||
|
||||
@GetMapping(value = "events")
|
||||
public JSONObject getRiskEvents(RiskEventQuery riskEventQuery, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
||||
JSONObject params = riskEventQuery.toJSON();
|
||||
return riskBusinessService.getRiskEventsByPage(params, manager);
|
||||
}
|
||||
|
||||
@GetMapping(value = "events/{risk_id}")
|
||||
public JSONObject getRiskEventDetail(@PathVariable("risk_id") String riskId,
|
||||
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
||||
JSONObject riskEvent = riskBusinessService.getRiskEventDetail(riskId);
|
||||
List<JSONObject> tradeLogs = riskBusinessService.getRiskEventOrderList(riskEvent.getString("order_ids"));
|
||||
riskEvent.put("tradeLogs", tradeLogs);
|
||||
return riskEvent;
|
||||
}
|
||||
|
||||
@PostMapping(value = "events")
|
||||
public void RegisterRiskEvent(@RequestBody JSONObject params,
|
||||
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
||||
riskBusinessService.addRiskEvent(params, manager);
|
||||
}
|
||||
|
||||
@PutMapping(value = "events")
|
||||
public void UpdateRiskEvent(@RequestBody JSONObject params) {
|
||||
riskBusinessService.updateRiskEvent(params);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/{risk_id}/download/materialsAsZIP")
|
||||
public void downloadComplianceZip(@PathVariable("risk_id") String riskId, HttpServletResponse response) throws Exception {
|
||||
riskBusinessService.downloadAuditMaterialZiP(riskId, response);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/{risk_id}/upload_mail",method = RequestMethod.PUT)
|
||||
public void uploadEmail(@PathVariable String risk_id) throws IOException {
|
||||
riskBusinessService.sendUploadEmail(risk_id);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/{risk_id}/refuse",method = RequestMethod.PUT)
|
||||
public void refuseEmail(@PathVariable String risk_id) throws IOException {
|
||||
riskBusinessService.sendRefuseEmail(risk_id);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/{risk_id}/material")
|
||||
public JSONObject getRiskMaterial(@PathVariable("risk_id") String riskId) {
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("risk_id", riskId);
|
||||
return riskBusinessService.getRiskMaterial(param);
|
||||
}
|
||||
|
||||
@PutMapping(value = "/channel/{channel}/permission/{channelFlag}")
|
||||
public void updateMerchantChannel(@RequestBody JSONObject params,
|
||||
@PathVariable("channelFlag") Boolean channelFlag,
|
||||
@PathVariable("channel") String channel,
|
||||
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
||||
clientManager.switchChannelPermission(manager, params.getString("client_moniker"), channel, channelFlag);
|
||||
|
||||
if (channelFlag)
|
||||
params.put("result_type", RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
|
||||
riskBusinessService.updateRiskEvent(params);
|
||||
}
|
||||
|
||||
@PutMapping(value = "/partner/{isValid}")
|
||||
public void updateMerchantValid(@RequestBody JSONObject params,
|
||||
@PathVariable("isValid") Boolean isValid,
|
||||
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
||||
String clientMoniker = params.getString("client_moniker");
|
||||
if (isValid) {
|
||||
clientManager.disableClient(clientMoniker, manager);
|
||||
Integer temporaryCloseMerchant = params.getInteger("temporary_close_merchant");
|
||||
if (temporaryCloseMerchant != 1) {
|
||||
params.put("result_type", RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
|
||||
}
|
||||
}
|
||||
else {
|
||||
clientManager.revertClient(clientMoniker, manager);
|
||||
params.put("result_type", RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
|
||||
}
|
||||
riskBusinessService.updateRiskEvent(params);
|
||||
|
||||
}
|
||||
@RequestMapping(value = "/{risk_id}/urge",method = RequestMethod.PUT)
|
||||
public void urgeEmail(@PathVariable String risk_id) throws IOException {
|
||||
riskBusinessService.sendUrgeEmail(risk_id);
|
||||
}
|
||||
|
||||
@ManagerMapping(value = "event/{risk_id}", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
|
||||
public JSONObject getRiskEventDetail() {
|
||||
return null;
|
||||
@GetMapping(value = "/partners")
|
||||
public List<JSONObject> getPartners(PartnerQuery partnerQuery) {
|
||||
JSONObject param = partnerQuery.toJsonParam();
|
||||
return clientManager.getClientBySimpleQuery(param);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,50 @@
|
||||
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.RiskUploadService;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/risk/upload")
|
||||
public class RiskFileUploadController {
|
||||
@Resource
|
||||
private RiskUploadService riskUploadService;
|
||||
@Resource
|
||||
private RiskBusinessService riskBusinessService;
|
||||
|
||||
/**
|
||||
* 上传材料的链接
|
||||
* @param codeKey
|
||||
* @param risk_id
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/{risk_id}/{codeKey}", method = RequestMethod.GET)
|
||||
public ModelAndView jumpVerifyMail(@PathVariable String codeKey, @PathVariable String risk_id) {
|
||||
//检查codekey是否有效
|
||||
riskUploadService.checkUploadMailKey(codeKey,risk_id);
|
||||
JSONObject event = riskBusinessService.getRiskEventDetail(risk_id);
|
||||
ModelAndView view = new ModelAndView("mail/risk_upload");
|
||||
view.addObject("codeKey", codeKey);
|
||||
view.addObject("risk_id",risk_id);
|
||||
view.addObject("order_type",event.getIntValue("order_type"));
|
||||
view.addObject("short_name",event.getJSONObject("clientInfo").getString("short_name"));
|
||||
return view;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传调单材料
|
||||
* @param codeKey
|
||||
* @param material
|
||||
*/
|
||||
@RequestMapping(value = "/{codeKey}", method = RequestMethod.POST)
|
||||
public void upload(@PathVariable String codeKey, @RequestBody JSONObject material) {
|
||||
riskUploadService.checkUploadMailKey(codeKey, material.getString("risk_id"));
|
||||
riskUploadService.submitMaterial(material);
|
||||
riskUploadService.deleteUploadMailKey(codeKey);
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
spring.datasource.schema-name=royalpay_production
|
||||
spring.datasource.host=192.168.0.49:3306
|
||||
spring.datasource.host=192.168.0.111:3306
|
||||
spring.datasource.url=jdbc:mysql://${spring.datasource.host}/${spring.datasource.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=root
|
@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="au.com.royalpay.payment.manage.mappers.riskbusiness.RiskEventMapper">
|
||||
<select id="listRisksByPage" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
re.risk_id,
|
||||
re.client_moniker,
|
||||
re.order_ids,
|
||||
re.order_type,
|
||||
re.royalpay_order_type,
|
||||
re.warning_order_type,
|
||||
re.description,
|
||||
re.email_status,
|
||||
re.receive_email_date,
|
||||
re.reply_email_date,
|
||||
re.fillin_person,
|
||||
re.fillin_id,
|
||||
re.result_type,
|
||||
re.channel_result,
|
||||
re.temporary_close_channel,
|
||||
re.temporary_close_merchant,
|
||||
re.in_merchant_blacklist,
|
||||
re.in_user_blacklist,
|
||||
re.processed_remark,
|
||||
re.create_time,
|
||||
sc.industry,
|
||||
sc.short_name,
|
||||
IFNULL(sc.sub_merchant_id, re.sub_merchant_id) sub_merchant_id
|
||||
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 re.risk_id
|
||||
FROM
|
||||
risk_event re,
|
||||
risk_event_help reh
|
||||
<where>
|
||||
reh.risk_event_help_id < (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) >= #{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) <= #{end_amount}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
) temp
|
||||
on re.risk_id = temp.risk_id
|
||||
</if>
|
||||
|
||||
<if test="bd_id != null">
|
||||
LEFT JOIN(
|
||||
SELECT DISTINCT client_id
|
||||
FROM sys_client_bd
|
||||
WHERE
|
||||
is_valid = 1
|
||||
AND bd_id = #{bd_id}
|
||||
AND end_date > NOW()
|
||||
) scb
|
||||
ON sc.client_id = scb.client_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="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 != null">
|
||||
AND re.receive_email_date = #{receive_email_date}
|
||||
</if>
|
||||
<if test="reply_email_date != null">
|
||||
AND re.reply_email_date = #{reply_email_date}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="au.com.royalpay.payment.manage.mappers.riskbusiness.RiskMaterialMapper">
|
||||
<select id="findOperatorById" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT m.*
|
||||
FROM risk_material r
|
||||
LEFT JOIN risk_event e
|
||||
ON r.risk_id = e.risk_id
|
||||
LEFT JOIN sys_managers m
|
||||
ON e.fillin_id = m.manager_id
|
||||
WHERE r.risk_id = #{risk_id}
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="findAllMaterials" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT *
|
||||
FROM risk_material
|
||||
WHERE risk_id = #{risk_id}
|
||||
ORDER BY update_time DESC
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,24 @@
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh">
|
||||
<h4>Dear <span th:text="${operator}"></span> :</h4>
|
||||
<p>您好,您于<span th:text="${create_time}"></span>创建的风控事件单已经接收到了商户<span th:text="${short_name}"></span>(<span th:text="${client_moniker}"></span>)的风控材料,请及时审核。</p>
|
||||
<h4>Best Regards</h4>
|
||||
<p>
|
||||
<img style="width: 120px;height: 120px"
|
||||
src="https://mpay.royalpay.com.au/static/images/logo_new.jpg"> <br>
|
||||
Contact Us<br>
|
||||
Email:<br>
|
||||
<a href="mailto:info@royalpay.com.au">info@royalpay.com.au</a> <br>
|
||||
Tel:<br>
|
||||
1300 10 77 50<br>
|
||||
<br>
|
||||
Service WeChat Account:<br>
|
||||
<img src="https://mpay.royalpay.com.au/static/images/customer_service.jpg"
|
||||
style="width: 60px"><br>
|
||||
Level 14, 383 Kent Street, Sydney NSW 2000<br>
|
||||
<br>
|
||||
Level 11, 15 William Street, Melbourne VIC 3000
|
||||
</p>
|
||||
<p>Tunnel Show Pty Ltd trading as RoyalPay<br>
|
||||
Representative of AFSL licensee 448066
|
||||
</p>
|
||||
</html>
|
@ -0,0 +1,190 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no">
|
||||
<meta name="description" content="">
|
||||
<title>Risk Materials | Success</title>
|
||||
<link href="static/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="static/lib/font-awesome-4.6.3/css/font-awesome.min.css" rel="stylesheet">
|
||||
|
||||
<link rel="stylesheet" href="./static/css/index_register.css">
|
||||
<link rel="stylesheet" href="static/lib/dist/css/AdminLTE.min.css">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script type="text/javascript" src="/static/lib/jquery/jquery-2.1.4.min.js"></script>
|
||||
<script type="text/javascript" src="/static/lib/angularjs/angular.min.js"></script>
|
||||
<script type="text/javascript" src="/static/lib/angularjs/angular-messages.js"></script>
|
||||
<script type="text/javascript" src="/static/lib/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="/static/lib/blocs.min.js"></script>
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "https://hm.baidu.com/hm.js?d7e727bd889ea69d369cba051844dfe5";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
<body class="pace-done fp-viewing-0">
|
||||
<!--[if lte IE 8]>
|
||||
<span class="lower-ie"></span>
|
||||
<![endif]-->
|
||||
<div class="pace pace-inactive">
|
||||
<div class="pace-progress" data-progress-text="100%" data-progress="99"
|
||||
style="transform: translate3d(100%, 0px, 0px);">
|
||||
<div class="pace-progress-inner"></div>
|
||||
</div>
|
||||
<div class="pace-activity"></div>
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
<div id="page-index">
|
||||
<nav id="header" class="navbar navbar-dark navbar-full navbar-fixed-top navbar-bg" style="position: absolute">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button class="navbar-toggle collapsed" type="button" data-toggle="collapse"
|
||||
data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="https://www.royalpay.com.au/">
|
||||
<img src="static/css/img/logo_w.png" alt="" class="navbar--logo">
|
||||
</a>
|
||||
<span class="navbar-brand" style="margin-left: 10px;padding-left: 10px;border-left: 1px solid #fff;">
|
||||
<img src="static/css/img/wechatpay.png" class="navbar--logo" style="transform: translateY(50%);height: 60%;">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right navbar-collapse collapse">
|
||||
<li id="nav-index" class="nav-item">
|
||||
<a href="https://www.royalpay.com.au/index.html" class="nav-link">Home</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a role="button" class="nav-link dropdown-toggle" data-toggle="dropdown">GATEWAY API</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="https://mpay.royalpay.com.au/docs/en/" target="_blank">En</a></li>
|
||||
<li><a href="https://mpay.royalpay.com.au/docs/cn/" target="_blank">中文</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="https://www.royalpay.com.au/industry.html" class="nav-link">Industry</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="https://www.royalpay.com.au/marketing.html" class="nav-link">Marketing</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a role="button" class="nav-link dropdown-toggle" data-toggle="dropdown">About Us</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="https://www.royalpay.com.au/industry.html" target="_blank">About Us</a></li>
|
||||
<li><a href="https://www.royalpay.com.au/c_news.html">News</a></li>
|
||||
<li><a href="https://www.royalpay.com.au/c_career.html">Career</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="https://www.royalpay.com.au/download.html" class="nav-link">Downloads</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="https://mpay.royalpay.com.au/login.html" target="_blank" class="nav-link">Sign In</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="fullpage" class="fullpage-wrapper">
|
||||
<section class="section section-industry"></section>
|
||||
<section class="section section-two" style="padding-bottom: 50px;">
|
||||
<div class="container">
|
||||
<div class="container">
|
||||
<!--<div class="row">-->
|
||||
<!--<div class="col-sm-12">-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<section class="content-header" style="text-align: center">
|
||||
<img src="static/images/pay_success.png" style="width: 120px">
|
||||
<h3>We have received your materials, our risk manager will review soon,</h3>
|
||||
<h3>please wait for result.</h3>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="section section-six fp-auto-height footer">
|
||||
<div class="container">
|
||||
<div class="row margin-bottom">
|
||||
<div class="col-md-4 footer-item">
|
||||
CONTACT US
|
||||
<hr>
|
||||
Level 14<br>
|
||||
383 Kent Street<br>
|
||||
Sydney NSW 2000<br>
|
||||
<br>
|
||||
Level 11<br>
|
||||
15 William Street<br>
|
||||
Melbourne VIC 3000<br>
|
||||
<br>
|
||||
1300-10-77-50<br>
|
||||
03 9448 8865<br>
|
||||
info@royalpay.com.au
|
||||
</div>
|
||||
<div class="col-md-4 sitemap footer-item">
|
||||
SITE MAP
|
||||
<hr>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-6">
|
||||
<p><a href="/">RoyalPay</a></p>
|
||||
<p><a href="https://mpay.royalpay.com.au/docs/en/">Gateway API</a></p>
|
||||
<p><a href="https://www.royalpay.com.au/industry.html">Industry Solution</a></p>
|
||||
<p><a href="https://www.royalpay.com.au/marketing.html">Marketing Service</a></p>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<p><a href="https://www.royalpay.com.au/about.html">About Us</a></p>
|
||||
<p><a href="https://www.royalpay.com.au/c_news.html">News</a></p>
|
||||
<p><a href="https://www.royalpay.com.au/c_career.html">Career</a></p>
|
||||
<p><a href="https://www.royalpay.com.au/download.html">Downloads</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 footer-item">
|
||||
SUPPORT
|
||||
<hr>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-6 qr-box">
|
||||
<img src="static/css/img/qr_royalpay.png">
|
||||
RoyalPay WeChat Official Account
|
||||
</div>
|
||||
<div class="col-xs-6 qr-box">
|
||||
<img src="static/css/img/qr_service.png">
|
||||
Customer Service
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="copyright">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-center">
|
||||
© 2016 Tunnel Show Pty. Ltd. | Representative of AFSL licensee 448066
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="fp-nav" class="right"></div>
|
||||
<div id="cli_dialog_div"></div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,223 @@
|
||||
<section class="content-header">
|
||||
<h1>New RiskEvent</h1>
|
||||
</section>
|
||||
|
||||
<div class="content">
|
||||
<form novalidate name="riskEventForm">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">RiskEvent Basic Information</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':riskEventForm.order_type.$invalid && riskEventForm.order_type.$dirty}">
|
||||
<label class="control-label col-sm-2"
|
||||
for="order-type-input">Order Type
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<select class="form-control"
|
||||
name="order_type"
|
||||
ng-model="riskEvent.order_type"
|
||||
id="order-type-input"
|
||||
required
|
||||
ng-options="key as value for (key, value) in orderTypes">
|
||||
<option value="">Please Choose</option>
|
||||
</select>
|
||||
<div ng-messages="riskEventForm.order_type.$error"
|
||||
ng-if="riskEventForm.order_type.$dirty">
|
||||
<p class="small text-danger"
|
||||
ng-message="required">required field
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group"
|
||||
ng-if="riskEvent.order_type == 3"
|
||||
ng-class="{'has-error':riskEventForm.royalpay_order_type.$invalid && riskEventForm.royalpay_order_type.$dirty}">
|
||||
<label class="control-label col-sm-2"
|
||||
for="royalpay-order-type-input">Royalpay Order Type
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<select class="form-control"
|
||||
name="royalpay_order_type"
|
||||
ng-model="riskEvent.royalpay_order_type"
|
||||
id="royalpay-order-type-input"
|
||||
required
|
||||
ng-options="key as value for (key, value) in royapayOrderTypes">
|
||||
<option value="">Please Choose</option>
|
||||
</select>
|
||||
<div ng-messages="riskEventForm.royalpay_order_type.$error"
|
||||
ng-if="riskEventForm.royalpay_order_type.$dirty">
|
||||
<p class="small text-danger"
|
||||
ng-message="required">required field
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group"
|
||||
ng-if="riskEvent.order_type == 4"
|
||||
ng-class="{'has-error':riskEventForm.warning_order_type.$invalid && riskEventForm.warning_order_type.$dirty}">
|
||||
<label class="control-label col-sm-2"
|
||||
for="warning-order-type-input">Warning Type
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<select class="form-control"
|
||||
name="warning_order_type"
|
||||
ng-model="riskEvent.warning_order_type"
|
||||
id="warning-order-type-input"
|
||||
required
|
||||
ng-options="key as value for (key, value) in warningOrderTypes">
|
||||
<option value="">Please Choose</option>
|
||||
</select>
|
||||
<div ng-messages="riskEventForm.warning_order_type.$error"
|
||||
ng-if="riskEventForm.warning_order_type.$dirty">
|
||||
<p class="small text-danger"
|
||||
ng-message="required">required field
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"
|
||||
ng-if="riskEvent.order_type == 5 || riskEvent.order_type == 1"
|
||||
ng-class="{'has-error':riskEventForm.sub_merchant_id.$invalid && riskEventForm.sub_merchant_id.$dirty}">
|
||||
<label class="control-label col-sm-2"
|
||||
for="sub-merchant-id-input">Sub Merchant ID</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control"
|
||||
ng-model="riskEvent.sub_merchant_id"
|
||||
type="text"
|
||||
name="sub_merchant_id"
|
||||
id="sub-merchant-id-input"
|
||||
ng-blur="loadParnters()"
|
||||
required>
|
||||
<div ng-messages="riskEventForm.order_ids.$error"
|
||||
ng-if="riskEventForm.sub_merchant_id.$dirty">
|
||||
<p class="small text-danger"
|
||||
ng-message="required">required field
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="partners != null">
|
||||
<label class="control-label col-sm-2"
|
||||
for="order-type-input">Company Name
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<select class="form-control"
|
||||
name="company_name"
|
||||
ng-model="riskEvent.client_moniker"
|
||||
id="company-name-input"
|
||||
ng-options="partner.client_moniker as partner.company_name for partner in partners">
|
||||
<option value="Please Choose"></option>
|
||||
</select>
|
||||
|
||||
<div ng-messages="riskEventForm.order_type.$error"
|
||||
ng-if="riskEventForm.order_type.$dirty">
|
||||
<p class="small text-danger"
|
||||
ng-message="required">required field
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"
|
||||
ng-if="riskEvent.order_type != 5"
|
||||
ng-class="{'has-error':riskEventForm.client_moniker.$invalid && riskEventForm.client_moniker.$dirty}">
|
||||
<label class="control-label col-sm-2"
|
||||
for="short-id-input">Partner Code
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control"
|
||||
ng-model="riskEvent.client_moniker"
|
||||
type="text"
|
||||
name="client_moniker"
|
||||
id="short-id-input"
|
||||
required
|
||||
maxlength="6"
|
||||
ng-pattern="/^[a-zA-Z0-9]+$/">
|
||||
<div ng-messages="riskEventForm.client_moniker.$error"
|
||||
ng-if="riskEventForm.client_moniker.$dirty">
|
||||
<p class="small text-danger"
|
||||
ng-message="required">Required Field
|
||||
</p>
|
||||
<p class="small text-danger"
|
||||
ng-message="maxlength">Less Than 6 Letters
|
||||
</p>
|
||||
<p class="small text-danger"
|
||||
ng-message="pattern">
|
||||
Only Uppercase Letters and Numbers are allowed
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"
|
||||
ng-if="riskEvent.order_type != 4"
|
||||
ng-class="{'has-error':riskEventForm.order_ids.$invalid && riskEventForm.order_ids.$dirty}">
|
||||
<label class="control-label col-sm-2"
|
||||
for="order-ids-input">Order IDs</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control"
|
||||
ng-model="riskEvent.order_ids"
|
||||
type="text"
|
||||
name="order_ids"
|
||||
id="order-ids-input"
|
||||
placeholder="order id1,order id2,order id3..."
|
||||
required>
|
||||
<div ng-messages="riskEventForm.order_ids.$error"
|
||||
ng-if="riskEventForm.order_ids.$dirty">
|
||||
<p class="small text-danger"
|
||||
ng-message="required">required field
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2"
|
||||
for="receive-date-input">
|
||||
{{(riskEvent.order_type == 1 || riskEvent.order_type ==2) ? 'Receive Date' : 'Create Date'}}
|
||||
</label>
|
||||
<div class="col-xs-2">
|
||||
<input class="form-control"
|
||||
id="receive-date-input"
|
||||
type="text"
|
||||
ng-model="riskEvent.receive_email_date"
|
||||
uib-datepicker-popup
|
||||
size="10"
|
||||
placeholder="{{(riskEvent.order_type == 1 || riskEvent.order_type ==2) ? 'Receive Date' : 'Create Date'}}"
|
||||
datepicker-options="{maxDate:today}"
|
||||
is-open="ReceiveDate.open"
|
||||
ng-click="ReceiveDate.open=true">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2"
|
||||
for="description-input">Description
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control"
|
||||
ng-model="riskEvent.description"
|
||||
name="description"
|
||||
id="description-input">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group margin-bottom margin-top">
|
||||
<button class="btn btn-success"
|
||||
type="button"
|
||||
ng-click="save(riskEventForm)">Save
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@ -1,10 +1,479 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
欢迎来到riskDetail页面
|
||||
</body>
|
||||
</html>
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li ui-sref-active-eq="active">
|
||||
<a ui-sref="analysis_monitoring.riskEvent_detail" ui-sref-opts="{reload:true}">Risk Detail</a>
|
||||
</li>
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref=".audit_material" ui-sref-opts="{reload:true}">Audit material</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content" ui-view>
|
||||
<div class="row" ng-if="!editFlag">
|
||||
<div class="col-sm-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<div class="tab-content">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
RiskEvent Basic Information
|
||||
<a role="button"
|
||||
class="pull-right"
|
||||
ng-click="changeEditFlag(editFlag)">
|
||||
<i class="fa fa-edit"></i> Edit
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group" ng-if="riskEvent.client_moniker != null">
|
||||
<label class="control-label col-sm-2">Partner Code</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static"
|
||||
ng-bind="riskEvent.client_moniker"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="clientInfo.short_name != null">
|
||||
<label class="control-label col-sm-2">Short Name</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static"
|
||||
ng-bind="clientInfo.short_name"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="riskEvent.order_type == 1 || riskEvent.order_type == 5">
|
||||
<label class="control-label col-sm-2">Sub Merchant ID</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">
|
||||
{{clientInfo.sub_merchant_id || riskEvent.sub_merchant_id}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="riskEvent.order_ids != null">
|
||||
<label class="control-label col-sm-2">Order IDs</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static"
|
||||
ng-bind="riskEvent.order_ids">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">Order Type</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static"
|
||||
ng-bind="riskEvent.order_type | orderType">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="riskEvent.order_type == 3">
|
||||
<label class="control-label col-sm-2">Royalpay Order Type</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static"
|
||||
ng-bind="riskEvent.royalpay_order_type | royalPayOrderType">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="riskEvent.order_type == 4">
|
||||
<label class="control-label col-sm-2">Waning Order Type</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static"
|
||||
ng-bind="riskEvent.warning_order_type | warningOrderType">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">Result Type</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">
|
||||
{{riskEvent.result_type | resultType:resultTypes}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">Email Status</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static"
|
||||
ng-bind="riskEvent.email_status | emailStatus"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">
|
||||
{{(riskEvent.order_type == 1 || riskEvent.order_type ==2) ? 'Receive Date' : 'Create Date'}}
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">
|
||||
{{riskEvent.receive_email_date | limitTo:10}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">Reply Deadline</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">
|
||||
{{riskEvent.reply_email_date | limitTo:10}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">Description</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static"
|
||||
ng-bind="riskEvent.description">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="clientInfo != null">
|
||||
<div class="form-group" ng-if="riskEvent.result_type <= 2">
|
||||
<label class="control-label col-sm-2">Operaction</label>
|
||||
<div class="col-xs-2" ng-if="enableChannel == 1">
|
||||
<button class="btn btn-info"
|
||||
type="button"
|
||||
ng-click="updateChannel(riskEvent.order_type, false, true)">临时关闭渠道
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-xs-2" ng-if="clientInfo.is_valid == 1">
|
||||
<button class="btn btn-info"
|
||||
type="button"
|
||||
ng-click="updateClient(true, true)">临时关闭商户
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="riskEvent.result_type > 2">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">加入商户黑名单</label>
|
||||
<div class="col-xs-6">
|
||||
<input type="checkbox"
|
||||
bs-switch
|
||||
ng-model="clientInfo.is_valid">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">加入用户黑名单</label>
|
||||
<div class="col-xs-6">
|
||||
<input type="checkbox"
|
||||
ng-model="clientInfo.is_valid"
|
||||
bs-switch>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="riskEvent.result_type > 2">
|
||||
<label class="control-label col-sm-2">Handle Result</label>
|
||||
<div class="col-xs-2" ng-if="riskEvent.temporary_close_channel != 1 && enableChannel == 1">
|
||||
<button class="btn btn-info"
|
||||
type="button"
|
||||
ng-click="updateChannel(riskEvent.order_type, false, false)">关停渠道
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-xs-2" ng-if="riskEvent.temporary_close_merchant != 1 && clientInfo.is_valid == 1">
|
||||
<button class="btn btn-info"
|
||||
type="button"
|
||||
ng-click="updateClient(true, false)">关停商户
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-2">
|
||||
<button class="btn btn-info"
|
||||
ng-if="enableChannel == 0"
|
||||
type="button"
|
||||
ng-click="updateChannel(riskEvent.order_type, true, false)">重新启用渠道
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-xs-2" ng-if="clientInfo.is_valid == 0">
|
||||
<button class="btn btn-info"
|
||||
type="button"
|
||||
ng-click="updateClient(false, false)">重新启用商户
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="riskEvent.channel_result != null">
|
||||
<label class="control-label col-sm-2">Channel Handle Result</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">
|
||||
{{riskEvent.channel_result}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 调单信息 -->
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title" style="display: inherit">
|
||||
Orders Information
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-body table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Order ID</th>
|
||||
<th>Amount</th>
|
||||
<th>Input Amount</th>
|
||||
<th>AUD Amount</th>
|
||||
<th>Exchange Rate</th>
|
||||
<th>Status</th>
|
||||
<th>Create Time</th>
|
||||
<th>Gateway</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="trade in tradeLogs"
|
||||
ng-class="{warning:trade.clearing_status==2}">
|
||||
<td>{{trade.order_id}}</td>
|
||||
<td>{{trade.total_amount | currency: trade.currency}}</td>
|
||||
<td ng-bind="trade.display_amount | currency: trade.currency"></td>
|
||||
<td ng-bind="trade.clearing_amount | currency: 'AUD'"></td>
|
||||
<td>
|
||||
<span ng-if="(trade.channel != 'hf') && (trade.channel != 'Rpay')"
|
||||
ng-bind="trade.exchange_rate">
|
||||
</span>
|
||||
<span ng-if="(trade.channel == 'hf') || (trade.channel == 'Rpay')"> - </span>
|
||||
</td>
|
||||
<td ng-bind="trade.status"></td>
|
||||
<td ng-bind="trade.create_time"></td>
|
||||
<td ng-bind="trade.gateway"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a role="button"
|
||||
ng-if="riskEvent.result_type <= 1 && riskEvent.order_type < 4"
|
||||
class="btn btn-info"
|
||||
ng-click="resendUploadEmail()">Send Email {{riskEvent.result_type == 1 ? 'again' : ''}}
|
||||
</a>
|
||||
|
||||
<a role="button"
|
||||
ng-if="riskEvent.order_type == 4 && riskEvent.result_type == 0"
|
||||
class="btn btn-info"
|
||||
ng-click="resendUploadEmail()">Send Warning Email
|
||||
</a>
|
||||
|
||||
<a role="button"
|
||||
ui-sref="analysis_monitoring.risk_business"
|
||||
class="btn btn-info pull-right">返回
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--编辑表单-->
|
||||
<form novalidate name="riskEventForm" ng-if="editFlag">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">RiskEvent Basic Information</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':riskEventForm.order_type.$invalid && riskEventForm.order_type.$dirty}">
|
||||
<label class="control-label col-sm-2"
|
||||
for="order-type-input">Order Type
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<select class="form-control"
|
||||
name="order_type"
|
||||
disabled
|
||||
ng-model="riskEventEdit.order_type"
|
||||
id="order-type-input"
|
||||
required
|
||||
ng-options="key as value for (key, value) in orderTypes">
|
||||
<option value="">Please Choose</option>
|
||||
</select>
|
||||
|
||||
<div ng-messages="riskEventForm.order_type.$error"
|
||||
ng-if="riskEventForm.order_type.$dirty">
|
||||
<p class="small text-danger"
|
||||
ng-message="required">required field
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"
|
||||
ng-if="riskEventEdit.order_type != 5"
|
||||
ng-class="{'has-error':riskEventForm.client_moniker.$invalid && riskEventForm.client_moniker.$dirty}">
|
||||
<label class="control-label col-sm-2"
|
||||
for="short-id-input">* Partner Code
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control text-uppercase"
|
||||
ng-model="riskEventEdit.client_moniker"
|
||||
type="text"
|
||||
name="client_moniker"
|
||||
id="short-id-input"
|
||||
required
|
||||
maxlength="6"
|
||||
ng-pattern="/^[a-zA-Z0-9]+$/">
|
||||
<div ng-messages="riskEventForm.client_moniker.$error"
|
||||
ng-if="riskEventForm.client_moniker.$dirty">
|
||||
<p class="small text-danger"
|
||||
ng-message="required">Required Field
|
||||
</p>
|
||||
<p class="small text-danger"
|
||||
ng-message="maxlength">Less Than 6 Letters
|
||||
</p>
|
||||
<p class="small text-danger"
|
||||
ng-message="pattern">
|
||||
Only Uppercase Letters and Numbers are allowed
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"
|
||||
ng-if="riskEventEdit.order_type != 4"
|
||||
ng-class="{'has-error':riskEventForm.order_ids.$invalid && riskEventForm.order_ids.$dirty}">
|
||||
<label class="control-label col-sm-2"
|
||||
for="order-ids-input">Order IDs
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control"
|
||||
ng-model="riskEventEdit.order_ids"
|
||||
type="text"
|
||||
name="order_ids"
|
||||
id="order-ids-input"
|
||||
required>
|
||||
<div ng-messages="riskEventForm.order_ids.$error"
|
||||
ng-if="riskEventForm.order_ids.$dirty">
|
||||
<p class="small text-danger"
|
||||
ng-message="required">required field
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"
|
||||
ng-if="riskEventEdit.order_type == 5"
|
||||
ng-class="{'has-error':riskEventForm.sub_merchant_id.$invalid && riskEventForm.sub_merchant_id.$dirty}">
|
||||
<label class="control-label col-sm-2"
|
||||
for="order-ids-input">Sub Merchant ID
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control"
|
||||
ng-model="riskEventEdit.sub_merchant_id"
|
||||
type="text"
|
||||
name="sub_merchant_id"
|
||||
id="sub-merchant-id-input"
|
||||
required>
|
||||
<div ng-messages="riskEventForm.sub_merchant_id.$error"
|
||||
ng-if="riskEventForm.sub_merchant_id.$dirty">
|
||||
<p class="small text-danger"
|
||||
ng-message="required">required field
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2"
|
||||
for="receive-email-input">
|
||||
{{(riskEvent.order_type == 1 || riskEvent.order_type ==2) ? 'Receive Date' : 'Create Date'}}
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<div style="display: inline-block">
|
||||
<input class="form-control"
|
||||
id="receive-email-input"
|
||||
type="text"
|
||||
ng-model="riskEventEdit.receive_email_date"
|
||||
uib-datepicker-popup
|
||||
size="10"
|
||||
placeholder="{{(riskEvent.order_type == 1 || riskEvent.order_type ==2) ? 'Receive Date' : 'Create Date'}}"
|
||||
is-open="receiveDate.open"
|
||||
ng-click="receiveDate.open=true"
|
||||
datepicker-options="{maxDate:today}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2"
|
||||
for="reply-deadline-input">Reply Deadline
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<div style="display: inline-block">
|
||||
<input class="form-control"
|
||||
id="reply-deadline-input"
|
||||
type="text"
|
||||
ng-model="riskEventEdit.reply_email_date"
|
||||
uib-datepicker-popup
|
||||
size="10"
|
||||
placeholder="Reply Deadline"
|
||||
is-open="replyDeadline.open"
|
||||
ng-click="replyDeadline.open=true">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2"
|
||||
for="description-input">Description
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control"
|
||||
maxlength="5000"
|
||||
ng-model="riskEventEdit.description"
|
||||
name="description"
|
||||
id="description-input">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2"
|
||||
for="channel-result-input">Channel Handle Result
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control"
|
||||
ng-model="riskEventEdit.channel_result"
|
||||
type="text"
|
||||
name="description"
|
||||
id="channel-result-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group margin-bottom margin-top">
|
||||
<button class="btn btn-success"
|
||||
style="margin-right: 10px;"
|
||||
type="button"
|
||||
ng-click="save(riskEventForm)">Save
|
||||
</button>
|
||||
<button class="btn btn-warning"
|
||||
type="button"
|
||||
ng-click="changeEditFlag(editFlag)">cancel
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -0,0 +1,181 @@
|
||||
<div class="content" ui-view>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="box-solid">
|
||||
<div class="box box-warning">
|
||||
<div class="box-header">
|
||||
<div class="form-horizontal">
|
||||
|
||||
<!--Partner Code-->
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="control-label col-xs-4 col-sm-4"
|
||||
for="partner-code-search">Partner Code
|
||||
</label>
|
||||
<div class="col-xs-6">
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="partner-code-search"
|
||||
ng-model="params.clientMoniker">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Sub Merchant ID-->
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="control-label col-xs-4 col-sm-4"
|
||||
for="sub-merchant-id-search">Sub Merchant ID
|
||||
</label>
|
||||
<div class="col-xs-6">
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="sub-merchant-id-search"
|
||||
placeholder="子商户号"
|
||||
ng-model="params.subMerchantId">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Order Type-->
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="control-label col-xs-4 col-sm-4"
|
||||
for="order-type-input">Order Type
|
||||
</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control"
|
||||
name="order_type"
|
||||
ng-model="params.orderType"
|
||||
id="order-type-input"
|
||||
ng-options="key as value for (key, value) in orderTypesForBD">
|
||||
<option value="">ALL</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Order IDs-->
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="control-label col-xs-4 col-sm-4"
|
||||
for="order-ids-input">Order IDs
|
||||
</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control"
|
||||
ng-model="params.orderIds"
|
||||
type="text"
|
||||
name="order_ids"
|
||||
placeholder="多个订单请用逗号分隔"
|
||||
id="order-ids-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Result Type-->
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="control-label col-xs-4 col-sm-4"
|
||||
for="order-type-input">Result Type
|
||||
</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control"
|
||||
name="result_type"
|
||||
ng-model="params.resultType"
|
||||
id="result-type-input"
|
||||
ng-options="key as value for (key, value) in resultTypesForBD">
|
||||
<option value="">ALL</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Industry-->
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="control-label col-xs-4 col-sm-4"
|
||||
for="industry-select">Industry</label>
|
||||
<div class="col-xs-6">
|
||||
<select ng-model="params.industry"
|
||||
id="industry-select"
|
||||
class="form-control"
|
||||
ng-options="industry.value as industry.label for industry in industries">
|
||||
<option value="">ALL</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12">
|
||||
<button class="btn btn-primary"
|
||||
type="button"
|
||||
ng-click="loadRiskEvents(1)">
|
||||
<i class="fa fa-search"></i>Search
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">RiskEvent List</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Partner</th>
|
||||
<th>Order Type</th>
|
||||
<th>Result Type</th>
|
||||
<th>Sub Merchant ID</th>
|
||||
<th>Description</th>
|
||||
<th>Channel Result</th>
|
||||
<th>Risk Manager</th>
|
||||
<th>Create Time</th>
|
||||
<th>Operation</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="riskEvent in riskEvents">
|
||||
<td>
|
||||
<a role="button" ui-sref="partners.detail({clientMoniker: riskEvent.client_moniker})">
|
||||
{{riskEvent.short_name}}({{riskEvent.client_moniker}})
|
||||
</a>
|
||||
</td>
|
||||
<td ng-bind="riskEvent.order_type | orderType"></td>
|
||||
<td ng-class="{'text-orange': (riskEvent.result_type == 1), 'text-green': (riskEvent.result_type == 3), 'text-red': (riskEvent.result_type == 4)}">
|
||||
{{riskEvent.result_type | resultType:resultTypesForBD}}
|
||||
</td>
|
||||
<td ng-bind="riskEvent.sub_merchant_id"></td>
|
||||
<td ng-bind="riskEvent.description | limitTo:20"></td>
|
||||
<td ng-bind="riskEvent.channel_result"></td>
|
||||
<td ng-bind="riskEvent.fillin_person"></td>
|
||||
<td ng-bind="riskEvent.create_time"></td>
|
||||
<td>
|
||||
<a class="text-primary"
|
||||
role="button"
|
||||
title="Detail"
|
||||
ui-sref="analysis_monitoring.riskEvent_detail_bd({risk_id:riskEvent.risk_id})">
|
||||
<i class="fa fa-search"></i> Detail
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="box-footer"
|
||||
ng-if="riskEvents.length">
|
||||
<uib-pagination class="pagination"
|
||||
total-items="pagination.totalCount"
|
||||
boundary-links="true"
|
||||
ng-model="pagination.page"
|
||||
items-per-page="pagination.limit"
|
||||
max-size="10"
|
||||
ng-change="loadRiskEvents()"
|
||||
previous-text="‹"
|
||||
next-text="›"
|
||||
first-text="«"
|
||||
last-text="»">
|
||||
</uib-pagination>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
Total Records:{{pagination.totalCount}};Total Pages:{{pagination.totalPages}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,170 @@
|
||||
// define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], function (angular) {
|
||||
// 'use strict';
|
||||
var app = angular.module('riskUploadApp',['ngFileUpload','ui.bootstrap']);
|
||||
app.controller('riskUploadCtrl', ['$scope','$http','Upload','$filter',function ($scope,$http,Upload,$filter) {
|
||||
$scope.material={};
|
||||
$scope.codeKey=document.getElementById('codeKey').value;
|
||||
$scope.material.risk_id=document.getElementById('risk_id').value;
|
||||
$scope.order_type=document.getElementById('order_type').value;
|
||||
$scope.material.update_time=$filter('date')(new Date(), 'yyyy-MM-dd HH:mm:ss');
|
||||
$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) {
|
||||
var urls = new Array();
|
||||
var value = 0;
|
||||
$scope.file6Progress = {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.file6Progress;
|
||||
alert('Upload Failed');
|
||||
}, function (evt) {
|
||||
value += parseInt(100 * evt.loaded / evt.total );
|
||||
$scope.file6Progress.value = value/(files.length*2);
|
||||
})
|
||||
}
|
||||
$scope.material.file6_url = urls;
|
||||
}
|
||||
};
|
||||
$scope.submit = function (form) {
|
||||
$http.post('/risk/upload/'+$scope.codeKey, $scope.material).then(function (resp) {
|
||||
// commonDialog.alert({title: 'Success', content: 'Submit successfully', type: 'success'});
|
||||
alert('Submit successfully');
|
||||
window.location.href="/risk_upload_success.html";
|
||||
}, function (resp) {
|
||||
alert('Submit failed');
|
||||
// commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
|
||||
});
|
||||
}
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
|
||||
// return app;
|
||||
//
|
||||
// })
|
||||
|
||||
|
Loading…
Reference in new issue