物流处理 完成了顺丰api对接
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
package com.ruoyi.oa.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.oa.domain.vo.OaExpressVo;
|
||||
import com.ruoyi.oa.domain.bo.OaExpressBo;
|
||||
import com.ruoyi.oa.service.IOaExpressService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 物流预览
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-07-20
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/oa/express")
|
||||
public class OaExpressController extends BaseController {
|
||||
|
||||
private final IOaExpressService iOaExpressService;
|
||||
|
||||
/**
|
||||
* 查询物流预览列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<OaExpressVo> list(OaExpressBo bo, PageQuery pageQuery) {
|
||||
return iOaExpressService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出物流预览列表
|
||||
*/
|
||||
@Log(title = "物流预览", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(OaExpressBo bo, HttpServletResponse response) {
|
||||
List<OaExpressVo> list = iOaExpressService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "物流预览", OaExpressVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物流预览详细信息
|
||||
*
|
||||
* @param expressId 主键
|
||||
*/
|
||||
@GetMapping("/{expressId}")
|
||||
public R<OaExpressVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long expressId) {
|
||||
return R.ok(iOaExpressService.queryById(expressId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物流预览
|
||||
*/
|
||||
@Log(title = "物流预览", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody OaExpressBo bo) {
|
||||
return toAjax(iOaExpressService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物流预览
|
||||
*/
|
||||
@Log(title = "物流预览", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OaExpressBo bo) {
|
||||
return toAjax(iOaExpressService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除物流预览
|
||||
*
|
||||
* @param expressIds 主键串
|
||||
*/
|
||||
@Log(title = "物流预览", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{expressIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] expressIds) {
|
||||
return toAjax(iOaExpressService.deleteWithValidByIds(Arrays.asList(expressIds), true));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/refresh/{expressIds}")
|
||||
public R<Void> getRefreshExpress(@PathVariable Long[] expressIds) {
|
||||
return toAjax(iOaExpressService.getRefreshExpress(Arrays.asList(expressIds)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.ruoyi.oa.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.oa.domain.vo.OaExpressQuestionVo;
|
||||
import com.ruoyi.oa.domain.bo.OaExpressQuestionBo;
|
||||
import com.ruoyi.oa.service.IOaExpressQuestionService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 快递问题
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-07-21
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/oa/expressQuestion")
|
||||
public class OaExpressQuestionController extends BaseController {
|
||||
|
||||
private final IOaExpressQuestionService iOaExpressQuestionService;
|
||||
|
||||
/**
|
||||
* 查询快递问题列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<OaExpressQuestionVo> list(OaExpressQuestionBo bo, PageQuery pageQuery) {
|
||||
return iOaExpressQuestionService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出快递问题列表
|
||||
*/
|
||||
@Log(title = "快递问题", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(OaExpressQuestionBo bo, HttpServletResponse response) {
|
||||
List<OaExpressQuestionVo> list = iOaExpressQuestionService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "快递问题", OaExpressQuestionVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取快递问题详细信息
|
||||
*
|
||||
* @param questionId 主键
|
||||
*/
|
||||
@GetMapping("/{questionId}")
|
||||
public R<OaExpressQuestionVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long questionId) {
|
||||
return R.ok(iOaExpressQuestionService.queryById(questionId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增快递问题
|
||||
*/
|
||||
@Log(title = "快递问题", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody OaExpressQuestionBo bo) {
|
||||
return toAjax(iOaExpressQuestionService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改快递问题
|
||||
*/
|
||||
@Log(title = "快递问题", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OaExpressQuestionBo bo) {
|
||||
return toAjax(iOaExpressQuestionService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除快递问题
|
||||
*
|
||||
* @param questionIds 主键串
|
||||
*/
|
||||
@Log(title = "快递问题", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{questionIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] questionIds) {
|
||||
return toAjax(iOaExpressQuestionService.deleteWithValidByIds(Arrays.asList(questionIds), true));
|
||||
}
|
||||
}
|
||||
@@ -67,6 +67,16 @@ public class OaReportDetailController extends BaseController {
|
||||
@PathVariable Long id) {
|
||||
return R.ok(iOaReportDetailService.queryById(id));
|
||||
}
|
||||
/**
|
||||
* 获取设计项目汇报详情详细信息
|
||||
*
|
||||
* @param projectId 主键
|
||||
*/
|
||||
@GetMapping("/project/{projectId}")
|
||||
public R<List<OaReportDetailVo>> listReportDetailByProjectId(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
return R.ok(iOaReportDetailService.queryByProjectId(projectId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设计项目汇报详情
|
||||
|
||||
Reference in New Issue
Block a user