Merge branch 'bo_dev' of gitee.com:septemyang/RuoYi into master
This commit is contained in:
commit
78043a51db
|
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.6.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>box-bps</artifactId>
|
||||
|
||||
<description>
|
||||
bps系统模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>20160810</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>1.5.21</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.kuaidi100-api</groupId>
|
||||
<artifactId>sdk</artifactId>
|
||||
<version>1.0.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,186 @@
|
|||
package com.ruoyi.bps.controller;
|
||||
|
||||
import com.ruoyi.bps.domain.ExpImportQuery;
|
||||
import com.ruoyi.bps.domain.ExpressInfo;
|
||||
import com.ruoyi.bps.mapper.ExpressInfoMapper;
|
||||
import com.ruoyi.bps.service.IExpImportQueryService;
|
||||
import com.ruoyi.bps.service.IExpressInfoService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Excel批量快递查询Controller
|
||||
*
|
||||
* @author Bo
|
||||
* @date 2021-07-21
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/bps/expImportQuery")
|
||||
public class ExpImportQueryController extends BaseController
|
||||
{
|
||||
private String prefix = "bps/expImportQuery";
|
||||
|
||||
@Autowired
|
||||
private IExpImportQueryService expImportQueryService;
|
||||
|
||||
@Autowired
|
||||
private IExpressInfoService expressInfoService;
|
||||
|
||||
@Autowired
|
||||
private ExpressInfoMapper expressInfoMapper;
|
||||
|
||||
@RequiresPermissions("bps:expImportQuery:view")
|
||||
@GetMapping()
|
||||
public String expImportQuery()
|
||||
{
|
||||
return prefix + "/expImportQuery";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询Excel批量快递查询列表
|
||||
*/
|
||||
@RequiresPermissions("bps:expImportQuery:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ExpImportQuery expImportQuery)
|
||||
{
|
||||
startPage();
|
||||
List<ExpImportQuery> list = expImportQueryService.selectExpImportQueryList(expImportQuery);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出Excel批量快递查询列表
|
||||
*/
|
||||
@RequiresPermissions("bps:expImportQuery:export")
|
||||
@Log(title = "Excel批量快递查询", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ExpImportQuery expImportQuery)
|
||||
{
|
||||
List<ExpImportQuery> list = expImportQueryService.selectExpImportQueryList(expImportQuery);
|
||||
ExcelUtil<ExpImportQuery> util = new ExcelUtil<ExpImportQuery>(ExpImportQuery.class);
|
||||
return util.exportExcel(list, "Excel批量快递查询数据");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出Excel批量快递查询列表
|
||||
*/
|
||||
@RequiresPermissions("bps:expressInfo:export")
|
||||
@Log(title = "详细快递信息导出", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/exportDetail")
|
||||
@ResponseBody
|
||||
public AjaxResult exportDetail(ExpressInfo expressInfo)
|
||||
{
|
||||
List<ExpressInfo> list = expressInfoService.selectLocalExpressInfoList(expressInfo);
|
||||
ExcelUtil<ExpressInfo> util = new ExcelUtil<ExpressInfo>(ExpressInfo.class);
|
||||
return util.exportExcel(list, "Excel批量快递查询数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增Excel批量快递查询
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存Excel批量快递查询
|
||||
*/
|
||||
@RequiresPermissions("bps:expImportQuery:add")
|
||||
@Log(title = "Excel批量快递查询", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ExpImportQuery expImportQuery)
|
||||
{
|
||||
return toAjax(expImportQueryService.insertExpImportQuery(expImportQuery));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改Excel批量快递查询
|
||||
*/
|
||||
@GetMapping("/edit/{sid}")
|
||||
public String edit(@PathVariable("sid") Long sid, ModelMap mmap)
|
||||
{
|
||||
ExpImportQuery expImportQuery = expImportQueryService.selectExpImportQueryById(sid);
|
||||
mmap.put("expImportQuery", expImportQuery);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存Excel批量快递查询
|
||||
*/
|
||||
@RequiresPermissions("bps:expImportQuery:edit")
|
||||
@Log(title = "Excel批量快递查询", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ExpImportQuery expImportQuery)
|
||||
{
|
||||
return toAjax(expImportQueryService.updateExpImportQuery(expImportQuery));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除Excel批量快递查询
|
||||
*/
|
||||
@RequiresPermissions("bps:expImportQuery:remove")
|
||||
@Log(title = "Excel批量快递查询", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(expImportQueryService.deleteExpImportQueryByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 快递查询明细信息
|
||||
*/
|
||||
@RequiresPermissions("bps:expImportQuery:detail")
|
||||
@GetMapping("/detail/{sid}")
|
||||
public String detail(@PathVariable("sid") Long sid, ModelMap mmap)
|
||||
{
|
||||
String queryId = expImportQueryService.selectExpImportQueryById(sid).getQueryId();
|
||||
ExpressInfo expressInfo= new ExpressInfo();
|
||||
expressInfo.setQueryId(queryId);
|
||||
mmap.put("expressInfo",expressInfo);
|
||||
return prefix + "/detail";
|
||||
}
|
||||
|
||||
/**
|
||||
* Excel导入查模板下载
|
||||
*/
|
||||
@GetMapping ( "/importTemplate" )
|
||||
@ResponseBody
|
||||
public AjaxResult importTemplate ( ) {
|
||||
ExcelUtil <ExpressInfo> util = new ExcelUtil<>(ExpressInfo.class);
|
||||
return util.importTemplateExcel ( "快递查询导入模板" );
|
||||
}
|
||||
|
||||
/**
|
||||
* Excel导入查询
|
||||
*/
|
||||
@PostMapping("/importData")
|
||||
@Log(title = "Excel批量导入快递查询", businessType = BusinessType.IMPORT)
|
||||
@ResponseBody
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
||||
{
|
||||
ExcelUtil<ExpressInfo> util= new ExcelUtil<ExpressInfo>(ExpressInfo.class);
|
||||
List<ExpressInfo> expressInfoList=util.importExcel(file.getInputStream());
|
||||
return expImportQueryService.importData(expressInfoList);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.ruoyi.bps.controller;
|
||||
|
||||
import com.kuaidi100.sdk.response.SubscribeResp;
|
||||
import com.ruoyi.bps.domain.ExpSubscribe;
|
||||
import com.ruoyi.bps.service.IExpSubsPushApiService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneOffset;
|
||||
|
||||
/**
|
||||
* 接受快递推送信息的API接口Controller
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-13
|
||||
*/
|
||||
@Api(value = "快递信息订阅推送",tags = "快递订阅接口")
|
||||
@RestController
|
||||
/*@RequestMapping("/anon")*/
|
||||
public class ExpSubsPushApiController extends BaseController {
|
||||
@Autowired
|
||||
IExpSubsPushApiService expSubsPushApiService;
|
||||
|
||||
//推送
|
||||
@CrossOrigin
|
||||
@PostMapping("anon/subscribeCallBackUrl")
|
||||
@ApiOperation("快递信息订阅推送接受")
|
||||
public SubscribeResp SubscribeCallBackUrl(HttpServletRequest request) {
|
||||
return expSubsPushApiService.ExpressSubscribeCallBackUrl(request);
|
||||
}
|
||||
|
||||
//订阅
|
||||
@CrossOrigin
|
||||
@PostMapping("anon/subscribe")
|
||||
public SubscribeResp Subscribe(ExpSubscribe expSubscribe){
|
||||
return expSubsPushApiService.ExpressSubscribe(expSubscribe);
|
||||
}
|
||||
|
||||
//接受topgp订阅,
|
||||
@Log(title = "快递订阅", businessType = BusinessType.OTHER)
|
||||
@CrossOrigin
|
||||
@ApiOperation(value="topgp订阅快递",notes = "request body格式: {\"requestId\":\"1628584040740\",\"deliveryNo\":\"S301-2108020001\",\"expressNo\":\"300444235610\",\"company\":\"annengwuliu\",\"phone\":\"13800138000\"}")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "requestJson", value = "请求json",required = true, paramType = "body", dataType = "String", dataTypeClass = String.class)
|
||||
})
|
||||
|
||||
@PostMapping("api/express/topgpSubscribe")
|
||||
public String topgpSubscribe(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
return expSubsPushApiService.ExpressSubscribeFromTopgp(request);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
package com.ruoyi.bps.controller;
|
||||
|
||||
import com.ruoyi.bps.domain.ExpSubsPushResp;
|
||||
import com.ruoyi.bps.service.IExpSubsPushRespService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 快递订阅推送信息增删改查Controller
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-13
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/bps/expsubspushresp")
|
||||
public class ExpSubsPushRespController extends BaseController
|
||||
{
|
||||
private String prefix = "bps/expsubspushresp";
|
||||
|
||||
@Autowired
|
||||
private IExpSubsPushRespService expSubsPushRespService;
|
||||
|
||||
@RequiresPermissions("bps:expsubspushresp:view")
|
||||
@GetMapping()
|
||||
public String expsubspushresp()
|
||||
{
|
||||
return prefix + "/expsubspushresp";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询快递订阅推送信息列表
|
||||
*/
|
||||
@RequiresPermissions("bps:expsubspushresp:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ExpSubsPushResp expSubsPushResp)
|
||||
{
|
||||
startPage();
|
||||
List<ExpSubsPushResp> list = expSubsPushRespService.selectExpSubsPushRespList(expSubsPushResp);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出快递订阅推送信息列表
|
||||
*/
|
||||
@RequiresPermissions("bps:expsubspushresp:export")
|
||||
@Log(title = "快递订阅推送信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ExpSubsPushResp expSubsPushResp)
|
||||
{
|
||||
List<ExpSubsPushResp> list = expSubsPushRespService.selectExpSubsPushRespList(expSubsPushResp);
|
||||
ExcelUtil<ExpSubsPushResp> util = new ExcelUtil<ExpSubsPushResp>(ExpSubsPushResp.class);
|
||||
return util.exportExcel(list, "快递订阅推送信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增快递订阅推送信息
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存快递订阅推送信息
|
||||
*/
|
||||
@RequiresPermissions("bps:expsubspushresp:add")
|
||||
@Log(title = "快递订阅推送信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ExpSubsPushResp expSubsPushResp)
|
||||
{
|
||||
return toAjax(expSubsPushRespService.insertExpSubsPushResp(expSubsPushResp));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改快递订阅推送信息
|
||||
*/
|
||||
@GetMapping("/edit/{sid}")
|
||||
public String edit(@PathVariable("sid") Long sid, ModelMap mmap)
|
||||
{
|
||||
ExpSubsPushResp expSubsPushResp = expSubsPushRespService.selectExpSubsPushRespById(sid);
|
||||
mmap.put("expSubsPushResp", expSubsPushResp);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存快递订阅推送信息
|
||||
*/
|
||||
@RequiresPermissions("bps:expsubspushresp:edit")
|
||||
@Log(title = "快递订阅推送信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ExpSubsPushResp expSubsPushResp)
|
||||
{
|
||||
return toAjax(expSubsPushRespService.updateExpSubsPushResp(expSubsPushResp));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除快递订阅推送信息
|
||||
*/
|
||||
@RequiresPermissions("bps:expsubspushresp:remove")
|
||||
@Log(title = "快递订阅推送信息", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(expSubsPushRespService.deleteExpSubsPushRespByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 快递订阅推送详细信息
|
||||
*/
|
||||
@RequiresPermissions("bps:expsubspushresp:detail")
|
||||
@GetMapping("/detail/{sid}")
|
||||
public String detail(@PathVariable("sid") Long sid, ModelMap mmap)
|
||||
{
|
||||
ExpSubsPushResp expSubsPushResp = expSubsPushRespService.selectExpSubsPushRespById(sid);
|
||||
mmap.put("expSubsPushResp", expSubsPushResp);
|
||||
return prefix + "/detail";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
package com.ruoyi.bps.controller;
|
||||
|
||||
import com.ruoyi.bps.domain.ExpSubscribe;
|
||||
import com.ruoyi.bps.service.IExpSubsPushApiService;
|
||||
import com.ruoyi.bps.service.IExpSubscribeService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.kuaidi100.sdk.response.SubscribeResp;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 快递订阅Controller
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-20
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/bps/subscribe")
|
||||
public class ExpSubscribeController extends BaseController
|
||||
{
|
||||
private String prefix = "bps/subscribe";
|
||||
|
||||
@Autowired
|
||||
private IExpSubscribeService expSubscribeService;
|
||||
|
||||
@Autowired
|
||||
private IExpSubsPushApiService iExpSubsPushApiService;
|
||||
|
||||
@RequiresPermissions("bps:subscribe:view")
|
||||
@GetMapping()
|
||||
public String subscribe()
|
||||
{
|
||||
return prefix + "/subscribe";
|
||||
}
|
||||
|
||||
/**
|
||||
* 订阅快递
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RequestMapping("/subscribe")
|
||||
@ResponseBody
|
||||
public SubscribeResp ExpressSubscribe(@RequestBody ExpSubscribe expSubscribe) {
|
||||
return iExpSubsPushApiService.ExpressSubscribe(expSubscribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询快递订阅列表
|
||||
*/
|
||||
@RequiresPermissions("bps:subscribe:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ExpSubscribe expSubscribe)
|
||||
{
|
||||
startPage();
|
||||
List<ExpSubscribe> list;
|
||||
if(expSubscribe.getNumber().contains(",")){
|
||||
List<String> number= Arrays.asList(expSubscribe.getNumber().split(","));
|
||||
list=expSubscribeService.selectExpSubsPushRespByNumber(number);
|
||||
}
|
||||
else {
|
||||
list = expSubscribeService.selectExpSubscribeList(expSubscribe);
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出快递订阅列表
|
||||
*/
|
||||
@RequiresPermissions("bps:subscribe:export")
|
||||
@Log(title = "快递订阅", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ExpSubscribe expSubscribe)
|
||||
{
|
||||
List<ExpSubscribe> list = expSubscribeService.selectExpSubscribeList(expSubscribe);
|
||||
ExcelUtil<ExpSubscribe> util = new ExcelUtil<ExpSubscribe>(ExpSubscribe.class);
|
||||
return util.exportExcel(list, "快递订阅数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增快递订阅
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存快递订阅
|
||||
*/
|
||||
@RequiresPermissions("bps:subscribe:add")
|
||||
@Log(title = "快递订阅", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ExpSubscribe expSubscribe)
|
||||
{
|
||||
return toAjax(expSubscribeService.insertExpSubscribe(expSubscribe));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改快递订阅
|
||||
*/
|
||||
@GetMapping("/edit/{sid}")
|
||||
public String edit(@PathVariable("sid") Long sid, ModelMap mmap)
|
||||
{
|
||||
ExpSubscribe expSubscribe = expSubscribeService.selectExpSubscribeById(sid);
|
||||
mmap.put("expSubscribe", expSubscribe);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存快递订阅
|
||||
*/
|
||||
@RequiresPermissions("bps:subscribe:edit")
|
||||
@Log(title = "快递订阅", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ExpSubscribe expSubscribe)
|
||||
{
|
||||
return toAjax(expSubscribeService.updateExpSubscribe(expSubscribe));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除快递订阅
|
||||
*/
|
||||
@RequiresPermissions("bps:subscribe:remove")
|
||||
@Log(title = "快递订阅", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(expSubscribeService.deleteExpSubscribeByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
package com.ruoyi.bps.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.bps.domain.ExpTopgpLog;
|
||||
import com.ruoyi.bps.service.IExpTopgpLogService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* ERP订阅推送日志Controller
|
||||
*
|
||||
* @author Bo
|
||||
* @date 2021-08-11
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/bps/expTopgpLog")
|
||||
public class ExpTopgpLogController extends BaseController
|
||||
{
|
||||
private String prefix = "bps/expTopgpLog";
|
||||
|
||||
@Autowired
|
||||
private IExpTopgpLogService expTopgpLogService;
|
||||
|
||||
@RequiresPermissions("bps:expTopgpLog:view")
|
||||
@GetMapping()
|
||||
public String expTopgpLog()
|
||||
{
|
||||
return prefix + "/expTopgpLog";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询ERP订阅推送日志列表
|
||||
*/
|
||||
@RequiresPermissions("bps:expTopgpLog:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ExpTopgpLog expTopgpLog)
|
||||
{
|
||||
startPage();
|
||||
List<ExpTopgpLog> list = expTopgpLogService.selectExpTopgpLogList(expTopgpLog);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出ERP订阅推送日志列表
|
||||
*/
|
||||
@RequiresPermissions("bps:expTopgpLog:export")
|
||||
@Log(title = "ERP订阅推送日志", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ExpTopgpLog expTopgpLog)
|
||||
{
|
||||
List<ExpTopgpLog> list = expTopgpLogService.selectExpTopgpLogList(expTopgpLog);
|
||||
ExcelUtil<ExpTopgpLog> util = new ExcelUtil<ExpTopgpLog>(ExpTopgpLog.class);
|
||||
return util.exportExcel(list, "ERP订阅推送日志数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增ERP订阅推送日志
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存ERP订阅推送日志
|
||||
*/
|
||||
@RequiresPermissions("bps:expTopgpLog:add")
|
||||
@Log(title = "ERP订阅推送日志", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ExpTopgpLog expTopgpLog)
|
||||
{
|
||||
return toAjax(expTopgpLogService.insertExpTopgpLog(expTopgpLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改ERP订阅推送日志
|
||||
*/
|
||||
@GetMapping("/edit/{sid}")
|
||||
public String edit(@PathVariable("sid") Long sid, ModelMap mmap)
|
||||
{
|
||||
ExpTopgpLog expTopgpLog = expTopgpLogService.selectExpTopgpLogBySid(sid);
|
||||
mmap.put("expTopgpLog", expTopgpLog);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存ERP订阅推送日志
|
||||
*/
|
||||
@RequiresPermissions("bps:expTopgpLog:edit")
|
||||
@Log(title = "ERP订阅推送日志", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ExpTopgpLog expTopgpLog)
|
||||
{
|
||||
return toAjax(expTopgpLogService.updateExpTopgpLog(expTopgpLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除ERP订阅推送日志
|
||||
*/
|
||||
@RequiresPermissions("bps:expTopgpLog:remove")
|
||||
@Log(title = "ERP订阅推送日志", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(expTopgpLogService.deleteExpTopgpLogBySids(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,174 @@
|
|||
package com.ruoyi.bps.controller;
|
||||
|
||||
import com.ruoyi.bps.domain.ExpressInfo;
|
||||
import com.ruoyi.bps.service.IExpressInfoService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 快递信息Controller
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-06
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/bps/expressInfo")
|
||||
public class ExpressInfoController extends BaseController
|
||||
{
|
||||
private String prefix = "bps/expressInfo";
|
||||
|
||||
@Autowired
|
||||
private IExpressInfoService expressInfoService;
|
||||
|
||||
@RequiresPermissions("bps:expressInfo:view")
|
||||
@GetMapping()
|
||||
public String expressInfo()
|
||||
{
|
||||
return prefix + "/expressInfo";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询快递信息列表
|
||||
*/
|
||||
@RequiresPermissions("bps:expressInfo:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ExpressInfo expressInfo)
|
||||
{
|
||||
startPage();
|
||||
List<ExpressInfo> list = expressInfoService.selectExpressInfoList(expressInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询快递信息列表
|
||||
*/
|
||||
@RequiresPermissions("bps:expressInfo:list")
|
||||
@PostMapping("/localList")
|
||||
@ResponseBody
|
||||
public TableDataInfo localList(ExpressInfo expressInfo)
|
||||
{
|
||||
startPage();
|
||||
List<ExpressInfo> list = expressInfoService.selectLocalExpressInfoList(expressInfo);
|
||||
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出快递信息列表
|
||||
*/
|
||||
@RequiresPermissions("bps:expressInfo:export")
|
||||
@Log(title = "快递信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ExpressInfo expressInfo)
|
||||
{
|
||||
List<ExpressInfo> list = expressInfoService.selectExpressInfoList(expressInfo);
|
||||
ExcelUtil<ExpressInfo> util = new ExcelUtil<ExpressInfo>(ExpressInfo.class);
|
||||
return util.exportExcel(list, "快递信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增快递信息
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存快递信息
|
||||
*/
|
||||
@RequiresPermissions("bps:expressInfo:add")
|
||||
@Log(title = "快递信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ExpressInfo expressInfo)
|
||||
{
|
||||
return toAjax(expressInfoService.insertExpressInfo(expressInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改快递信息
|
||||
*/
|
||||
@GetMapping("/edit/{message}")
|
||||
public String edit(@PathVariable("message") String message, ModelMap mmap)
|
||||
{
|
||||
ExpressInfo expressInfo = expressInfoService.selectExpressInfoById(message);
|
||||
mmap.put("expressInfo", expressInfo);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存快递信息
|
||||
*/
|
||||
@RequiresPermissions("bps:expressInfo:edit")
|
||||
@Log(title = "快递信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ExpressInfo expressInfo)
|
||||
{
|
||||
return toAjax(expressInfoService.updateExpressInfo(expressInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除快递信息
|
||||
*/
|
||||
@RequiresPermissions("bps:expressInfo:remove")
|
||||
@Log(title = "快递信息", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(expressInfoService.deleteExpressInfoByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping ( "/importTemplate" )
|
||||
@ResponseBody
|
||||
public AjaxResult importTemplate ( ) {
|
||||
ExcelUtil < ExpressInfo > util = new ExcelUtil<>(ExpressInfo.class);
|
||||
return util.importTemplateExcel ( "快递查询导入模板" );
|
||||
}
|
||||
|
||||
@PostMapping("/importData")
|
||||
@ResponseBody
|
||||
public TableDataInfo importData(MultipartFile file, boolean updateSupport) throws Exception
|
||||
{
|
||||
/*ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
|
||||
List<SysUser> userList = util.importExcel(file.getInputStream());
|
||||
String operName = ShiroUtils.getSysUser().getLoginName();
|
||||
String message = userService.importUser(userList, updateSupport, operName);
|
||||
return AjaxResult.success(message);*/
|
||||
|
||||
ExcelUtil<ExpressInfo> util= new ExcelUtil<ExpressInfo>(ExpressInfo.class);
|
||||
List<ExpressInfo> expressInfoList=util.importExcel(file.getInputStream());
|
||||
List<ExpressInfo> list = new ArrayList<>();
|
||||
for( ExpressInfo expressInfo:expressInfoList)
|
||||
{
|
||||
list.add(expressInfo);
|
||||
|
||||
}
|
||||
|
||||
//String message = expressInfoList.importUser(userList, updateSupport, operName);
|
||||
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.ruoyi.bps.controller;
|
||||
|
||||
|
||||
//import com.ruoyi.bps.express.contant.CompanyConstant;
|
||||
//import com.ruoyi.bps.express.request.QueryTrackParam;
|
||||
|
||||
import com.ruoyi.bps.service.IExpressService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.kuaidi100.sdk.request.QueryTrackParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class ExpressTestController extends BaseController {
|
||||
@Autowired
|
||||
private IExpressService expressService;
|
||||
|
||||
@RequestMapping("/anon/bps/express/test/queryTrackMultiList")
|
||||
public TableDataInfo QueryTrackMultiList(){
|
||||
//return expressService.QueryTrackExpressMultiList(expressService.GetTestQueryTrackParam()).toString();
|
||||
return getDataTable(expressService.QueryTrackExpressMultiList(expressService.GetTestQueryTrackParam()));
|
||||
}
|
||||
|
||||
@RequestMapping("/anon/bps/express/test/queryTrackMulti")
|
||||
public String QueryTrackMulti(){
|
||||
return expressService.QueryTrackExpressMulti(expressService.GetTestQueryTrackParam());
|
||||
}
|
||||
|
||||
@RequestMapping("/anon/bps/express/test/queryTrack")
|
||||
public String QueryTrack(){
|
||||
QueryTrackParam queryTrackParam = new QueryTrackParam();
|
||||
queryTrackParam.setCom("annengwuliu");
|
||||
queryTrackParam.setNum("3004459671351");
|
||||
queryTrackParam.setPhone("17725390266");
|
||||
|
||||
return expressService.QueryTrackExpress(queryTrackParam);
|
||||
|
||||
|
||||
}
|
||||
@RequestMapping("/anon/bps/express/test/subscribe")
|
||||
public String Subscribe(){
|
||||
return expressService.SubscribeExpress();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
package com.ruoyi.bps.controller;
|
||||
|
||||
import com.ruoyi.bps.service.TopgpDdlService;
|
||||
import com.ruoyi.common.annotation.DataSource;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = "TOPGP使用帆软报表接口")
|
||||
@RestController
|
||||
public class FrForCrTopgpController {
|
||||
@Autowired
|
||||
private TopgpDdlService topgpDdlService;
|
||||
|
||||
//访问 ../anon/bps/frforcr/topprod时,使用topprod
|
||||
@ApiOperation("TOPPROD正式区访问")
|
||||
@ApiImplicitParam(name = "jsonString", value = "Json字符串", paramType = "body", dataType = "String", dataTypeClass = String.class)
|
||||
@CrossOrigin
|
||||
@Log(title = "CSFR412_CR报表_TOPPROD", businessType = BusinessType.DROP)
|
||||
@PostMapping("/anon/bps/frforcr/topprod")
|
||||
@DataSource(value = DataSourceType.TOPPRODDSREPORT)
|
||||
public AjaxResult frforcrtopprod(@RequestBody Map<String,Object> map){
|
||||
return frforcrtoppgp(map);
|
||||
}
|
||||
|
||||
//访问../anon/bps/frforcr/topprod时,使用toptest实例
|
||||
@ApiOperation("TOPTEST正式区访问")
|
||||
@ApiImplicitParam(name = "jsonString", value = "Json字符串", paramType = "body", dataType = "String", dataTypeClass = String.class)
|
||||
@CrossOrigin
|
||||
@Log(title = "CSFR412_CR报表_TOPTEST", businessType = BusinessType.DROP)
|
||||
@PostMapping("/anon/bps/frforcr/toptest")
|
||||
@DataSource(value = DataSourceType.TOPTESTDSREPORT)
|
||||
public AjaxResult frforcrtoptest(@RequestBody Map<String,Object> map){
|
||||
return frforcrtoppgp(map);
|
||||
}
|
||||
|
||||
private AjaxResult frforcrtoppgp(Map<String,Object> map){
|
||||
/* 多此一举,在@RequestBody时取不到值是,已经会报500错误了,并不会执行到这一段。
|
||||
if(map.isEmpty()){ //如果传过来的值为空,返回未取到表名
|
||||
// System.out.println(LocalTime.now()+"未获取到表名!");
|
||||
return AjaxResult.error("未取到表名传参!");
|
||||
}
|
||||
*/
|
||||
StringBuilder droppedTable = new StringBuilder();
|
||||
StringBuilder errorDroppedTable = new StringBuilder();
|
||||
StringBuilder notExistsTable = new StringBuilder();
|
||||
|
||||
for (String tableName : getTableName(map)) {
|
||||
if(topgpDdlService.isTableInDb("ds_report",tableName) <=0){
|
||||
//表名在数据库中不存在
|
||||
//System.out.println(LocalTime.now() + "【" + tableName + "】不存在!");
|
||||
notExistsTable.append(tableName+",");
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
topgpDdlService.dropTable("ds_report." + tableName);
|
||||
//System.out.println(LocalTime.now() + "【" + tableName + "】已被删除!");
|
||||
droppedTable.append(tableName+",");
|
||||
} catch (Exception e) {
|
||||
//System.out.println(LocalTime.now() + "【" + tableName + "】删除异常!");
|
||||
errorDroppedTable.append(tableName+",");
|
||||
}
|
||||
}
|
||||
|
||||
//删除异常写入日志
|
||||
if (StringUtils.isNotEmpty(errorDroppedTable)){
|
||||
return AjaxResult.error(errorDroppedTable+"删除异常!");
|
||||
}
|
||||
//表不存在写入日志
|
||||
if(StringUtils.isNotEmpty(notExistsTable)){
|
||||
return AjaxResult.warn(notExistsTable+"表不存在!");
|
||||
}
|
||||
//被删除的表写入日志
|
||||
if(StringUtils.isNotEmpty(droppedTable)){
|
||||
return AjaxResult.success(droppedTable + "删除成功!");
|
||||
}
|
||||
//以上三种情况都不存在,说明发生了不明异常,写入日志
|
||||
return AjaxResult.warn("发生不明异常!");
|
||||
}
|
||||
|
||||
//防止意手抖把SID也当成表传过来
|
||||
//排除sid的key值
|
||||
private List<String> getTableName(Map<String,Object> map){
|
||||
List<String> list=new ArrayList<String>();
|
||||
for(String key:map.keySet()){
|
||||
if(key !="sid")
|
||||
{
|
||||
list.add(map.get(key).toString());
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
package com.ruoyi.bps.controller;
|
||||
|
||||
|
||||
//import com.ruoyi.bps.express.contant.CompanyConstant;
|
||||
//import com.ruoyi.bps.express.request.QueryTrackParam;
|
||||
//import com.ruoyi.bps.express.response.QueryTrackResp;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.bps.service.IExpressService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
//import com.google.gson.Gson;
|
||||
import com.kuaidi100.sdk.request.QueryTrackParam;
|
||||
import com.kuaidi100.sdk.response.QueryTrackResp;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
public class QueryExpressController extends BaseController {
|
||||
@Autowired
|
||||
private IExpressService expressService;
|
||||
@RequiresPermissions("bps:express:view")
|
||||
@RequestMapping("/bps/express/queryExpress")
|
||||
public String queryExpress()
|
||||
{
|
||||
//return "express/queryExpress";
|
||||
//说明:此处不能用绝对路径,否则,当application.yml中,设定context-path: /it_war后,打Jar包时,会找不到thymeleaf对应的文件。
|
||||
return "express/queryExpress";
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@RequestMapping("/bps/express/queryExpress/list")
|
||||
@ResponseBody
|
||||
public Map<String, String> queryExpressList(@RequestBody QueryTrackParam queryTrackParam){
|
||||
Map<String,String> result = null;
|
||||
if (queryTrackParam != null) {
|
||||
System.out.println("运单号码:" + queryTrackParam.getNum());
|
||||
System.out.println("快递公司:" + queryTrackParam.getCom());
|
||||
System.out.println("电话:" + queryTrackParam.getPhone());
|
||||
result = new HashMap<>();
|
||||
result.put("code", "1");
|
||||
result.put("msg", "ok");
|
||||
result.put("info",expressService.QueryTrackExpress(queryTrackParam));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@RequestMapping("/bps/express/queryExpress/list1")
|
||||
@ResponseBody
|
||||
public Map<String, Object> queryExpressList1(@RequestBody QueryTrackParam queryTrackParam){
|
||||
Map<String, Object> result = null;
|
||||
if (queryTrackParam != null) {
|
||||
System.out.println("运单号码:" + queryTrackParam.getNum());
|
||||
System.out.println("快递公司:" + queryTrackParam.getCom());
|
||||
System.out.println("电话:" + queryTrackParam.getPhone());
|
||||
String info=expressService.QueryTrackExpress(queryTrackParam);
|
||||
//QueryTrackResp queryTrackResp = new Gson().fromJson(info,QueryTrackResp.class);
|
||||
QueryTrackResp queryTrackResp= JSONObject.parseObject(info,QueryTrackResp.class);
|
||||
result = new HashMap<>();
|
||||
result.put("code", "1");
|
||||
result.put("msg", "ok");
|
||||
result.put("nu",queryTrackResp.getNu());
|
||||
result.put("com",queryTrackResp.getCom());
|
||||
result.put("state",queryTrackResp.getState());
|
||||
result.put("info",queryTrackResp.getData());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@RequestMapping("/anon/bps/express/queryTrackMultiList")
|
||||
public TableDataInfo QueryTrackMultiList(@RequestBody QueryTrackParam queryTrackParam){
|
||||
|
||||
return getDataTable(expressService.QueryTrackExpressMultiList(expressService.GetTestQueryTrackParam()));
|
||||
}
|
||||
|
||||
@RequestMapping("/anon/bps/express/queryTrackMulti")
|
||||
public String QueryTrackMulti(){
|
||||
return expressService.QueryTrackExpressMulti(expressService.GetTestQueryTrackParam());
|
||||
}
|
||||
|
||||
@RequestMapping("/anon/bps/express/queryTrack")
|
||||
public String QueryTrack(){
|
||||
QueryTrackParam queryTrackParam = new QueryTrackParam();
|
||||
queryTrackParam.setCom("annengwuliu");
|
||||
queryTrackParam.setNum("3004459671351");
|
||||
queryTrackParam.setPhone("17725390266");
|
||||
|
||||
return expressService.QueryTrackExpress(queryTrackParam);
|
||||
|
||||
|
||||
}
|
||||
@RequestMapping("/anon/bps/express/subscribe")
|
||||
public String Subscribe(){
|
||||
return expressService.SubscribeExpress();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
package com.ruoyi.bps.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* Excel批量快递查询对象 exp_import_query
|
||||
*
|
||||
* @author Bo
|
||||
* @date 2021-07-21
|
||||
*/
|
||||
public class ExpImportQuery extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** sid */
|
||||
private Long sid;
|
||||
|
||||
/** 查询ID */
|
||||
@Excel(name = "查询ID")
|
||||
private String queryId;
|
||||
|
||||
/** 查询时间 */
|
||||
@Excel(name = "查询时间")
|
||||
private String queryTime;
|
||||
|
||||
/** 用户ID */
|
||||
@Excel(name = "用户ID")
|
||||
private String queryLoginName;
|
||||
|
||||
/** 用户名 */
|
||||
@Excel(name = "用户名")
|
||||
private String queryUserName;
|
||||
|
||||
/** 查询IP */
|
||||
@Excel(name = "查询IP")
|
||||
private String queryIp;
|
||||
|
||||
/** 完成时间 */
|
||||
@Excel(name = "完成时间")
|
||||
private String finishTime;
|
||||
|
||||
/** 完成状态 */
|
||||
@Excel(name = "完成状态")
|
||||
private String status;
|
||||
|
||||
/** 运单总量 */
|
||||
@Excel(name = "运单总量")
|
||||
private String queryQty;
|
||||
|
||||
public static long getSerialVersionUID() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
public Long getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(Long sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public String getQueryId() {
|
||||
return queryId;
|
||||
}
|
||||
|
||||
public void setQueryId(String queryId) {
|
||||
this.queryId = queryId;
|
||||
}
|
||||
|
||||
public String getQueryTime() {
|
||||
return queryTime;
|
||||
}
|
||||
|
||||
public void setQueryTime(String queryTime) {
|
||||
this.queryTime = queryTime;
|
||||
}
|
||||
|
||||
public String getQueryLoginName() {
|
||||
return queryLoginName;
|
||||
}
|
||||
|
||||
public void setQueryLoginName(String queryLoginName) {
|
||||
this.queryLoginName = queryLoginName;
|
||||
}
|
||||
|
||||
public String getQueryUserName() {
|
||||
return queryUserName;
|
||||
}
|
||||
|
||||
public void setQueryUserName(String queryUserName) {
|
||||
this.queryUserName = queryUserName;
|
||||
}
|
||||
|
||||
public String getQueryIp() {
|
||||
return queryIp;
|
||||
}
|
||||
|
||||
public void setQueryIp(String queryIp) {
|
||||
this.queryIp = queryIp;
|
||||
}
|
||||
|
||||
public String getFinishTime() {
|
||||
return finishTime;
|
||||
}
|
||||
|
||||
public void setFinishTime(String finishTime) {
|
||||
this.finishTime = finishTime;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getQueryQty() {
|
||||
return queryQty;
|
||||
}
|
||||
|
||||
public void setQueryQty(String queryQty) {
|
||||
this.queryQty = queryQty;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ExpImportQuery{" +
|
||||
"sid=" + sid +
|
||||
", queryId='" + queryId + '\'' +
|
||||
", queryTime='" + queryTime + '\'' +
|
||||
", queryLoginName='" + queryLoginName + '\'' +
|
||||
", queryUserName='" + queryUserName + '\'' +
|
||||
", queryIp='" + queryIp + '\'' +
|
||||
", finishTime='" + finishTime + '\'' +
|
||||
", status='" + status + '\'' +
|
||||
", queryQty='" + queryQty + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,334 @@
|
|||
package com.ruoyi.bps.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 快递订阅推送信息对象 exp_subs_push_resp
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-13
|
||||
*/
|
||||
public class ExpSubsPushResp extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** SID */
|
||||
private Long sid;
|
||||
|
||||
/** 监控状态 */
|
||||
@Excel(name = "监控状态")
|
||||
private String status;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String billStatus;
|
||||
|
||||
/** 监控状态消息 */
|
||||
@Excel(name = "监控状态消息")
|
||||
private String message;
|
||||
|
||||
/** 快递公司编码是否出错 */
|
||||
@Excel(name = "快递公司编码是否出错")
|
||||
private String autoCheck;
|
||||
|
||||
/** 原始快递公司编码 */
|
||||
@Excel(name = "原始快递公司编码")
|
||||
private String comOld;
|
||||
|
||||
/** 修正快递公司编码 */
|
||||
@Excel(name = "修正快递公司编码")
|
||||
private String comNew;
|
||||
|
||||
/** 当前快递消息 */
|
||||
@Excel(name = "当前快递消息")
|
||||
private String lastResultMessage;
|
||||
|
||||
/** 当前快递单状态 */
|
||||
@Excel(name = "当前快递单状态")
|
||||
private String lastResultState;
|
||||
|
||||
/** 通讯状态 */
|
||||
@Excel(name = "通讯状态")
|
||||
private String lastResulStatus;
|
||||
|
||||
/** 快递单明细状态 */
|
||||
@Excel(name = "快递单明细状态")
|
||||
private String lastResultCondition;
|
||||
|
||||
/** 是否签收 */
|
||||
@Excel(name = "是否签收")
|
||||
private String lastResultIsCheck;
|
||||
|
||||
/** 快递公司编码 */
|
||||
@Excel(name = "快递公司编码")
|
||||
private String lastResultCom;
|
||||
|
||||
/** 快递单号 */
|
||||
@Excel(name = "快递单号")
|
||||
private String lastResultNu;
|
||||
|
||||
/** 快递流转信息 */
|
||||
@Excel(name = "快递流转信息")
|
||||
private String lastResultData;
|
||||
|
||||
/** 目的国快递消息 */
|
||||
@Excel(name = "目的国快递消息")
|
||||
private String destResultMessage;
|
||||
|
||||
/** 目的国快递单状态 */
|
||||
@Excel(name = "目的国快递单状态")
|
||||
private String destResultState;
|
||||
|
||||
/** 目的国通讯状态 */
|
||||
@Excel(name = "目的国通讯状态")
|
||||
private String destResultStatus;
|
||||
|
||||
/** 目的国快递单明细状态 */
|
||||
@Excel(name = "目的国快递单明细状态")
|
||||
private String destResultCondition;
|
||||
|
||||
/** 目的国是否签收 */
|
||||
@Excel(name = "目的国是否签收")
|
||||
private String destResultIsCheck;
|
||||
|
||||
/** 目的国快递公司编码 */
|
||||
@Excel(name = "目的国快递公司编码")
|
||||
private String destResultCom;
|
||||
|
||||
/** 目的国快递单号 */
|
||||
@Excel(name = "目的国快递单号")
|
||||
private String destResultNu;
|
||||
|
||||
/** 目的国快递流转信息 */
|
||||
@Excel(name = "目的国快递流转信息")
|
||||
private String destResultData;
|
||||
|
||||
/** 最后更新时间 */
|
||||
@Excel(name = "最后更新时间")
|
||||
private String lastResponseTime;
|
||||
|
||||
public Long getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(Long sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getBillStatus() {
|
||||
return billStatus;
|
||||
}
|
||||
|
||||
public void setBillStatus(String billStatus) {
|
||||
this.billStatus = billStatus;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getAutoCheck() {
|
||||
return autoCheck;
|
||||
}
|
||||
|
||||
public void setAutoCheck(String autoCheck) {
|
||||
this.autoCheck = autoCheck;
|
||||
}
|
||||
|
||||
public String getComOld() {
|
||||
return comOld;
|
||||
}
|
||||
|
||||
public void setComOld(String comOld) {
|
||||
this.comOld = comOld;
|
||||
}
|
||||
|
||||
public String getComNew() {
|
||||
return comNew;
|
||||
}
|
||||
|
||||
public void setComNew(String comNew) {
|
||||
this.comNew = comNew;
|
||||
}
|
||||
|
||||
public String getLastResultMessage() {
|
||||
return lastResultMessage;
|
||||
}
|
||||
|
||||
public void setLastResultMessage(String lastResultMessage) {
|
||||
this.lastResultMessage = lastResultMessage;
|
||||
}
|
||||
|
||||
public String getLastResultState() {
|
||||
return lastResultState;
|
||||
}
|
||||
|
||||
public void setLastResultState(String lastResultState) {
|
||||
this.lastResultState = lastResultState;
|
||||
}
|
||||
|
||||
public String getLastResulStatus() {
|
||||
return lastResulStatus;
|
||||
}
|
||||
|
||||
public void setLastResulStatus(String lastResulStatus) {
|
||||
this.lastResulStatus = lastResulStatus;
|
||||
}
|
||||
|
||||
public String getLastResultCondition() {
|
||||
return lastResultCondition;
|
||||
}
|
||||
|
||||
public void setLastResultCondition(String lastResultCondition) {
|
||||
this.lastResultCondition = lastResultCondition;
|
||||
}
|
||||
|
||||
public String getLastResultIsCheck() {
|
||||
return lastResultIsCheck;
|
||||
}
|
||||
|
||||
public void setLastResultIsCheck(String lastResultIsCheck) {
|
||||
this.lastResultIsCheck = lastResultIsCheck;
|
||||
}
|
||||
|
||||
public String getLastResultCom() {
|
||||
return lastResultCom;
|
||||
}
|
||||
|
||||
public void setLastResultCom(String lastResultCom) {
|
||||
this.lastResultCom = lastResultCom;
|
||||
}
|
||||
|
||||
public String getLastResultNu() {
|
||||
return lastResultNu;
|
||||
}
|
||||
|
||||
public void setLastResultNu(String lastResultNu) {
|
||||
this.lastResultNu = lastResultNu;
|
||||
}
|
||||
|
||||
public String getLastResultData() {
|
||||
return lastResultData;
|
||||
}
|
||||
|
||||
public void setLastResultData(String lastResultData) {
|
||||
this.lastResultData = lastResultData;
|
||||
}
|
||||
|
||||
public String getDestResultMessage() {
|
||||
return destResultMessage;
|
||||
}
|
||||
|
||||
public void setDestResultMessage(String destResultMessage) {
|
||||
this.destResultMessage = destResultMessage;
|
||||
}
|
||||
|
||||
public String getDestResultState() {
|
||||
return destResultState;
|
||||
}
|
||||
|
||||
public void setDestResultState(String destResultState) {
|
||||
this.destResultState = destResultState;
|
||||
}
|
||||
|
||||
public String getDestResultStatus() {
|
||||
return destResultStatus;
|
||||
}
|
||||
|
||||
public void setDestResultStatus(String destResultStatus) {
|
||||
this.destResultStatus = destResultStatus;
|
||||
}
|
||||
|
||||
public String getDestResultCondition() {
|
||||
return destResultCondition;
|
||||
}
|
||||
|
||||
public void setDestResultCondition(String destResultCondition) {
|
||||
this.destResultCondition = destResultCondition;
|
||||
}
|
||||
|
||||
public String getDestResultIsCheck() {
|
||||
return destResultIsCheck;
|
||||
}
|
||||
|
||||
public void setDestResultIsCheck(String destResultIsCheck) {
|
||||
this.destResultIsCheck = destResultIsCheck;
|
||||
}
|
||||
|
||||
public String getDestResultCom() {
|
||||
return destResultCom;
|
||||
}
|
||||
|
||||
public void setDestResultCom(String destResultCom) {
|
||||
this.destResultCom = destResultCom;
|
||||
}
|
||||
|
||||
public String getDestResultNu() {
|
||||
return destResultNu;
|
||||
}
|
||||
|
||||
public void setDestResultNu(String destResultNu) {
|
||||
this.destResultNu = destResultNu;
|
||||
}
|
||||
|
||||
public String getDestResultData() {
|
||||
return destResultData;
|
||||
}
|
||||
|
||||
public void setDestResultData(String destResultData) {
|
||||
this.destResultData = destResultData;
|
||||
}
|
||||
|
||||
public String getLastResponseTime() {
|
||||
return lastResponseTime;
|
||||
}
|
||||
|
||||
public void setLastResponseTime(String lastResponseTime) {
|
||||
this.lastResponseTime = lastResponseTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ExpSubsPushResp{" +
|
||||
"sid=" + sid +
|
||||
", status='" + status + '\'' +
|
||||
", billStatus='" + billStatus + '\'' +
|
||||
", message='" + message + '\'' +
|
||||
", autoCheck='" + autoCheck + '\'' +
|
||||
", comOld='" + comOld + '\'' +
|
||||
", comNew='" + comNew + '\'' +
|
||||
", lastResultMessage='" + lastResultMessage + '\'' +
|
||||
", lastResultState='" + lastResultState + '\'' +
|
||||
", lastResulStatus='" + lastResulStatus + '\'' +
|
||||
", lastResultCondition='" + lastResultCondition + '\'' +
|
||||
", lastResultIsCheck='" + lastResultIsCheck + '\'' +
|
||||
", lastResultCom='" + lastResultCom + '\'' +
|
||||
", lastResultNu='" + lastResultNu + '\'' +
|
||||
", lastResultData='" + lastResultData + '\'' +
|
||||
", destResultMessage='" + destResultMessage + '\'' +
|
||||
", destResultState='" + destResultState + '\'' +
|
||||
", destResultStatus='" + destResultStatus + '\'' +
|
||||
", destResultCondition='" + destResultCondition + '\'' +
|
||||
", destResultIsCheck='" + destResultIsCheck + '\'' +
|
||||
", destResultCom='" + destResultCom + '\'' +
|
||||
", destResultNu='" + destResultNu + '\'' +
|
||||
", destResultData='" + destResultData + '\'' +
|
||||
", lastResponseTime='" + lastResponseTime + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
package com.ruoyi.bps.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 快递订阅对象 exp_subscribe
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-20
|
||||
*/
|
||||
public class ExpSubscribe extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** SID */
|
||||
private Long sid;
|
||||
|
||||
/** 快递公司编码 */
|
||||
@Excel(name = "快递公司编码")
|
||||
private String company;
|
||||
|
||||
/** 快递单号 */
|
||||
@Excel(name = "快递单号")
|
||||
private String number;
|
||||
|
||||
/** 收/寄件人电话 */
|
||||
@Excel(name = "收/寄件人电话")
|
||||
private String phone;
|
||||
|
||||
/** 盐 */
|
||||
@Excel(name = "盐")
|
||||
private String salt;
|
||||
|
||||
/** 订阅时间 */
|
||||
@Excel(name = "订阅时间")
|
||||
private String subscribeTime;
|
||||
|
||||
/** 订阅结果 */
|
||||
@Excel(name = "订阅结果")
|
||||
private String result;
|
||||
|
||||
/** 返回码 */
|
||||
@Excel(name = "返回码")
|
||||
private String returnCode;
|
||||
|
||||
/** 返回消息 */
|
||||
@Excel(name = "返回消息")
|
||||
private String message;
|
||||
|
||||
/** 返回消息 */
|
||||
@Excel(name = "请求方")
|
||||
private String requestFrom;
|
||||
|
||||
/** 返回消息 */
|
||||
@Excel(name = "请求ID")
|
||||
private String requestId;
|
||||
|
||||
public void setSid(Long sid)
|
||||
{
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public Long getSid()
|
||||
{
|
||||
return sid;
|
||||
}
|
||||
public void setCompany(String company)
|
||||
{
|
||||
this.company = company;
|
||||
}
|
||||
|
||||
public String getCompany()
|
||||
{
|
||||
return company;
|
||||
}
|
||||
public void setNumber(String number)
|
||||
{
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public String getNumber()
|
||||
{
|
||||
return number;
|
||||
}
|
||||
public void setPhone(String phone)
|
||||
{
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPhone()
|
||||
{
|
||||
return phone;
|
||||
}
|
||||
public void setSalt(String salt)
|
||||
{
|
||||
this.salt = salt;
|
||||
}
|
||||
|
||||
public String getSalt()
|
||||
{
|
||||
return salt;
|
||||
}
|
||||
public void setSubscribeTime(String subscribeTime)
|
||||
{
|
||||
this.subscribeTime = subscribeTime;
|
||||
}
|
||||
|
||||
public String getSubscribeTime()
|
||||
{
|
||||
return subscribeTime;
|
||||
}
|
||||
public void setResult(String result)
|
||||
{
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getResult()
|
||||
{
|
||||
return result;
|
||||
}
|
||||
public void setReturnCode(String returnCode)
|
||||
{
|
||||
this.returnCode = returnCode;
|
||||
}
|
||||
|
||||
public String getReturnCode()
|
||||
{
|
||||
return returnCode;
|
||||
}
|
||||
public void setMessage(String message)
|
||||
{
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setRequestFrom(String requestFrom)
|
||||
{
|
||||
this.requestFrom = requestFrom;
|
||||
}
|
||||
|
||||
public String getRequestFrom()
|
||||
{
|
||||
return requestFrom;
|
||||
}
|
||||
|
||||
public void setRequestId(String requestId)
|
||||
{
|
||||
this.requestId = requestId;
|
||||
}
|
||||
|
||||
public String getRequestId()
|
||||
{
|
||||
return requestId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("sid", getSid())
|
||||
.append("company", getCompany())
|
||||
.append("number", getNumber())
|
||||
.append("phone", getPhone())
|
||||
.append("salt", getSalt())
|
||||
.append("subscribeTime", getSubscribeTime())
|
||||
.append("result", getResult())
|
||||
.append("returnCode", getReturnCode())
|
||||
.append("message", getMessage())
|
||||
.append("message", getMessage())
|
||||
.append("message", getMessage())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,149 @@
|
|||
package com.ruoyi.bps.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* ERP订阅推送日志对象 exp_topgp_log
|
||||
*
|
||||
* @author Bo
|
||||
* @date 2021-08-11
|
||||
*/
|
||||
public class ExpTopgpLog extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** SID */
|
||||
private Long sid;
|
||||
|
||||
/** 请求ID */
|
||||
@Excel(name = "请求ID")
|
||||
private String requestId;
|
||||
|
||||
/** 请求类型(FromTopgp:ERP请求订阅、ToTopgp:Java推送签收指令) */
|
||||
@Excel(name = "请求类型", readConverterExp = "请求类型(FromTopgp:ERP请求订阅、ToTopgp:Java推送签收指令)")
|
||||
private String requestType;
|
||||
|
||||
/** 快递单 */
|
||||
@Excel(name = "快递单")
|
||||
private String expressNumber;
|
||||
|
||||
/** 出货单号 */
|
||||
@Excel(name = "出货单号")
|
||||
private String deliveryNumber;
|
||||
|
||||
/** 请求报文 */
|
||||
@Excel(name = "请求报文")
|
||||
private String requestStr;
|
||||
|
||||
/** 请求时间 */
|
||||
@Excel(name = "请求时间")
|
||||
private String requestTime;
|
||||
|
||||
/** 返回code */
|
||||
@Excel(name = "返回code")
|
||||
private String responseCode;
|
||||
|
||||
/** 返回报文 */
|
||||
@Excel(name = "返回报文")
|
||||
private String responseStr;
|
||||
|
||||
public void setSid(Long sid)
|
||||
{
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public Long getSid()
|
||||
{
|
||||
return sid;
|
||||
}
|
||||
public void setRequestId(String requestId)
|
||||
{
|
||||
this.requestId = requestId;
|
||||
}
|
||||
|
||||
public String getRequestId()
|
||||
{
|
||||
return requestId;
|
||||
}
|
||||
public void setRequestType(String requestType)
|
||||
{
|
||||
this.requestType = requestType;
|
||||
}
|
||||
|
||||
public String getRequestType()
|
||||
{
|
||||
return requestType;
|
||||
}
|
||||
public void setExpressNumber(String expressNumber)
|
||||
{
|
||||
this.expressNumber = expressNumber;
|
||||
}
|
||||
|
||||
public String getExpressNumber()
|
||||
{
|
||||
return expressNumber;
|
||||
}
|
||||
public void setDeliveryNumber(String deliveryNumber)
|
||||
{
|
||||
this.deliveryNumber = deliveryNumber;
|
||||
}
|
||||
|
||||
public String getDeliveryNumber()
|
||||
{
|
||||
return deliveryNumber;
|
||||
}
|
||||
public void setRequestStr(String requestStr)
|
||||
{
|
||||
this.requestStr = requestStr;
|
||||
}
|
||||
|
||||
public String getRequestStr()
|
||||
{
|
||||
return requestStr;
|
||||
}
|
||||
public void setRequestTime(String requestTime)
|
||||
{
|
||||
this.requestTime = requestTime;
|
||||
}
|
||||
|
||||
public String getRequestTime()
|
||||
{
|
||||
return requestTime;
|
||||
}
|
||||
public void setResponseCode(String responseCode)
|
||||
{
|
||||
this.responseCode = responseCode;
|
||||
}
|
||||
|
||||
public String getResponseCode()
|
||||
{
|
||||
return responseCode;
|
||||
}
|
||||
public void setResponseStr(String responseStr)
|
||||
{
|
||||
this.responseStr = responseStr;
|
||||
}
|
||||
|
||||
public String getResponseStr()
|
||||
{
|
||||
return responseStr;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("sid", getSid())
|
||||
.append("requestId", getRequestId())
|
||||
.append("requestType", getRequestType())
|
||||
.append("expressNumber", getExpressNumber())
|
||||
.append("deliveryNumber", getDeliveryNumber())
|
||||
.append("requestStr", getRequestStr())
|
||||
.append("requestTime", getRequestTime())
|
||||
.append("responseCode", getResponseCode())
|
||||
.append("responseStr", getResponseStr())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,298 @@
|
|||
package com.ruoyi.bps.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 快递信息对象 expressInfo
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-06
|
||||
*/
|
||||
public class ExpressInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息 */
|
||||
private String sid;
|
||||
|
||||
/** 消息 */
|
||||
@Excel(name = "消息",type= Excel.Type.EXPORT)
|
||||
private String message;
|
||||
|
||||
|
||||
/** 出货单号 */
|
||||
@Excel(name = "出货单号")
|
||||
private String deliveryNum;
|
||||
|
||||
/** 快递单号 */
|
||||
@Excel(name = "快递单号")
|
||||
private String nu;
|
||||
|
||||
/** 签收状态 */
|
||||
@Excel(name = "签收状态",type= Excel.Type.EXPORT,readConverterExp = "0=未签收,1=已签收")
|
||||
private String ischeck;
|
||||
|
||||
/** 快递公司 */
|
||||
@Excel(name = "快递公司",dictType= "express_company",dictTypeExceptImport = "true")
|
||||
private String com;
|
||||
|
||||
/** 通信状态 */
|
||||
//@Excel(name = "通信状态",type= Excel.Type.EXPORT)
|
||||
private String status;
|
||||
|
||||
/** 运单详情 */
|
||||
@Excel(name = "运单详情",type= Excel.Type.EXPORT,align = Excel.Align.LEFT)
|
||||
private String data;
|
||||
|
||||
/** 当前状态 */
|
||||
@Excel(name = "当前状态",type= Excel.Type.EXPORT,dictType = "express_stats")
|
||||
private String state;
|
||||
|
||||
/** 状态标志 */
|
||||
//@Excel(name = "状态标志",type= Excel.Type.EXPORT)
|
||||
private String condition;
|
||||
|
||||
/** 路由信息 */
|
||||
//@Excel(name = "路由信息",type= Excel.Type.EXPORT)
|
||||
private String routeInfo;
|
||||
|
||||
/** 返回码 */
|
||||
//@Excel(name = "返回码",type= Excel.Type.EXPORT)
|
||||
private String returnCode;
|
||||
|
||||
/** 返回结果 */
|
||||
//@Excel(name = "返回结果",type= Excel.Type.EXPORT)
|
||||
private String result;
|
||||
|
||||
/** 电话号码 */
|
||||
//@Excel(name = "电话号码",type= Excel.Type.EXPORT)
|
||||
private String phone;
|
||||
|
||||
/** 揽收时间*/
|
||||
@Excel(name = "揽收时间",type= Excel.Type.EXPORT)
|
||||
private String collectTime;
|
||||
|
||||
/** 签收时间*/
|
||||
@Excel(name = "签收时间",type= Excel.Type.EXPORT)
|
||||
private String singedTime;
|
||||
|
||||
/** 最后更新时间*/
|
||||
@Excel(name = "最后更新时间",type= Excel.Type.EXPORT)
|
||||
private String lastUpdateTime;
|
||||
|
||||
/** 查询时间*/
|
||||
@Excel(name = "查询时间",type= Excel.Type.EXPORT)
|
||||
private String queryTime;
|
||||
|
||||
/** 查询人*/
|
||||
@Excel(name = "查询人",type= Excel.Type.EXPORT)
|
||||
private String queryUserName;
|
||||
|
||||
/** 查询ID*/
|
||||
private String queryId;
|
||||
|
||||
/** 查询类型*/
|
||||
private String queryType;
|
||||
|
||||
public static long getSerialVersionUID() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
public String getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(String sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getDeliveryNum() {
|
||||
return deliveryNum;
|
||||
}
|
||||
|
||||
public void setDeliveryNum(String deliveryNum) {
|
||||
this.deliveryNum = deliveryNum;
|
||||
}
|
||||
|
||||
public String getNu() {
|
||||
return nu;
|
||||
}
|
||||
|
||||
public void setNu(String nu) {
|
||||
this.nu = nu;
|
||||
}
|
||||
|
||||
public String getIscheck() {
|
||||
return ischeck;
|
||||
}
|
||||
|
||||
public void setIscheck(String ischeck) {
|
||||
this.ischeck = ischeck;
|
||||
}
|
||||
|
||||
public String getCom() {
|
||||
return com;
|
||||
}
|
||||
|
||||
public void setCom(String com) {
|
||||
this.com = com;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(String data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public void setCondition(String condition) {
|
||||
this.condition = condition;
|
||||
}
|
||||
|
||||
public String getRouteInfo() {
|
||||
return routeInfo;
|
||||
}
|
||||
|
||||
public void setRouteInfo(String routeInfo) {
|
||||
this.routeInfo = routeInfo;
|
||||
}
|
||||
|
||||
public String getReturnCode() {
|
||||
return returnCode;
|
||||
}
|
||||
|
||||
public void setReturnCode(String returnCode) {
|
||||
this.returnCode = returnCode;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getCollectTime() {
|
||||
return collectTime;
|
||||
}
|
||||
|
||||
public void setCollectTime(String collectTime) {
|
||||
this.collectTime = collectTime;
|
||||
}
|
||||
|
||||
public String getSingedTime() {
|
||||
return singedTime;
|
||||
}
|
||||
|
||||
public void setSingedTime(String singedTime) {
|
||||
this.singedTime = singedTime;
|
||||
}
|
||||
|
||||
public String getLastUpdateTime() {
|
||||
return lastUpdateTime;
|
||||
}
|
||||
|
||||
public void setLastUpdateTime(String lastUpdateTime) {
|
||||
this.lastUpdateTime = lastUpdateTime;
|
||||
}
|
||||
|
||||
public String getQueryTime() {
|
||||
return queryTime;
|
||||
}
|
||||
|
||||
public void setQueryTime(String queryTime) {
|
||||
this.queryTime = queryTime;
|
||||
}
|
||||
|
||||
public String getQueryUserName() {
|
||||
return queryUserName;
|
||||
}
|
||||
|
||||
public void setQueryUserName(String queryUserName) {
|
||||
this.queryUserName = queryUserName;
|
||||
}
|
||||
|
||||
public String getQueryId() {
|
||||
return queryId;
|
||||
}
|
||||
|
||||
public void setQueryId(String queryId) {
|
||||
this.queryId = queryId;
|
||||
}
|
||||
|
||||
public String getQueryType() {
|
||||
return queryType;
|
||||
}
|
||||
|
||||
public void setQueryType(String queryType) {
|
||||
this.queryType = queryType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ExpressInfo{" +
|
||||
"sid='" + sid + '\'' +
|
||||
", message='" + message + '\'' +
|
||||
", deliveryNum='" + deliveryNum + '\'' +
|
||||
", nu='" + nu + '\'' +
|
||||
", ischeck='" + ischeck + '\'' +
|
||||
", com='" + com + '\'' +
|
||||
", status='" + status + '\'' +
|
||||
", data='" + data + '\'' +
|
||||
", state='" + state + '\'' +
|
||||
", condition='" + condition + '\'' +
|
||||
", routeInfo='" + routeInfo + '\'' +
|
||||
", returnCode='" + returnCode + '\'' +
|
||||
", result='" + result + '\'' +
|
||||
", phone='" + phone + '\'' +
|
||||
", collectTime='" + collectTime + '\'' +
|
||||
", singedTime='" + singedTime + '\'' +
|
||||
", lastUpdateTime='" + lastUpdateTime + '\'' +
|
||||
", queryTime='" + queryTime + '\'' +
|
||||
", queryUserName='" + queryUserName + '\'' +
|
||||
", queryId='" + queryId + '\'' +
|
||||
", queryType='" + queryType + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.bps.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bps.domain.ExpImportQuery;
|
||||
|
||||
/**
|
||||
* Excel批量快递查询Mapper接口
|
||||
*
|
||||
* @author Bo
|
||||
* @date 2021-07-21
|
||||
*/
|
||||
public interface ExpImportQueryMapper
|
||||
{
|
||||
/**
|
||||
* 查询Excel批量快递查询
|
||||
*
|
||||
* @param sid Excel批量快递查询ID
|
||||
* @return Excel批量快递查询
|
||||
*/
|
||||
public ExpImportQuery selectExpImportQueryById(Long sid);
|
||||
|
||||
/**
|
||||
* 查询Excel批量快递查询列表
|
||||
*
|
||||
* @param expImportQuery Excel批量快递查询
|
||||
* @return Excel批量快递查询集合
|
||||
*/
|
||||
public List<ExpImportQuery> selectExpImportQueryList(ExpImportQuery expImportQuery);
|
||||
|
||||
/**
|
||||
* 新增Excel批量快递查询
|
||||
*
|
||||
* @param expImportQuery Excel批量快递查询
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExpImportQuery(ExpImportQuery expImportQuery);
|
||||
|
||||
/**
|
||||
* 修改Excel批量快递查询
|
||||
*
|
||||
* @param expImportQuery Excel批量快递查询
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExpImportQuery(ExpImportQuery expImportQuery);
|
||||
|
||||
/**
|
||||
* 删除Excel批量快递查询
|
||||
*
|
||||
* @param sid Excel批量快递查询ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpImportQueryById(Long sid);
|
||||
|
||||
/**
|
||||
* 批量删除Excel批量快递查询
|
||||
*
|
||||
* @param sids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpImportQueryByIds(String[] sids);
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.ruoyi.bps.mapper;
|
||||
|
||||
import com.ruoyi.bps.domain.ExpSubsPushResp;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
/**
|
||||
* 快递订阅推送信息Mapper接口
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-13
|
||||
*/
|
||||
public interface ExpSubsPushRespMapper
|
||||
{
|
||||
/**
|
||||
* 查询快递订阅推送信息
|
||||
*
|
||||
* @param sid 快递订阅推送信息ID
|
||||
* @return 快递订阅推送信息
|
||||
*/
|
||||
public ExpSubsPushResp selectExpSubsPushRespById(Long sid);
|
||||
|
||||
/**
|
||||
* 查询快递订阅推送信息列表
|
||||
*
|
||||
* @param expSubsPushResp 快递订阅推送信息
|
||||
* @return 快递订阅推送信息集合
|
||||
*/
|
||||
public List<ExpSubsPushResp> selectExpSubsPushRespList(ExpSubsPushResp expSubsPushResp);
|
||||
|
||||
/**
|
||||
* 新增快递订阅推送信息
|
||||
*
|
||||
* @param expSubsPushResp 快递订阅推送信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExpSubsPushResp(ExpSubsPushResp expSubsPushResp);
|
||||
|
||||
/**
|
||||
* 修改快递订阅推送信息
|
||||
*
|
||||
* @param expSubsPushResp 快递订阅推送信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExpSubsPushResp(ExpSubsPushResp expSubsPushResp);
|
||||
|
||||
/**
|
||||
* 删除快递订阅推送信息
|
||||
*
|
||||
* @param sid 快递订阅推送信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpSubsPushRespById(Long sid);
|
||||
|
||||
/**
|
||||
* 批量删除快递订阅推送信息
|
||||
*
|
||||
* @param sids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpSubsPushRespByIds(String[] sids);
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.ruoyi.bps.mapper;
|
||||
|
||||
import com.ruoyi.bps.domain.ExpSubsPushResp;
|
||||
import com.ruoyi.bps.domain.ExpSubscribe;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
/**
|
||||
* 快递订阅Mapper接口
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-20
|
||||
*/
|
||||
public interface ExpSubscribeMapper
|
||||
{
|
||||
/**
|
||||
* 查询快递订阅
|
||||
*
|
||||
* @param sid 快递订阅ID
|
||||
* @return 快递订阅
|
||||
*/
|
||||
public ExpSubscribe selectExpSubscribeById(Long sid);
|
||||
|
||||
/**
|
||||
* 查询快递订阅列表
|
||||
*
|
||||
* @param expSubscribe 快递订阅
|
||||
* @return 快递订阅集合
|
||||
*/
|
||||
public List<ExpSubscribe> selectExpSubscribeList(ExpSubscribe expSubscribe);
|
||||
|
||||
/**
|
||||
* 新增快递订阅
|
||||
*
|
||||
* @param expSubscribe 快递订阅
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExpSubscribe(ExpSubscribe expSubscribe);
|
||||
|
||||
/**
|
||||
* 修改快递订阅
|
||||
*
|
||||
* @param expSubscribe 快递订阅
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExpSubscribe(ExpSubscribe expSubscribe);
|
||||
|
||||
/**
|
||||
* 删除快递订阅
|
||||
*
|
||||
* @param sid 快递订阅ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpSubscribeById(Long sid);
|
||||
|
||||
/**
|
||||
* 批量删除快递订阅
|
||||
*
|
||||
* @param sids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpSubscribeByIds(String[] sids);
|
||||
|
||||
/**
|
||||
* 根据快递单号查询快递订阅推送信息
|
||||
*
|
||||
* @param number 快递单号List
|
||||
* @return 快递订阅推送信息
|
||||
*/
|
||||
public List<ExpSubscribe> selectExpSubscribeByNumber(List<String> number);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.bps.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bps.domain.ExpTopgpLog;
|
||||
|
||||
/**
|
||||
* ERP订阅推送日志Mapper接口
|
||||
*
|
||||
* @author Bo
|
||||
* @date 2021-08-11
|
||||
*/
|
||||
public interface ExpTopgpLogMapper
|
||||
{
|
||||
/**
|
||||
* 查询ERP订阅推送日志
|
||||
*
|
||||
* @param sid ERP订阅推送日志主键
|
||||
* @return ERP订阅推送日志
|
||||
*/
|
||||
public ExpTopgpLog selectExpTopgpLogBySid(Long sid);
|
||||
|
||||
/**
|
||||
* 查询ERP订阅推送日志列表
|
||||
*
|
||||
* @param expTopgpLog ERP订阅推送日志
|
||||
* @return ERP订阅推送日志集合
|
||||
*/
|
||||
public List<ExpTopgpLog> selectExpTopgpLogList(ExpTopgpLog expTopgpLog);
|
||||
|
||||
/**
|
||||
* 新增ERP订阅推送日志
|
||||
*
|
||||
* @param expTopgpLog ERP订阅推送日志
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExpTopgpLog(ExpTopgpLog expTopgpLog);
|
||||
|
||||
/**
|
||||
* 修改ERP订阅推送日志
|
||||
*
|
||||
* @param expTopgpLog ERP订阅推送日志
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExpTopgpLog(ExpTopgpLog expTopgpLog);
|
||||
|
||||
/**
|
||||
* 删除ERP订阅推送日志
|
||||
*
|
||||
* @param sid ERP订阅推送日志主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpTopgpLogBySid(Long sid);
|
||||
|
||||
/**
|
||||
* 批量删除ERP订阅推送日志
|
||||
*
|
||||
* @param sids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpTopgpLogBySids(String[] sids);
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
package com.ruoyi.bps.mapper;
|
||||
|
||||
import com.ruoyi.bps.domain.ExpressInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
/**
|
||||
* 快递信息Mapper接口
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-06
|
||||
*/
|
||||
public interface ExpressInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询快递信息
|
||||
*
|
||||
* @param message 快递信息ID
|
||||
* @return 快递信息
|
||||
*/
|
||||
public ExpressInfo selectExpressInfoById(String message);
|
||||
|
||||
/**
|
||||
* 查询快递信息列表
|
||||
*
|
||||
* @param expressInfo 快递信息
|
||||
* @return 快递信息集合
|
||||
*/
|
||||
public List<ExpressInfo> selectExpressInfoList(ExpressInfo expressInfo);
|
||||
|
||||
/**
|
||||
* 新增快递信息
|
||||
*
|
||||
* @param expressInfo 快递信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExpressInfo(ExpressInfo expressInfo);
|
||||
|
||||
/**
|
||||
* 修改快递信息
|
||||
*
|
||||
* @param expressInfo 快递信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExpressInfo(ExpressInfo expressInfo);
|
||||
|
||||
/**
|
||||
* 删除快递信息
|
||||
*
|
||||
* @param message 快递信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpressInfoById(String message);
|
||||
|
||||
/**
|
||||
* 批量删除快递信息
|
||||
*
|
||||
* @param messages 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpressInfoByIds(String[] messages);
|
||||
|
||||
/**
|
||||
* 批量新增快递信息
|
||||
*
|
||||
* @param expressInfoList 角色菜单列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertExpressInfo(List<ExpressInfo> expressInfoList);
|
||||
|
||||
|
||||
/**
|
||||
* 删除快递信息
|
||||
*
|
||||
* @param queryId 快递信息queryId
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpressInfoByQueryId(String queryId);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.ruoyi.bps.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Mapper
|
||||
@Component("TopgpDdlMapper")
|
||||
public interface TopgpDdlMapper {
|
||||
// alter table
|
||||
int alterTableName(@Param("originalTableName") String originalTableName,
|
||||
@Param("newTableName") String newTableName);
|
||||
|
||||
//truncate table
|
||||
int truncateTable(@Param("tableName") String tableName);
|
||||
|
||||
//drop table
|
||||
int dropTable(@Param("tableName") String tableName);
|
||||
|
||||
//copy table
|
||||
void copyTable(@Param("newTableName") String newTableName,
|
||||
@Param("originalTableName") String originalTableName);
|
||||
|
||||
//获取表记录数
|
||||
int getRecordCount(@Param("tableName") String tableName);
|
||||
|
||||
|
||||
|
||||
//查询数据库中表是否存在
|
||||
int isTableInDb(@Param("dataBaseName") String dataBaseName,
|
||||
@Param("tableName") String tableName);
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package com.ruoyi.bps.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bps.domain.ExpImportQuery;
|
||||
import com.ruoyi.bps.domain.ExpressInfo;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
|
||||
/**
|
||||
* Excel批量快递查询Service接口
|
||||
*
|
||||
* @author Bo
|
||||
* @date 2021-07-21
|
||||
*/
|
||||
public interface IExpImportQueryService
|
||||
{
|
||||
/**
|
||||
* 查询Excel批量快递查询
|
||||
*
|
||||
* @param sid Excel批量快递查询ID
|
||||
* @return Excel批量快递查询
|
||||
*/
|
||||
public ExpImportQuery selectExpImportQueryById(Long sid);
|
||||
|
||||
/**
|
||||
* 查询Excel批量快递查询列表
|
||||
*
|
||||
* @param expImportQuery Excel批量快递查询
|
||||
* @return Excel批量快递查询集合
|
||||
*/
|
||||
public List<ExpImportQuery> selectExpImportQueryList(ExpImportQuery expImportQuery);
|
||||
|
||||
/**
|
||||
* 新增Excel批量快递查询
|
||||
*
|
||||
* @param expImportQuery Excel批量快递查询
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExpImportQuery(ExpImportQuery expImportQuery);
|
||||
|
||||
/**
|
||||
* 修改Excel批量快递查询
|
||||
*
|
||||
* @param expImportQuery Excel批量快递查询
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExpImportQuery(ExpImportQuery expImportQuery);
|
||||
|
||||
/**
|
||||
* 批量删除Excel批量快递查询
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpImportQueryByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除Excel批量快递查询信息
|
||||
*
|
||||
* @param sid Excel批量快递查询ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpImportQueryById(Long sid);
|
||||
|
||||
/**
|
||||
* 删除Excel批量快递查询信息
|
||||
*
|
||||
* @param expressInfoList Excel导入的快递列表
|
||||
* @return 结果
|
||||
*/
|
||||
public AjaxResult importData(List<ExpressInfo> expressInfoList) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.ruoyi.bps.service;
|
||||
|
||||
import com.ruoyi.bps.domain.ExpSubscribe;
|
||||
import com.kuaidi100.sdk.response.SubscribeResp;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
|
||||
public interface IExpSubsPushApiService {
|
||||
|
||||
/**
|
||||
* 向快递100推送订阅请求
|
||||
* @param expSubscribe
|
||||
* @return
|
||||
*/
|
||||
public SubscribeResp ExpressSubscribe(ExpSubscribe expSubscribe);
|
||||
|
||||
/**
|
||||
* 快递100订阅推送处理
|
||||
*
|
||||
* 回调接口支持自定义参数,比如订阅时回调地址填写的是 http://www.xxx.com?orderId=1233333
|
||||
* 可以通过下面这种方式获取到orderId: String orderId = request.getParameter("orderId");
|
||||
*
|
||||
* 返回值必须是下面这样的格式,否则快递100将认为该推送失败,快递100将会重试3次该推送,时间间隔35分钟;
|
||||
* 成功结果返回例子: {"result":true,"returnCode":"200","message":"提交成功"}
|
||||
*
|
||||
*/
|
||||
public SubscribeResp ExpressSubscribeCallBackUrl(HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 获取Topgp推送的快递信息,向快递100推送订阅请求
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
public String ExpressSubscribeFromTopgp(HttpServletRequest request) throws IOException;
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.ruoyi.bps.service;
|
||||
|
||||
import com.ruoyi.bps.domain.ExpSubsPushResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 快递订阅推送信息Service接口
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-13
|
||||
*/
|
||||
public interface IExpSubsPushRespService
|
||||
{
|
||||
/**
|
||||
* 查询快递订阅推送信息
|
||||
*
|
||||
* @param sid 快递订阅推送信息ID
|
||||
* @return 快递订阅推送信息
|
||||
*/
|
||||
public ExpSubsPushResp selectExpSubsPushRespById(Long sid);
|
||||
|
||||
/**
|
||||
* 查询快递订阅推送信息列表
|
||||
*
|
||||
* @param expSubsPushResp 快递订阅推送信息
|
||||
* @return 快递订阅推送信息集合
|
||||
*/
|
||||
public List<ExpSubsPushResp> selectExpSubsPushRespList(ExpSubsPushResp expSubsPushResp);
|
||||
|
||||
/**
|
||||
* 新增快递订阅推送信息
|
||||
*
|
||||
* @param expSubsPushResp 快递订阅推送信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExpSubsPushResp(ExpSubsPushResp expSubsPushResp);
|
||||
|
||||
/**
|
||||
* 修改快递订阅推送信息
|
||||
*
|
||||
* @param expSubsPushResp 快递订阅推送信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExpSubsPushResp(ExpSubsPushResp expSubsPushResp);
|
||||
|
||||
/**
|
||||
* 批量删除快递订阅推送信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpSubsPushRespByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除快递订阅推送信息信息
|
||||
*
|
||||
* @param sid 快递订阅推送信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpSubsPushRespById(Long sid);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
package com.ruoyi.bps.service;
|
||||
|
||||
import com.ruoyi.bps.domain.ExpSubsPushResp;
|
||||
import com.ruoyi.bps.domain.ExpSubscribe;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 快递订阅Service接口
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-20
|
||||
*/
|
||||
public interface IExpSubscribeService
|
||||
{
|
||||
/**
|
||||
* 查询快递订阅
|
||||
*
|
||||
* @param sid 快递订阅ID
|
||||
* @return 快递订阅
|
||||
*/
|
||||
public ExpSubscribe selectExpSubscribeById(Long sid);
|
||||
|
||||
/**
|
||||
* 查询快递订阅列表
|
||||
*
|
||||
* @param expSubscribe 快递订阅
|
||||
* @return 快递订阅集合
|
||||
*/
|
||||
public List<ExpSubscribe> selectExpSubscribeList(ExpSubscribe expSubscribe);
|
||||
|
||||
/**
|
||||
* 新增快递订阅
|
||||
*
|
||||
* @param expSubscribe 快递订阅
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExpSubscribe(ExpSubscribe expSubscribe);
|
||||
|
||||
/**
|
||||
* 修改快递订阅
|
||||
*
|
||||
* @param expSubscribe 快递订阅
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExpSubscribe(ExpSubscribe expSubscribe);
|
||||
|
||||
/**
|
||||
* 批量删除快递订阅
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpSubscribeByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除快递订阅信息
|
||||
*
|
||||
* @param sid 快递订阅ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpSubscribeById(Long sid);
|
||||
|
||||
/**
|
||||
* 根据快递单号查询快递订阅推送信息
|
||||
*
|
||||
* @param number 快递单号List
|
||||
* @return 快递订阅推送信息
|
||||
*/
|
||||
public List<ExpSubscribe> selectExpSubsPushRespByNumber(List<String> number);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.bps.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bps.domain.ExpTopgpLog;
|
||||
|
||||
/**
|
||||
* ERP订阅推送日志Service接口
|
||||
*
|
||||
* @author Bo
|
||||
* @date 2021-08-11
|
||||
*/
|
||||
public interface IExpTopgpLogService
|
||||
{
|
||||
/**
|
||||
* 查询ERP订阅推送日志
|
||||
*
|
||||
* @param sid ERP订阅推送日志主键
|
||||
* @return ERP订阅推送日志
|
||||
*/
|
||||
public ExpTopgpLog selectExpTopgpLogBySid(Long sid);
|
||||
|
||||
/**
|
||||
* 查询ERP订阅推送日志列表
|
||||
*
|
||||
* @param expTopgpLog ERP订阅推送日志
|
||||
* @return ERP订阅推送日志集合
|
||||
*/
|
||||
public List<ExpTopgpLog> selectExpTopgpLogList(ExpTopgpLog expTopgpLog);
|
||||
|
||||
/**
|
||||
* 新增ERP订阅推送日志
|
||||
*
|
||||
* @param expTopgpLog ERP订阅推送日志
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExpTopgpLog(ExpTopgpLog expTopgpLog);
|
||||
|
||||
/**
|
||||
* 修改ERP订阅推送日志
|
||||
*
|
||||
* @param expTopgpLog ERP订阅推送日志
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExpTopgpLog(ExpTopgpLog expTopgpLog);
|
||||
|
||||
/**
|
||||
* 批量删除ERP订阅推送日志
|
||||
*
|
||||
* @param sids 需要删除的ERP订阅推送日志主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpTopgpLogBySids(String sids);
|
||||
|
||||
/**
|
||||
* 删除ERP订阅推送日志信息
|
||||
*
|
||||
* @param sid ERP订阅推送日志主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpTopgpLogBySid(Long sid);
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.ruoyi.bps.service;
|
||||
|
||||
import com.ruoyi.bps.domain.ExpressInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 快递信息Service接口
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-06
|
||||
*/
|
||||
public interface IExpressInfoService
|
||||
{
|
||||
/**
|
||||
* 查询快递信息
|
||||
*
|
||||
* @param message 快递信息ID
|
||||
* @return 快递信息
|
||||
*/
|
||||
public ExpressInfo selectExpressInfoById(String message);
|
||||
|
||||
/**
|
||||
* 查询本地快递信息列表
|
||||
*
|
||||
* @param expressInfo 快递信息
|
||||
* @return 快递信息集合
|
||||
*/
|
||||
public List<ExpressInfo> selectLocalExpressInfoList(ExpressInfo expressInfo);
|
||||
|
||||
/**
|
||||
* 查询本地快递信息列表
|
||||
*
|
||||
* @param expressInfo 快递信息
|
||||
* @return 快递信息集合
|
||||
*/
|
||||
public List<ExpressInfo> selectExpressInfoList(ExpressInfo expressInfo);
|
||||
|
||||
/**
|
||||
* 新增快递信息
|
||||
*
|
||||
* @param expressInfo 快递信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExpressInfo(ExpressInfo expressInfo);
|
||||
|
||||
/**
|
||||
* 修改快递信息
|
||||
*
|
||||
* @param expressInfo 快递信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExpressInfo(ExpressInfo expressInfo);
|
||||
|
||||
/**
|
||||
* 批量删除快递信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpressInfoByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除快递信息信息
|
||||
*
|
||||
* @param message 快递信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpressInfoById(String message);
|
||||
|
||||
/**
|
||||
* 查询快递信息
|
||||
*
|
||||
* @param expressInfo 快递信息
|
||||
* @return 快递信息
|
||||
*/
|
||||
public ExpressInfo SelectExpressInfo(ExpressInfo expressInfo);
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.ruoyi.bps.service;
|
||||
|
||||
//import com.ruoyi.bps.express.request.QueryTrackParam;
|
||||
//import com.ruoyi.bps.express.response.QueryTrackResp;
|
||||
|
||||
import com.kuaidi100.sdk.request.QueryTrackParam;
|
||||
import com.kuaidi100.sdk.response.QueryTrackResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IExpressService {
|
||||
|
||||
public List<QueryTrackResp> QueryTrackExpressMultiList(List<QueryTrackParam> list);
|
||||
/**
|
||||
* 查询多条物流轨迹
|
||||
*/
|
||||
public String QueryTrackExpressMulti(List<QueryTrackParam> list);
|
||||
|
||||
/**
|
||||
* 查询物流轨迹
|
||||
*/
|
||||
public String QueryTrackExpress(QueryTrackParam qt);
|
||||
|
||||
/**
|
||||
* 订阅
|
||||
*/
|
||||
public String SubscribeExpress();
|
||||
|
||||
/**
|
||||
* 测试快递单号合集
|
||||
*/
|
||||
public List<QueryTrackParam> GetTestQueryTrackParam();
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.ruoyi.bps.service;
|
||||
|
||||
public interface TopgpDdlService {
|
||||
//修改表名
|
||||
int alterTableName(String originalTableName, String newTableName);
|
||||
|
||||
// truncate指定数据库表的数据
|
||||
int truncateTable(String tableName);
|
||||
|
||||
//drop 指定定数据库表
|
||||
int dropTable(String tableName);
|
||||
|
||||
|
||||
//根据传入的表明,创建新的表并且将原表的数据插入到新的Occur表中
|
||||
void copyTable(String newTableName,String originalTableName);
|
||||
|
||||
//统计某张表中的总数据条数
|
||||
int getRecordCount(String tableName);
|
||||
|
||||
//从指定数据库中,查询是否存在某张表
|
||||
int isTableInDb(String dataBaseName, String tableName);
|
||||
}
|
||||
|
|
@ -0,0 +1,171 @@
|
|||
package com.ruoyi.bps.service.impl;
|
||||
|
||||
import com.ruoyi.bps.domain.ExpImportQuery;
|
||||
import com.ruoyi.bps.domain.ExpressInfo;
|
||||
import com.ruoyi.bps.mapper.ExpImportQueryMapper;
|
||||
import com.ruoyi.bps.mapper.ExpressInfoMapper;
|
||||
import com.ruoyi.bps.service.IExpImportQueryService;
|
||||
import com.ruoyi.bps.service.IExpressInfoService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Excel批量快递查询Service业务层处理
|
||||
*
|
||||
* @author Bo
|
||||
* @date 2021-07-21
|
||||
*/
|
||||
@Service
|
||||
public class ExpImportQueryServiceImpl implements IExpImportQueryService
|
||||
{
|
||||
@Autowired
|
||||
private ExpImportQueryMapper expImportQueryMapper;
|
||||
|
||||
@Autowired
|
||||
private IExpressInfoService expressInfoService;
|
||||
|
||||
@Autowired
|
||||
private ExpressInfoMapper expressInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询Excel批量快递查询
|
||||
*
|
||||
* @param sid Excel批量快递查询ID
|
||||
* @return Excel批量快递查询
|
||||
*/
|
||||
@Override
|
||||
public ExpImportQuery selectExpImportQueryById(Long sid)
|
||||
{
|
||||
return expImportQueryMapper.selectExpImportQueryById(sid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询Excel批量快递查询列表
|
||||
*
|
||||
* @param expImportQuery Excel批量快递查询
|
||||
* @return Excel批量快递查询
|
||||
*/
|
||||
@Override
|
||||
public List<ExpImportQuery> selectExpImportQueryList(ExpImportQuery expImportQuery)
|
||||
{
|
||||
return expImportQueryMapper.selectExpImportQueryList(expImportQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增Excel批量快递查询
|
||||
*
|
||||
* @param expImportQuery Excel批量快递查询
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExpImportQuery(ExpImportQuery expImportQuery)
|
||||
{
|
||||
return expImportQueryMapper.insertExpImportQuery(expImportQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改Excel批量快递查询
|
||||
*
|
||||
* @param expImportQuery Excel批量快递查询
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExpImportQuery(ExpImportQuery expImportQuery)
|
||||
{
|
||||
return expImportQueryMapper.updateExpImportQuery(expImportQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除Excel批量快递查询对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteExpImportQueryByIds(String ids)
|
||||
{
|
||||
for(String str:Arrays.asList(ids.split(",")))
|
||||
{
|
||||
expressInfoMapper.deleteExpressInfoByQueryId(str);
|
||||
}
|
||||
int message= expImportQueryMapper.deleteExpImportQueryByIds(Convert.toStrArray(ids));
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除Excel批量快递查询信息
|
||||
*
|
||||
* @param sid Excel批量快递查询ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExpImportQueryById(Long sid)
|
||||
{
|
||||
return expImportQueryMapper.deleteExpImportQueryById(sid);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Excel批量快递查询信息
|
||||
*
|
||||
* @param expressInfoList Excel导入的快递列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult importData(List<ExpressInfo> expressInfoList) throws Exception {
|
||||
String queryTime= DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss");
|
||||
String queryId= LocalDateTime.now().toString();
|
||||
ExpImportQuery expImportQuery=new ExpImportQuery();
|
||||
List<ExpressInfo> expressInfoListForInsert=new ArrayList<>();
|
||||
/* try{*/
|
||||
//将查询到的快递结果放到expressInfoListForInsert,并插入到数据库表expressInfo
|
||||
for( ExpressInfo expressInfo:expressInfoList){
|
||||
//去除快递单号中的头尾空白符
|
||||
expressInfo.setNu(expressInfo.getNu().trim());
|
||||
ExpressInfo ei= expressInfoService.SelectExpressInfo(expressInfo);
|
||||
ei.setQueryId(queryId);
|
||||
ei.setQueryUserName(ShiroUtils.getSysUser().getUserName());
|
||||
ei.setQueryType("excel");
|
||||
ei.setQueryTime(queryTime);
|
||||
//expressInfoService.insertExpressInfo(ei);
|
||||
expressInfoListForInsert.add(ei);
|
||||
/* for(int i=1;i<1001;i++){ //测试批量插入效率用时打开Mark,产生5万条数据。
|
||||
expressInfoListForInsert.add(ei);
|
||||
}*/
|
||||
}
|
||||
int size= expressInfoListForInsert.size();
|
||||
List<ExpressInfo> expressInfos= new ArrayList<>();
|
||||
for(int i=1;i<=size;i++){
|
||||
expressInfos.add(expressInfoListForInsert.get(i-1));
|
||||
if( (i%400==0 ) ||i== size) {
|
||||
expressInfoMapper.batchInsertExpressInfo(expressInfos);
|
||||
expressInfos.clear();
|
||||
}
|
||||
}
|
||||
//将本次excel导入查询记录到数据表exp_import_query
|
||||
expImportQuery.setQueryTime(queryTime);
|
||||
expImportQuery.setQueryLoginName(ShiroUtils.getLoginName());
|
||||
expImportQuery.setQueryUserName(ShiroUtils.getSysUser().getUserName());
|
||||
expImportQuery.setFinishTime(DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"));
|
||||
expImportQuery.setQueryIp(ShiroUtils.getIp());
|
||||
expImportQuery.setStatus("success");
|
||||
expImportQuery.setQueryQty(String.valueOf(expressInfoList.size()));
|
||||
expImportQuery.setQueryId(queryId);
|
||||
int message=expImportQueryMapper.insertExpImportQuery(expImportQuery);
|
||||
return AjaxResult.success(message);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,426 @@
|
|||
package com.ruoyi.bps.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
//import com.google.gson.Gson;
|
||||
import com.kuaidi100.sdk.api.Subscribe;
|
||||
import com.kuaidi100.sdk.contant.ApiInfoConstant;
|
||||
import com.kuaidi100.sdk.core.IBaseClient;
|
||||
import com.kuaidi100.sdk.pojo.HttpResult;
|
||||
import com.kuaidi100.sdk.request.SubscribeParam;
|
||||
import com.kuaidi100.sdk.request.SubscribeParameters;
|
||||
import com.kuaidi100.sdk.request.SubscribeReq;
|
||||
import com.kuaidi100.sdk.response.SubscribePushData;
|
||||
import com.kuaidi100.sdk.response.SubscribePushParamResp;
|
||||
import com.kuaidi100.sdk.response.SubscribePushResult;
|
||||
import com.kuaidi100.sdk.response.SubscribeResp;
|
||||
import com.kuaidi100.sdk.utils.SignUtils;
|
||||
import com.ruoyi.bps.domain.ExpSubsPushResp;
|
||||
import com.ruoyi.bps.domain.ExpSubscribe;
|
||||
import com.ruoyi.bps.domain.ExpTopgpLog;
|
||||
import com.ruoyi.bps.service.IExpSubsPushApiService;
|
||||
import com.ruoyi.bps.service.IExpSubsPushRespService;
|
||||
import com.ruoyi.bps.service.IExpSubscribeService;
|
||||
import com.ruoyi.bps.service.IExpTopgpLogService;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.TopgpXmlUtils;
|
||||
import com.ruoyi.common.utils.http.HttpUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService {
|
||||
/*String key = PropertiesReader.get("key");
|
||||
String customer = PropertiesReader.get("customer");
|
||||
String secret = PropertiesReader.get("secret");
|
||||
String siid = PropertiesReader.get("siid");
|
||||
String userid = PropertiesReader.get("userid");
|
||||
String tid = PropertiesReader.get("tid");
|
||||
String secret_key = PropertiesReader.get("secret_key");
|
||||
String secret_secret = PropertiesReader.get("secret_secret"); */
|
||||
private static final Logger log = LoggerFactory.getLogger(HttpUtils.class);
|
||||
@Value("${express.key}")
|
||||
private String key;
|
||||
|
||||
@Value("${topgp.webservice.toptest}")
|
||||
private String webserviceUrl;
|
||||
|
||||
@Autowired
|
||||
private IExpSubsPushRespService expSubsPushRespService;
|
||||
|
||||
@Autowired
|
||||
IExpSubscribeService expSubscribeService;
|
||||
|
||||
@Autowired
|
||||
IExpTopgpLogService expTopgpLogService;
|
||||
|
||||
/**
|
||||
* 订阅快递
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public SubscribeResp ExpressSubscribe(ExpSubscribe expSubscribe) {
|
||||
|
||||
//如果订阅来源是topgp,则来源为topgp,否则为local
|
||||
/*String loginFrom= expSubscribe.getSalt();
|
||||
String subscribeFrom= StringUtils.isNotEmpty(loginFrom)?loginFrom.equals("topgp")?"topgp":"local":"local";*/
|
||||
if(StringUtils.isEmpty(expSubscribe.getRequestFrom())){
|
||||
expSubscribe.setRequestFrom("local");
|
||||
}
|
||||
|
||||
if( StringUtils.isEmpty(expSubscribe.getRequestId())) {
|
||||
//expSubscribe.setRequestId("local"+System.currentTimeMillis()); //获取时间戳,生成本地请求的requestId
|
||||
expSubscribe.setRequestId("local"+ LocalDateTime.now());
|
||||
}
|
||||
if(StringUtils.isEmpty(expSubscribe.getSubscribeTime())){
|
||||
expSubscribe.setSubscribeTime(DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"));
|
||||
}
|
||||
String salt="bpsemi"; //定义salt字符串
|
||||
|
||||
//组合订阅参数
|
||||
SubscribeParameters subscribeParameters = new SubscribeParameters();
|
||||
SubscribeResp subscribeResp = new SubscribeResp();
|
||||
subscribeParameters.setCallbackurl("http://report.bpsemi.cn:8081/it_war/anon/subscribeCallBackUrl");
|
||||
subscribeParameters.setPhone(expSubscribe.getPhone());
|
||||
subscribeParameters.setSalt(salt);
|
||||
SubscribeParam subscribeParam = new SubscribeParam();
|
||||
subscribeParam.setParameters(subscribeParameters);
|
||||
subscribeParam.setCompany(expSubscribe.getCompany());
|
||||
subscribeParam.setNumber(expSubscribe.getNumber());
|
||||
subscribeParam.setKey(key);
|
||||
|
||||
SubscribeReq subscribeReq = new SubscribeReq();
|
||||
subscribeReq.setSchema(ApiInfoConstant.SUBSCRIBE_SCHEMA);
|
||||
//subscribeReq.setParam(new Gson().toJson(subscribeParam));
|
||||
subscribeReq.setParam(JSONObject.toJSONString(subscribeParam));
|
||||
|
||||
IBaseClient subscribe = new Subscribe();
|
||||
try{
|
||||
//推送订阅,并获得快递100响应结果
|
||||
HttpResult httpResult= subscribe.execute(subscribeReq);
|
||||
//subscribeResp= new Gson().fromJson(httpResult.getBody(),SubscribeResp.class);
|
||||
subscribeResp = JSONObject.parseObject(httpResult.getBody(),SubscribeResp.class);
|
||||
}catch (Exception e)
|
||||
{
|
||||
return subscribeResp;
|
||||
}
|
||||
//如果快递公司或快递单号为空,则直接返回订阅结果
|
||||
if(StringUtils.isEmpty(expSubscribe.getCompany()) || StringUtils.isEmpty(expSubscribe.getNumber()))
|
||||
{
|
||||
return subscribeResp;
|
||||
}
|
||||
|
||||
|
||||
//订阅记录写入数据库
|
||||
ExpSubscribe newExpSubscribe = new ExpSubscribe();
|
||||
newExpSubscribe.setSid(expSubscribe.getSid()); //将时间戳设为Sid 210810 yangbo
|
||||
newExpSubscribe.setCompany(expSubscribe.getCompany());
|
||||
newExpSubscribe.setNumber(expSubscribe.getNumber());
|
||||
newExpSubscribe.setPhone(expSubscribe.getPhone());
|
||||
newExpSubscribe.setSalt(salt);
|
||||
newExpSubscribe.setSubscribeTime(expSubscribe.getSubscribeTime());
|
||||
newExpSubscribe.setResult((subscribeResp.isResult())?"true":"false");
|
||||
newExpSubscribe.setReturnCode(subscribeResp.getReturnCode());
|
||||
newExpSubscribe.setMessage(subscribeResp.getMessage());
|
||||
newExpSubscribe.setRequestFrom(expSubscribe.getRequestFrom());
|
||||
newExpSubscribe.setRequestId(expSubscribe.getRequestId());
|
||||
|
||||
/*ExpSubscribe queryExpSubscribe = new ExpSubscribe();
|
||||
queryExpSubscribe.setCompany(expSubscribe.getCompany());
|
||||
queryExpSubscribe.setNumber(expSubscribe.getNumber());
|
||||
queryExpSubscribe.setResult(expSubscribe.getResult());
|
||||
queryExpSubscribe.setReturnCode(expSubscribe.getReturnCode());
|
||||
List<ExpSubscribe> list=expSubscribeService.selectExpSubscribeList(queryExpSubscribe);
|
||||
if(list.size()>0){
|
||||
//如果数据库中存在快递单号+快递公司编码+结果+返回码相同,则更新记录
|
||||
for(ExpSubscribe es:list){
|
||||
queryExpSubscribe= newExpSubscribe;
|
||||
queryExpSubscribe.setSid(es.getSid());
|
||||
expSubscribeService.updateExpSubscribe(queryExpSubscribe);
|
||||
}
|
||||
}else {
|
||||
//如果数据库中没有快递单号+快递公司编码,则更插入新记录
|
||||
expSubscribeService.insertExpSubscribe(newExpSubscribe);
|
||||
}*/
|
||||
//20210802 无论系统里有没有记录,都会记录本次推送。
|
||||
expSubscribeService.insertExpSubscribe(newExpSubscribe);
|
||||
|
||||
//返回订阅结果
|
||||
return subscribeResp;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理Topgp推送的快递订阅请求,向快递100推送订阅请求,并将结果返回给TOPGP
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String ExpressSubscribeFromTopgp(HttpServletRequest request) throws IOException {
|
||||
//定义Return变量
|
||||
String retrunStr;
|
||||
|
||||
//获取httpServletRequest传过来的Json字符串,并进行解析
|
||||
JSONObject contentJson= JSONObject.parseObject(ServletUtils.getRequestContent(request));
|
||||
if(StringUtils.isEmpty(contentJson)){
|
||||
return "貌似没有接受到任何参数!";
|
||||
}
|
||||
String requestId=contentJson.getString("requestId"); //TOPGP请求ID,年月日时分稍毫秒
|
||||
String deliveryNo= contentJson.getString("deliveryNo"); //TOPGP出货单号
|
||||
String expressNo = contentJson.getString("expressNo"); //TOPGP快递单号
|
||||
String company = contentJson.getString("company"); //TOPGP物流公司编号
|
||||
String phone = contentJson.getString("phone"); //TOPGP出货单号
|
||||
//Long timeStamp = System.currentTimeMillis(); //获取时间戳
|
||||
String subscribeTime= DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"); //获取订阅时间
|
||||
SubscribeResp subscribeResp=new SubscribeResp();
|
||||
//如果请求ID、出货单号或者快递单号为空,则不向快递100请求订阅,自己组合返回信息。
|
||||
if(StringUtils.isEmpty(deliveryNo) || StringUtils.isEmpty(expressNo) || StringUtils.isEmpty(requestId)){
|
||||
subscribeResp.setMessage("请求ID、快递单号或出货单号不可为空");
|
||||
subscribeResp.setResult(false);
|
||||
subscribeResp.setReturnCode("700");
|
||||
}else {
|
||||
//组合向快递100推送订阅请求的参数
|
||||
ExpSubscribe expSubscribe=new ExpSubscribe();
|
||||
expSubscribe.setSid(Long.getLong(requestId)); //时间戳
|
||||
expSubscribe.setNumber(expressNo);
|
||||
expSubscribe.setCompany(company);
|
||||
expSubscribe.setPhone(phone);
|
||||
expSubscribe.setSubscribeTime(subscribeTime); //订阅时间
|
||||
expSubscribe.setSalt("topgp"); //
|
||||
|
||||
//向快递100推送订阅请求,取得订阅返回结果
|
||||
subscribeResp= ExpressSubscribe(expSubscribe);
|
||||
|
||||
}
|
||||
//根据快递100的订阅返回结果,组合返回Topgp的JSON字符串
|
||||
Map<String,Object> map= new HashMap<>();
|
||||
map.put("requestId",requestId); //从TOPGP传过来的requestId, 时间戳
|
||||
map.put("deliveryNo",deliveryNo); //出货单号
|
||||
map.put("expressNo",expressNo); //快递单号
|
||||
map.put("responseStr",subscribeResp.getMessage()); //返回消息
|
||||
map.put("responseCode",subscribeResp.getReturnCode()); //返回码
|
||||
map.put("result",subscribeResp.isResult()); //订阅结果
|
||||
|
||||
|
||||
//返回Json字符串给TOPGP
|
||||
retrunStr= JSONObject.toJSONString(map);
|
||||
|
||||
|
||||
//记录本次TOPGP订阅请求的Log
|
||||
ExpTopgpLog expTopgpLog=new ExpTopgpLog();
|
||||
expTopgpLog.setRequestId(requestId);
|
||||
expTopgpLog.setRequestType("fromTopgp");
|
||||
expTopgpLog.setExpressNumber(expressNo);
|
||||
expTopgpLog.setDeliveryNumber(deliveryNo);
|
||||
expTopgpLog.setRequestStr(contentJson.toString());
|
||||
expTopgpLog.setRequestTime(subscribeTime);
|
||||
expTopgpLog.setResponseCode(subscribeResp.getReturnCode());
|
||||
expTopgpLog.setResponseStr(retrunStr);
|
||||
|
||||
expTopgpLogService.insertExpTopgpLog(expTopgpLog);
|
||||
|
||||
//返回TOPGP json字符串
|
||||
return retrunStr;
|
||||
}
|
||||
|
||||
public JSONObject SendRequestToTopgp( String url,String tip,Map<String,Object> map) {
|
||||
String param = TopgpXmlUtils.GetTopgpRequestXml(tip, map);
|
||||
String returnXml = HttpUtils.sendXmlPost(url, param);
|
||||
return TopgpXmlUtils.GetStatusFromTopgpResponse(returnXml);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 处理快递100订阅的快递推送信息,并返回响应结果
|
||||
*
|
||||
* @param request 快递100推送的订阅信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public SubscribeResp ExpressSubscribeCallBackUrl(HttpServletRequest request) {
|
||||
//如果推送信息中没有包含
|
||||
if(StringUtils.isEmpty(request.getParameter("param"))
|
||||
|| StringUtils.isEmpty(request.getParameter("sign"))) {
|
||||
SubscribeResp subscribeResp= new SubscribeResp();
|
||||
subscribeResp.setResult(Boolean.FALSE);
|
||||
subscribeResp.setReturnCode("701");
|
||||
subscribeResp.setMessage("推送的信息不合法!");
|
||||
return subscribeResp;
|
||||
}
|
||||
|
||||
String param= request.getParameter("param");
|
||||
String sign = request.getParameter("sign");
|
||||
//log.debug("快递100订阅推送回调结果|{}|{}",param,sign);
|
||||
//订阅时传的salt
|
||||
String salt = "bpsemi";
|
||||
String ourSign = SignUtils.sign(param + salt);
|
||||
SubscribeResp subscribeResp = new SubscribeResp();
|
||||
subscribeResp.setResult(Boolean.TRUE);
|
||||
subscribeResp.setReturnCode("200");
|
||||
//加密如果不等,则不属于快递100推送,忽略掉当前请求
|
||||
if (!ourSign.equals(sign)){
|
||||
subscribeResp.setMessage("接受成功!但加密验证不通过!【sign】"+sign+"【ourSign】"+ourSign);
|
||||
return subscribeResp;
|
||||
}
|
||||
//加密相等,继续处理业务逻辑
|
||||
subscribeResp.setMessage("接受成功!加密验证通过!【sign】"+sign+"【ourSign】"+ourSign);
|
||||
|
||||
//SubscribePushParamResp subscribePushParamResp = new Gson().fromJson(param, SubscribePushParamResp.class);
|
||||
SubscribePushParamResp subscribePushParamResp=JSONObject.parseObject(param,SubscribePushParamResp.class);
|
||||
SubscribePushResult subscribePushResult = subscribePushParamResp.getLastResult();
|
||||
//快递单号
|
||||
String nu = subscribePushResult.getNu();
|
||||
//监控状态 (polling:监控中,shutdown:结束,abort:中止,updateall:重新推送。其中当快递单为已签收时status=shutdown)
|
||||
String status= subscribePushParamResp.getStatus();
|
||||
if(status.equals("abort")){
|
||||
//todo
|
||||
//当message为“3天查询无记录”或“60天无变化时”status= abort ,对于status=abort的状态的处理逻辑
|
||||
//将Abort信息存档。然后预警
|
||||
|
||||
}
|
||||
//快递单当前状态 (0在途,1揽收,2疑难,3签收,4退签,5派件,6退回,7转单,10待清关,11清关中,12已清关,13清关异常,14收件人拒签)
|
||||
String state = subscribePushResult.getState();
|
||||
|
||||
//处理签收逻辑
|
||||
//如果是快递100推送的快递单状态为签收(state=3),并且TOPGP未反馈该快递单已被签收
|
||||
if(state.equals("3")) {
|
||||
//如果该快递信息没有推送给TOPGP且TOPGP已反馈生成签收单成功记录,则推送给TOPGP
|
||||
ExpTopgpLog expTopgpLog=new ExpTopgpLog();
|
||||
expTopgpLog.setExpressNumber(subscribePushResult.getNu());
|
||||
expTopgpLog.setRequestType("toTopgp");
|
||||
expTopgpLog.setResponseCode("200");
|
||||
List<ExpTopgpLog> expTopgpLogList= expTopgpLogService.selectExpTopgpLogList(expTopgpLog);
|
||||
if(null==expTopgpLogList || expTopgpLogList.size()<1){
|
||||
Map<String, Object> requestMap = new HashMap<>();
|
||||
requestMap.put("expressNum", subscribePushResult.getNu());
|
||||
requestMap.put("expressCom", subscribePushResult.getCom());
|
||||
requestMap.put("expressState", subscribePushResult.getState());
|
||||
|
||||
//一个快递单号,对应多个出货单请求?
|
||||
|
||||
|
||||
//调用topgp Webservice接口
|
||||
//topgp返回的?
|
||||
JSONObject jsonObject= SendRequestToTopgp(webserviceUrl, "express_testRequest",requestMap);
|
||||
log.info(jsonObject.toJSONString());
|
||||
if(jsonObject.getString("returnCode").equals("200")){
|
||||
//一个快递单号对应多个出货单号怎么处理?如果有多个出货单号,部分已签收,部分未签收又怎么处理? 如果推送到ERP时,ERP已经人工生成签收单了,又该怎么处理?
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//将快递流转状态存入数据库
|
||||
expSubsPushRespService.insertExpSubsPushResp(ToExpSubsPushResp(subscribePushParamResp)); //无论数据库中存在快递单号+快递公司编码,都更新数据库 210809 yangbo 修正
|
||||
|
||||
/*ExpSubsPushResp expSubsPushResp=new ExpSubsPushResp();
|
||||
expSubsPushResp.setLastResultNu(subscribePushResult.getNu());
|
||||
expSubsPushResp.setLastResultCom(subscribePushResult.getCom());
|
||||
List<ExpSubsPushResp> list=expSubsPushRespService.selectExpSubsPushRespList(expSubsPushResp);
|
||||
if(list.size()>0){
|
||||
//如果数据库中存在快递单号+快递公司编码,则更新记录
|
||||
ExpSubsPushResp newExpSubsPushResp= ToExpSubsPushResp(subscribePushParamResp);
|
||||
for(ExpSubsPushResp expr:list){
|
||||
newExpSubsPushResp.setSid(expr.getSid());
|
||||
expSubsPushRespService.updateExpSubsPushResp(newExpSubsPushResp);
|
||||
newExpSubsPushResp.setSid(null);
|
||||
}
|
||||
}else {
|
||||
//如果数据库中没有快递单号+快递公司编码,则更插入新记录
|
||||
expSubsPushRespService.insertExpSubsPushResp(ToExpSubsPushResp(subscribePushParamResp));
|
||||
}*/
|
||||
|
||||
|
||||
return subscribeResp;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将快递100推送的信息转换为ExpSubsPushResp
|
||||
* @param subscribePushParamResp
|
||||
* @return ExpSubsPushResp
|
||||
*/
|
||||
private ExpSubsPushResp ToExpSubsPushResp(SubscribePushParamResp subscribePushParamResp){
|
||||
ExpSubsPushResp expSubsPushResp=new ExpSubsPushResp();
|
||||
|
||||
SubscribePushResult subscribePushLastResult = subscribePushParamResp.getLastResult();
|
||||
SubscribePushResult subscribePushDestResult = subscribePushParamResp.getDestResult();
|
||||
|
||||
expSubsPushResp.setStatus(subscribePushParamResp.getStatus());
|
||||
expSubsPushResp.setBillStatus(subscribePushParamResp.getBillstatus());
|
||||
expSubsPushResp.setMessage(subscribePushParamResp.getMessage());
|
||||
expSubsPushResp.setAutoCheck(subscribePushParamResp.getAutoCheck());
|
||||
expSubsPushResp.setComOld(subscribePushParamResp.getComOld());
|
||||
expSubsPushResp.setComNew(subscribePushParamResp.getComNew());
|
||||
|
||||
expSubsPushResp.setLastResultMessage(subscribePushLastResult.getMessage());
|
||||
expSubsPushResp.setLastResultState(subscribePushLastResult.getState());
|
||||
expSubsPushResp.setLastResulStatus(subscribePushLastResult.getStatus());
|
||||
expSubsPushResp.setLastResultCondition(subscribePushLastResult.getCondition());
|
||||
expSubsPushResp.setLastResultIsCheck(subscribePushLastResult.getIscheck());
|
||||
expSubsPushResp.setLastResultCom(subscribePushLastResult.getCom());
|
||||
expSubsPushResp.setLastResultNu(subscribePushLastResult.getNu());
|
||||
expSubsPushResp.setLastResultData(SubscribePushDataToString(subscribePushLastResult.getData()));
|
||||
|
||||
if(subscribePushDestResult != null) {
|
||||
//只有邮政国外的快递推送才会有DestResult信息
|
||||
expSubsPushResp.setDestResultMessage(subscribePushDestResult.getMessage());
|
||||
expSubsPushResp.setDestResultState(subscribePushDestResult.getState());
|
||||
expSubsPushResp.setDestResultStatus(subscribePushDestResult.getStatus());
|
||||
expSubsPushResp.setDestResultCondition(subscribePushDestResult.getCondition());
|
||||
expSubsPushResp.setDestResultIsCheck(subscribePushDestResult.getIscheck());
|
||||
expSubsPushResp.setDestResultCom(subscribePushDestResult.getCom());
|
||||
expSubsPushResp.setDestResultNu(subscribePushDestResult.getNu());
|
||||
expSubsPushResp.setDestResultData(SubscribePushDataToString(subscribePushDestResult.getData()));
|
||||
}
|
||||
expSubsPushResp.setLastResponseTime(DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"));
|
||||
|
||||
return expSubsPushResp;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param list 将List<SubscribePushData>转化为字符串
|
||||
* @return
|
||||
*/
|
||||
private String SubscribePushDataToString(List<SubscribePushData> list){
|
||||
String str="";
|
||||
for(SubscribePushData subscribePushData:list){
|
||||
str+="【"+subscribePushData.getTime()+"】 ";
|
||||
if(StringUtils.isNotEmpty(subscribePushData.getAreaName()))
|
||||
{
|
||||
str+=subscribePushData.getAreaName()+"/"; //某些快递没有AreaName信息
|
||||
}
|
||||
str+=subscribePushData.getContext();
|
||||
if(list.size()-1>list.indexOf(subscribePushData)){
|
||||
str+="\r\n";
|
||||
}
|
||||
}
|
||||
//System.out.println(str);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
package com.ruoyi.bps.service.impl;
|
||||
|
||||
import com.ruoyi.bps.domain.ExpSubsPushResp;
|
||||
import com.ruoyi.bps.mapper.ExpSubsPushRespMapper;
|
||||
import com.ruoyi.bps.service.IExpSubsPushRespService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 快递订阅推送信息Service业务层处理
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-13
|
||||
*/
|
||||
@Service
|
||||
public class ExpSubsPushRespServiceImpl implements IExpSubsPushRespService
|
||||
{
|
||||
@Autowired
|
||||
private ExpSubsPushRespMapper expSubsPushRespMapper;
|
||||
|
||||
/**
|
||||
* 查询快递订阅推送信息
|
||||
*
|
||||
* @param sid 快递订阅推送信息ID
|
||||
* @return 快递订阅推送信息
|
||||
*/
|
||||
@Override
|
||||
public ExpSubsPushResp selectExpSubsPushRespById(Long sid)
|
||||
{
|
||||
return expSubsPushRespMapper.selectExpSubsPushRespById(sid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询快递订阅推送信息列表
|
||||
*
|
||||
* @param expSubsPushResp 快递订阅推送信息
|
||||
* @return 快递订阅推送信息
|
||||
*/
|
||||
@Override
|
||||
public List<ExpSubsPushResp> selectExpSubsPushRespList(ExpSubsPushResp expSubsPushResp)
|
||||
{
|
||||
return expSubsPushRespMapper.selectExpSubsPushRespList(expSubsPushResp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增快递订阅推送信息
|
||||
*
|
||||
* @param expSubsPushResp 快递订阅推送信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExpSubsPushResp(ExpSubsPushResp expSubsPushResp)
|
||||
{
|
||||
return expSubsPushRespMapper.insertExpSubsPushResp(expSubsPushResp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改快递订阅推送信息
|
||||
*
|
||||
* @param expSubsPushResp 快递订阅推送信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExpSubsPushResp(ExpSubsPushResp expSubsPushResp)
|
||||
{
|
||||
return expSubsPushRespMapper.updateExpSubsPushResp(expSubsPushResp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除快递订阅推送信息对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExpSubsPushRespByIds(String ids)
|
||||
{
|
||||
return expSubsPushRespMapper.deleteExpSubsPushRespByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除快递订阅推送信息信息
|
||||
*
|
||||
* @param sid 快递订阅推送信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExpSubsPushRespById(Long sid)
|
||||
{
|
||||
return expSubsPushRespMapper.deleteExpSubsPushRespById(sid);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
package com.ruoyi.bps.service.impl;
|
||||
|
||||
import com.ruoyi.bps.domain.ExpSubsPushResp;
|
||||
import com.ruoyi.bps.domain.ExpSubscribe;
|
||||
import com.ruoyi.bps.mapper.ExpSubscribeMapper;
|
||||
import com.ruoyi.bps.service.IExpSubscribeService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 快递订阅Service业务层处理
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-20
|
||||
*/
|
||||
@Service
|
||||
public class ExpSubscribeServiceImpl implements IExpSubscribeService
|
||||
{
|
||||
@Autowired
|
||||
private ExpSubscribeMapper expSubscribeMapper;
|
||||
|
||||
/**
|
||||
* 查询快递订阅
|
||||
*
|
||||
* @param sid 快递订阅ID
|
||||
* @return 快递订阅
|
||||
*/
|
||||
@Override
|
||||
public ExpSubscribe selectExpSubscribeById(Long sid)
|
||||
{
|
||||
return expSubscribeMapper.selectExpSubscribeById(sid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询快递订阅列表
|
||||
*
|
||||
* @param expSubscribe 快递订阅
|
||||
* @return 快递订阅
|
||||
*/
|
||||
@Override
|
||||
public List<ExpSubscribe> selectExpSubscribeList(ExpSubscribe expSubscribe)
|
||||
{
|
||||
return expSubscribeMapper.selectExpSubscribeList(expSubscribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增快递订阅
|
||||
*
|
||||
* @param expSubscribe 快递订阅
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExpSubscribe(ExpSubscribe expSubscribe)
|
||||
{
|
||||
return expSubscribeMapper.insertExpSubscribe(expSubscribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改快递订阅
|
||||
*
|
||||
* @param expSubscribe 快递订阅
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExpSubscribe(ExpSubscribe expSubscribe)
|
||||
{
|
||||
return expSubscribeMapper.updateExpSubscribe(expSubscribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除快递订阅对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExpSubscribeByIds(String ids)
|
||||
{
|
||||
return expSubscribeMapper.deleteExpSubscribeByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除快递订阅信息
|
||||
*
|
||||
* @param sid 快递订阅ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExpSubscribeById(Long sid)
|
||||
{
|
||||
return expSubscribeMapper.deleteExpSubscribeById(sid);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据快递单号查询快递订阅推送信息
|
||||
*
|
||||
* @param number 快递单号List
|
||||
* @return 快递订阅推送信息
|
||||
*/
|
||||
@Override
|
||||
public List<ExpSubscribe> selectExpSubsPushRespByNumber(List<String> number){
|
||||
return expSubscribeMapper.selectExpSubscribeByNumber(number);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
package com.ruoyi.bps.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.bps.mapper.ExpTopgpLogMapper;
|
||||
import com.ruoyi.bps.domain.ExpTopgpLog;
|
||||
import com.ruoyi.bps.service.IExpTopgpLogService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* ERP订阅推送日志Service业务层处理
|
||||
*
|
||||
* @author Bo
|
||||
* @date 2021-08-11
|
||||
*/
|
||||
@Service
|
||||
public class ExpTopgpLogServiceImpl implements IExpTopgpLogService
|
||||
{
|
||||
@Autowired
|
||||
private ExpTopgpLogMapper expTopgpLogMapper;
|
||||
|
||||
/**
|
||||
* 查询ERP订阅推送日志
|
||||
*
|
||||
* @param sid ERP订阅推送日志主键
|
||||
* @return ERP订阅推送日志
|
||||
*/
|
||||
@Override
|
||||
public ExpTopgpLog selectExpTopgpLogBySid(Long sid)
|
||||
{
|
||||
return expTopgpLogMapper.selectExpTopgpLogBySid(sid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询ERP订阅推送日志列表
|
||||
*
|
||||
* @param expTopgpLog ERP订阅推送日志
|
||||
* @return ERP订阅推送日志
|
||||
*/
|
||||
@Override
|
||||
public List<ExpTopgpLog> selectExpTopgpLogList(ExpTopgpLog expTopgpLog)
|
||||
{
|
||||
return expTopgpLogMapper.selectExpTopgpLogList(expTopgpLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增ERP订阅推送日志
|
||||
*
|
||||
* @param expTopgpLog ERP订阅推送日志
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExpTopgpLog(ExpTopgpLog expTopgpLog)
|
||||
{
|
||||
return expTopgpLogMapper.insertExpTopgpLog(expTopgpLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改ERP订阅推送日志
|
||||
*
|
||||
* @param expTopgpLog ERP订阅推送日志
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExpTopgpLog(ExpTopgpLog expTopgpLog)
|
||||
{
|
||||
return expTopgpLogMapper.updateExpTopgpLog(expTopgpLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除ERP订阅推送日志
|
||||
*
|
||||
* @param sids 需要删除的ERP订阅推送日志主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExpTopgpLogBySids(String sids)
|
||||
{
|
||||
return expTopgpLogMapper.deleteExpTopgpLogBySids(Convert.toStrArray(sids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除ERP订阅推送日志信息
|
||||
*
|
||||
* @param sid ERP订阅推送日志主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExpTopgpLogBySid(Long sid)
|
||||
{
|
||||
return expTopgpLogMapper.deleteExpTopgpLogBySid(sid);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,321 @@
|
|||
package com.ruoyi.bps.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.bps.domain.ExpressInfo;
|
||||
import com.ruoyi.bps.mapper.ExpressInfoMapper;
|
||||
import com.ruoyi.bps.service.IExpressInfoService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
//import com.google.gson.Gson;
|
||||
import com.kuaidi100.sdk.api.AutoNum;
|
||||
import com.kuaidi100.sdk.api.QueryTrack;
|
||||
import com.kuaidi100.sdk.core.IBaseClient;
|
||||
import com.kuaidi100.sdk.pojo.HttpResult;
|
||||
import com.kuaidi100.sdk.request.AutoNumReq;
|
||||
import com.kuaidi100.sdk.request.QueryTrackParam;
|
||||
import com.kuaidi100.sdk.request.QueryTrackReq;
|
||||
import com.kuaidi100.sdk.response.AutoNumResp;
|
||||
import com.kuaidi100.sdk.response.QueryTrackData;
|
||||
import com.kuaidi100.sdk.response.QueryTrackResp;
|
||||
import com.kuaidi100.sdk.utils.PropertiesReader;
|
||||
import com.kuaidi100.sdk.utils.SignUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 快递信息Service业务层处理
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-06
|
||||
*/
|
||||
@Service
|
||||
public class ExpressInfoServiceImpl implements IExpressInfoService
|
||||
{
|
||||
/*
|
||||
String key = PropertiesReader.get("key");
|
||||
String customer = PropertiesReader.get("customer");
|
||||
String secret = PropertiesReader.get("secret");
|
||||
String siid = PropertiesReader.get("siid");
|
||||
String userid = PropertiesReader.get("userid");
|
||||
String tid = PropertiesReader.get("tid");
|
||||
String secret_key = PropertiesReader.get("secret_key");
|
||||
String secret_secret = PropertiesReader.get("secret_secret");
|
||||
*/
|
||||
@Value("${express.key}")
|
||||
private String key;
|
||||
|
||||
@Value("${express.customer}")
|
||||
private String customer;
|
||||
|
||||
|
||||
|
||||
|
||||
String msg="";
|
||||
|
||||
@Autowired
|
||||
private ExpressInfoMapper expressInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询快递信息
|
||||
*
|
||||
* @param message 快递信息ID
|
||||
* @return 快递信息
|
||||
*/
|
||||
@Override
|
||||
public ExpressInfo selectExpressInfoById(String message)
|
||||
{
|
||||
return expressInfoMapper.selectExpressInfoById(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询本地快递信息列表
|
||||
*
|
||||
* @param expressInfo 快递信息
|
||||
* @return 快递信息集合
|
||||
*/
|
||||
@Override
|
||||
public List<ExpressInfo> selectLocalExpressInfoList(ExpressInfo expressInfo) {
|
||||
return expressInfoMapper.selectExpressInfoList(expressInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询快递信息列表
|
||||
*
|
||||
* @param expressInfo 快递信息
|
||||
* @return 快递信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<ExpressInfo> selectExpressInfoList(ExpressInfo expressInfo)
|
||||
{
|
||||
List<ExpressInfo> expressInfoList=new ArrayList<>();
|
||||
//如果没有输入订单号,则返回空信息
|
||||
String nuStr=expressInfo.getNu();
|
||||
if(StringUtils.isEmpty(nuStr)){
|
||||
expressInfo.setData("请输入订单号进行查询!");
|
||||
expressInfoList.add(expressInfo);
|
||||
return expressInfoList;
|
||||
}
|
||||
//如果是顺丰,则必须要输入电话号码
|
||||
if( StringUtils.isEmpty(expressInfo.getPhone())
|
||||
&& (expressInfo.getCom().equals("nsf") || expressInfo.getCom().contains("shunfeng"))){
|
||||
expressInfo.setData("查询顺丰快递信息,必须要提供收/寄人电话号码");
|
||||
expressInfoList.add(expressInfo);
|
||||
return expressInfoList;
|
||||
}
|
||||
|
||||
List<String> stringList= Arrays.asList(nuStr.split(","));
|
||||
ExpressInfo newExpressInfo= expressInfo;
|
||||
for(String str:stringList){
|
||||
newExpressInfo.setNu(str);
|
||||
expressInfoList.add(SelectExpressInfo(newExpressInfo));
|
||||
}
|
||||
return expressInfoList;
|
||||
//return expressInfoMapper.selectExpressInfoList(expressInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpressInfo SelectExpressInfo(ExpressInfo expressInfo){
|
||||
String nu=expressInfo.getNu(); //快递单号
|
||||
String com=expressInfo.getCom(); //快递公司
|
||||
String phone=expressInfo.getPhone(); //收、寄件人电话号码
|
||||
String deliveryNum= expressInfo.getDeliveryNum();
|
||||
ExpressInfo callbackExpressInfo=new ExpressInfo();
|
||||
|
||||
callbackExpressInfo.setNu(nu);
|
||||
callbackExpressInfo.setPhone(phone);
|
||||
callbackExpressInfo.setDeliveryNum(deliveryNum);
|
||||
//如果没有输入快递公司编号,则查询快递公司编号
|
||||
if(StringUtils.isEmpty(com)){
|
||||
List<AutoNumResp> list= AutoGetExpressCom(nu);
|
||||
if(null==list || list.size()<1){
|
||||
callbackExpressInfo.setData("请提供要查询的快递所属物流公司编号!,且根据快递单号没有查询到物流公司编号!");
|
||||
return callbackExpressInfo;
|
||||
}
|
||||
if (list.size()>1)
|
||||
{
|
||||
callbackExpressInfo.setData("您没有提供要查询的快递所属物流公司编号,且根据快递单号查询到多个物流公司编号");
|
||||
return callbackExpressInfo;
|
||||
}
|
||||
com=list.get(0).getComCode();
|
||||
}
|
||||
callbackExpressInfo.setCom(com);
|
||||
|
||||
//return callbackExpressInfo;
|
||||
return QueryExpressInfo(callbackExpressInfo);
|
||||
}
|
||||
|
||||
private ExpressInfo QueryExpressInfo(ExpressInfo expressInfo){
|
||||
//从expressInfo中获取快递单号、物流信息、电话,生成快递请求参数
|
||||
QueryTrackParam queryTrackParam= new QueryTrackParam();
|
||||
queryTrackParam.setNum(expressInfo.getNu());
|
||||
queryTrackParam.setCom(expressInfo.getCom());
|
||||
queryTrackParam.setPhone(expressInfo.getPhone());
|
||||
|
||||
//获取快递信息
|
||||
//String param = new Gson().toJson(queryTrackParam);
|
||||
String param= JSONObject.toJSONString(queryTrackParam);
|
||||
QueryTrackReq queryTrackReq=new QueryTrackReq();
|
||||
queryTrackReq.setParam(param);
|
||||
queryTrackReq.setCustomer(customer);
|
||||
queryTrackReq.setSign(SignUtils.querySign(param ,key,customer));
|
||||
HttpResult httpResult =new HttpResult();
|
||||
IBaseClient baseClient = new QueryTrack();
|
||||
try {
|
||||
httpResult = baseClient.execute(queryTrackReq);
|
||||
msg=httpResult.getBody();
|
||||
}
|
||||
catch (Exception e) {
|
||||
msg=e.toString();
|
||||
}
|
||||
|
||||
//将快递信息转化为QueryTrackResp对象
|
||||
//QueryTrackResp queryTrackResp = new Gson().fromJson(msg,QueryTrackResp.class);
|
||||
QueryTrackResp queryTrackResp= JSONObject.parseObject(msg,QueryTrackResp.class);
|
||||
|
||||
//如果没有查到物流信息,则返回错误信息
|
||||
if(StringUtils.isEmpty(queryTrackResp.getStatus()) || !queryTrackResp.getStatus().equals("200")){
|
||||
expressInfo.setData(queryTrackResp.getMessage());
|
||||
return expressInfo;
|
||||
}
|
||||
|
||||
//获取签收时间
|
||||
String signedTime=null;
|
||||
if(queryTrackResp.getState().equals("3")) {
|
||||
signedTime=queryTrackResp.getData().get(0).getFtime();
|
||||
}
|
||||
|
||||
//获取最后更新时间
|
||||
String lastUpdateTime=queryTrackResp.getData().get(0).getFtime();
|
||||
|
||||
//获取揽收时间
|
||||
String collectTime= queryTrackResp.getData().get(queryTrackResp.getData().size()-1).getTime();
|
||||
|
||||
//获取查询时间
|
||||
String queryTime= StringUtils.isNotEmpty(expressInfo.getQueryTime())?expressInfo.getQueryTime():DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
//获取查询人(登录用户)
|
||||
String queryUserName= ShiroUtils.getLoginName();
|
||||
|
||||
//将快递信息中的Context转化为字符
|
||||
String dataStr="";
|
||||
for(QueryTrackData queryTrackData :queryTrackResp.getData()){
|
||||
dataStr+="【"+queryTrackData.getTime()+"】 ";
|
||||
dataStr+=queryTrackData.getContext();
|
||||
if(queryTrackResp.getData().size()-1>queryTrackResp.getData().indexOf(queryTrackData)){
|
||||
dataStr+="\r\n";
|
||||
}
|
||||
}
|
||||
String a= queryTrackResp.getCondition();
|
||||
ExpressInfo callbackExpressInfo=new ExpressInfo();
|
||||
callbackExpressInfo.setMessage(queryTrackResp.getMessage());
|
||||
callbackExpressInfo.setNu(queryTrackResp.getNu());
|
||||
callbackExpressInfo.setIscheck(queryTrackResp.getIscheck());
|
||||
callbackExpressInfo.setCom(queryTrackResp.getCom());
|
||||
callbackExpressInfo.setStatus(queryTrackResp.getStatus());
|
||||
callbackExpressInfo.setData(dataStr);
|
||||
callbackExpressInfo.setState(queryTrackResp.getState());
|
||||
callbackExpressInfo.setCondition(queryTrackResp.getCondition());
|
||||
callbackExpressInfo.setRouteInfo(""); //出发位置,当前位置,到达位置,暂无信息
|
||||
callbackExpressInfo.setReturnCode(queryTrackResp.getReturnCode());
|
||||
callbackExpressInfo.setResult(queryTrackResp.isResult()?"Y":"N");
|
||||
callbackExpressInfo.setPhone(expressInfo.getPhone());
|
||||
callbackExpressInfo.setSingedTime(signedTime);
|
||||
callbackExpressInfo.setCollectTime(collectTime);
|
||||
callbackExpressInfo.setLastUpdateTime(lastUpdateTime);
|
||||
callbackExpressInfo.setQueryTime(queryTime);
|
||||
callbackExpressInfo.setQueryUserName(queryUserName);
|
||||
callbackExpressInfo.setDeliveryNum(expressInfo.getDeliveryNum());
|
||||
|
||||
return callbackExpressInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据快递单号,查询快递公司编码
|
||||
* @param num 快递单号
|
||||
* @return 快递公司编码
|
||||
*/
|
||||
|
||||
private List<AutoNumResp> AutoGetExpressCom(String num){
|
||||
AutoNumReq autoNumReq = new AutoNumReq();
|
||||
autoNumReq.setKey(key);
|
||||
autoNumReq.setNum(num.trim());
|
||||
|
||||
IBaseClient baseClient = new AutoNum();
|
||||
//AutoNumResp autoNumResp=new AutoNumResp();
|
||||
List<AutoNumResp> autoNumRespList=new ArrayList<>();
|
||||
try {
|
||||
JSONArray jsonArray= JSONArray.parseArray(baseClient.execute(autoNumReq).getBody());
|
||||
if(StringUtils.isEmpty(jsonArray))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (Object object:jsonArray)
|
||||
{
|
||||
autoNumRespList.add(JSONObject.parseObject(JSONObject.toJSONString(object),AutoNumResp.class));
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
//return autoNumResp;
|
||||
return autoNumRespList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增快递信息
|
||||
*
|
||||
* @param expressInfo 快递信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExpressInfo(ExpressInfo expressInfo)
|
||||
{
|
||||
return expressInfoMapper.insertExpressInfo(expressInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改快递信息
|
||||
*
|
||||
* @param expressInfo 快递信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExpressInfo(ExpressInfo expressInfo)
|
||||
{
|
||||
return expressInfoMapper.updateExpressInfo(expressInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除快递信息对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExpressInfoByIds(String ids)
|
||||
{
|
||||
return expressInfoMapper.deleteExpressInfoByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除快递信息信息
|
||||
*
|
||||
* @param message 快递信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExpressInfoById(String message)
|
||||
{
|
||||
return expressInfoMapper.deleteExpressInfoById(message);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,181 @@
|
|||
package com.ruoyi.bps.service.impl;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
//import com.google.gson.Gson;
|
||||
import com.kuaidi100.sdk.api.QueryTrack;
|
||||
import com.kuaidi100.sdk.api.Subscribe;
|
||||
import com.kuaidi100.sdk.contant.ApiInfoConstant;
|
||||
import com.kuaidi100.sdk.core.IBaseClient;
|
||||
import com.kuaidi100.sdk.pojo.HttpResult;
|
||||
import com.kuaidi100.sdk.request.*;
|
||||
import com.kuaidi100.sdk.response.QueryTrackResp;
|
||||
import com.kuaidi100.sdk.utils.PropertiesReader;
|
||||
import com.kuaidi100.sdk.utils.SignUtils;
|
||||
import com.ruoyi.bps.service.IExpressService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ExpressServiceImpl implements IExpressService {
|
||||
/*String key = PropertiesReader.get("key");*/
|
||||
|
||||
@Value("${express.key}")
|
||||
private String key;
|
||||
|
||||
@Value("${express.customer}")
|
||||
private String customer;
|
||||
|
||||
String msg="";
|
||||
@Autowired
|
||||
IExpressService expressService;
|
||||
|
||||
@Override
|
||||
public List<QueryTrackResp> QueryTrackExpressMultiList(List<QueryTrackParam> list) {
|
||||
List<QueryTrackResp> qtList=new ArrayList<>();
|
||||
|
||||
for(QueryTrackParam queryTrackParam:list)
|
||||
{
|
||||
//QueryTrackResp queryTrackResp = new Gson().fromJson(expressService.QueryTrackExpress(queryTrackParam),QueryTrackResp.class);
|
||||
QueryTrackResp queryTrackResp= JSONObject.parseObject(expressService.QueryTrackExpress(queryTrackParam),QueryTrackResp.class);
|
||||
qtList.add(queryTrackResp);
|
||||
}
|
||||
return qtList;
|
||||
}
|
||||
|
||||
/**
|
||||
*查询多个物流轨迹
|
||||
*/
|
||||
@Override
|
||||
public String QueryTrackExpressMulti(List<QueryTrackParam> list) {
|
||||
String str="";
|
||||
for(QueryTrackParam qt:list){
|
||||
str += QueryTrackExpress(qt);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单个物流轨迹
|
||||
*/
|
||||
@Override
|
||||
public String QueryTrackExpress(QueryTrackParam queryTrackParam) {
|
||||
String str="";
|
||||
QueryTrackReq queryTrackReq = new QueryTrackReq();
|
||||
//String param = new Gson().toJson(queryTrackParam);
|
||||
String param = JSONObject.toJSONString(queryTrackParam);
|
||||
|
||||
queryTrackReq.setParam(param);
|
||||
queryTrackReq.setCustomer(customer);
|
||||
queryTrackReq.setSign(SignUtils.querySign(param ,key,customer));
|
||||
HttpResult httpResult=new HttpResult();
|
||||
IBaseClient baseClient = new QueryTrack();
|
||||
try {
|
||||
httpResult = baseClient.execute(queryTrackReq);
|
||||
msg=httpResult.getBody();
|
||||
}
|
||||
catch (Exception e) {
|
||||
msg=e.toString();
|
||||
}
|
||||
|
||||
//JSONObject jsonObject = new JSONObject(msg);
|
||||
JSONObject jsonObject = JSON.parseObject(msg);
|
||||
|
||||
if (jsonObject.containsKey("returnCode")){
|
||||
//QueryTrackResp queryTrackResp= new Gson().fromJson(msg,QueryTrackResp.class);
|
||||
QueryTrackResp queryTrackResp= JSONObject.parseObject(msg,QueryTrackResp.class);
|
||||
queryTrackResp.setStatus(queryTrackResp.getReturnCode());
|
||||
queryTrackResp.setNu(queryTrackParam.getNum());
|
||||
//msg= new Gson().toJson(queryTrackResp);
|
||||
msg= JSONObject.toJSONString(queryTrackResp);
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询物流转迹
|
||||
*/
|
||||
@Override
|
||||
public String SubscribeExpress() {
|
||||
SubscribeParameters subscribeParameters = new SubscribeParameters();
|
||||
subscribeParameters.setCallbackurl("http://www.baidu.com"); //回调接口的地址,必须
|
||||
subscribeParameters.setPhone("17725390266"); //收、寄件人电话号码,非必须
|
||||
SubscribeParam subscribeParam = new SubscribeParam();
|
||||
subscribeParam.setParameters(subscribeParameters);
|
||||
subscribeParam.setCompany("annengwuliu"); //快递公司编码,小写。必须
|
||||
subscribeParam.setNumber("300445967949"); //快递单号, 必须
|
||||
subscribeParam.setKey(key); //授权码,必须
|
||||
|
||||
SubscribeReq subscribeReq = new SubscribeReq();
|
||||
subscribeReq.setSchema(ApiInfoConstant.SUBSCRIBE_SCHEMA); //返回的数据格式,必须
|
||||
//subscribeReq.setParam(new Gson().toJson(subscribeParam));
|
||||
subscribeReq.setParam(JSONObject.toJSONString(subscribeParam));
|
||||
|
||||
IBaseClient subscribe = new Subscribe();
|
||||
try{
|
||||
msg=subscribe.execute(subscribeReq).toString();
|
||||
}
|
||||
catch (Exception e) {
|
||||
msg=e.toString();
|
||||
}
|
||||
System.out.println(msg);
|
||||
return msg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryTrackParam> GetTestQueryTrackParam() {
|
||||
QueryTrackParam queryTrackParam = new QueryTrackParam();
|
||||
List<QueryTrackParam> list=new ArrayList<QueryTrackParam>();
|
||||
queryTrackParam.setCom("annengwuliu");
|
||||
queryTrackParam.setNum("300445967949");
|
||||
queryTrackParam.setPhone("17725390266");
|
||||
list.add(queryTrackParam);
|
||||
|
||||
QueryTrackParam queryTrackParam1 = new QueryTrackParam();
|
||||
queryTrackParam1.setCom("annengwuliu");
|
||||
queryTrackParam1.setNum("300445967135");
|
||||
queryTrackParam1.setPhone("17725390266");
|
||||
list.add(queryTrackParam1);
|
||||
|
||||
|
||||
QueryTrackParam queryTrackParam2 = new QueryTrackParam();
|
||||
queryTrackParam2.setCom("annengwuliu");
|
||||
queryTrackParam2.setNum("3004459670971");
|
||||
queryTrackParam2.setPhone("17725390266");
|
||||
list.add(queryTrackParam2);
|
||||
/*
|
||||
QueryTrackParam queryTrackParam3 = new QueryTrackParam();
|
||||
queryTrackParam3.setCom(CompanyConstant.AN);
|
||||
queryTrackParam3.setNum("300445967045");
|
||||
queryTrackParam3.setPhone("17725390266");
|
||||
list.add(queryTrackParam3);
|
||||
|
||||
QueryTrackParam queryTrackParam4 = new QueryTrackParam();
|
||||
queryTrackParam4.setCom(CompanyConstant.AN);
|
||||
queryTrackParam4.setNum("300443569920");
|
||||
queryTrackParam4.setPhone("17725390266");
|
||||
list.add(queryTrackParam4);
|
||||
|
||||
QueryTrackParam queryTrackParam5 = new QueryTrackParam();
|
||||
queryTrackParam5.setCom(CompanyConstant.AN);
|
||||
queryTrackParam5.setNum("300443569878");
|
||||
queryTrackParam5.setPhone("17725390266");
|
||||
list.add(queryTrackParam5);
|
||||
|
||||
QueryTrackParam queryTrackParam6 = new QueryTrackParam();
|
||||
queryTrackParam6.setCom(CompanyConstant.AN);
|
||||
queryTrackParam6.setNum("300443569880");
|
||||
queryTrackParam6.setPhone("17725390266");
|
||||
list.add(queryTrackParam6);
|
||||
*/
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package com.ruoyi.bps.service.impl;
|
||||
|
||||
import com.ruoyi.bps.mapper.TopgpDdlMapper;
|
||||
import com.ruoyi.bps.service.TopgpDdlService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
//@DataSource(value = DataSourceType.SLAVE)
|
||||
//@DataSource(value = DataSourceType.TOPTESTDSREPORT)
|
||||
public class TopgpDdlServiceImpl implements TopgpDdlService {
|
||||
@Autowired
|
||||
private TopgpDdlMapper topgpDdlMapper;
|
||||
|
||||
//修改表名
|
||||
public int alterTableName(String originalTableName, String newTableName)
|
||||
{
|
||||
return topgpDdlMapper.alterTableName(originalTableName,newTableName);
|
||||
}
|
||||
|
||||
// truncate指定数据库表的数据
|
||||
public int truncateTable(String tableName){
|
||||
return topgpDdlMapper.truncateTable(tableName);
|
||||
}
|
||||
|
||||
//drop 指定定数据库表
|
||||
public int dropTable(String tableName){
|
||||
return topgpDdlMapper.dropTable(tableName);
|
||||
}
|
||||
|
||||
|
||||
//根据传入的表明,创建新的表并且将原表的数据插入到新的Occur表中
|
||||
public void copyTable(String newTableName,String originalTableName){
|
||||
return ;
|
||||
}
|
||||
|
||||
//统计某张表中的总数据条数
|
||||
public int getRecordCount(String tableName){
|
||||
return topgpDdlMapper.getRecordCount(tableName);
|
||||
}
|
||||
|
||||
//从指定数据库中,查询是否存在某张表
|
||||
public int isTableInDb(String dataBaseName, String tableName){
|
||||
return topgpDdlMapper.isTableInDb(dataBaseName,tableName);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
#快递100的基础账号信息,可以在这里获取
|
||||
# https://poll.kuaidi100.com/manager/page/myinfo/enterprise
|
||||
#key = kzuyKyAE3985
|
||||
#customer = 6774D6F41D773B17027EEBE5CC902C9E
|
||||
#secret = 4fc7633a027c4fe1a68b68237c236d6e
|
||||
#userid = bfc0389a986f45c4b36e27d9b18b7bd3
|
||||
|
||||
#电子面单快递公司账号信息(非必填)
|
||||
partnerId =
|
||||
partnerKey =
|
||||
net =
|
||||
siid =
|
||||
|
||||
#短信模板id(非必填)
|
||||
tid =
|
||||
|
||||
#云平台相关(非必填)
|
||||
#登录云平台 https://cloud.kuaidi100.com/buyer/user/info
|
||||
secret_key =
|
||||
secret_secret =
|
||||
|
||||
#是否记录快递100接口返回结果,建议记录日志或者入库,方便后期有问题双方排查(true:启用 false: 关闭 )
|
||||
#log.return.record = true
|
||||
#日志记录位置,建议根据自身情况配置
|
||||
#logPath = logs
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
<?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="com.ruoyi.bps.mapper.ExpImportQueryMapper">
|
||||
|
||||
<resultMap type="ExpImportQuery" id="ExpImportQueryResult">
|
||||
<result property="sid" column="sid" />
|
||||
<result property="queryId" column="queryId" />
|
||||
<result property="queryTime" column="queryTime" />
|
||||
<result property="queryLoginName" column="queryLoginName" />
|
||||
<result property="queryUserName" column="queryUserName" />
|
||||
<result property="queryIp" column="queryIp" />
|
||||
<result property="finishTime" column="finishTime" />
|
||||
<result property="status" column="status" />
|
||||
<result property="queryQty" column="queryQty" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExpImportQueryVo">
|
||||
select sid, queryId, queryTime, queryLoginName, queryUserName, queryIp, finishTime, status, queryQty from exp_import_query
|
||||
</sql>
|
||||
|
||||
<select id="selectExpImportQueryList" parameterType="ExpImportQuery" resultMap="ExpImportQueryResult">
|
||||
<include refid="selectExpImportQueryVo"/>
|
||||
<where>
|
||||
<if test="queryTime != null and queryTime != ''"> and queryTime like concat('%', #{queryTime}, '%')</if>
|
||||
<if test="queryLoginName != null and queryLoginName != ''"> and queryLoginName = #{queryLoginName}</if>
|
||||
<if test="queryUserName != null and queryUserName != ''"> and queryUserName = #{queryUserName}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExpImportQueryById" parameterType="Long" resultMap="ExpImportQueryResult">
|
||||
<include refid="selectExpImportQueryVo"/>
|
||||
where sid = #{sid}
|
||||
</select>
|
||||
|
||||
<insert id="insertExpImportQuery" parameterType="ExpImportQuery" useGeneratedKeys="true" keyProperty="sid">
|
||||
insert into exp_import_query
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="queryTime != null">queryTime,</if>
|
||||
<if test="queryId != null">queryId,</if>
|
||||
<if test="queryLoginName != null">queryLoginName,</if>
|
||||
<if test="queryUserName != null">queryUserName,</if>
|
||||
<if test="queryIp != null">queryIp,</if>
|
||||
<if test="finishTime != null">finishTime,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="queryQty != null">queryQty,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="queryTime != null">#{queryTime},</if>
|
||||
<if test="queryId != null">#{queryId},</if>
|
||||
<if test="queryLoginName != null">#{queryLoginName},</if>
|
||||
<if test="queryUserName != null">#{queryUserName},</if>
|
||||
<if test="queryIp != null">#{queryIp},</if>
|
||||
<if test="finishTime != null">#{finishTime},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="queryQty != null">#{queryQty},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExpImportQuery" parameterType="ExpImportQuery">
|
||||
update exp_import_query
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="queryTime != null">queryTime = #{queryTime},</if>
|
||||
<if test="queryId != null">queryId = #{queryId},</if>
|
||||
<if test="queryLoginName != null">queryLoginName = #{queryLoginName},</if>
|
||||
<if test="queryUserName != null">queryUserName = #{queryUserName},</if>
|
||||
<if test="queryIp != null">queryIp = #{queryIp},</if>
|
||||
<if test="finishTime != null">finishTime = #{finishTime},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="queryQty != null">queryQty = #{queryQty},</if>
|
||||
</trim>
|
||||
where sid = #{sid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExpImportQueryById" parameterType="Long">
|
||||
delete from exp_import_query where sid = #{sid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExpImportQueryByIds" parameterType="String">
|
||||
delete from exp_import_query where sid in
|
||||
<foreach item="sid" collection="array" open="(" separator="," close=")">
|
||||
#{sid}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,153 @@
|
|||
<?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="com.ruoyi.bps.mapper.ExpSubsPushRespMapper">
|
||||
|
||||
<resultMap type="ExpSubsPushResp" id="ExpSubsPushRespResult">
|
||||
<result property="sid" column="sid" />
|
||||
<result property="status" column="status" />
|
||||
<result property="billStatus" column="billStatus" />
|
||||
<result property="message" column="message" />
|
||||
<result property="autoCheck" column="autoCheck" />
|
||||
<result property="comOld" column="comOld" />
|
||||
<result property="comNew" column="comNew" />
|
||||
<result property="lastResultMessage" column="lastResultMessage" />
|
||||
<result property="lastResultState" column="lastResultState" />
|
||||
<result property="lastResulStatus" column="lastResulStatus" />
|
||||
<result property="lastResultCondition" column="lastResultCondition" />
|
||||
<result property="lastResultIsCheck" column="lastResultIsCheck" />
|
||||
<result property="lastResultCom" column="lastResultCom" />
|
||||
<result property="lastResultNu" column="lastResultNu" />
|
||||
<result property="lastResultData" column="lastResultData" />
|
||||
<result property="destResultMessage" column="destResultMessage" />
|
||||
<result property="destResultState" column="destResultState" />
|
||||
<result property="destResultStatus" column="destResultStatus" />
|
||||
<result property="destResultCondition" column="destResultCondition" />
|
||||
<result property="destResultIsCheck" column="destResultIsCheck" />
|
||||
<result property="destResultCom" column="destResultCom" />
|
||||
<result property="destResultNu" column="destResultNu" />
|
||||
<result property="destResultData" column="destResultData" />
|
||||
<result property="lastResponseTime" column="lastResponseTime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExpSubsPushRespVo">
|
||||
select sid, status, billStatus, message, autoCheck, comOld, comNew, lastResultMessage, lastResultState, lastResulStatus, lastResultCondition, lastResultIsCheck, lastResultCom, lastResultNu, lastResultData, destResultMessage, destResultState, destResultStatus, destResultCondition, destResultIsCheck, destResultCom, destResultNu, destResultData, lastResponseTime from exp_subs_push_resp
|
||||
</sql>
|
||||
|
||||
<select id="selectExpSubsPushRespList" parameterType="ExpSubsPushResp" resultMap="ExpSubsPushRespResult">
|
||||
<include refid="selectExpSubsPushRespVo"/>
|
||||
<where>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="lastResultState != null and lastResultState != ''"> and lastResultState = #{lastResultState}</if>
|
||||
<if test="lastResultIsCheck != null and lastResultIsCheck != ''"> and lastResultIsCheck = #{lastResultIsCheck}</if>
|
||||
<if test="lastResultCom != null and lastResultCom != ''"> and lastResultCom = #{lastResultCom}</if>
|
||||
<if test="lastResultNu != null and lastResultNu != ''"> and lastResultNu = #{lastResultNu}</if>
|
||||
<if test="destResultState != null and destResultState != ''"> and destResultState = #{destResultState}</if>
|
||||
<if test="destResultIsCheck != null and destResultIsCheck != ''"> and destResultIsCheck = #{destResultIsCheck}</if>
|
||||
<if test="destResultCom != null and destResultCom != ''"> and destResultCom = #{destResultCom}</if>
|
||||
<if test="destResultNu != null and destResultNu != ''"> and destResultNu = #{destResultNu}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExpSubsPushRespById" parameterType="Long" resultMap="ExpSubsPushRespResult">
|
||||
<include refid="selectExpSubsPushRespVo"/>
|
||||
where sid = #{sid}
|
||||
</select>
|
||||
|
||||
<insert id="insertExpSubsPushResp" parameterType="ExpSubsPushResp" useGeneratedKeys="true" keyProperty="sid">
|
||||
insert into exp_subs_push_resp
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="status != null">status,</if>
|
||||
<if test="billStatus != null">billStatus,</if>
|
||||
<if test="message != null">message,</if>
|
||||
<if test="autoCheck != null">autoCheck,</if>
|
||||
<if test="comOld != null">comOld,</if>
|
||||
<if test="comNew != null">comNew,</if>
|
||||
<if test="lastResultMessage != null">lastResultMessage,</if>
|
||||
<if test="lastResultState != null">lastResultState,</if>
|
||||
<if test="lastResulStatus != null">lastResulStatus,</if>
|
||||
<if test="lastResultCondition != null">lastResultCondition,</if>
|
||||
<if test="lastResultIsCheck != null">lastResultIsCheck,</if>
|
||||
<if test="lastResultCom != null">lastResultCom,</if>
|
||||
<if test="lastResultNu != null">lastResultNu,</if>
|
||||
<if test="lastResultData != null">lastResultData,</if>
|
||||
<if test="destResultMessage != null">destResultMessage,</if>
|
||||
<if test="destResultState != null">destResultState,</if>
|
||||
<if test="destResultStatus != null">destResultStatus,</if>
|
||||
<if test="destResultCondition != null">destResultCondition,</if>
|
||||
<if test="destResultIsCheck != null">destResultIsCheck,</if>
|
||||
<if test="destResultCom != null">destResultCom,</if>
|
||||
<if test="destResultNu != null">destResultNu,</if>
|
||||
<if test="destResultData != null">destResultData,</if>
|
||||
<if test="lastResponseTime != null">lastResponseTime,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="billStatus != null">#{billStatus},</if>
|
||||
<if test="message != null">#{message},</if>
|
||||
<if test="autoCheck != null">#{autoCheck},</if>
|
||||
<if test="comOld != null">#{comOld},</if>
|
||||
<if test="comNew != null">#{comNew},</if>
|
||||
<if test="lastResultMessage != null">#{lastResultMessage},</if>
|
||||
<if test="lastResultState != null">#{lastResultState},</if>
|
||||
<if test="lastResulStatus != null">#{lastResulStatus},</if>
|
||||
<if test="lastResultCondition != null">#{lastResultCondition},</if>
|
||||
<if test="lastResultIsCheck != null">#{lastResultIsCheck},</if>
|
||||
<if test="lastResultCom != null">#{lastResultCom},</if>
|
||||
<if test="lastResultNu != null">#{lastResultNu},</if>
|
||||
<if test="lastResultData != null">#{lastResultData},</if>
|
||||
<if test="destResultMessage != null">#{destResultMessage},</if>
|
||||
<if test="destResultState != null">#{destResultState},</if>
|
||||
<if test="destResultStatus != null">#{destResultStatus},</if>
|
||||
<if test="destResultCondition != null">#{destResultCondition},</if>
|
||||
<if test="destResultIsCheck != null">#{destResultIsCheck},</if>
|
||||
<if test="destResultCom != null">#{destResultCom},</if>
|
||||
<if test="destResultNu != null">#{destResultNu},</if>
|
||||
<if test="destResultData != null">#{destResultData},</if>
|
||||
<if test="lastResponseTime != null">#{lastResponseTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExpSubsPushResp" parameterType="ExpSubsPushResp">
|
||||
update exp_subs_push_resp
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="billStatus != null">billStatus = #{billStatus},</if>
|
||||
<if test="message != null">message = #{message},</if>
|
||||
<if test="autoCheck != null">autoCheck = #{autoCheck},</if>
|
||||
<if test="comOld != null">comOld = #{comOld},</if>
|
||||
<if test="comNew != null">comNew = #{comNew},</if>
|
||||
<if test="lastResultMessage != null">lastResultMessage = #{lastResultMessage},</if>
|
||||
<if test="lastResultState != null">lastResultState = #{lastResultState},</if>
|
||||
<if test="lastResulStatus != null">lastResulStatus = #{lastResulStatus},</if>
|
||||
<if test="lastResultCondition != null">lastResultCondition = #{lastResultCondition},</if>
|
||||
<if test="lastResultIsCheck != null">lastResultIsCheck = #{lastResultIsCheck},</if>
|
||||
<if test="lastResultCom != null">lastResultCom = #{lastResultCom},</if>
|
||||
<if test="lastResultNu != null">lastResultNu = #{lastResultNu},</if>
|
||||
<if test="lastResultData != null">lastResultData = #{lastResultData},</if>
|
||||
<if test="destResultMessage != null">destResultMessage = #{destResultMessage},</if>
|
||||
<if test="destResultState != null">destResultState = #{destResultState},</if>
|
||||
<if test="destResultStatus != null">destResultStatus = #{destResultStatus},</if>
|
||||
<if test="destResultCondition != null">destResultCondition = #{destResultCondition},</if>
|
||||
<if test="destResultIsCheck != null">destResultIsCheck = #{destResultIsCheck},</if>
|
||||
<if test="destResultCom != null">destResultCom = #{destResultCom},</if>
|
||||
<if test="destResultNu != null">destResultNu = #{destResultNu},</if>
|
||||
<if test="destResultData != null">destResultData = #{destResultData},</if>
|
||||
<if test="lastResponseTime != null">lastResponseTime = #{lastResponseTime},</if>
|
||||
</trim>
|
||||
where sid = #{sid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExpSubsPushRespById" parameterType="Long">
|
||||
delete from exp_subs_push_resp where sid = #{sid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExpSubsPushRespByIds" parameterType="String">
|
||||
delete from exp_subs_push_resp where sid in
|
||||
<foreach item="sid" collection="array" open="(" separator="," close=")">
|
||||
#{sid}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
<?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="com.ruoyi.bps.mapper.ExpSubscribeMapper">
|
||||
|
||||
<resultMap type="ExpSubscribe" id="ExpSubscribeResult">
|
||||
<result property="sid" column="sid" />
|
||||
<result property="company" column="company" />
|
||||
<result property="number" column="number" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="salt" column="salt" />
|
||||
<result property="subscribeTime" column="subscribeTime" />
|
||||
<result property="result" column="result" />
|
||||
<result property="returnCode" column="returnCode" />
|
||||
<result property="message" column="message" />
|
||||
<result property="requestFrom" column="requestFrom" />
|
||||
<result property="requestId" column="requestId" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExpSubscribeVo">
|
||||
select sid, company, number, phone, salt, subscribeTime, result, returnCode, message, requestFrom, requestId from exp_subscribe
|
||||
</sql>
|
||||
|
||||
<select id="selectExpSubscribeList" parameterType="ExpSubscribe" resultMap="ExpSubscribeResult">
|
||||
<include refid="selectExpSubscribeVo"/>
|
||||
<where>
|
||||
<if test="company != null and company != ''"> and company = #{company}</if>
|
||||
<if test="number != null and number != ''"> and number = #{number}</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="subscribeTime != null and subscribeTime != ''"> and subscribeTime like concat('%', #{subscribeTime}, '%')</if>
|
||||
<if test="result != null and result != ''"> and result = #{result}</if>
|
||||
<if test="returnCode != null and returnCode != ''"> and returnCode = #{returnCode}</if>
|
||||
<if test="requestFrom != null and requestFrom != ''"> and requestFrom = #{requestFrom}</if>
|
||||
<if test="requestId != null and requestId != ''"> and requestId = #{requestId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExpSubscribeById" parameterType="Long" resultMap="ExpSubscribeResult">
|
||||
<include refid="selectExpSubscribeVo"/>
|
||||
where sid = #{sid}
|
||||
</select>
|
||||
|
||||
<insert id="insertExpSubscribe" parameterType="ExpSubscribe" useGeneratedKeys="true" keyProperty="sid">
|
||||
insert into exp_subscribe
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="company != null">company,</if>
|
||||
<if test="number != null">number,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="salt != null">salt,</if>
|
||||
<if test="subscribeTime != null">subscribeTime,</if>
|
||||
<if test="result != null">result,</if>
|
||||
<if test="returnCode != null">returnCode,</if>
|
||||
<if test="message != null">message,</if>
|
||||
<if test="requestFrom != null">requestFrom,</if>
|
||||
<if test="requestId != null">requestId,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="company != null">#{company},</if>
|
||||
<if test="number != null">#{number},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="salt != null">#{salt},</if>
|
||||
<if test="subscribeTime != null">#{subscribeTime},</if>
|
||||
<if test="result != null">#{result},</if>
|
||||
<if test="returnCode != null">#{returnCode},</if>
|
||||
<if test="message != null">#{message},</if>
|
||||
<if test="requestFrom != null">#{requestFrom},</if>
|
||||
<if test="requestId != null">#{requestId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExpSubscribe" parameterType="ExpSubscribe">
|
||||
update exp_subscribe
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="company != null">company = #{company},</if>
|
||||
<if test="number != null">number = #{number},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="salt != null">salt = #{salt},</if>
|
||||
<if test="subscribeTime != null">subscribeTime = #{subscribeTime},</if>
|
||||
<if test="result != null">result = #{result},</if>
|
||||
<if test="returnCode != null">returnCode = #{returnCode},</if>
|
||||
<if test="message != null">message = #{message},</if>
|
||||
<if test="requestFrom != null">requestFrom = #{requestFrom},</if>
|
||||
<if test="requestId != null">requestId = #{requestId},</if>
|
||||
</trim>
|
||||
where sid = #{sid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExpSubscribeById" parameterType="Long">
|
||||
delete from exp_subscribe where sid = #{sid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExpSubscribeByIds" parameterType="String">
|
||||
delete from exp_subscribe where sid in
|
||||
<foreach item="sid" collection="array" open="(" separator="," close=")">
|
||||
#{sid}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectExpSubscribeByNumber" resultMap="ExpSubscribeResult">
|
||||
<include refid="selectExpSubscribeVo"/>
|
||||
where number in
|
||||
<foreach item="number" collection="list" open="(" separator="," close=")">
|
||||
#{number}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
<?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="com.ruoyi.bps.mapper.ExpTopgpLogMapper">
|
||||
|
||||
<resultMap type="ExpTopgpLog" id="ExpTopgpLogResult">
|
||||
<result property="sid" column="sid" />
|
||||
<result property="requestId" column="requestId" />
|
||||
<result property="requestType" column="requestType" />
|
||||
<result property="expressNumber" column="expressNumber" />
|
||||
<result property="deliveryNumber" column="deliveryNumber" />
|
||||
<result property="requestStr" column="requestStr" />
|
||||
<result property="requestTime" column="requestTime" />
|
||||
<result property="responseCode" column="responseCode" />
|
||||
<result property="responseStr" column="responseStr" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExpTopgpLogVo">
|
||||
select sid, requestId, requestType, expressNumber, deliveryNumber, requestStr, requestTime, responseCode, responseStr from exp_topgp_log
|
||||
</sql>
|
||||
|
||||
<select id="selectExpTopgpLogList" parameterType="ExpTopgpLog" resultMap="ExpTopgpLogResult">
|
||||
<include refid="selectExpTopgpLogVo"/>
|
||||
<where>
|
||||
<if test="requestId != null and requestId != ''"> and requestId = #{requestId}</if>
|
||||
<if test="requestType != null and requestType != ''"> and requestType = #{requestType}</if>
|
||||
<if test="expressNumber != null and expressNumber != ''"> and expressNumber = #{expressNumber}</if>
|
||||
<if test="deliveryNumber != null and deliveryNumber != ''"> and deliveryNumber = #{deliveryNumber}</if>
|
||||
<if test="requestStr != null and requestStr != ''"> and requestStr = #{requestStr}</if>
|
||||
<if test="requestTime != null and requestTime != ''"> and requestTime = #{requestTime}</if>
|
||||
<if test="responseCode != null and responseCode != ''"> and responseCode = #{responseCode}</if>
|
||||
<if test="responseStr != null and responseStr != ''"> and responseStr = #{responseStr}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExpTopgpLogBySid" parameterType="Long" resultMap="ExpTopgpLogResult">
|
||||
<include refid="selectExpTopgpLogVo"/>
|
||||
where sid = #{sid}
|
||||
</select>
|
||||
|
||||
<insert id="insertExpTopgpLog" parameterType="ExpTopgpLog" useGeneratedKeys="true" keyProperty="sid">
|
||||
insert into exp_topgp_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="requestId != null">requestId,</if>
|
||||
<if test="requestType != null">requestType,</if>
|
||||
<if test="expressNumber != null">expressNumber,</if>
|
||||
<if test="deliveryNumber != null">deliveryNumber,</if>
|
||||
<if test="requestStr != null">requestStr,</if>
|
||||
<if test="requestTime != null">requestTime,</if>
|
||||
<if test="responseCode != null">responseCode,</if>
|
||||
<if test="responseStr != null">responseStr,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="requestId != null">#{requestId},</if>
|
||||
<if test="requestType != null">#{requestType},</if>
|
||||
<if test="expressNumber != null">#{expressNumber},</if>
|
||||
<if test="deliveryNumber != null">#{deliveryNumber},</if>
|
||||
<if test="requestStr != null">#{requestStr},</if>
|
||||
<if test="requestTime != null">#{requestTime},</if>
|
||||
<if test="responseCode != null">#{responseCode},</if>
|
||||
<if test="responseStr != null">#{responseStr},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExpTopgpLog" parameterType="ExpTopgpLog">
|
||||
update exp_topgp_log
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="requestId != null">requestId = #{requestId},</if>
|
||||
<if test="requestType != null">requestType = #{requestType},</if>
|
||||
<if test="expressNumber != null">expressNumber = #{expressNumber},</if>
|
||||
<if test="deliveryNumber != null">deliveryNumber = #{deliveryNumber},</if>
|
||||
<if test="requestStr != null">requestStr = #{requestStr},</if>
|
||||
<if test="requestTime != null">requestTime = #{requestTime},</if>
|
||||
<if test="responseCode != null">responseCode = #{responseCode},</if>
|
||||
<if test="responseStr != null">responseStr = #{responseStr},</if>
|
||||
</trim>
|
||||
where sid = #{sid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExpTopgpLogBySid" parameterType="Long">
|
||||
delete from exp_topgp_log where sid = #{sid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExpTopgpLogBySids" parameterType="String">
|
||||
delete from exp_topgp_log where sid in
|
||||
<foreach item="sid" collection="array" open="(" separator="," close=")">
|
||||
#{sid}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,156 @@
|
|||
<?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="com.ruoyi.bps.mapper.ExpressInfoMapper">
|
||||
|
||||
<resultMap type="ExpressInfo" id="ExpressInfoResult">
|
||||
<result property="sid" column="sid" />
|
||||
<result property="message" column="message" />
|
||||
<result property="nu" column="nu" />
|
||||
<result property="ischeck" column="ischeck" />
|
||||
<result property="com" column="com" />
|
||||
<result property="status" column="status" />
|
||||
<result property="data" column="data" />
|
||||
<result property="state" column="state" />
|
||||
<result property="condition" column="condition" />
|
||||
<result property="routeInfo" column="routeInfo" />
|
||||
<result property="returnCode" column="returnCode" />
|
||||
<result property="result" column="result" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="collectTime" column="collectTime" />
|
||||
<result property="singedTime" column="singedTime" />
|
||||
<result property="lastUpdateTime" column="lastUpdateTime" />
|
||||
<result property="queryTime" column="queryTime" />
|
||||
<result property="queryUserName" column="queryUserName" />
|
||||
<result property="queryId" column="queryId" />
|
||||
<result property="queryType" column="queryType" />
|
||||
<result property="deliveryNum" column="deliveryNum" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExpressInfoVo">
|
||||
select sid, message, nu, deliveryNum, ischeck, com, status, `data`, `state`, `condition`, routeInfo, returnCode, `result`, phone,
|
||||
collectTime, singedTime, lastUpdateTime, queryTime, queryUserName, queryId, queryType
|
||||
from expressInfo
|
||||
</sql>
|
||||
|
||||
<select id="selectExpressInfoList" parameterType="ExpressInfo" resultMap="ExpressInfoResult">
|
||||
<include refid="selectExpressInfoVo"/>
|
||||
<where>
|
||||
<if test="nu != null and nu != ''"> and nu = #{nu}</if>
|
||||
<if test="com != null and com != ''"> and com = #{com}</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="queryId != null and queryId != ''"> and queryId = #{queryId}</if>
|
||||
<if test="deliveryNum != null and deliveryNum != ''"> and deliveryNum = #{deliveryNum}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExpressInfoById" parameterType="String" resultMap="ExpressInfoResult">
|
||||
<include refid="selectExpressInfoVo"/>
|
||||
where sid = #{sid}
|
||||
</select>
|
||||
|
||||
<insert id="insertExpressInfo" parameterType="ExpressInfo">
|
||||
insert into expressInfo
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="message != null">message,</if>
|
||||
<if test="nu != null">nu,</if>
|
||||
<if test="ischeck != null">ischeck,</if>
|
||||
<if test="com != null">com,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="data != null">`data`,</if>
|
||||
<if test="state != null">`state`,</if>
|
||||
<if test="condition != null">`condition`,</if>
|
||||
<if test="routeInfo != null">routeInfo,</if>
|
||||
<if test="returnCode != null">returnCode,</if>
|
||||
<if test="result != null">`result`,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="collectTime != null">collectTime,</if>
|
||||
<if test="singedTime != null">singedTime,</if>
|
||||
<if test="lastUpdateTime != null">lastUpdateTime,</if>
|
||||
<if test="queryTime != null">queryTime,</if>
|
||||
<if test="queryUserName != null">queryUserName,</if>
|
||||
<if test="queryId != null">queryId,</if>
|
||||
<if test="queryType != null">queryType,</if>
|
||||
<if test="deliveryNum != null">deliveryNum,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="message != null">#{message},</if>
|
||||
<if test="nu != null">#{nu},</if>
|
||||
<if test="ischeck != null">#{ischeck},</if>
|
||||
<if test="com != null">#{com},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="data != null">#{data},</if>
|
||||
<if test="state != null">#{state},</if>
|
||||
<if test="condition != null">#{condition},</if>
|
||||
<if test="routeInfo != null">#{routeInfo},</if>
|
||||
<if test="returnCode != null">#{returnCode},</if>
|
||||
<if test="result != null">#{result},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="collectTime != null">#{collectTime},</if>
|
||||
<if test="singedTime != null">#{singedTime},</if>
|
||||
<if test="lastUpdateTime != null">#{lastUpdateTime},</if>
|
||||
<if test="queryTime != null">#{queryTime},</if>
|
||||
<if test="queryUserName != null">#{queryUserName},</if>
|
||||
<if test="queryId != null">#{queryId},</if>
|
||||
<if test="queryType != null">#{queryType},</if>
|
||||
<if test="deliveryNum != null">#{deliveryNum},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExpressInfo" parameterType="ExpressInfo">
|
||||
update expressInfo
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="nu != null">nu = #{nu},</if>
|
||||
<if test="ischeck != null">ischeck = #{ischeck},</if>
|
||||
<if test="com != null">com = #{com},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="data != null">`data` = #{data},</if>
|
||||
<if test="state != null">`state` = #{state},</if>
|
||||
<if test="condition != null">`condition` = #{condition},</if>
|
||||
<if test="routeInfo != null">routeInfo = #{routeInfo},</if>
|
||||
<if test="returnCode != null">returnCode = #{returnCode},</if>
|
||||
<if test="result != null">`result` = #{result},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="collectTime != null">collectTime = #{collectTime},</if>
|
||||
<if test="singedTime != null">singedTime = #{singedTime},</if>
|
||||
<if test="lastUpdateTime != null">lastUpdateTime = #{lastUpdateTime},</if>
|
||||
<if test="queryTime != null">queryTime = #{queryTime},</if>
|
||||
<if test="queryUserName != null">queryUserName = #{queryUserName},</if>
|
||||
<if test="queryId != null">queryId = #{queryId},</if>
|
||||
<if test="queryType != null">queryType = #{queryType},</if>
|
||||
<if test="deliveryNum != null">deliveryNum = #{deliveryNum},</if>
|
||||
</trim>
|
||||
where message = #{message}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExpressInfoById" parameterType="String">
|
||||
delete from expressInfo where sid = #{sid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExpressInfoByIds" parameterType="String">
|
||||
delete from expressInfo where sid in
|
||||
<foreach item="sid" collection="array" open="(" separator="," close=")">
|
||||
#{sid}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertExpressInfo">
|
||||
insert into expressInfo(message, nu, deliveryNum, ischeck, com, status, `data`, `state`, `condition`, routeInfo, returnCode, `result`, phone,
|
||||
collectTime, singedTime, lastUpdateTime, queryTime, queryUserName, queryId, queryType) values
|
||||
<foreach item="expressInfo" index="index" collection="list" separator=",">
|
||||
( #{expressInfo.message}, #{expressInfo.nu}, #{expressInfo.deliveryNum}, #{expressInfo.ischeck}, #{expressInfo.com}, #{expressInfo.status},
|
||||
#{expressInfo.data}, #{expressInfo.state}, #{expressInfo.condition}, #{expressInfo.routeInfo}, #{expressInfo.returnCode},
|
||||
#{expressInfo.result}, #{expressInfo.phone}, #{expressInfo.collectTime}, #{expressInfo.singedTime}, #{expressInfo.lastUpdateTime},
|
||||
#{expressInfo.queryTime}, #{expressInfo.queryUserName}, #{expressInfo.queryId}, #{expressInfo.queryType}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteExpressInfoByQueryId" parameterType="String">
|
||||
delete from expressInfo where queryId in (select queryId from exp_import_query where sid= #{sid})
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<?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="com.ruoyi.bps.mapper.TopgpDdlMapper">
|
||||
|
||||
<update id="alterTableName">
|
||||
alter table ${originalTableName} rename ${newTableName}
|
||||
</update>
|
||||
|
||||
<update id="truncateTable">
|
||||
truncate table ${tableName}
|
||||
</update>
|
||||
|
||||
<update id="dropTable">
|
||||
drop table ${tableName}
|
||||
</update>
|
||||
|
||||
<update id="copyTable">
|
||||
create table ${newTableName} as select * from ${originalTableName}
|
||||
</update>
|
||||
|
||||
<select id="getRecordCount" resultType="int">
|
||||
select count(1) from ${tableName}
|
||||
</select>
|
||||
|
||||
<select id="isTableInDb" resultType="int">
|
||||
SELECT COUNT(*) FROM ALL_TABLES WHERE OWNER = UPPER(#{dataBaseName}) AND TABLE_NAME = UPPER(#{tableName})
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增Excel批量快递查询')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-expImportQuery-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">查询编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="queryId" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">查询时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="queryTime" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">用户ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="queryLoginName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">用户名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="queryUserName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">查询IP:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="queryIp" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">完成时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="finishTime" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">完成状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="status" class="form-control m-b" th:with="type=${@dict.getType('sys_common_status')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">运单总量:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="queryQty" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "bps/expImportQuery"
|
||||
$("#form-expImportQuery-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-expImportQuery-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('快递信息列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId" th:object="${expressInfo}">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>查询编号:</label>
|
||||
<input type="text" name="queryId" th:field="*{queryId}" readonly/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" >
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('bps:expressInfo:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('bps:expressInfo:remove')}]];
|
||||
|
||||
var prefix = ctx + "bps/expressInfo";
|
||||
var datas = [[${@dict.getType('express_company')}]];
|
||||
var stats= [[${@dict.getType('express_stats')}]];
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/localList",
|
||||
exportUrl: ctx+ "bps/expImportQuery/exportDetail",
|
||||
modalName: "快递信息",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
/*
|
||||
{
|
||||
field: 'message',
|
||||
title: '消息'
|
||||
},*/
|
||||
{
|
||||
field: 'deliveryNum',
|
||||
title: '出货单号'
|
||||
},
|
||||
{
|
||||
field: 'nu',
|
||||
title: '快递单号'
|
||||
},
|
||||
/*
|
||||
{
|
||||
field: 'ischeck',
|
||||
title: '签收状态'
|
||||
},*/
|
||||
{
|
||||
field: 'com',
|
||||
title: '快递公司',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(datas, value);
|
||||
}
|
||||
},
|
||||
/*
|
||||
{
|
||||
field: 'status',
|
||||
title: '通信状态'
|
||||
},*/
|
||||
{
|
||||
field: 'data',
|
||||
title: '运单详情',
|
||||
formatter:function (value,row,index){
|
||||
return value.replace(/(\r\n)|(\n)/g,'<br>');
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'state',
|
||||
title: '当前状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(stats, value);
|
||||
}
|
||||
},/*
|
||||
{
|
||||
field: 'condition',
|
||||
title: '状态标志'
|
||||
},
|
||||
{
|
||||
field: 'routeInfo',
|
||||
title: '路由信息'
|
||||
},
|
||||
{
|
||||
field: 'returnCode',
|
||||
title: '返回码'
|
||||
},
|
||||
{
|
||||
field: 'result',
|
||||
title: '返回结果'
|
||||
},*/
|
||||
|
||||
{
|
||||
field: 'phone',
|
||||
title: '电话号码'
|
||||
},
|
||||
{
|
||||
field: 'singedTime',
|
||||
title: '签收时间'
|
||||
},
|
||||
{
|
||||
field: 'collectTime',
|
||||
title: '揽收时间'
|
||||
},
|
||||
{
|
||||
field: 'lastUpdateTime',
|
||||
title: '最后更新时间'
|
||||
},
|
||||
{
|
||||
field: 'queryTime',
|
||||
title: '查询时间'
|
||||
},
|
||||
{
|
||||
field: 'queryUserName',
|
||||
title: '查询人'
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改Excel批量快递查询')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-expImportQuery-edit" th:object="${expImportQuery}">
|
||||
<input name="sid" th:field="*{sid}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">查询时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="queryTime" th:field="*{queryTime}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">用户ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="queryLoginName" th:field="*{queryLoginName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">用户名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="queryUserName" th:field="*{queryUserName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">查询IP:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="queryIp" th:field="*{queryIp}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">完成时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="finishTime" th:field="*{finishTime}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">完成状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="status" class="form-control m-b" th:with="type=${@dict.getType('sys_common_status')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">运单总量:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="queryQty" th:field="*{queryQty}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "bps/expImportQuery";
|
||||
$("#form-expImportQuery-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-expImportQuery-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('Excel批量快递查询列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>查询时间:</label>
|
||||
<input type="text" name="queryTime"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>用户ID:</label>
|
||||
<input type="text" name="queryLoginName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>用户名:</label>
|
||||
<input type="text" name="queryUserName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>完成状态:</label>
|
||||
<select name="status" th:with="type=${@dict.getType('sys_common_status')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-info" onclick="$.table.importExcel()">
|
||||
<i class="fa fa-upload"></i> 导入
|
||||
</a>
|
||||
<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs">
|
||||
<i class="fa fa-file-excel-o"></i> 下载导入模板
|
||||
</a>
|
||||
<!--<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="bps:expImportQuery:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="bps:expImportQuery:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="bps:expImportQuery:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bps:expImportQuery:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>-->
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('bps:expImportQuery:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('bps:expImportQuery:remove')}]];
|
||||
var detailFlag = [[${@permission.hasPermi('bps:expImportQuery:detail')}]];
|
||||
var statusDatas = [[${@dict.getType('sys_common_status')}]];
|
||||
var prefix = ctx + "bps/expImportQuery";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
detailUrl: prefix + "/detail/{id}",
|
||||
exportUrl: prefix + "/export",
|
||||
importUrl: prefix + "/importData",
|
||||
importTemplateUrl: prefix + "/importTemplate",
|
||||
sortName: "querytime",
|
||||
sortOrder: "desc",
|
||||
modalName: "Excel批量快递查询",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'sid',
|
||||
title: 'sid',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'queryId',
|
||||
title: '查询编号'
|
||||
},
|
||||
{
|
||||
field: 'queryTime',
|
||||
title: '查询时间'
|
||||
},
|
||||
{
|
||||
field: 'queryLoginName',
|
||||
title: '用户ID'
|
||||
},
|
||||
{
|
||||
field: 'queryUserName',
|
||||
title: '用户名'
|
||||
},
|
||||
{
|
||||
field: 'queryIp',
|
||||
title: '查询IP'
|
||||
},
|
||||
{
|
||||
field: 'finishTime',
|
||||
title: '完成时间'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '完成状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(statusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'queryQty',
|
||||
title: '运单总量'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detailTab(\'' + row.sid + '\')"><i class="fa fa-edit"></i>详细</a> ');
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.sid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.sid + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- 导入区域 -->
|
||||
<script id="importTpl" type="text/template">
|
||||
<form enctype="multipart/form-data" class="mt20 mb10">
|
||||
<div class="col-xs-offset-1">
|
||||
<input type="file" id="file" name="file"/>
|
||||
<!--<div class="mt10 pt5">
|
||||
<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
|
||||
</div>-->
|
||||
<span class="pull-left mt10" style="color: red; ">
|
||||
提示:仅允许导入“xls”或“xlsx”格式文件!
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增ERP订阅推送日志')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-expTopgpLog-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">请求ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="requestId" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">请求类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="requestType" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递单:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="expressNumber" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">出货单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="deliveryNumber" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">请求报文:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="requestStr" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">请求时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="requestTime" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">返回code:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="responseCode" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">返回报文:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="responseStr" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "bps/expTopgpLog"
|
||||
$("#form-expTopgpLog-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-expTopgpLog-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改ERP订阅推送日志')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-expTopgpLog-edit" th:object="${expTopgpLog}">
|
||||
<input name="sid" th:field="*{sid}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">请求ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="requestId" th:field="*{requestId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">请求类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="requestType" th:field="*{requestType}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递单:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="expressNumber" th:field="*{expressNumber}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">出货单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="deliveryNumber" th:field="*{deliveryNumber}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">请求报文:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="requestStr" class="form-control">[[*{requestStr}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">请求时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="requestTime" th:field="*{requestTime}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">返回code:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="responseCode" th:field="*{responseCode}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">返回报文:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="responseStr" class="form-control">[[*{responseStr}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "bps/expTopgpLog";
|
||||
$("#form-expTopgpLog-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-expTopgpLog-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('ERP订阅推送日志列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>请求ID:</label>
|
||||
<input type="text" name="requestId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>请求类型:</label>
|
||||
<input type="text" name="requestType"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>快递单:</label>
|
||||
<input type="text" name="expressNumber"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>出货单号:</label>
|
||||
<input type="text" name="deliveryNumber"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>请求时间:</label>
|
||||
<input type="text" name="requestTime"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>返回code:</label>
|
||||
<input type="text" name="responseCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="bps:expTopgpLog:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="bps:expTopgpLog:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="bps:expTopgpLog:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bps:expTopgpLog:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('bps:expTopgpLog:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('bps:expTopgpLog:remove')}]];
|
||||
var prefix = ctx + "bps/expTopgpLog";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
sortName: "requesttime", //不要用驼峰式变量requestTime,mybatis会转换成request_time
|
||||
sortOrder: "desc",
|
||||
modalName: "ERP订阅推送日志",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'sid',
|
||||
title: 'SID',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'requestId',
|
||||
title: '请求ID'
|
||||
},
|
||||
{
|
||||
field: 'requestType',
|
||||
title: '请求类型'
|
||||
},
|
||||
{
|
||||
field: 'expressNumber',
|
||||
title: '快递单'
|
||||
},
|
||||
{
|
||||
field: 'deliveryNumber',
|
||||
title: '出货单号'
|
||||
},
|
||||
{
|
||||
field: 'requestStr',
|
||||
title: '请求报文'
|
||||
},
|
||||
{
|
||||
field: 'requestTime',
|
||||
title: '请求时间'
|
||||
},
|
||||
{
|
||||
field: 'responseCode',
|
||||
title: '返回code'
|
||||
},
|
||||
{
|
||||
field: 'responseStr',
|
||||
title: '返回报文'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.sid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.sid + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增快递信息')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-expressInfo-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">消息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="message" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="nu" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">签收状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="ischeck" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递公司:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="com" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">通信状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="status" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">运单详情:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="data" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">当前状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="state" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态标志:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="condition" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">路由信息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="routeInfo" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">返回码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="returnCode" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">返回结果:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="result" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">电话号码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="phone" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "bps/expressInfo"
|
||||
$("#form-expressInfo-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-expressInfo-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改快递信息')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-expressInfo-edit" th:object="${expressInfo}">
|
||||
<input name="message" th:field="*{message}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">消息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="message" th:field="*{message}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="nu" th:field="*{nu}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">签收状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="ischeck" th:field="*{ischeck}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递公司:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="com" th:field="*{com}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">通信状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="status" th:field="*{status}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">运单详情:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="data" th:field="*{data}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">当前状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="state" th:field="*{state}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态标志:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="condition" th:field="*{condition}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">路由信息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="routeInfo" th:field="*{routeInfo}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">返回码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="returnCode" th:field="*{returnCode}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">返回结果:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="result" th:field="*{result}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">电话号码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="phone" th:field="*{phone}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "bps/expressInfo";
|
||||
$("#form-expressInfo-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-expressInfo-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,209 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('快递信息列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>快递单号:</label>
|
||||
<input type="text" name="nu"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>快递公司:</label>
|
||||
<input type="text" name="com"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>电话号码:</label>
|
||||
<input type="text" name="phone"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>出货单号:</label>
|
||||
<input type="text" name="deliveryNum"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>实时查询</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<!--<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="bps:expressInfo:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="bps:expressInfo:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="bps:expressInfo:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>-->
|
||||
<!-- <a class="btn btn-info" onclick="$.table.importExcel()">
|
||||
<i class="fa fa-upload"></i> 导入
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bps:expressInfo:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>-->
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('bps:expressInfo:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('bps:expressInfo:remove')}]];
|
||||
|
||||
var prefix = ctx + "bps/expressInfo";
|
||||
var datas = [[${@dict.getType('express_company')}]];
|
||||
var stats= [[${@dict.getType('express_stats')}]];
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
importUrl: prefix + "/importData",
|
||||
importTemplateUrl: prefix + "/importTemplate",
|
||||
modalName: "快递信息",
|
||||
columns: [{
|
||||
checkbox: false
|
||||
},
|
||||
{
|
||||
field: 'sid',
|
||||
title: 'SID',
|
||||
visible: false
|
||||
},
|
||||
/*
|
||||
{
|
||||
field: 'message',
|
||||
title: '消息',
|
||||
visible: false
|
||||
},*/
|
||||
{
|
||||
field: 'deliveryNum',
|
||||
title: '出货单号'
|
||||
},
|
||||
{
|
||||
field: 'nu',
|
||||
title: '快递单号'
|
||||
},
|
||||
/*
|
||||
{
|
||||
field: 'ischeck',
|
||||
title: '签收状态',
|
||||
visible: false
|
||||
},*/
|
||||
{
|
||||
field: 'com',
|
||||
title: '快递公司',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(datas, value);
|
||||
}
|
||||
},
|
||||
/*
|
||||
{
|
||||
field: 'status',
|
||||
title: '通信状态',
|
||||
visible: false
|
||||
},*/
|
||||
{
|
||||
field: 'data',
|
||||
title: '运单详情',
|
||||
formatter:function (value,row,index){
|
||||
return value.replace(/(\r\n)|(\n)/g,'<br>');
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'state',
|
||||
title: '当前状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(stats, value);
|
||||
}
|
||||
},/*
|
||||
{
|
||||
field: 'condition',
|
||||
title: '状态标志',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'routeInfo',
|
||||
title: '路由信息',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'returnCode',
|
||||
title: '返回码',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'result',
|
||||
title: '返回结果',
|
||||
visible: false
|
||||
},*/
|
||||
|
||||
{
|
||||
field: 'phone',
|
||||
title: '电话号码'
|
||||
},
|
||||
{
|
||||
field: 'singedTime',
|
||||
title: '签收时间'
|
||||
},
|
||||
{
|
||||
field: 'collectTime',
|
||||
title: '揽收时间'
|
||||
},
|
||||
{
|
||||
field: 'lastUpdateTime',
|
||||
title: '最后更新时间'
|
||||
},
|
||||
{
|
||||
field: 'queryTime',
|
||||
title: '查询时间'
|
||||
},
|
||||
{
|
||||
field: 'queryUserName',
|
||||
title: '查询人'
|
||||
}
|
||||
/*
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.sid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.sid + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}*/]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
<!-- 导入区域 -->
|
||||
<script id="importTpl" type="text/template">
|
||||
<form enctype="multipart/form-data" class="mt20 mb10">
|
||||
<div class="col-xs-offset-1">
|
||||
<input type="file" id="file" name="file"/>
|
||||
<div class="mt10 pt5">
|
||||
<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
|
||||
</div>
|
||||
<span class="pull-left mt10" style="color: red; ">
|
||||
提示:仅允许导入“xls”或“xlsx”格式文件!
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,169 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增快递订阅推送信息')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-expsubspushresp-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">监控状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box">
|
||||
<input type="radio" name="status" value="">
|
||||
<label th:for="status" th:text="未知"></label>
|
||||
</div>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box">
|
||||
<input type="radio" name="billStatus" value="">
|
||||
<label th:for="billStatus" th:text="未知"></label>
|
||||
</div>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">监控状态消息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="message" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递公司编码是否出错:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="autoCheck" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">原始快递公司编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="comOld" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">修正快递公司编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="comNew" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">当前快递消息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultMessage" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">当前快递单状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultState" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">通讯状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResulStatus" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递单明细状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultCondition" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否签收:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultIsCheck" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递公司编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultCom" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultNu" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递流转信息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultData" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递消息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultMessage" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递单状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultState" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国通讯状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box">
|
||||
<input type="radio" name="destResultStatus" value="">
|
||||
<label th:for="destResultStatus" th:text="未知"></label>
|
||||
</div>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递单明细状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultCondition" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国是否签收:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultIsCheck" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递公司编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultCom" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultNu" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递流转信息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultData" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "bps/expsubspushresp"
|
||||
$("#form-expsubspushresp-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-expsubspushresp-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,229 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('快递订阅推送详细信息')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-expsubspushresp-detail" th:object="${expSubsPushResp}">
|
||||
<input name="sid" th:field="*{sid}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">监控状态:</label>
|
||||
<!--<div class="col-sm-3" th:text="*{@dict.getLabel('express_monitor_stats',status)} " />-->
|
||||
<div class="col-sm-4">
|
||||
<input name="autoCheck" th:field="*{status}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input name="autoCheckDictLabel" id="autoCheckDictLabel" class="form-control" type="text" readonly>
|
||||
<!--<select name="status" class="form-control m-b" th:with="type=${@dict.getType('express_monitor_stats')}" disabled>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
|
||||
</select>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递公司编码:</label>
|
||||
<div class="col-sm-4">
|
||||
<input name="lastResultCom" th:field="*{lastResultCom}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input name="lastResultComDictLabel" id="lastResultComDictLabel" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">最新推送时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResponseTime" th:field="*{lastResponseTime}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultNu" th:field="*{lastResultNu}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递流转信息:</label>
|
||||
<div class="col-sm-8">
|
||||
<!--<textarea name="lastResultData" th:field="*{lastResultData}" class="form-control" type="text" th:multiple="true" readonly> </textarea>-->
|
||||
<textarea name="lastResultData" id="lastResultData" class="form-control" type="text" readonly></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">监控状态消息:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="message" th:field="*{message}" class="form-control" type="text" readonly></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">当前快递单状态:</label>
|
||||
<div class="col-sm-4">
|
||||
<input name="lastResultState" th:field="*{lastResultState}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input name="lastResultStateDictLabel" id="lastResultStateDictLabel" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否签收:</label>
|
||||
<div class="col-sm-4">
|
||||
<input name="lastResultIsCheck" th:field="*{lastResultIsCheck}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input name="lastResultIsCheckLabel" id="lastResultIsCheckLabel" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="autoCheck" th:field="*{billStatus}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递公司编码是否出错:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="autoCheck" th:field="*{autoCheck}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">原始快递公司编码:</label>
|
||||
<div class="col-sm-4">
|
||||
<input name="comOld" th:field="*{comOld}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<!--<select name="comOld1" class="form-control m-b" th:with="type=${@dict.getType('express_company')}" disabled>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{comOld}"></option>
|
||||
</select>-->
|
||||
<input name="comOldDictLabel" id="comOldDictLabel" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">修正快递公司编码:</label>
|
||||
<div class="col-sm-4">
|
||||
<input name="comNew" th:field="*{comNew}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input name="comNewDictLabel" id="comNewDictLabel" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">当前快递消息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultMessage" th:field="*{lastResultMessage}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递单明细状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultCondition" th:field="*{lastResultCondition}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">通讯状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResulStatus" th:field="*{lastResulStatus}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递消息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultMessage" th:field="*{destResultMessage}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递单状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultState" th:field="*{destResultState}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国通讯状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultState" th:field="*{destResultStatus}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递单明细状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultCondition" th:field="*{destResultCondition}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国是否签收:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultIsCheck" th:field="*{destResultIsCheck}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递公司编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultCom" th:field="*{destResultCom}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultNu" th:field="*{destResultNu}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递流转信息:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="destResultData" th:field="*{destResultData}" class="form-control" type="text" readonly></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "bps/expsubspushresp";
|
||||
var lastResultData=[[${expSubsPushResp.lastResultData}]];
|
||||
$(function (){
|
||||
$("#autoCheckDictLabel").val([[${@dict.getLabel('express_monitor_stats',expSubsPushResp.status)}]]);
|
||||
$("#comOldDictLabel").val([[${@dict.getLabel('express_company',expSubsPushResp.comOld)}]]);
|
||||
$("#comNewDictLabel").val([[${@dict.getLabel('express_company',expSubsPushResp.comNew)}]]);
|
||||
$("#lastResultStateDictLabel").val([[${@dict.getLabel('express_stats',expSubsPushResp.lastResultState)}]]);
|
||||
$("#lastResultComDictLabel").val([[${@dict.getLabel('express_company',expSubsPushResp.lastResultCom)}]]);
|
||||
if([[${expSubsPushResp.lastResultIsCheck}]]=="1"){
|
||||
$("#lastResultIsCheckLabel").val("已签收");
|
||||
}
|
||||
else {
|
||||
$("#lastResultIsCheckLabel").val("未签收");
|
||||
}
|
||||
|
||||
$("#lastResultData").html(lastResultData.replace(/<br\s*\/?>/gi,"\r\n"));
|
||||
$("#lastResultData,#message").txtaAutoHeight();
|
||||
/* $("#message").txtaAutoHeight();*/
|
||||
});
|
||||
|
||||
$("#form-expsubspushresp-detail").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-expsubspushresp-detail').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
//jQuery实现textarea高度根据内容自适应
|
||||
$.fn.extend({
|
||||
txtaAutoHeight: function () {
|
||||
return this.each(function () {
|
||||
var $this = $(this);
|
||||
if (!$this.attr('initAttrH')) {
|
||||
$this.attr('initAttrH', $this.outerHeight());
|
||||
}
|
||||
setAutoHeight(this).on('input', function () {
|
||||
setAutoHeight(this);
|
||||
});
|
||||
});
|
||||
function setAutoHeight(elem) {
|
||||
var $obj = $(elem);
|
||||
return $obj.css({ height: $obj.attr('initAttrH'), 'overflow-y': 'hidden' }).height(elem.scrollHeight);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改快递订阅推送信息')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-expsubspushresp-edit" th:object="${expSubsPushResp}">
|
||||
<input name="sid" th:field="*{sid}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">监控状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box">
|
||||
<input type="radio" name="status" value="">
|
||||
<label th:for="status" th:text="未知"></label>
|
||||
</div>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box">
|
||||
<input type="radio" name="billStatus" value="">
|
||||
<label th:for="billStatus" th:text="未知"></label>
|
||||
</div>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">监控状态消息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="message" th:field="*{message}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递公司编码是否出错:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="autoCheck" th:field="*{autoCheck}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">原始快递公司编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="comOld" th:field="*{comOld}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">修正快递公司编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="comNew" th:field="*{comNew}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">当前快递消息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultMessage" th:field="*{lastResultMessage}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">当前快递单状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultState" th:field="*{lastResultState}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">通讯状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResulStatus" th:field="*{lastResulStatus}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递单明细状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultCondition" th:field="*{lastResultCondition}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否签收:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultIsCheck" th:field="*{lastResultIsCheck}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递公司编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultCom" th:field="*{lastResultCom}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultNu" th:field="*{lastResultNu}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递流转信息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lastResultData" th:field="*{lastResultData}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递消息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultMessage" th:field="*{destResultMessage}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递单状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultState" th:field="*{destResultState}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国通讯状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box">
|
||||
<input type="radio" name="destResultStatus" value="">
|
||||
<label th:for="destResultStatus" th:text="未知"></label>
|
||||
</div>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递单明细状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultCondition" th:field="*{destResultCondition}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国是否签收:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultIsCheck" th:field="*{destResultIsCheck}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递公司编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultCom" th:field="*{destResultCom}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultNu" th:field="*{destResultNu}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">目的国快递流转信息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="destResultData" th:field="*{destResultData}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "bps/expsubspushresp";
|
||||
$("#form-expsubspushresp-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-expsubspushresp-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,230 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('快递订阅推送信息列表')" />
|
||||
<th:block th:include="include :: select2-css" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>当前状态:</label>
|
||||
<select name="lastResultState" th:with="type=${@dict.getType('express_stats')}" class="form-control">
|
||||
<option value="">---所有---</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>是否签收:</label>
|
||||
<select name="lastResultIsCheck">
|
||||
<option value="">---所有---</option>
|
||||
<option value="0">未签收</option>
|
||||
<option value="1">已签收</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>快递公司:</label>
|
||||
<select name="lastResultCom" th:with="type=${@dict.getType('express_company')}" class="form-control">
|
||||
<option value="">---所有---</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>快递单号:</label>
|
||||
<input type="text" name="lastResultNu"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="bps:expsubspushresp:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="bps:expsubspushresp:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="bps:expsubspushresp:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>-->
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bps:expsubspushresp:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: select2-js" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('bps:expsubspushresp:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('bps:expsubspushresp:remove')}]];
|
||||
var detailFlag = [[${@permission.hasPermi('bps:expsubspushresp:detail')}]];
|
||||
var companyDatas = [[${@dict.getType('express_company')}]];
|
||||
var statsDatas = [[${@dict.getType('express_stats')}]];
|
||||
var monitorStats=[[${@dict.getType('express_monitor_stats')}]];
|
||||
var prefix = ctx + "bps/expsubspushresp";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
detailUrl: prefix + "/detail/{id}",
|
||||
modalName: "快递订阅推送信息",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'sid',
|
||||
title: 'SID',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '监控状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(monitorStats, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'billStatus',
|
||||
title: '状态',
|
||||
visible: false
|
||||
},
|
||||
/*{
|
||||
field: 'autoCheck',
|
||||
title: '快递公司编码是否出错'
|
||||
},
|
||||
{
|
||||
field: 'comOld',
|
||||
title: '原始快递公司编码'
|
||||
},
|
||||
{
|
||||
field: 'comNew',
|
||||
title: '修正快递公司编码'
|
||||
},
|
||||
{
|
||||
field: 'lastResultMessage',
|
||||
title: '当前快递消息'
|
||||
},*/
|
||||
{
|
||||
field: 'lastResultState',
|
||||
title: '当前状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(statsDatas, value);
|
||||
}
|
||||
},
|
||||
/*{
|
||||
field: 'lastResulStatus',
|
||||
title: '通讯状态'
|
||||
},
|
||||
{
|
||||
field: 'lastResultCondition',
|
||||
title: '快递单明细状态'
|
||||
},
|
||||
{
|
||||
field: 'lastResultIsCheck',
|
||||
title: '是否签收',
|
||||
formatter: function(value, row, index) {
|
||||
if(value=="0"){return "未签收";}
|
||||
if(value=="1"){return "已签收";}
|
||||
return value;
|
||||
}
|
||||
},*/
|
||||
{
|
||||
field: 'lastResultCom',
|
||||
title: '快递公司',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(companyDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'lastResultNu',
|
||||
title: '快递单号'
|
||||
},
|
||||
{
|
||||
field: 'lastResultData',
|
||||
title: '运单详情',
|
||||
formatter:function (value,row,index){
|
||||
return value.replace(/(\r\n)|(\n)/g,'<br>');
|
||||
}
|
||||
},
|
||||
/*
|
||||
{
|
||||
field: 'message',
|
||||
title: '监控状态消息'
|
||||
},
|
||||
{
|
||||
field: 'destResultMessage',
|
||||
title: '目的国快递消息'
|
||||
},
|
||||
{
|
||||
field: 'destResultState',
|
||||
title: '目的国快递单状态'
|
||||
},
|
||||
{
|
||||
field: 'destResultStatus',
|
||||
title: '目的国通讯状态'
|
||||
},
|
||||
{
|
||||
field: 'destResultCondition',
|
||||
title: '目的国快递单明细状态'
|
||||
},
|
||||
{
|
||||
field: 'destResultIsCheck',
|
||||
title: '目的国是否签收'
|
||||
},
|
||||
{
|
||||
field: 'destResultCom',
|
||||
title: '目的国快递公司编码'
|
||||
},
|
||||
{
|
||||
field: 'destResultNu',
|
||||
title: '目的国快递单号'
|
||||
},
|
||||
{
|
||||
field: 'destResultData',
|
||||
title: '目的国快递流转信息'
|
||||
},*/
|
||||
{
|
||||
field: 'lastResponseTime',
|
||||
title: '最新推送时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
/*
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.sid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
*/
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.sid + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||
actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.sid + '\')"><i class="fa fa-search"></i>详细</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function reset(){
|
||||
$('.form-control').val(null).trigger('change');
|
||||
$.form.reset();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增快递订阅')" />
|
||||
<th:block th:include="include :: select2-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-subscribe-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递公司编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="company" class="form-control m-b" th:with="type=${@dict.getType('express_company')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="number" id="number" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">收/寄件人电话:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="phone" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-3 control-label">盐:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="salt" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">订阅时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="subscribeTime" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">订阅结果:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="result" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">返回码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="returnCode" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">返回消息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="message" class="form-control" type="text">
|
||||
</div>
|
||||
</div>-->
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: select2-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "bps/subscribe"
|
||||
$("#form-subscribe-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
//$.operate.save(prefix + "/add", $('#form-subscribe-add').serialize());
|
||||
sendForm();
|
||||
$.modal.close();
|
||||
}
|
||||
}
|
||||
|
||||
function sendForm() {
|
||||
var formObject={};
|
||||
$("#form-subscribe-add").serializeArray().map(function(val,key){formObject[val.name]=val.value;})
|
||||
|
||||
$.ajax({
|
||||
url:ctx+"bps/subscribe/subscribe",
|
||||
type:"POST",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(formObject),
|
||||
dataType: "json",
|
||||
async:false, //如果不加async:false参数,ajax请求默认是异步的,会出现工程启动后第一次订阅,返回canceled,不执行success任务的问题
|
||||
success:function(data){
|
||||
alert(JSON.stringify(data));
|
||||
parent.$("#number").val($("#number").val());
|
||||
parent.$.table.search();
|
||||
},
|
||||
error:function(e){
|
||||
alert("错误!!");
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改快递订阅')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-subscribe-edit" th:object="${expSubscribe}">
|
||||
<input name="sid" th:field="*{sid}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递公司编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="company" class="form-control m-b" th:with="type=${@dict.getType('express_company')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{company}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">快递单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="number" th:field="*{number}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">收/寄件人电话:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="phone" th:field="*{phone}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">盐:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="salt" th:field="*{salt}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">订阅时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="subscribeTime" th:field="*{subscribeTime}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">订阅结果:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="result" th:field="*{result}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">返回码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="returnCode" th:field="*{returnCode}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">返回消息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="message" th:field="*{message}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "bps/subscribe";
|
||||
$("#form-subscribe-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-subscribe-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,191 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('快递订阅列表')" />
|
||||
<th:block th:include="include :: select2-css" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div id="userids"></div>
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
快递公司:
|
||||
<select name="company" th:with="type=${@dict.getType('express_company')}" class="form-control">
|
||||
<option value="">---所有---</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>快递单号:</label>
|
||||
<input type="text" id="number" name="number"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>收/寄件人电话:</label>
|
||||
<input type="text" name="phone"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>订阅时间:</label>
|
||||
<input type="text" name="subscribeTime"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>订阅结果:</label>
|
||||
<select name="result">
|
||||
<option value="">---所有---</option>
|
||||
<option value="true">成功</option>
|
||||
<option value="false">失败</option>
|
||||
</select>
|
||||
</li>
|
||||
<!-- <li>
|
||||
<label>返回码:</label>
|
||||
<input type="text" name="returnCode"/>
|
||||
</li>-->
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search();"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
<!-- <li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="sendForm()"><i class="fa fa-check"></i> 订阅</a>
|
||||
</li>-->
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="bps:subscribe:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="bps:subscribe:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="bps:subscribe:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bps:subscribe:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: select2-js" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('bps:subscribe:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('bps:subscribe:remove')}]];
|
||||
var stepToResp = [[${@permission.hasPermi('bps:expsubspushresp:list')}]];
|
||||
var companyDatas = [[${@dict.getType('express_company')}]];
|
||||
var prefix = ctx + "bps/subscribe";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "快递订阅",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'sid',
|
||||
title: 'SID',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'company',
|
||||
title: '快递公司编码',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(companyDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'number',
|
||||
title: '快递单号'
|
||||
},
|
||||
{
|
||||
field: 'phone',
|
||||
title: '收/寄件人电话'
|
||||
},
|
||||
{
|
||||
field: 'salt',
|
||||
title: '盐'
|
||||
},
|
||||
{
|
||||
field: 'subscribeTime',
|
||||
title: '订阅时间'
|
||||
},
|
||||
{
|
||||
field: 'result',
|
||||
title: '订阅结果',
|
||||
formatter: function(value, row, index) {
|
||||
if(value=="true")
|
||||
{ return "成功";}
|
||||
if(value=="false")
|
||||
{return "失败";}
|
||||
return value;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'returnCode',
|
||||
title: '返回码'
|
||||
},
|
||||
{
|
||||
field: 'message',
|
||||
title: '返回消息'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
/*actions.push('<a class="btn btn-danger btn-xs ' + stepToResp + '" href="expsubspushresp/list/'+row.sid+'"><i class="fa fa-search"></i>信息跟踪</a>');*/
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.sid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.sid + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
/* function sendForm() {
|
||||
/!* var formObject = {};
|
||||
var formArray =$("#formId").serializeArray();
|
||||
$.each(formArray,function(i,item){
|
||||
formObject[item.name] = item.value;
|
||||
});*!/
|
||||
var formObject={};
|
||||
$("#formId").serializeArray().map(function(val,key){formObject[val.name]=val.value;})
|
||||
|
||||
$.ajax({
|
||||
url:ctx+"/bps/subscribe/subscribe",
|
||||
type:"POST",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(formObject),
|
||||
dataType: "json",
|
||||
success:function(data){
|
||||
alert(JSON.stringify(data));
|
||||
$.table.search();
|
||||
},
|
||||
error:function(e){
|
||||
alert("错误!!");
|
||||
}
|
||||
});
|
||||
|
||||
};*/
|
||||
function reset(){
|
||||
$('.form-control').val(null).trigger('change');
|
||||
$.form.reset();
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('快递信息查询')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label> 快递单号:</label>
|
||||
<input type="text" name="num"/>
|
||||
</li>
|
||||
<li>
|
||||
<label> 快递公司:</label>
|
||||
<input type="text" name="com"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>电话号码:</label>
|
||||
<input type="text" name="phone"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="sendForm()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bps:express:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<div id="testdiv"></div>
|
||||
<table id="bootstrap-table"></table>
|
||||
<div id="test"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<th:block th:include="include :: footer" />
|
||||
|
||||
|
||||
<script th:inline="javascript">
|
||||
var ctx = [[@{/}]];
|
||||
function sendForm() {
|
||||
var formObject = {};
|
||||
var formArray =$("#formId").serializeArray();
|
||||
$.each(formArray,function(i,item){
|
||||
formObject[item.name] = item.value;
|
||||
});
|
||||
$.ajax({
|
||||
url:ctx+"/bps/express/queryExpress/list1",
|
||||
type:"POST",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(formObject),
|
||||
dataType: "json",
|
||||
success:function(data){
|
||||
//alert(data.msg);
|
||||
alert(JSON.stringify(data));
|
||||
// document.getElementById("testdiv").innerHTML=JSON.stringify(data);
|
||||
showData(data);
|
||||
},
|
||||
error:function(e){
|
||||
alert("错误!!");
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
function showData(data){
|
||||
var inf ="<table class='table'>";
|
||||
inf += "<tr><th>快递单号</th><th>快递公司</th><th>快递状态</th><th>快递信息</th></tr>";
|
||||
inf+="<tr><td>"+data.nu+"</td><td>"+data.com+"</td><td>"+getContext(data.info)+"</td><td>"+data.state+"</td></tr>";
|
||||
inf += "</table>";
|
||||
$("#test").html(inf);
|
||||
|
||||
};
|
||||
|
||||
function getContext(info){
|
||||
var contextinfo="";
|
||||
for(var i=0;i<info.length;i++){
|
||||
contextinfo += "【"+info[i].time +"】 "+ info[i].context;
|
||||
if(i != info.length-1)
|
||||
{contextinfo+="<br/>";}
|
||||
}
|
||||
return contextinfo;
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.6.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>box-test</artifactId>
|
||||
|
||||
<description>
|
||||
test系统模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--https://mvnrepository.com/artifact/org.apache.cxf/cxf-spring-boot-starter-jaxws-->
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-spring-boot-starter-jaxws</artifactId>
|
||||
<version>3.2.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>20160810</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-system</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.test.conrtroller;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 测试权限登录访问请求
|
||||
*
|
||||
* 登录访问(返回token) POST / http://localhost:80/jwt/login?username=ry&password=admin123
|
||||
*
|
||||
* 测试任意权限(header携带token) GET / http://localhost:80/api/list
|
||||
*
|
||||
* 测试菜单权限(header携带token) GET / http://localhost:80/api/user/list
|
||||
*
|
||||
* 测试角色权限(header携带token) GET / http://localhost:80/api/role/list
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api")
|
||||
public class ApiController
|
||||
{
|
||||
/**
|
||||
* 无权限访问
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list()
|
||||
{
|
||||
return AjaxResult.success("list success");
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单权限 system:user:list
|
||||
*/
|
||||
@GetMapping("/user/list")
|
||||
@RequiresPermissions("system:user:list")
|
||||
public AjaxResult userlist()
|
||||
{
|
||||
return AjaxResult.success("user list success");
|
||||
}
|
||||
|
||||
/**
|
||||
* 角色权限 admin
|
||||
*/
|
||||
@GetMapping("/role/list")
|
||||
@RequiresRoles("admin")
|
||||
public AjaxResult rolelist()
|
||||
{
|
||||
return AjaxResult.success("role list success");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.ruoyi.test.conrtroller;
|
||||
|
||||
import com.ruoyi.test.service.TestService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/test")
|
||||
public class BoxTestController {
|
||||
@Autowired
|
||||
private TestService testService;
|
||||
@RequestMapping("test")
|
||||
public String test(){
|
||||
testService.test();
|
||||
return testService.test();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.ruoyi.test.conrtroller;
|
||||
|
||||
import com.ruoyi.test.service.OracleDdlService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
public class FrForCrController {
|
||||
@Autowired
|
||||
private OracleDdlService oracleDdlService;
|
||||
|
||||
@CrossOrigin
|
||||
@RequestMapping("/test/frforcr")
|
||||
public void frforcr(@RequestBody Map<String,Object> map){
|
||||
for(Object value:map.values()){
|
||||
String dbName="ds7";
|
||||
String tableName=value.toString();
|
||||
String tableNameWithDb=dbName+"."+tableName;
|
||||
int isTableInDb=oracleDdlService.isTableInDb(dbName,tableName);
|
||||
if(isTableInDb>0){
|
||||
try{
|
||||
oracleDdlService.dropTable(tableNameWithDb);
|
||||
System.out.println(LocalTime.now()+"【"+tableNameWithDb+"】已被删除!");
|
||||
}catch (Exception e){
|
||||
System.out.println(LocalTime.now()+"【"+tableNameWithDb+"】删除异常!");
|
||||
}
|
||||
}
|
||||
else{
|
||||
System.out.println(LocalTime.now()+"【"+tableNameWithDb+"】不存在!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
package com.ruoyi.test.conrtroller;
|
||||
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class GetEcologyInfoTestController extends BaseController {
|
||||
@Autowired
|
||||
private ISysDeptService deptService;
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
@RequestMapping("/anon/getEcologyDept")
|
||||
public AjaxResult getEcologyDept() throws Exception {
|
||||
String url="http://192.168.2.85:90/api/hrm/resful/getHrmdepartmentWithPage";
|
||||
String params="{\"params\":{\"pagesize\":999999}}";
|
||||
//return sendPost(url,params);
|
||||
return deptService.syncEcologyDept(url,params);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@RequestMapping("/anon/getEcologyUser")
|
||||
public AjaxResult getEcologyUser(){
|
||||
String url="http://192.168.2.85:90/api/hrm/resful/getHrmUserInfoWithPage";
|
||||
String params="{\"params\":{\"pagesize\":999999}}";
|
||||
return userService.syncEcologyUser(url,params);
|
||||
}
|
||||
|
||||
/* *//*public Map<String,String> sendPostWithRest(String url,String params){
|
||||
RestTemplate restTemplate=new RestTemplate();
|
||||
ResponseEntity<String> result=null;
|
||||
int statusCode=0;
|
||||
try{
|
||||
result=restTemplate.postForEntity(url,params,String.class);
|
||||
statusCode=result.getStatusCode().value();
|
||||
}catch (RestClientException e){
|
||||
System.out.println("POST Request uri: "+url+", params:"+params+" error:"+e.getMessage());
|
||||
}
|
||||
Map<String,String> map=new HashMap<>();
|
||||
map.put("statusCode",String.valueOf(statusCode));
|
||||
if(statusCode== 200){
|
||||
map.put("result",result.getBody());
|
||||
} else{
|
||||
map.put("result",String.valueOf(statusCode));
|
||||
}
|
||||
|
||||
return map;
|
||||
}*//*
|
||||
|
||||
public SysDept insertEcologyDept(EcologyDept ecologyDept){
|
||||
SysDept dept=new SysDept();
|
||||
dept.setDeptId(Long.parseLong(ecologyDept.getId()));
|
||||
dept.setParentId(Long.parseLong(ecologyDept.getSupdepid()) == 0 ? 999999 : Long.parseLong(ecologyDept.getSupdepid()));
|
||||
dept.setDeptName(ecologyDept.getDepartmentname());
|
||||
//dept.setAncestors(pAncestors);
|
||||
dept.setOrderNum("0");
|
||||
dept.setStatus("0");
|
||||
dept.setCreateBy("Admin");
|
||||
deptMapper.insertDept(dept);
|
||||
return dept;
|
||||
}
|
||||
|
||||
public void updateAncestors(List<SysDept> sysDeptList)
|
||||
{
|
||||
if(sysDeptList.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
List<SysDept> list =new ArrayList<>();
|
||||
for(SysDept dept:sysDeptList){
|
||||
SysDept info = deptMapper.selectDeptById(dept.getParentId());
|
||||
if(StringUtils.isNotEmpty(info.getAncestors())) {
|
||||
dept.setAncestors(info.getAncestors()+","+dept.getParentId());
|
||||
deptMapper.updateDept(dept);
|
||||
}else{
|
||||
list.add(dept);
|
||||
}
|
||||
}
|
||||
updateAncestors(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String deptSync(Map<String,String> mapResult){
|
||||
//如果接口返回状态码不为200,则不做同步处理
|
||||
String statusCode=mapResult.get("statusCode");
|
||||
String result= mapResult.get("result");
|
||||
if(!statusCode.equals("200"))
|
||||
{
|
||||
return mapResult.get("result");
|
||||
}
|
||||
//取Ecology返回信息中的部门信息
|
||||
Map<String,Object> map = (Map) JSON.parse(result);
|
||||
Map<String,Object> o= (Map<String, Object>) map.get("data");
|
||||
JSONArray json = (JSONArray) o.get("dataList");
|
||||
List<EcologyDept> depts = JSONArray.parseArray(json.toJSONString(), EcologyDept.class);
|
||||
|
||||
//清空部门表,并插入顶级部门
|
||||
SysDept sysDept=deptMapper.selectDeptById(Long.parseLong("999999"));
|
||||
deptMapper.truncateDept();
|
||||
deptMapper.insertDept(sysDept);
|
||||
List<SysDept> list=new ArrayList<>();
|
||||
//同步Ecology部门信息
|
||||
for(EcologyDept ecologyDept:depts){
|
||||
if(ecologyDept.getSubcompanyid1().equals("1")) { //只取分部ID为“1”的部门,排除代理商
|
||||
*//* String pAncestors=null;
|
||||
if(ecologyDept.getSupdepid().equals("0")){ //如果Ecology部门为一级部门,则设定ancestors="0,999999"
|
||||
pAncestors="0,999999";
|
||||
}*//*
|
||||
SysDept dept= insertEcologyDept(ecologyDept);
|
||||
list.add(dept);
|
||||
}
|
||||
}
|
||||
//更新祖级信息
|
||||
updateAncestors(list);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
*//* public String sendPost(String url,String params) throws Exception {
|
||||
RestTemplate restTemplate=new RestTemplate();
|
||||
ResponseEntity<String> result = null;
|
||||
int statusCode = 0;
|
||||
try {
|
||||
result = restTemplate.postForEntity(url, params, String.class);
|
||||
statusCode = result.getStatusCode().value();
|
||||
} catch (RestClientException e) {
|
||||
//logger.error("POST Request uri: {}, params: {}, error: {}", url, params, e.getMessage());
|
||||
}
|
||||
if (statusCode == 200) {
|
||||
|
||||
return result.getBody();
|
||||
}
|
||||
if (statusCode >= 300 || statusCode < 200) {
|
||||
throw new Exception("Response code is " + statusCode);
|
||||
}
|
||||
//return ResponseCreator.writeJsonErr(result.getStatusCode().toString());
|
||||
|
||||
return result.getStatusCode().toString();
|
||||
}
|
||||
*//*
|
||||
|
||||
*/
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package com.ruoyi.test.conrtroller;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.test.domain.Beauty;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/test")
|
||||
public class GetJsonReqController {
|
||||
|
||||
@CrossOrigin
|
||||
@RequestMapping(value = "simple")
|
||||
// json的结构和内部字段名称可以与POJO/DTO/javabean完全对应
|
||||
public Map<String, String> getJsonBean(@RequestBody Beauty beauty) {
|
||||
Map<String, String> result = null;
|
||||
|
||||
if (beauty != null) {
|
||||
System.out.println("姓名:" + beauty.getName());
|
||||
System.out.println("年龄:" + beauty.getAge());
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
System.out.println("出生日期:" + sdf.format(beauty.getDate()));
|
||||
|
||||
System.out.println("年收入:" + beauty.getSalary());
|
||||
result = new HashMap<>();
|
||||
result.put("code", "1");
|
||||
result.put("msg", "ok");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@RequestMapping(value = "complex")
|
||||
//json的结构较为复杂,不直接与POJO/DTO/javabean对应。
|
||||
public Map<String, String> getJsonComplex(@RequestBody JSONObject param) {
|
||||
Map<String, String> result = null;
|
||||
|
||||
if (param != null) {
|
||||
JSONObject master = param.getJSONObject("master");
|
||||
Beauty beauty = (Beauty) JSONObject.toJavaObject(master, Beauty.class);
|
||||
System.out.println(beauty);
|
||||
|
||||
JSONArray mm = param.getJSONArray("MM");
|
||||
for (int i = 0; i < mm.size(); i++) {
|
||||
// 这里不能使用get(i),因为get(i)只会得到键值对。
|
||||
JSONObject json = mm.getJSONObject(i);
|
||||
Beauty bt = (Beauty) JSONObject.toJavaObject(json, Beauty.class);
|
||||
System.out.println(bt);
|
||||
}
|
||||
|
||||
result = new HashMap<>();
|
||||
result.put("code", "1");
|
||||
result.put("msg", "ok");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.ruoyi.test.conrtroller;
|
||||
|
||||
import com.ruoyi.common.annotation.DataSource;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
import com.ruoyi.test.service.OracleDdlService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/test")
|
||||
@DataSource(value = DataSourceType.SLAVE)
|
||||
public class OracleDdlController {
|
||||
@Autowired
|
||||
private OracleDdlService oracleDdlService;
|
||||
|
||||
//查询表录数
|
||||
@RequestMapping("getRecordCount")
|
||||
|
||||
public String getRecordCount() {
|
||||
String tableName = "tc_user";
|
||||
int result = oracleDdlService.getRecordCount(tableName);
|
||||
return result + "";
|
||||
}
|
||||
|
||||
//检查表是否存在
|
||||
@RequestMapping("isTableInDb")
|
||||
public String isTableInDb() {
|
||||
String dbName = "ds7";
|
||||
String tableName = "tc_user";
|
||||
return (oracleDdlService.isTableInDb(dbName, tableName)>0?"实例ds7中存在表tc_user":"实例ds7中不存在表tc_user");
|
||||
}
|
||||
|
||||
//复制表
|
||||
@RequestMapping("copyTable")
|
||||
public String copyTable() {
|
||||
String originalTalble = "tc_user";
|
||||
String newTable = "new_tc_user";
|
||||
|
||||
if (oracleDdlService.isTableInDb("ds7", originalTalble) > 0) {
|
||||
try {
|
||||
oracleDdlService.copyTable(newTable, originalTalble);
|
||||
return "复制" + originalTalble + "成功!新表名:" + newTable;
|
||||
} catch (Exception e) {
|
||||
System.out.println(e);
|
||||
return "复制" + originalTalble + "失败!";
|
||||
}
|
||||
} else {
|
||||
return "表"+originalTalble+"不存在";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.ruoyi.test.conrtroller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
|
||||
@Controller
|
||||
public class SendJsonController {
|
||||
@RequestMapping("/test/sendjson")
|
||||
public String ajaxSend(){
|
||||
return ("test/sendJson");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,171 @@
|
|||
package com.ruoyi.test.conrtroller;
|
||||
|
||||
import org.apache.cxf.endpoint.Client;
|
||||
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
|
||||
import org.json.XML;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.soap.MessageFactory;
|
||||
import javax.xml.soap.SOAPBody;
|
||||
import javax.xml.soap.SOAPBodyElement;
|
||||
import javax.xml.soap.SOAPMessage;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerConfigurationException;
|
||||
import javax.xml.transform.TransformerException;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
import javax.xml.ws.BindingProvider;
|
||||
import javax.xml.ws.Dispatch;
|
||||
import javax.xml.ws.Service;
|
||||
import javax.xml.ws.WebServiceException;
|
||||
import javax.xml.ws.soap.SOAPBinding;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/anon/soap")
|
||||
public class SoapTestController {
|
||||
|
||||
|
||||
/**
|
||||
* https://www.jianshu.com/p/cdbcdd724813
|
||||
* 方法一:用cxf框架
|
||||
* @param url
|
||||
* @param method
|
||||
* @param args
|
||||
* @return
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RequestMapping("/hello")
|
||||
@ResponseBody
|
||||
public Map<String, Object> hello(String url, String method, String[] args) {
|
||||
if (args.length < 1) {
|
||||
args = new String[]{""};
|
||||
}
|
||||
|
||||
// 创建动态客户端
|
||||
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
|
||||
Client client = dcf.createClient(url);
|
||||
// 需要密码的情况需要加上用户名和密码
|
||||
// client.getOutInterceptors().add(new ClientLoginInterceptor(USER_NAME,PASS_WORD));
|
||||
// 命名空间,方法名
|
||||
QName name = new QName("http://WebXml.com.cn/", method);
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
try {
|
||||
// invoke("方法名",参数1,参数2,参数3....);
|
||||
Object[] objects = client.invoke(name, args);
|
||||
map.put("result", objects);
|
||||
return map;
|
||||
} catch (java.lang.Exception e) {
|
||||
e.printStackTrace();
|
||||
map.put("result", "接口调用异常");
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 方法二:自己用jax-ws的方式实现
|
||||
* @param url 请求地址
|
||||
* @param targetNamespace 名称空间
|
||||
* @param pName 端口名
|
||||
* @param method 方法名
|
||||
* @param argsName 参数名
|
||||
* @param args 参数
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/getSoap")
|
||||
@ResponseBody
|
||||
public Map getSoap(String url, String targetNamespace, String pName, String method, String[] argsName, String[] args) throws Exception {
|
||||
QName serviceName = new QName(targetNamespace, method);
|
||||
|
||||
//WSDL中定义的端口的QName
|
||||
QName portName = new QName(targetNamespace, pName);
|
||||
|
||||
//创建动态Service实例
|
||||
Service service = Service.create(serviceName);
|
||||
service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, url);
|
||||
|
||||
//创建一个dispatch实例
|
||||
Dispatch<SOAPMessage> dispatch = service.createDispatch(portName, SOAPMessage.class, Service.Mode.MESSAGE);
|
||||
|
||||
// Use Dispatch as BindingProvider
|
||||
BindingProvider bp = (BindingProvider) dispatch;
|
||||
|
||||
// 配置RequestContext以发送SOAPAction HTTP标头
|
||||
Map<String, Object> rc = dispatch.getRequestContext();
|
||||
rc.put(BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
|
||||
rc.put(BindingProvider.SOAPACTION_URI_PROPERTY, targetNamespace + method);
|
||||
|
||||
// 获取预配置的SAAJ MessageFactory
|
||||
MessageFactory factory = ((SOAPBinding) bp.getBinding()).getMessageFactory();
|
||||
|
||||
// 创建SOAPMessage请求
|
||||
SOAPMessage request = null;
|
||||
request = factory.createMessage();
|
||||
// 请求体
|
||||
SOAPBody body = request.getSOAPBody();
|
||||
|
||||
// Compose the soap:Body payload
|
||||
QName payloadName = new QName(targetNamespace, method);
|
||||
|
||||
SOAPBodyElement payload = body.addBodyElement(payloadName);
|
||||
if (args.length > 0) {
|
||||
for (int i = 0; i < argsName.length; i++) {
|
||||
payload.addChildElement(argsName[i]).setValue(args[i]);
|
||||
}
|
||||
}
|
||||
// payload.addChildElement("startCity").setValue("北京");
|
||||
// payload.addChildElement("lastCity").setValue("上海");
|
||||
// payload.addChildElement("theDate").setValue("2019-06-07");
|
||||
// payload.addChildElement("userID").setValue("");
|
||||
|
||||
// SOAPElement message = payload.addChildElement(INPUT_NMAE);
|
||||
// message.addTextNode("88888");
|
||||
|
||||
SOAPMessage reply = null;
|
||||
|
||||
try {
|
||||
//调用端点操作并读取响应
|
||||
//request.writeTo(System.out);
|
||||
reply = dispatch.invoke(request);
|
||||
//reply.writeTo(System.out);
|
||||
} catch (WebServiceException wse) {
|
||||
wse.printStackTrace();
|
||||
}
|
||||
|
||||
// 处理响应结果
|
||||
Document doc = reply.getSOAPPart().getEnvelope().getBody().extractContentAsDocument();
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("result", XML.toJSONObject(format(doc)).toString());
|
||||
//System.out.println(XML.toJSONObject(format(doc)).toString());
|
||||
return map;
|
||||
|
||||
}
|
||||
|
||||
// Document对象转字符串
|
||||
public static String format(Document doc) throws Exception {
|
||||
// XML转字符串
|
||||
String xmlStr = "";
|
||||
try {
|
||||
TransformerFactory tf = TransformerFactory.newInstance();
|
||||
Transformer t = tf.newTransformer();
|
||||
t.setOutputProperty("encoding", "UTF-8");
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
t.transform(new DOMSource(doc), new StreamResult(bos));
|
||||
xmlStr = bos.toString();
|
||||
} catch (TransformerConfigurationException e) {
|
||||
e.printStackTrace();
|
||||
} catch (TransformerException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return xmlStr;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
package com.ruoyi.test.conrtroller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.test.domain.SysCustomer;
|
||||
import com.ruoyi.test.service.ISysCustomerService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 客户Controller
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-02-13
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/test/customer")
|
||||
public class SysCustomerController extends BaseController
|
||||
{
|
||||
private String prefix = "test/customer";
|
||||
|
||||
@Autowired
|
||||
private ISysCustomerService sysCustomerService;
|
||||
|
||||
@RequiresPermissions("test:customer:view")
|
||||
@GetMapping()
|
||||
public String customer()
|
||||
{
|
||||
return prefix + "/customer";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询客户列表
|
||||
*/
|
||||
@RequiresPermissions("test:customer:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(SysCustomer sysCustomer)
|
||||
{
|
||||
startPage();
|
||||
List<SysCustomer> list = sysCustomerService.selectSysCustomerList(sysCustomer);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出客户列表
|
||||
*/
|
||||
@RequiresPermissions("test:customer:export")
|
||||
@Log(title = "客户", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(SysCustomer sysCustomer)
|
||||
{
|
||||
List<SysCustomer> list = sysCustomerService.selectSysCustomerList(sysCustomer);
|
||||
ExcelUtil<SysCustomer> util = new ExcelUtil<SysCustomer>(SysCustomer.class);
|
||||
return util.exportExcel(list, "customer");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增客户
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存客户
|
||||
*/
|
||||
@RequiresPermissions("test:customer:add")
|
||||
@Log(title = "客户", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(SysCustomer sysCustomer)
|
||||
{
|
||||
return toAjax(sysCustomerService.insertSysCustomer(sysCustomer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户
|
||||
*/
|
||||
@GetMapping("/edit/{customerId}")
|
||||
public String edit(@PathVariable("customerId") Long customerId, ModelMap mmap)
|
||||
{
|
||||
SysCustomer sysCustomer = sysCustomerService.selectSysCustomerById(customerId);
|
||||
mmap.put("sysCustomer", sysCustomer);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存客户
|
||||
*/
|
||||
@RequiresPermissions("test:customer:edit")
|
||||
@Log(title = "客户", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(SysCustomer sysCustomer)
|
||||
{
|
||||
return toAjax(sysCustomerService.updateSysCustomer(sysCustomer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户
|
||||
*/
|
||||
@RequiresPermissions("test:customer:remove")
|
||||
@Log(title = "客户", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(sysCustomerService.deleteSysCustomerByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
package com.ruoyi.test.conrtroller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.test.domain.SysFileInfo;
|
||||
import com.ruoyi.test.service.ISysFileInfoService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文件信息Controller
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-06
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/test/fileinfo")
|
||||
public class SysFileInfoController extends BaseController
|
||||
{
|
||||
private String prefix = "test/fileinfo";
|
||||
|
||||
@Autowired
|
||||
private ISysFileInfoService sysFileInfoService;
|
||||
|
||||
@RequiresPermissions("test:fileinfo:view")
|
||||
@GetMapping()
|
||||
public String fileinfo()
|
||||
{
|
||||
return prefix + "/fileinfo";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文件信息列表
|
||||
*/
|
||||
@RequiresPermissions("test:fileinfo:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(SysFileInfo sysFileInfo)
|
||||
{
|
||||
startPage();
|
||||
List<SysFileInfo> list = sysFileInfoService.selectSysFileInfoList(sysFileInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出文件信息列表
|
||||
*/
|
||||
@RequiresPermissions("test:fileinfo:export")
|
||||
@Log(title = "文件信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(SysFileInfo sysFileInfo)
|
||||
{
|
||||
List<SysFileInfo> list = sysFileInfoService.selectSysFileInfoList(sysFileInfo);
|
||||
ExcelUtil<SysFileInfo> util = new ExcelUtil<SysFileInfo>(SysFileInfo.class);
|
||||
return util.exportExcel(list, "文件信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增文件信息
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存文件信息
|
||||
*/
|
||||
@RequiresPermissions("test:fileinfo:add")
|
||||
@Log(title = "文件信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(SysFileInfo sysFileInfo)
|
||||
{
|
||||
return toAjax(sysFileInfoService.insertSysFileInfo(sysFileInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改文件信息
|
||||
*/
|
||||
@GetMapping("/edit/{fileId}")
|
||||
public String edit(@PathVariable("fileId") Long fileId, ModelMap mmap)
|
||||
{
|
||||
SysFileInfo sysFileInfo = sysFileInfoService.selectSysFileInfoById(fileId);
|
||||
mmap.put("sysFileInfo", sysFileInfo);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存文件信息
|
||||
*/
|
||||
@RequiresPermissions("test:fileinfo:edit")
|
||||
@Log(title = "文件信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(SysFileInfo sysFileInfo)
|
||||
{
|
||||
return toAjax(sysFileInfoService.updateSysFileInfo(sysFileInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文件信息
|
||||
*/
|
||||
@RequiresPermissions("test:fileinfo:remove")
|
||||
@Log(title = "文件信息", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(sysFileInfoService.deleteSysFileInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.ruoyi.test.conrtroller;
|
||||
|
||||
import com.ruoyi.test.domain.TcUser;
|
||||
import com.ruoyi.test.service.TcUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/test")
|
||||
public class TcUserController {
|
||||
@Autowired
|
||||
private TcUserService tcUserService;
|
||||
|
||||
//查询所有
|
||||
// http://localhost/test/selectall
|
||||
@RequestMapping("selectAll")
|
||||
@ResponseBody
|
||||
public String selectAll(){
|
||||
List<TcUser> users=tcUserService.selectAll();
|
||||
users.forEach(System.out::println);
|
||||
return users.toString()+"";
|
||||
}
|
||||
|
||||
|
||||
//查询 by id
|
||||
// http://localhost/test/selectById/1(此处1为要获取的id)
|
||||
@RequestMapping(value = "selectById/{id}", method = RequestMethod.GET)
|
||||
public String selectById(@PathVariable int id) {
|
||||
return tcUserService.selectById(id).toString();
|
||||
}
|
||||
|
||||
//插入新用户
|
||||
// http://localhost/test/insert?id=100&name=张三&password=20
|
||||
@RequestMapping(value = "/insert", method = RequestMethod.GET)
|
||||
public TcUser insert(TcUser tcUser) {
|
||||
return tcUserService.insert(tcUser);
|
||||
}
|
||||
|
||||
//通过用户id删除用户
|
||||
// http://localhost/test/deleteById?id=1(此处1为要删除的id)
|
||||
@RequestMapping(value = "/deleteById", method = RequestMethod.GET)
|
||||
public String delete(int id) {
|
||||
int result = tcUserService.deleteById(id);
|
||||
if (result >= 1) {
|
||||
return "删除成功";
|
||||
} else {
|
||||
return "删除失败";
|
||||
}
|
||||
}
|
||||
|
||||
//更新 by id
|
||||
// http://localhost/test/updateById?id=2&name=波波&password=12
|
||||
@RequestMapping(value = "/updateById", method = RequestMethod.GET)
|
||||
public String update(TcUser tcUser) {
|
||||
int result = tcUserService.updateById(tcUser);
|
||||
if (result >= 1) {
|
||||
return "修改成功";
|
||||
} else {
|
||||
return "修改失败";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.ruoyi.test.conrtroller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Controller
|
||||
public class TestIndexController {
|
||||
@RequestMapping("/test")
|
||||
public String index(ModelMap modelMap){
|
||||
modelMap.put("date", LocalDateTime.now());
|
||||
return ("test/index");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.ruoyi.test.conrtroller;
|
||||
|
||||
import com.ruoyi.test.service.TestVerifyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
@Controller
|
||||
public class TestVerifyController {
|
||||
@Autowired
|
||||
private TestVerifyService testVerifyService;
|
||||
|
||||
@RequestMapping("/test/testVerify")
|
||||
public String testVerify(){
|
||||
return "/test/testVerify";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 校验用户名
|
||||
*/
|
||||
|
||||
@PostMapping("/test/testVerifyName")
|
||||
@ResponseBody
|
||||
public int testVerifyName(String name)
|
||||
{
|
||||
return testVerifyService.isNameUnique(name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
package com.ruoyi.test.conrtroller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.system.service.IWechatApiService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
public class WechatApiController extends BaseController {
|
||||
@Autowired
|
||||
IWechatApiService wechatApiService;
|
||||
|
||||
@RequestMapping("anon/getAccessToken")
|
||||
@ResponseBody
|
||||
public String getAccessToken() {
|
||||
return wechatApiService.GetAccessToken();
|
||||
}
|
||||
|
||||
@GetMapping("anon/userInfo")
|
||||
@ResponseBody
|
||||
public Object getJSON(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
|
||||
BufferedReader streamReader = new BufferedReader( new InputStreamReader(request.getInputStream(), "UTF-8"));
|
||||
StringBuilder responseStrBuilder = new StringBuilder();
|
||||
String inputStr;
|
||||
while ((inputStr = streamReader.readLine()) != null) {
|
||||
responseStrBuilder.append(inputStr);
|
||||
}
|
||||
//return JSON.parseObject(responseStrBuilder.toString(), Map.class);
|
||||
return JSON.parse(responseStrBuilder.toString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("anon/SendTextMessageToWechatUser")
|
||||
@ResponseBody
|
||||
public Map<String, String> SendTextMessageToWechatUser() {
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
userIdList.add("2342343243");//错误userId示例
|
||||
userIdList.add("erqrqwe");//错误userId示例
|
||||
userIdList.add(""); //空UserId示例
|
||||
userIdList.add("359");
|
||||
if(! String.valueOf(ShiroUtils.getUserId()).equals("359")){
|
||||
userIdList.add(String.valueOf(ShiroUtils.getUserId()));
|
||||
}
|
||||
Map<String, String> resultMap = wechatApiService.SendTextMessageToWechatUser(userIdList,"<a href=\"www.baidu.com\">哈哈哈!</a>");
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@GetMapping("anon/SendTextCardMessageToWechatUser")
|
||||
@ResponseBody
|
||||
public Map<String, String> SendTextCardMessageToWechatUser() {
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
userIdList.add("23456667"); //错误userId示例
|
||||
userIdList.add("355354354"); //错误userId示例
|
||||
userIdList.add(""); //空UserId示例
|
||||
userIdList.add("359");
|
||||
//userIdList.add("454");
|
||||
//userIdList.add("408");
|
||||
if(!String.valueOf(ShiroUtils.getUserId()).equals("359")){
|
||||
userIdList.add(String.valueOf(ShiroUtils.getUserId()));
|
||||
}
|
||||
String title="号外:特大优惠!限时抢购";
|
||||
String description="今年仅此一次,苹果手机1000元起!欢迎前来购买!走过路过,不要错过!";
|
||||
String dtailUrl="https://item.jd.com/100008348530.html";
|
||||
|
||||
Map<String, String> resultMap = wechatApiService.SendTextCardMessageToWechatUser(userIdList,title,description,dtailUrl);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.ruoyi.test.conrtroller;
|
||||
|
||||
import com.ruoyi.common.utils.TopgpXmlUtils;
|
||||
import com.ruoyi.common.utils.http.HttpUtils;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
|
||||
public class XmlWebserviceController {
|
||||
//private static final Logger log = LoggerFactory.getLogger(HttpUtils.class);
|
||||
|
||||
@PostMapping("/anon/sendXml")
|
||||
public String SendXml() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("responseInfo", "此处为测试消息");
|
||||
String param = TopgpXmlUtils.GetTopgpRequestXml("express_testRequest", map);
|
||||
String url = "http://192.168.2.81:85/web/ws/r/aws_ttsrv2_toptest";
|
||||
String returnXml = HttpUtils.sendXmlPost(url,param);
|
||||
return TopgpXmlUtils.GetStatusFromTopgpResponse(returnXml).toString();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.ruoyi.test.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class Beauty {
|
||||
private String name;
|
||||
private int age;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date date;
|
||||
private double salary;
|
||||
|
||||
public Beauty() {
|
||||
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public Date getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(Date date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public double getSalary() {
|
||||
return salary;
|
||||
}
|
||||
|
||||
public void setSalary(double salary) {
|
||||
this.salary = salary;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Beauty [name=" + name + ", age=" + age + ", date=" + date + ", salary=" + salary + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
package com.ruoyi.test.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 客户对象 sys_customer
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-02-13
|
||||
*/
|
||||
public class SysCustomer extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 客户id */
|
||||
private Long customerId;
|
||||
|
||||
/** 客户姓名 */
|
||||
@Excel(name = "客户姓名")
|
||||
private String customerName;
|
||||
|
||||
/** 手机号码 */
|
||||
@Excel(name = "手机号码")
|
||||
private String phonenumber;
|
||||
|
||||
/** 客户性别 */
|
||||
@Excel(name = "客户性别")
|
||||
private String sex;
|
||||
|
||||
/** 客户生日 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "客户生日", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date birthday;
|
||||
|
||||
/** 商品信息 */
|
||||
private List<SysGoods> sysGoodsList;
|
||||
|
||||
public void setCustomerId(Long customerId)
|
||||
{
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public Long getCustomerId()
|
||||
{
|
||||
return customerId;
|
||||
}
|
||||
public void setCustomerName(String customerName)
|
||||
{
|
||||
this.customerName = customerName;
|
||||
}
|
||||
|
||||
public String getCustomerName()
|
||||
{
|
||||
return customerName;
|
||||
}
|
||||
public void setPhonenumber(String phonenumber)
|
||||
{
|
||||
this.phonenumber = phonenumber;
|
||||
}
|
||||
|
||||
public String getPhonenumber()
|
||||
{
|
||||
return phonenumber;
|
||||
}
|
||||
public void setSex(String sex)
|
||||
{
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getSex()
|
||||
{
|
||||
return sex;
|
||||
}
|
||||
public void setBirthday(Date birthday)
|
||||
{
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
public Date getBirthday()
|
||||
{
|
||||
return birthday;
|
||||
}
|
||||
|
||||
public List<SysGoods> getSysGoodsList()
|
||||
{
|
||||
return sysGoodsList;
|
||||
}
|
||||
|
||||
public void setSysGoodsList(List<SysGoods> sysGoodsList)
|
||||
{
|
||||
this.sysGoodsList = sysGoodsList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("customerId", getCustomerId())
|
||||
.append("customerName", getCustomerName())
|
||||
.append("phonenumber", getPhonenumber())
|
||||
.append("sex", getSex())
|
||||
.append("birthday", getBirthday())
|
||||
.append("remark", getRemark())
|
||||
.append("sysGoodsList", getSysGoodsList())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
package com.ruoyi.test.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 文件信息对象 sys_file_info
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-06
|
||||
*/
|
||||
public class SysFileInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 文件id */
|
||||
private Long fileId;
|
||||
|
||||
/** 文件名称 */
|
||||
@Excel(name = "文件名称")
|
||||
private String fileName;
|
||||
|
||||
/** 文件路径 */
|
||||
@Excel(name = "文件路径")
|
||||
private String filePath;
|
||||
|
||||
public void setFileId(Long fileId)
|
||||
{
|
||||
this.fileId = fileId;
|
||||
}
|
||||
|
||||
public Long getFileId()
|
||||
{
|
||||
return fileId;
|
||||
}
|
||||
public void setFileName(String fileName)
|
||||
{
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public String getFileName()
|
||||
{
|
||||
return fileName;
|
||||
}
|
||||
public void setFilePath(String filePath)
|
||||
{
|
||||
this.filePath = filePath;
|
||||
}
|
||||
|
||||
public String getFilePath()
|
||||
{
|
||||
return filePath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("fileId", getFileId())
|
||||
.append("fileName", getFileName())
|
||||
.append("filePath", getFilePath())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
package com.ruoyi.test.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 商品对象 sys_goods
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-02-13
|
||||
*/
|
||||
public class SysGoods extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 商品id */
|
||||
private Long goodsId;
|
||||
|
||||
/** 客户id */
|
||||
@Excel(name = "客户id")
|
||||
private Long customerId;
|
||||
|
||||
/** 商品名称 */
|
||||
@Excel(name = "商品名称")
|
||||
private String name;
|
||||
|
||||
/** 商品重量 */
|
||||
@Excel(name = "商品重量")
|
||||
private Integer weight;
|
||||
|
||||
/** 商品价格 */
|
||||
@Excel(name = "商品价格")
|
||||
private BigDecimal price;
|
||||
|
||||
/** 商品时间 */
|
||||
@Excel(name = "商品时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date date;
|
||||
|
||||
/** 商品种类 */
|
||||
@Excel(name = "商品种类")
|
||||
private String type;
|
||||
|
||||
public void setGoodsId(Long goodsId)
|
||||
{
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public Long getGoodsId()
|
||||
{
|
||||
return goodsId;
|
||||
}
|
||||
public void setCustomerId(Long customerId)
|
||||
{
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public Long getCustomerId()
|
||||
{
|
||||
return customerId;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setWeight(Integer weight)
|
||||
{
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public Integer getWeight()
|
||||
{
|
||||
return weight;
|
||||
}
|
||||
public void setPrice(BigDecimal price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public BigDecimal getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
public void setDate(Date date)
|
||||
{
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public Date getDate()
|
||||
{
|
||||
return date;
|
||||
}
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("goodsId", getGoodsId())
|
||||
.append("customerId", getCustomerId())
|
||||
.append("name", getName())
|
||||
.append("weight", getWeight())
|
||||
.append("price", getPrice())
|
||||
.append("date", getDate())
|
||||
.append("type", getType())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.ruoyi.test.domain;
|
||||
|
||||
public class TcUser {
|
||||
private int id;
|
||||
private String name;
|
||||
private String password;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TcUser{" +
|
||||
"id=" + id +
|
||||
", name='" + name + '\'' +
|
||||
", age='" + password + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.ruoyi.test.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Mapper
|
||||
@Component("OracleDdlMapper")
|
||||
public interface OracleDdlMapper {
|
||||
// alter table
|
||||
int alterTableName(@Param("originalTableName") String originalTableName,
|
||||
@Param("newTableName") String newTableName);
|
||||
|
||||
//truncate table
|
||||
int truncateTable(@Param("tableName") String tableName);
|
||||
|
||||
//drop table
|
||||
int dropTable(@Param("tableName") String tableName);
|
||||
|
||||
//copy table
|
||||
void copyTable(@Param("newTableName") String newTableName,
|
||||
@Param("originalTableName") String originalTableName);
|
||||
|
||||
//获取表记录数
|
||||
int getRecordCount(@Param("tableName") String tableName);
|
||||
|
||||
|
||||
|
||||
//查询数据库中表是否存在
|
||||
int isTableInDb(@Param("dataBaseName") String dataBaseName,
|
||||
@Param("tableName") String tableName);
|
||||
}
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
package com.ruoyi.test.mapper;
|
||||
|
||||
import com.ruoyi.test.domain.SysCustomer;
|
||||
import com.ruoyi.test.domain.SysGoods;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 客户Mapper接口
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-02-13
|
||||
*/
|
||||
public interface SysCustomerMapper
|
||||
{
|
||||
/**
|
||||
* 查询客户
|
||||
*
|
||||
* @param customerId 客户ID
|
||||
* @return 客户
|
||||
*/
|
||||
public SysCustomer selectSysCustomerById(Long customerId);
|
||||
|
||||
/**
|
||||
* 查询客户列表
|
||||
*
|
||||
* @param sysCustomer 客户
|
||||
* @return 客户集合
|
||||
*/
|
||||
public List<SysCustomer> selectSysCustomerList(SysCustomer sysCustomer);
|
||||
|
||||
/**
|
||||
* 新增客户
|
||||
*
|
||||
* @param sysCustomer 客户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysCustomer(SysCustomer sysCustomer);
|
||||
|
||||
/**
|
||||
* 修改客户
|
||||
*
|
||||
* @param sysCustomer 客户
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysCustomer(SysCustomer sysCustomer);
|
||||
|
||||
/**
|
||||
* 删除客户
|
||||
*
|
||||
* @param customerId 客户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysCustomerById(Long customerId);
|
||||
|
||||
/**
|
||||
* 批量删除客户
|
||||
*
|
||||
* @param customerIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysCustomerByIds(String[] customerIds);
|
||||
|
||||
/**
|
||||
* 批量删除商品
|
||||
*
|
||||
* @param customerIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysGoodsByCustomerIds(String[] customerIds);
|
||||
|
||||
/**
|
||||
* 批量新增商品
|
||||
*
|
||||
* @param sysGoodsList 商品列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchSysGoods(List<SysGoods> sysGoodsList);
|
||||
|
||||
|
||||
/**
|
||||
* 通过客户ID删除商品信息
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysGoodsByCustomerId(Long customerId);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.ruoyi.test.mapper;
|
||||
|
||||
import com.ruoyi.test.domain.SysFileInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文件信息Mapper接口
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-06
|
||||
*/
|
||||
public interface SysFileInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询文件信息
|
||||
*
|
||||
* @param fileId 文件信息ID
|
||||
* @return 文件信息
|
||||
*/
|
||||
public SysFileInfo selectSysFileInfoById(Long fileId);
|
||||
|
||||
/**
|
||||
* 查询文件信息列表
|
||||
*
|
||||
* @param sysFileInfo 文件信息
|
||||
* @return 文件信息集合
|
||||
*/
|
||||
public List<SysFileInfo> selectSysFileInfoList(SysFileInfo sysFileInfo);
|
||||
|
||||
/**
|
||||
* 新增文件信息
|
||||
*
|
||||
* @param sysFileInfo 文件信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysFileInfo(SysFileInfo sysFileInfo);
|
||||
|
||||
/**
|
||||
* 修改文件信息
|
||||
*
|
||||
* @param sysFileInfo 文件信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysFileInfo(SysFileInfo sysFileInfo);
|
||||
|
||||
/**
|
||||
* 删除文件信息
|
||||
*
|
||||
* @param fileId 文件信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysFileInfoById(Long fileId);
|
||||
|
||||
/**
|
||||
* 批量删除文件信息
|
||||
*
|
||||
* @param fileIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysFileInfoByIds(String[] fileIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.ruoyi.test.mapper;
|
||||
|
||||
import com.ruoyi.test.domain.TcUser;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Component("TCUserMapper")
|
||||
public interface TcUserMapper {
|
||||
//查询所有
|
||||
List<TcUser> selectAll();
|
||||
|
||||
//查询 by id
|
||||
TcUser selectById(int id);
|
||||
|
||||
//增加
|
||||
int insert(TcUser tcUser);
|
||||
|
||||
//删除 by id
|
||||
int deleteById(int id);
|
||||
|
||||
//更新 by id
|
||||
int updateById(TcUser tcUser);
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.ruoyi.test.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Mapper
|
||||
@Component("TestVerifyMapper")
|
||||
public interface TestVerifyMapper {
|
||||
//检查姓名是否唯一
|
||||
int isNameUnique(String name);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.ruoyi.test.service;
|
||||
|
||||
import com.ruoyi.test.domain.SysCustomer;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 客户Service接口
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-02-13
|
||||
*/
|
||||
public interface ISysCustomerService
|
||||
{
|
||||
/**
|
||||
* 查询客户
|
||||
*
|
||||
* @param customerId 客户ID
|
||||
* @return 客户
|
||||
*/
|
||||
public SysCustomer selectSysCustomerById(Long customerId);
|
||||
|
||||
/**
|
||||
* 查询客户列表
|
||||
*
|
||||
* @param sysCustomer 客户
|
||||
* @return 客户集合
|
||||
*/
|
||||
public List<SysCustomer> selectSysCustomerList(SysCustomer sysCustomer);
|
||||
|
||||
/**
|
||||
* 新增客户
|
||||
*
|
||||
* @param sysCustomer 客户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysCustomer(SysCustomer sysCustomer);
|
||||
|
||||
/**
|
||||
* 修改客户
|
||||
*
|
||||
* @param sysCustomer 客户
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysCustomer(SysCustomer sysCustomer);
|
||||
|
||||
/**
|
||||
* 批量删除客户
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysCustomerByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除客户信息
|
||||
*
|
||||
* @param customerId 客户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysCustomerById(Long customerId);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.ruoyi.test.service;
|
||||
|
||||
import com.ruoyi.test.domain.SysFileInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文件信息Service接口
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-06
|
||||
*/
|
||||
public interface ISysFileInfoService
|
||||
{
|
||||
/**
|
||||
* 查询文件信息
|
||||
*
|
||||
* @param fileId 文件信息ID
|
||||
* @return 文件信息
|
||||
*/
|
||||
public SysFileInfo selectSysFileInfoById(Long fileId);
|
||||
|
||||
/**
|
||||
* 查询文件信息列表
|
||||
*
|
||||
* @param sysFileInfo 文件信息
|
||||
* @return 文件信息集合
|
||||
*/
|
||||
public List<SysFileInfo> selectSysFileInfoList(SysFileInfo sysFileInfo);
|
||||
|
||||
/**
|
||||
* 新增文件信息
|
||||
*
|
||||
* @param sysFileInfo 文件信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysFileInfo(SysFileInfo sysFileInfo);
|
||||
|
||||
/**
|
||||
* 修改文件信息
|
||||
*
|
||||
* @param sysFileInfo 文件信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysFileInfo(SysFileInfo sysFileInfo);
|
||||
|
||||
/**
|
||||
* 批量删除文件信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysFileInfoByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除文件信息信息
|
||||
*
|
||||
* @param fileId 文件信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysFileInfoById(Long fileId);
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.ruoyi.test.service;
|
||||
|
||||
public interface OracleDdlService {
|
||||
//修改表名
|
||||
int alterTableName(String originalTableName, String newTableName);
|
||||
|
||||
// truncate指定数据库表的数据
|
||||
int truncateTable(String tableName);
|
||||
|
||||
//drop 指定定数据库表
|
||||
int dropTable(String tableName);
|
||||
|
||||
|
||||
//根据传入的表明,创建新的表并且将原表的数据插入到新的Occur表中
|
||||
void copyTable(String newTableName,String originalTableName);
|
||||
|
||||
//统计某张表中的总数据条数
|
||||
int getRecordCount(String tableName);
|
||||
|
||||
//从指定数据库中,查询是否存在某张表
|
||||
int isTableInDb(String dataBaseName, String tableName);
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.ruoyi.test.service;
|
||||
|
||||
import com.ruoyi.test.domain.TcUser;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TcUserService {
|
||||
//查询所有用户
|
||||
List<TcUser> selectAll();
|
||||
|
||||
//根据id查询用户信息
|
||||
TcUser selectById(int id);
|
||||
|
||||
//新增用户
|
||||
TcUser insert (TcUser tcUser);
|
||||
|
||||
// 根据id删除
|
||||
int deleteById (int id);
|
||||
|
||||
//更新用户信息
|
||||
int updateById(TcUser tcUser);
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.ruoyi.test.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class TestService {
|
||||
public String test(){
|
||||
return "hello,box-test.test";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.ruoyi.test.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public interface TestVerifyService {
|
||||
//检查姓名是否唯一
|
||||
int isNameUnique(String name);
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.ruoyi.test.service.impl;
|
||||
|
||||
import com.ruoyi.test.mapper.OracleDdlMapper;
|
||||
import com.ruoyi.test.service.OracleDdlService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
//@DataSource(value = DataSourceType.SLAVE)
|
||||
public class OracleDdlServiceImpl implements OracleDdlService {
|
||||
@Autowired
|
||||
private OracleDdlMapper oracleDdlMapper;
|
||||
|
||||
//修改表名
|
||||
public int alterTableName(String originalTableName, String newTableName)
|
||||
{
|
||||
return oracleDdlMapper.alterTableName(originalTableName,newTableName);
|
||||
}
|
||||
|
||||
// truncate指定数据库表的数据
|
||||
public int truncateTable(String tableName){
|
||||
return oracleDdlMapper.truncateTable(tableName);
|
||||
}
|
||||
|
||||
//drop 指定定数据库表
|
||||
public int dropTable(String tableName){
|
||||
return oracleDdlMapper.dropTable(tableName);
|
||||
}
|
||||
|
||||
|
||||
//根据传入的表明,创建新的表并且将原表的数据插入到新的Occur表中
|
||||
public void copyTable(String newTableName,String originalTableName){
|
||||
return ;
|
||||
}
|
||||
|
||||
//统计某张表中的总数据条数
|
||||
public int getRecordCount(String tableName){
|
||||
return oracleDdlMapper.getRecordCount(tableName);
|
||||
}
|
||||
|
||||
//从指定数据库中,查询是否存在某张表
|
||||
public int isTableInDb(String dataBaseName, String tableName){
|
||||
return oracleDdlMapper.isTableInDb(dataBaseName,tableName);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
package com.ruoyi.test.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.test.domain.SysCustomer;
|
||||
import com.ruoyi.test.domain.SysGoods;
|
||||
import com.ruoyi.test.mapper.SysCustomerMapper;
|
||||
import com.ruoyi.test.service.ISysCustomerService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 客户Service业务层处理
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-02-13
|
||||
*/
|
||||
@Service
|
||||
public class SysCustomerServiceImpl implements ISysCustomerService
|
||||
{
|
||||
@Autowired
|
||||
private SysCustomerMapper sysCustomerMapper;
|
||||
|
||||
/**
|
||||
* 查询客户
|
||||
*
|
||||
* @param customerId 客户ID
|
||||
* @return 客户
|
||||
*/
|
||||
@Override
|
||||
public SysCustomer selectSysCustomerById(Long customerId)
|
||||
{
|
||||
return sysCustomerMapper.selectSysCustomerById(customerId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询客户列表
|
||||
*
|
||||
* @param sysCustomer 客户
|
||||
* @return 客户
|
||||
*/
|
||||
@Override
|
||||
public List<SysCustomer> selectSysCustomerList(SysCustomer sysCustomer)
|
||||
{
|
||||
return sysCustomerMapper.selectSysCustomerList(sysCustomer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增客户
|
||||
*
|
||||
* @param sysCustomer 客户
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int insertSysCustomer(SysCustomer sysCustomer)
|
||||
{
|
||||
int rows = sysCustomerMapper.insertSysCustomer(sysCustomer);
|
||||
insertSysGoods(sysCustomer);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户
|
||||
*
|
||||
* @param sysCustomer 客户
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int updateSysCustomer(SysCustomer sysCustomer)
|
||||
{
|
||||
sysCustomerMapper.deleteSysGoodsByCustomerId(sysCustomer.getCustomerId());
|
||||
insertSysGoods(sysCustomer);
|
||||
return sysCustomerMapper.updateSysCustomer(sysCustomer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteSysCustomerByIds(String ids)
|
||||
{
|
||||
sysCustomerMapper.deleteSysGoodsByCustomerIds(Convert.toStrArray(ids));
|
||||
return sysCustomerMapper.deleteSysCustomerByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户信息
|
||||
*
|
||||
* @param customerId 客户ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysCustomerById(Long customerId)
|
||||
{
|
||||
sysCustomerMapper.deleteSysGoodsByCustomerId(customerId);
|
||||
return sysCustomerMapper.deleteSysCustomerById(customerId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品信息
|
||||
*
|
||||
* @param sysCustomer 客户对象
|
||||
*/
|
||||
public void insertSysGoods(SysCustomer sysCustomer)
|
||||
{
|
||||
List<SysGoods> sysGoodsList = sysCustomer.getSysGoodsList();
|
||||
Long customerId = sysCustomer.getCustomerId();
|
||||
if (StringUtils.isNotNull(sysGoodsList))
|
||||
{
|
||||
List<SysGoods> list = new ArrayList<SysGoods>();
|
||||
for (SysGoods sysGoods : sysGoodsList)
|
||||
{
|
||||
sysGoods.setCustomerId(customerId);
|
||||
list.add(sysGoods);
|
||||
}
|
||||
if (list.size() > 0)
|
||||
{
|
||||
sysCustomerMapper.batchSysGoods(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
package com.ruoyi.test.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.test.domain.SysFileInfo;
|
||||
import com.ruoyi.test.mapper.SysFileInfoMapper;
|
||||
import com.ruoyi.test.service.ISysFileInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文件信息Service业务层处理
|
||||
*
|
||||
* @author box
|
||||
* @date 2021-05-06
|
||||
*/
|
||||
@Service
|
||||
public class SysFileInfoServiceImpl implements ISysFileInfoService
|
||||
{
|
||||
@Autowired
|
||||
private SysFileInfoMapper sysFileInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询文件信息
|
||||
*
|
||||
* @param fileId 文件信息ID
|
||||
* @return 文件信息
|
||||
*/
|
||||
@Override
|
||||
public SysFileInfo selectSysFileInfoById(Long fileId)
|
||||
{
|
||||
return sysFileInfoMapper.selectSysFileInfoById(fileId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文件信息列表
|
||||
*
|
||||
* @param sysFileInfo 文件信息
|
||||
* @return 文件信息
|
||||
*/
|
||||
@Override
|
||||
public List<SysFileInfo> selectSysFileInfoList(SysFileInfo sysFileInfo)
|
||||
{
|
||||
return sysFileInfoMapper.selectSysFileInfoList(sysFileInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增文件信息
|
||||
*
|
||||
* @param sysFileInfo 文件信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysFileInfo(SysFileInfo sysFileInfo)
|
||||
{
|
||||
return sysFileInfoMapper.insertSysFileInfo(sysFileInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改文件信息
|
||||
*
|
||||
* @param sysFileInfo 文件信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysFileInfo(SysFileInfo sysFileInfo)
|
||||
{
|
||||
return sysFileInfoMapper.updateSysFileInfo(sysFileInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文件信息对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysFileInfoByIds(String ids)
|
||||
{
|
||||
return sysFileInfoMapper.deleteSysFileInfoByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文件信息信息
|
||||
*
|
||||
* @param fileId 文件信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysFileInfoById(Long fileId)
|
||||
{
|
||||
return sysFileInfoMapper.deleteSysFileInfoById(fileId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.ruoyi.test.service.impl;
|
||||
|
||||
import com.ruoyi.common.annotation.DataSource;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
import com.ruoyi.test.domain.TcUser;
|
||||
import com.ruoyi.test.mapper.TcUserMapper;
|
||||
import com.ruoyi.test.service.TcUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@DataSource(value = DataSourceType.SQLSVR)
|
||||
public class TcUserServiceImpl implements TcUserService {
|
||||
@Autowired
|
||||
private TcUserMapper tcUserMapper;
|
||||
|
||||
//查询所有用户
|
||||
@Override
|
||||
public List<TcUser> selectAll() {
|
||||
return tcUserMapper.selectAll();
|
||||
}
|
||||
|
||||
//查询 by id
|
||||
@Override
|
||||
public TcUser selectById(int id) {
|
||||
return tcUserMapper.selectById(id);
|
||||
}
|
||||
|
||||
//新增
|
||||
@Override
|
||||
public TcUser insert(TcUser tcUser) {
|
||||
int user=tcUserMapper.insert(tcUser);
|
||||
return tcUser;
|
||||
}
|
||||
|
||||
//删除by id
|
||||
@Override
|
||||
public int deleteById(int id) {
|
||||
return tcUserMapper.deleteById(id);
|
||||
}
|
||||
//更新 by id
|
||||
@Override
|
||||
public int updateById(TcUser tcUser) {
|
||||
return tcUserMapper.updateById(tcUser);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.ruoyi.test.service.impl;
|
||||
|
||||
import com.ruoyi.common.annotation.DataSource;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
import com.ruoyi.test.mapper.TestVerifyMapper;
|
||||
import com.ruoyi.test.service.TestVerifyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@DataSource(value = DataSourceType.SQLSVR)
|
||||
public class TestVerifyServiceImpl implements TestVerifyService {
|
||||
@Autowired
|
||||
private TestVerifyMapper testVerifyMapper;
|
||||
@Override
|
||||
public int isNameUnique(String name) {
|
||||
return testVerifyMapper.isNameUnique(name);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<?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="com.ruoyi.test.mapper.OracleDdlMapper">
|
||||
|
||||
<update id="alterTableName">
|
||||
alter table ${originalTableName} rename ${newTableName}
|
||||
</update>
|
||||
|
||||
<update id="truncateTable">
|
||||
truncate table ${tableName}
|
||||
</update>
|
||||
|
||||
<update id="dropTable">
|
||||
drop table ${tableName}
|
||||
</update>
|
||||
|
||||
<update id="copyTable">
|
||||
create table ${newTableName} as select * from ${originalTableName}
|
||||
</update>
|
||||
|
||||
<select id="getRecordCount" resultType="int">
|
||||
select count(1) from ${tableName}
|
||||
</select>
|
||||
|
||||
<select id="isTableInDb" resultType="int">
|
||||
SELECT COUNT(*) FROM ALL_TABLES WHERE OWNER = UPPER(#{dataBaseName}) AND TABLE_NAME = UPPER(#{tableName})
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue