路线管理列表
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
package com.mhd.wms.interfaces.assember.copyCodeReference;
|
||||
|
||||
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.todo.CopyCodeReferenceDO;
|
||||
import com.mhd.wms.domain.lineManagement.repository.todo.LineManagementDO;
|
||||
import com.mhd.wms.interfaces.dto.LineManagement.LineManagementDTO;
|
||||
import com.mhd.wms.interfaces.dto.copyCodeReference.CopyCodeReferenceDTO;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class LineManagementAssembler {
|
||||
|
||||
public LineManagementDO toDO(LineManagementDTO lineManagementDTO){
|
||||
if(lineManagementDTO == null){
|
||||
return null;
|
||||
}
|
||||
LineManagementDO lineManagementDO = new LineManagementDO();
|
||||
BeanUtils.copyProperties(lineManagementDTO,lineManagementDO);
|
||||
return lineManagementDO;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.mhd.wms.interfaces.dto.LineManagement;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 线路管理对象 container
|
||||
*
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class LineManagementDTO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("仓库ID")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库名字")
|
||||
private String warehouseName;
|
||||
|
||||
/**
|
||||
* 路线编码
|
||||
*/
|
||||
@ApiModelProperty("路线编码")
|
||||
private String routeCode;
|
||||
|
||||
/**
|
||||
* 路线名称
|
||||
*/
|
||||
@ApiModelProperty("路线名称")
|
||||
private String routeName;
|
||||
|
||||
/**
|
||||
* 客户
|
||||
*/
|
||||
@ApiModelProperty("客户Json数据")
|
||||
private String customerJson;
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
package com.mhd.wms.interfaces.facadeApi.lineManagement;
|
||||
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.wms.domain.lineManagement.repository.facade.ILineManagementService;
|
||||
import com.mhd.wms.domain.lineManagement.repository.po.LineManagementPO;
|
||||
import com.mhd.wms.domain.lineManagement.repository.todo.LineManagementDO;
|
||||
import com.mhd.wms.interfaces.assember.copyCodeReference.LineManagementAssembler;
|
||||
import com.mhd.wms.interfaces.dto.LineManagement.LineManagementDTO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 路线管理Api
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/lineManagementApi")
|
||||
public class LineManagementApi extends BaseController{
|
||||
|
||||
@Autowired
|
||||
private ILineManagementService lineManagementService;
|
||||
|
||||
@Resource
|
||||
private LineManagementAssembler lineManagementAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询路线管理列表
|
||||
*/
|
||||
@ApiOperation("查询路线管理列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(LineManagementDTO lineManagementDTO)
|
||||
{
|
||||
//转换实体
|
||||
LineManagementDO lineManagementDO = lineManagementAssembler.toDO(lineManagementDTO);
|
||||
startPage();
|
||||
List<LineManagementPO> list = lineManagementService.queryList(lineManagementDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询路线管理列表
|
||||
*/
|
||||
@ApiOperation("查询路线管理列表")
|
||||
@GetMapping("/listByApp")
|
||||
public AjaxResult listByApp(LineManagementDTO lineManagementDTO)
|
||||
{
|
||||
//转换实体
|
||||
LineManagementDO lineManagementDO = lineManagementAssembler.toDO(lineManagementDTO);
|
||||
List<LineManagementPO> list = lineManagementService.queryList(lineManagementDO);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑路线管理
|
||||
*/
|
||||
@ApiOperation("编辑路线管理")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody LineManagementDTO lineManagementDTO)
|
||||
{
|
||||
//转换实体
|
||||
LineManagementDO lineManagementDO = lineManagementAssembler.toDO(lineManagementDTO);
|
||||
if(lineManagementDTO.getId() != null){
|
||||
return toAjax(lineManagementService.update(lineManagementDO));
|
||||
}else {
|
||||
return toAjax(lineManagementService.insert(lineManagementDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除路线管理
|
||||
*/
|
||||
@ApiOperation("批量删除路线管理")
|
||||
@DeleteMapping("/deleteByIds/{leaseIds}")
|
||||
public AjaxResult delete(@PathVariable Long[] leaseIds)
|
||||
{
|
||||
return toAjax(lineManagementService.delete(leaseIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取路线管理详细信息
|
||||
*/
|
||||
@ApiOperation("获取路线管理")
|
||||
@GetMapping(value = "/getInfo/{leaseId}")
|
||||
public AjaxResult getInfo(@PathVariable("leaseId") Long leaseId)
|
||||
{
|
||||
return AjaxResult.success(lineManagementService.getInfo(leaseId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user