Showing
7 changed files
with
193 additions
and
17 deletions
@@ -35,7 +35,13 @@ public class BusinessLicenseReq extends PageRequestBO{ | @@ -35,7 +35,13 @@ public class BusinessLicenseReq extends PageRequestBO{ | ||
35 | 35 | ||
36 | private String certNo; | 36 | private String certNo; |
37 | 37 | ||
38 | - private String licenseImage; | 38 | + private Integer startTime; |
39 | + | ||
40 | + private Integer expireTime; | ||
41 | + | ||
42 | + private String licenseOriginalImage; | ||
43 | + | ||
44 | + private String licenseCopyImage; | ||
39 | 45 | ||
40 | private String certFaceImage; | 46 | private String certFaceImage; |
41 | 47 |
@@ -43,9 +43,7 @@ public class BusinessLicenseRsp extends PageRequestBO{ | @@ -43,9 +43,7 @@ public class BusinessLicenseRsp extends PageRequestBO{ | ||
43 | 43 | ||
44 | private String rejectReason; | 44 | private String rejectReason; |
45 | 45 | ||
46 | - private String startTime; | ||
47 | - | ||
48 | - private String expireTime; | 46 | + private String validDate; |
49 | 47 | ||
50 | private String licenseOriginalImage; | 48 | private String licenseOriginalImage; |
51 | 49 | ||
@@ -55,4 +53,8 @@ public class BusinessLicenseRsp extends PageRequestBO{ | @@ -55,4 +53,8 @@ public class BusinessLicenseRsp extends PageRequestBO{ | ||
55 | 53 | ||
56 | private String socialCreditCode; | 54 | private String socialCreditCode; |
57 | 55 | ||
56 | + private String certFaceImage; | ||
57 | + | ||
58 | + private String certReverseImage; | ||
59 | + | ||
58 | } | 60 | } |
@@ -30,7 +30,8 @@ | @@ -30,7 +30,8 @@ | ||
30 | <insert id="insert" parameterType="com.yoho.order.model.BusinessLicense"> | 30 | <insert id="insert" parameterType="com.yoho.order.model.BusinessLicense"> |
31 | insert into business_license (uid, business_type, business_name, social_credit_code, cert_name, cert_no, start_time, expire_time, | 31 | insert into business_license (uid, business_type, business_name, social_credit_code, cert_name, cert_no, start_time, expire_time, |
32 | license_original_image, license_copy_image, cert_face_image, cert_reverse_image, commit_time) values (#{uid}, #{businessType}, #{businessName}, | 32 | license_original_image, license_copy_image, cert_face_image, cert_reverse_image, commit_time) values (#{uid}, #{businessType}, #{businessName}, |
33 | - #{socialCreditCode}, #{certName}, #{certNo}, #{licenseImage}, #{certFaceImage}, #{certReverseImage}, #{commitTime}) | 33 | + #{socialCreditCode}, #{certName}, #{certNo}, #{startTime}, #{expireTime}, #{licenseOriginalImage}, #{licenseCopyImage}, |
34 | + #{certFaceImage}, #{certReverseImage}, #{commitTime}) | ||
34 | </insert> | 35 | </insert> |
35 | 36 | ||
36 | <select id="selectByUid" resultMap="BaseResultMap"> | 37 | <select id="selectByUid" resultMap="BaseResultMap"> |
@@ -79,7 +80,7 @@ | @@ -79,7 +80,7 @@ | ||
79 | </if> | 80 | </if> |
80 | </select> | 81 | </select> |
81 | 82 | ||
82 | - <select id="selectById"> | 83 | + <select id="selectById" resultMap="BaseResultMap"> |
83 | select <include refid="Base_Column_List"></include> | 84 | select <include refid="Base_Column_List"></include> |
84 | from business_license | 85 | from business_license |
85 | where id=#{id} | 86 | where id=#{id} |
@@ -68,5 +68,12 @@ public class BusinessLicenseController { | @@ -68,5 +68,12 @@ public class BusinessLicenseController { | ||
68 | 68 | ||
69 | return new ApiResponse.ApiResponseBuilder().code(200).message(info).data(auditStatusStr).build(); | 69 | return new ApiResponse.ApiResponseBuilder().code(200).message(info).data(auditStatusStr).build(); |
70 | } | 70 | } |
71 | + | ||
72 | + @RequestMapping(value = "/getDetailById") | ||
73 | + public ApiResponse getDetailById(BusinessLicenseReq req) { | ||
74 | + LOGGER.info("save in. req is {}", req); | ||
75 | + BusinessLicenseRsp result = businessLicenseService.getDetail(req); | ||
76 | + return new ApiResponse.ApiResponseBuilder().code(200).data(result).message("保存成功").build(); | ||
77 | + } | ||
71 | 78 | ||
72 | } | 79 | } |
@@ -99,10 +99,23 @@ public class BusinessLicenseServiceImpl implements IBusinessLicenseService { | @@ -99,10 +99,23 @@ public class BusinessLicenseServiceImpl implements IBusinessLicenseService { | ||
99 | BusinessLicenseRsp rsp = new BusinessLicenseRsp(); | 99 | BusinessLicenseRsp rsp = new BusinessLicenseRsp(); |
100 | BeanUtils.copyProperties(bl, rsp, BusinessLicenseRsp.class); | 100 | BeanUtils.copyProperties(bl, rsp, BusinessLicenseRsp.class); |
101 | rsp.setBusinessTypeStr(getBusinessTypeStr(bl.getBusinessType())); | 101 | rsp.setBusinessTypeStr(getBusinessTypeStr(bl.getBusinessType())); |
102 | + rsp.setValidDate(getValidDateStr(bl.getStartTime(), bl.getExpireTime())); | ||
102 | 103 | ||
103 | return rsp; | 104 | return rsp; |
104 | } | 105 | } |
105 | 106 | ||
107 | + private String getValidDateStr(Integer startTime, Integer expireTime) { | ||
108 | + StringBuilder sb = new StringBuilder(); | ||
109 | + sb.append(DateUtil.getDateStrBySecond(startTime, "yyyy.MM.dd")).append(" - "); | ||
110 | + if(expireTime.intValue() == 0) { | ||
111 | + sb.append("无限期"); | ||
112 | + }else { | ||
113 | + sb.append(DateUtil.getDateStrBySecond(expireTime, "yyyy.MM.dd")); | ||
114 | + } | ||
115 | + | ||
116 | + return sb.toString(); | ||
117 | + } | ||
118 | + | ||
106 | private String getBusinessTypeStr(int type) { | 119 | private String getBusinessTypeStr(int type) { |
107 | if(type == 1) { | 120 | if(type == 1) { |
108 | return "个体工商户"; | 121 | return "个体工商户"; |
@@ -4,15 +4,6 @@ | @@ -4,15 +4,6 @@ | ||
4 | <meta charset="UTF-8"/> | 4 | <meta charset="UTF-8"/> |
5 | <title>Yoho!Buy运营平台</title> | 5 | <title>Yoho!Buy运营平台</title> |
6 | <script src="/ufoPlatform/js/include.js"></script> | 6 | <script src="/ufoPlatform/js/include.js"></script> |
7 | - <style> | ||
8 | - .selected{background: #5bc0de; color:#fff; } | ||
9 | - </style> | ||
10 | - | ||
11 | - <style type="text/css"> | ||
12 | - .nav li {float:left; list-style:none;} | ||
13 | - .nav li a{float:left;text-decoration:none;padding:0.2em 1.6em;border-right:1px solid white;color:black; font-size:14px;} | ||
14 | -</style> | ||
15 | - | ||
16 | </head> | 7 | </head> |
17 | <body class="easyui-layout"> | 8 | <body class="easyui-layout"> |
18 | <div region="north" style="height:230px;"> | 9 | <div region="north" style="height:230px;"> |
@@ -156,8 +147,8 @@ function getBusinessList(){ | @@ -156,8 +147,8 @@ function getBusinessList(){ | ||
156 | onLoadSuccess: function (data) { | 147 | onLoadSuccess: function (data) { |
157 | $(this).datagrid("getPanel").find("a[role='detail']").linkbutton({ | 148 | $(this).datagrid("getPanel").find("a[role='detail']").linkbutton({ |
158 | onClick: function () { | 149 | onClick: function () { |
159 | - var orderCode = $(this).attr("dataId"); | ||
160 | - window.open(contextPath + "/html/orderManage/detail.html?orderCode=" + orderCode + "&ver=" + new Date().getTime()) | 150 | + var id = $(this).attr("dataId"); |
151 | + window.open(contextPath + "/html/businessLicense/view.html?id=" + id + "&ver=" + new Date().getTime()) | ||
161 | } | 152 | } |
162 | }); | 153 | }); |
163 | 154 |
1 | +<!DOCTYPE html> | ||
2 | +<html> | ||
3 | +<head> | ||
4 | + <meta charset="UTF-8"/> | ||
5 | + <title>Yoho!Buy运营平台</title> | ||
6 | + <script src="/ufoPlatform/js/include.js"></script> | ||
7 | + <style> | ||
8 | + .sub-info th{ | ||
9 | + font-size: 16px; | ||
10 | + text-align: right; | ||
11 | + width: 30%; | ||
12 | + } | ||
13 | + .sub-info td{ | ||
14 | + font-size: 16px; | ||
15 | + width: 70%; | ||
16 | + } | ||
17 | + </style> | ||
18 | +</head> | ||
19 | +<body class="easyui-layout"> | ||
20 | +<div region="north" style="height:90px;"> | ||
21 | + <script> | ||
22 | + document.write(addHead('营业执照认证', '商户入驻资质审核')); | ||
23 | + </script> | ||
24 | +</div> | ||
25 | + | ||
26 | +<div id="businessDiv" region="center"> | ||
27 | + <table id="businessTable" class="sub-info" frame="void" width="80%" cellpadding="16" align="center"> | ||
28 | + <tr> | ||
29 | + <th>商户类型</th> | ||
30 | + <td id="businessTypeStr"></td> | ||
31 | + </tr> | ||
32 | + <tr> | ||
33 | + <th id="businessNameTitle">个体工商户名称</th> | ||
34 | + <td id="businessName"></td> | ||
35 | + </tr> | ||
36 | + <tr> | ||
37 | + <th>统一社会信用代码</th> | ||
38 | + <td id="socialCreditCode"></td> | ||
39 | + </tr> | ||
40 | + <tr> | ||
41 | + <th id="certNameTitle">经营者姓名</th> | ||
42 | + <td id="certName"></td> | ||
43 | + </tr> | ||
44 | + <tr> | ||
45 | + <th id="certNoTitle">经营者身份证号</th> | ||
46 | + <td id="certNo"></td> | ||
47 | + </tr> | ||
48 | + <tr> | ||
49 | + <th>营业执照有效期</th> | ||
50 | + <td id="validDate"></td> | ||
51 | + </tr> | ||
52 | + <tr> | ||
53 | + <th>企业营业执照正本照片</th> | ||
54 | + <td><img id="licenseOriginalImage" height='132px;' width='211px;' /></td> | ||
55 | + </tr> | ||
56 | + <tr> | ||
57 | + <th>企业营业执照副本照片</th> | ||
58 | + <td><img id="licenseCopyImage" height='132px;' width='211px;' /></td> | ||
59 | + </tr> | ||
60 | + <tr> | ||
61 | + <th>法人身份证正面照片</th> | ||
62 | + <td><img id="certFaceImage" height='132px;' width='211px;' /></td> | ||
63 | + </tr> | ||
64 | + <tr> | ||
65 | + <th>法人身份证反面照片</th> | ||
66 | + <td><img id="certReverseImage" height='132px;' width='211px;' /></td> | ||
67 | + </tr> | ||
68 | + <tr> | ||
69 | + <th rowspan="2">不通过原因</th> | ||
70 | + <td id="rejectReason" rowspan="2"></td> | ||
71 | + </tr> | ||
72 | + </table> | ||
73 | +</div> | ||
74 | +<script> | ||
75 | +$(function() { | ||
76 | + var param=window.location.search; | ||
77 | + var id = getQueryString(param, "id"); | ||
78 | + | ||
79 | + getDetailInfo(id); | ||
80 | + | ||
81 | + | ||
82 | + | ||
83 | + $("#searchBtn").linkbutton({ | ||
84 | + iconCls : "icon-search", | ||
85 | + onClick : function() { | ||
86 | + $("#businessListTable").datagrid("load", { | ||
87 | + uid : $("#uid").val(), | ||
88 | + businessName : $("#businessName").val(), | ||
89 | + validStatus : $("#validStatus").myCombobox("getValue") | ||
90 | + }); | ||
91 | + } | ||
92 | + }); | ||
93 | + | ||
94 | + //全部按钮 | ||
95 | + $("#allBtn").linkbutton({ | ||
96 | + iconCls: "icon-import", | ||
97 | + onClick: function () { | ||
98 | + $("#uid").textbox('setValue',''); | ||
99 | + $("#businessName").textbox('setValue',''); | ||
100 | + $("#validStatus").combobox('setValue',''); | ||
101 | + } | ||
102 | + }); | ||
103 | + | ||
104 | +}); | ||
105 | + | ||
106 | +function getDetailInfo(id){ | ||
107 | + var form = new FormData(); | ||
108 | + form.append("id", id); | ||
109 | + | ||
110 | + //发送请求 | ||
111 | + $.ajax({ | ||
112 | + type: "POST", | ||
113 | + url: contextPath + '/businessLicense/getDetailById', | ||
114 | + data: form, | ||
115 | + async: false, | ||
116 | + cache: false, | ||
117 | + contentType: false, | ||
118 | + processData: false, | ||
119 | + dataType: 'json', | ||
120 | + success: function (result) { | ||
121 | + if(result.code == 200) { | ||
122 | + var businessType = result.data.businessType; | ||
123 | + if(businessType == 2){ | ||
124 | + $("#businessNameTitle").html("企业名称"); | ||
125 | + $("#certNameTitle").html("法人姓名"); | ||
126 | + $("#certNoTitle").html("法人身份证号"); | ||
127 | + } | ||
128 | + $("#businessTypeStr").html(result.data.businessTypeStr); | ||
129 | + $("#businessName").html(result.data.businessName); | ||
130 | + $("#socialCreditCode").html(result.data.socialCreditCode); | ||
131 | + $("#certName").html(result.data.certName); | ||
132 | + $("#certNo").html(result.data.certNo); | ||
133 | + $("#validDate").html(result.data.validDate); | ||
134 | + $("#licenseOriginalImage").attr("src", result.data.licenseOriginalImage); | ||
135 | + $("#licenseCopyImage").attr("src", result.data.licenseCopyImage); | ||
136 | + $("#certFaceImage").attr("src", result.data.certFaceImage); | ||
137 | + $("#certReverseImage").attr("src", result.data.certReverseImage); | ||
138 | + | ||
139 | + } | ||
140 | + else { | ||
141 | + $.messager.alert("失败", result.message, "error"); | ||
142 | + } | ||
143 | + } | ||
144 | + }); | ||
145 | +} | ||
146 | + | ||
147 | +function getQueryString(paraPart,name) { | ||
148 | + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); | ||
149 | + var r = paraPart.substr(1).match(reg); | ||
150 | + if (r != null) return unescape(r[2]); | ||
151 | + return null; | ||
152 | +} | ||
153 | + | ||
154 | +</script> | ||
155 | +</body> | ||
156 | +</html> |
-
Please register or login to post a comment