Authored by caoyan

营业执照

... ... @@ -35,7 +35,13 @@ public class BusinessLicenseReq extends PageRequestBO{
private String certNo;
private String licenseImage;
private Integer startTime;
private Integer expireTime;
private String licenseOriginalImage;
private String licenseCopyImage;
private String certFaceImage;
... ...
... ... @@ -43,9 +43,7 @@ public class BusinessLicenseRsp extends PageRequestBO{
private String rejectReason;
private String startTime;
private String expireTime;
private String validDate;
private String licenseOriginalImage;
... ... @@ -55,4 +53,8 @@ public class BusinessLicenseRsp extends PageRequestBO{
private String socialCreditCode;
private String certFaceImage;
private String certReverseImage;
}
... ...
... ... @@ -30,7 +30,8 @@
<insert id="insert" parameterType="com.yoho.order.model.BusinessLicense">
insert into business_license (uid, business_type, business_name, social_credit_code, cert_name, cert_no, start_time, expire_time,
license_original_image, license_copy_image, cert_face_image, cert_reverse_image, commit_time) values (#{uid}, #{businessType}, #{businessName},
#{socialCreditCode}, #{certName}, #{certNo}, #{licenseImage}, #{certFaceImage}, #{certReverseImage}, #{commitTime})
#{socialCreditCode}, #{certName}, #{certNo}, #{startTime}, #{expireTime}, #{licenseOriginalImage}, #{licenseCopyImage},
#{certFaceImage}, #{certReverseImage}, #{commitTime})
</insert>
<select id="selectByUid" resultMap="BaseResultMap">
... ... @@ -79,7 +80,7 @@
</if>
</select>
<select id="selectById">
<select id="selectById" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from business_license
where id=#{id}
... ...
... ... @@ -68,5 +68,12 @@ public class BusinessLicenseController {
return new ApiResponse.ApiResponseBuilder().code(200).message(info).data(auditStatusStr).build();
}
@RequestMapping(value = "/getDetailById")
public ApiResponse getDetailById(BusinessLicenseReq req) {
LOGGER.info("save in. req is {}", req);
BusinessLicenseRsp result = businessLicenseService.getDetail(req);
return new ApiResponse.ApiResponseBuilder().code(200).data(result).message("保存成功").build();
}
}
... ...
... ... @@ -99,10 +99,23 @@ public class BusinessLicenseServiceImpl implements IBusinessLicenseService {
BusinessLicenseRsp rsp = new BusinessLicenseRsp();
BeanUtils.copyProperties(bl, rsp, BusinessLicenseRsp.class);
rsp.setBusinessTypeStr(getBusinessTypeStr(bl.getBusinessType()));
rsp.setValidDate(getValidDateStr(bl.getStartTime(), bl.getExpireTime()));
return rsp;
}
private String getValidDateStr(Integer startTime, Integer expireTime) {
StringBuilder sb = new StringBuilder();
sb.append(DateUtil.getDateStrBySecond(startTime, "yyyy.MM.dd")).append(" - ");
if(expireTime.intValue() == 0) {
sb.append("无限期");
}else {
sb.append(DateUtil.getDateStrBySecond(expireTime, "yyyy.MM.dd"));
}
return sb.toString();
}
private String getBusinessTypeStr(int type) {
if(type == 1) {
return "个体工商户";
... ...
... ... @@ -4,15 +4,6 @@
<meta charset="UTF-8"/>
<title>Yoho!Buy运营平台</title>
<script src="/ufoPlatform/js/include.js"></script>
<style>
.selected{background: #5bc0de; color:#fff; }
</style>
<style type="text/css">
.nav li {float:left; list-style:none;}
.nav li a{float:left;text-decoration:none;padding:0.2em 1.6em;border-right:1px solid white;color:black; font-size:14px;}
</style>
</head>
<body class="easyui-layout">
<div region="north" style="height:230px;">
... ... @@ -156,8 +147,8 @@ function getBusinessList(){
onLoadSuccess: function (data) {
$(this).datagrid("getPanel").find("a[role='detail']").linkbutton({
onClick: function () {
var orderCode = $(this).attr("dataId");
window.open(contextPath + "/html/orderManage/detail.html?orderCode=" + orderCode + "&ver=" + new Date().getTime())
var id = $(this).attr("dataId");
window.open(contextPath + "/html/businessLicense/view.html?id=" + id + "&ver=" + new Date().getTime())
}
});
... ...
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>Yoho!Buy运营平台</title>
<script src="/ufoPlatform/js/include.js"></script>
<style>
.sub-info th{
font-size: 16px;
text-align: right;
width: 30%;
}
.sub-info td{
font-size: 16px;
width: 70%;
}
</style>
</head>
<body class="easyui-layout">
<div region="north" style="height:90px;">
<script>
document.write(addHead('营业执照认证', '商户入驻资质审核'));
</script>
</div>
<div id="businessDiv" region="center">
<table id="businessTable" class="sub-info" frame="void" width="80%" cellpadding="16" align="center">
<tr>
<th>商户类型</th>
<td id="businessTypeStr"></td>
</tr>
<tr>
<th id="businessNameTitle">个体工商户名称</th>
<td id="businessName"></td>
</tr>
<tr>
<th>统一社会信用代码</th>
<td id="socialCreditCode"></td>
</tr>
<tr>
<th id="certNameTitle">经营者姓名</th>
<td id="certName"></td>
</tr>
<tr>
<th id="certNoTitle">经营者身份证号</th>
<td id="certNo"></td>
</tr>
<tr>
<th>营业执照有效期</th>
<td id="validDate"></td>
</tr>
<tr>
<th>企业营业执照正本照片</th>
<td><img id="licenseOriginalImage" height='132px;' width='211px;' /></td>
</tr>
<tr>
<th>企业营业执照副本照片</th>
<td><img id="licenseCopyImage" height='132px;' width='211px;' /></td>
</tr>
<tr>
<th>法人身份证正面照片</th>
<td><img id="certFaceImage" height='132px;' width='211px;' /></td>
</tr>
<tr>
<th>法人身份证反面照片</th>
<td><img id="certReverseImage" height='132px;' width='211px;' /></td>
</tr>
<tr>
<th rowspan="2">不通过原因</th>
<td id="rejectReason" rowspan="2"></td>
</tr>
</table>
</div>
<script>
$(function() {
var param=window.location.search;
var id = getQueryString(param, "id");
getDetailInfo(id);
$("#searchBtn").linkbutton({
iconCls : "icon-search",
onClick : function() {
$("#businessListTable").datagrid("load", {
uid : $("#uid").val(),
businessName : $("#businessName").val(),
validStatus : $("#validStatus").myCombobox("getValue")
});
}
});
//全部按钮
$("#allBtn").linkbutton({
iconCls: "icon-import",
onClick: function () {
$("#uid").textbox('setValue','');
$("#businessName").textbox('setValue','');
$("#validStatus").combobox('setValue','');
}
});
});
function getDetailInfo(id){
var form = new FormData();
form.append("id", id);
//发送请求
$.ajax({
type: "POST",
url: contextPath + '/businessLicense/getDetailById',
data: form,
async: false,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function (result) {
if(result.code == 200) {
var businessType = result.data.businessType;
if(businessType == 2){
$("#businessNameTitle").html("企业名称");
$("#certNameTitle").html("法人姓名");
$("#certNoTitle").html("法人身份证号");
}
$("#businessTypeStr").html(result.data.businessTypeStr);
$("#businessName").html(result.data.businessName);
$("#socialCreditCode").html(result.data.socialCreditCode);
$("#certName").html(result.data.certName);
$("#certNo").html(result.data.certNo);
$("#validDate").html(result.data.validDate);
$("#licenseOriginalImage").attr("src", result.data.licenseOriginalImage);
$("#licenseCopyImage").attr("src", result.data.licenseCopyImage);
$("#certFaceImage").attr("src", result.data.certFaceImage);
$("#certReverseImage").attr("src", result.data.certReverseImage);
}
else {
$.messager.alert("失败", result.message, "error");
}
}
});
}
function getQueryString(paraPart,name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = paraPart.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
</script>
</body>
</html>
\ No newline at end of file
... ...