|
@@ -9,8 +9,10 @@ import com.huiju.estateagents.base.BaseController;
|
9
|
9
|
import com.huiju.estateagents.base.ResponseBean;
|
10
|
10
|
import com.huiju.estateagents.common.CommConstant;
|
11
|
11
|
import com.huiju.estateagents.eContract.entity.TaCompanySeal;
|
|
12
|
+import com.huiju.estateagents.eContract.entity.TaContract;
|
12
|
13
|
import com.huiju.estateagents.eContract.service.ITaCompanySealService;
|
13
|
14
|
import com.huiju.estateagents.config.FadadaProperties;
|
|
15
|
+import com.huiju.estateagents.eContract.service.ITaContractService;
|
14
|
16
|
import com.huiju.estateagents.sample.entity.TaH5Demand;
|
15
|
17
|
import org.apache.commons.lang3.StringUtils;
|
16
|
18
|
import org.slf4j.Logger;
|
|
@@ -27,9 +29,13 @@ import com.huiju.estateagents.eContract.entity.TaCompany;
|
27
|
29
|
import org.springframework.web.bind.annotation.RestController;
|
28
|
30
|
|
29
|
31
|
import javax.servlet.http.HttpServletRequest;
|
|
32
|
+import javax.servlet.http.HttpServletResponse;
|
|
33
|
+import java.io.IOException;
|
|
34
|
+import java.io.PrintWriter;
|
30
|
35
|
import java.util.HashMap;
|
31
|
36
|
import java.util.List;
|
32
|
37
|
import java.util.Map;
|
|
38
|
+import java.util.ResourceBundle;
|
33
|
39
|
|
34
|
40
|
/**
|
35
|
41
|
* <p>
|
|
@@ -54,6 +60,9 @@ public class TaCompanyController extends BaseController {
|
54
|
60
|
@Autowired
|
55
|
61
|
private ITaCompanySealService iTaCompanySealService;
|
56
|
62
|
|
|
63
|
+ @Autowired
|
|
64
|
+ private ITaContractService iTaContractService;
|
|
65
|
+
|
57
|
66
|
/**
|
58
|
67
|
* 条件查询企业列表
|
59
|
68
|
*
|
|
@@ -419,10 +428,45 @@ public class TaCompanyController extends BaseController {
|
419
|
428
|
iTaCompanyService.updateById(taCompany);
|
420
|
429
|
}
|
421
|
430
|
|
|
431
|
+ /**
|
|
432
|
+ * 自动授权签章回调
|
|
433
|
+ */
|
|
434
|
+ @RequestMapping(value = "/fadd/autoAuthCompanySeal", method = RequestMethod.POST)
|
|
435
|
+ public void autoAuthCompanySealNotify(@RequestParam String transactionId,
|
|
436
|
+ @RequestParam Integer contractId,
|
|
437
|
+ @RequestParam String downloadUrl,
|
|
438
|
+ @RequestParam String viewpdfUrl,
|
|
439
|
+ @RequestParam String resultCode,
|
|
440
|
+ @RequestParam String resultDesc,
|
|
441
|
+ HttpServletRequest request){
|
|
442
|
+ TaContract taContract = new TaContract();
|
|
443
|
+ taContract.setContractId(contractId);
|
|
444
|
+ QueryWrapper<TaContract> contractQueryWrapper = new QueryWrapper<>();
|
|
445
|
+ contractQueryWrapper.eq("contract_download_url", downloadUrl);
|
|
446
|
+ contractQueryWrapper.eq("contract_view_url", viewpdfUrl);
|
|
447
|
+ iTaContractService.update(taContract, contractQueryWrapper);
|
|
448
|
+
|
|
449
|
+ TaCompany taCompany = new TaCompany();
|
|
450
|
+ taCompany.setCompanyId(iTaContractService.getById(contractId).getCompanyId());
|
|
451
|
+ QueryWrapper<TaCompany> taCompanyQueryWrapper = new QueryWrapper<>();
|
|
452
|
+ taCompanyQueryWrapper.eq("authorize_status", resultCode.equals("3000") ? "1" : "0");
|
|
453
|
+ taCompanyQueryWrapper.eq("authorize_transaction_id", transactionId);
|
|
454
|
+ taCompanyQueryWrapper.eq("authorize_contract_id", contractId);
|
|
455
|
+ taCompanyQueryWrapper.eq("authorize_download_url", downloadUrl);
|
|
456
|
+ taCompanyQueryWrapper.eq("authorize_view_url", viewpdfUrl);
|
|
457
|
+ taCompanyQueryWrapper.eq("authorize_description", resultDesc);
|
|
458
|
+ iTaCompanyService.update(taCompany, taCompanyQueryWrapper);
|
|
459
|
+
|
|
460
|
+ }
|
|
461
|
+
|
422
|
462
|
/**
|
423
|
463
|
* 自动签章授权
|
424
|
464
|
*/
|
425
|
|
- public ResponseBean autoAuthCompanySeal(Integer companyId, HttpServletRequest request){
|
426
|
|
- return null;
|
|
465
|
+ @RequestMapping(value = "/channel/company/autoAuthCompany/{id}", method = RequestMethod.PUT)
|
|
466
|
+ public ResponseBean autoAuthCompanySeal(@PathVariable Integer id, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
|
467
|
+ ResponseBean responseBean = new ResponseBean();
|
|
468
|
+ String res = iTaCompanyService.autoAuthCompanySeal(id, getOrgId(request));
|
|
469
|
+ responseBean.addSuccess((Object)res);
|
|
470
|
+ return responseBean;
|
427
|
471
|
}
|
428
|
472
|
}
|