|
@@ -159,12 +159,35 @@ public class BankTenderpubController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 获取标段发布详细信息
|
|
|
|
|
|
+ * 同步标段发布信息
|
|
*/
|
|
*/
|
|
// @RequiresPermissions("bank:tenderpub:query")
|
|
// @RequiresPermissions("bank:tenderpub:query")
|
|
@GetMapping(value = "/{tenderpubid}")
|
|
@GetMapping(value = "/{tenderpubid}")
|
|
public AjaxResult getInfo(@PathVariable("tenderpubid") String tenderpubid) {
|
|
public AjaxResult getInfo(@PathVariable("tenderpubid") String tenderpubid) {
|
|
- return success(bankTenderpubService.selectBankTenderpubByTenderpubid(tenderpubid));
|
|
|
|
|
|
+ if (tenderpubid == null) return error("请求参数错误");
|
|
|
|
+ BankTenderpub b = bankTenderpubService.selectBankTenderpubByTenderpubid(tenderpubid);
|
|
|
|
+ if (b == null) return error("没查询到此条数据");
|
|
|
|
+
|
|
|
|
+ String rtnxml = postBank(b);
|
|
|
|
+
|
|
|
|
+ String rtn = JsonUtils.getStatus(rtnxml);
|
|
|
|
+
|
|
|
|
+ if (rtn.contains("成功")) {
|
|
|
|
+ if (update(b, rtnxml) > 0) {
|
|
|
|
+ /** 同时查询保存标段查询信息 **/
|
|
|
|
+ BankTenderpub b1 = bankTenderpubService.selectBankTenderpubByTenderpubid(b.getTenderpubid());
|
|
|
|
+ BankTenderquery bt = new BankTenderquery();
|
|
|
|
+ bt.setPpid(Long.valueOf(b1.getPpid()));
|
|
|
|
+ bt.setSgtid(b1.getRtnSgtid());
|
|
|
|
+ AjaxResult msg = bankTenderqueryController.addBankTenderquery(bt);
|
|
|
|
+ if (msg.isSuccess()) {
|
|
|
|
+ return success("同步银行数据成功");
|
|
|
|
+ } else {
|
|
|
|
+ return error("同步银行数据失败");
|
|
|
|
+ }
|
|
|
|
+ } else
|
|
|
|
+ return error("同步银行数据失败");
|
|
|
|
+ } else return AjaxResult.error(rtn);
|
|
}
|
|
}
|
|
|
|
|
|
public Map<String, Object> getInfos(@PathVariable("ppid") String ppid) {
|
|
public Map<String, Object> getInfos(@PathVariable("ppid") String ppid) {
|