- 将表名从"oa_"前缀改为"wms_"前缀 - 更新相关控制器的@RequestMapping路径 - 移除WmsReportSummaryMapper.xml中的projectId查询条件 - 注释掉rxgood页面的"涉及项目"列
101 lines
3.3 KiB
Java
101 lines
3.3 KiB
Java
package com.klp.controller;
|
|
|
|
import com.klp.common.annotation.Log;
|
|
import com.klp.common.annotation.RepeatSubmit;
|
|
import com.klp.common.core.controller.BaseController;
|
|
import com.klp.common.core.domain.PageQuery;
|
|
import com.klp.common.core.domain.R;
|
|
import com.klp.common.core.page.TableDataInfo;
|
|
import com.klp.common.core.validate.AddGroup;
|
|
import com.klp.common.core.validate.EditGroup;
|
|
import com.klp.common.enums.BusinessType;
|
|
import com.klp.common.utils.poi.ExcelUtil;
|
|
import com.klp.domain.bo.WmsExpressQuestionBo;
|
|
import com.klp.domain.vo.WmsExpressQuestionVo;
|
|
import com.klp.service.IWmsExpressQuestionService;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.validation.constraints.NotEmpty;
|
|
import javax.validation.constraints.NotNull;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 快递问题
|
|
*
|
|
* @author hdka
|
|
* @date 2025-07-21
|
|
*/
|
|
@Validated
|
|
@RequiredArgsConstructor
|
|
@RestController
|
|
@RequestMapping("/wms/expressQuestion")
|
|
public class WmsExpressQuestionController extends BaseController {
|
|
|
|
private final IWmsExpressQuestionService IWmsExpressQuestionService;
|
|
|
|
/**
|
|
* 查询快递问题列表
|
|
*/
|
|
@GetMapping("/list")
|
|
public TableDataInfo<WmsExpressQuestionVo> list(WmsExpressQuestionBo bo, PageQuery pageQuery) {
|
|
return IWmsExpressQuestionService.queryPageList(bo, pageQuery);
|
|
}
|
|
|
|
/**
|
|
* 导出快递问题列表
|
|
*/
|
|
@Log(title = "快递问题", businessType = BusinessType.EXPORT)
|
|
@PostMapping("/export")
|
|
public void export(WmsExpressQuestionBo bo, HttpServletResponse response) {
|
|
List<WmsExpressQuestionVo> list = IWmsExpressQuestionService.queryList(bo);
|
|
ExcelUtil.exportExcel(list, "快递问题", WmsExpressQuestionVo.class, response);
|
|
}
|
|
|
|
/**
|
|
* 获取快递问题详细信息
|
|
*
|
|
* @param questionId 主键
|
|
*/
|
|
@GetMapping("/{questionId}")
|
|
public R<WmsExpressQuestionVo> getInfo(@NotNull(message = "主键不能为空")
|
|
@PathVariable Long questionId) {
|
|
return R.ok(IWmsExpressQuestionService.queryById(questionId));
|
|
}
|
|
|
|
/**
|
|
* 新增快递问题
|
|
*/
|
|
@Log(title = "快递问题", businessType = BusinessType.INSERT)
|
|
@RepeatSubmit()
|
|
@PostMapping()
|
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsExpressQuestionBo bo) {
|
|
return toAjax(IWmsExpressQuestionService.insertByBo(bo));
|
|
}
|
|
|
|
/**
|
|
* 修改快递问题
|
|
*/
|
|
@Log(title = "快递问题", businessType = BusinessType.UPDATE)
|
|
@RepeatSubmit()
|
|
@PutMapping()
|
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsExpressQuestionBo bo) {
|
|
return toAjax(IWmsExpressQuestionService.updateByBo(bo));
|
|
}
|
|
|
|
/**
|
|
* 删除快递问题
|
|
*
|
|
* @param questionIds 主键串
|
|
*/
|
|
@Log(title = "快递问题", businessType = BusinessType.DELETE)
|
|
@DeleteMapping("/{questionIds}")
|
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
|
@PathVariable Long[] questionIds) {
|
|
return toAjax(IWmsExpressQuestionService.deleteWithValidByIds(Arrays.asList(questionIds), true));
|
|
}
|
|
}
|