路线管理列表
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
package com.mhd.wms.domain.lineManagement.entity;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 路线管理对象
|
||||
*
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class LineManagement 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;
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.mhd.wms.domain.lineManagement.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.wms.domain.lineManagement.entity.LineManagement;
|
||||
import com.mhd.wms.domain.lineManagement.repository.po.LineManagementPO;
|
||||
import com.mhd.wms.domain.lineManagement.repository.todo.LineManagementDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 路线管理Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
public interface ILineManagementService extends IService<LineManagement>
|
||||
{
|
||||
/**
|
||||
* 分页查询路线管理列表
|
||||
*/
|
||||
public List<LineManagementPO> queryList(LineManagementDO lineManagementDO);
|
||||
|
||||
/**
|
||||
* 新增路线管理
|
||||
*/
|
||||
public Boolean insert(LineManagementDO lineManagementDO);
|
||||
|
||||
public LineManagement insertReturn(LineManagementDO lineManagementDO);
|
||||
|
||||
/**
|
||||
* 修改路线管理
|
||||
*/
|
||||
public Boolean update(LineManagementDO lineManagementDO);
|
||||
|
||||
/**
|
||||
* 批量删除路线管理
|
||||
*/
|
||||
public Boolean delete(Long[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 查询路线管理
|
||||
*/
|
||||
public LineManagementPO getInfo(Long id);
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.mhd.wms.domain.lineManagement.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.lineManagement.entity.LineManagement;
|
||||
import com.mhd.wms.domain.lineManagement.repository.po.LineManagementPO;
|
||||
import com.mhd.wms.domain.lineManagement.repository.todo.LineManagementDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 路线管理Mapper接口
|
||||
*
|
||||
*/
|
||||
public interface LineManagementMapper extends BaseMapper<LineManagement>
|
||||
{
|
||||
/**
|
||||
* 查询路线管理列表
|
||||
*/
|
||||
public List<LineManagementPO> queryList(LineManagementDO lineManagementDO);
|
||||
|
||||
}
|
||||
+149
@@ -0,0 +1,149 @@
|
||||
package com.mhd.wms.domain.lineManagement.repository.persistence;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.nacos.shaded.com.google.gson.JsonObject;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.UserServiceFeign;
|
||||
import com.mhd.system.api.domain.UserDTO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.wms.domain.lineManagement.entity.LineManagement;
|
||||
import com.mhd.wms.domain.lineManagement.repository.facade.ILineManagementService;
|
||||
import com.mhd.wms.domain.lineManagement.repository.mapper.LineManagementMapper;
|
||||
import com.mhd.wms.domain.lineManagement.repository.po.LineManagementPO;
|
||||
import com.mhd.wms.domain.lineManagement.repository.todo.LineManagementCustomer;
|
||||
import com.mhd.wms.domain.lineManagement.repository.todo.LineManagementDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
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.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 路线管理Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@Service
|
||||
public class LineManagementImpl extends ServiceImpl<LineManagementMapper, LineManagement> implements ILineManagementService {
|
||||
@Autowired
|
||||
private LineManagementMapper lineManagementMapper;
|
||||
@Autowired
|
||||
private UserServiceFeign userServiceFeign;
|
||||
|
||||
/**
|
||||
* 查询路线管理列表
|
||||
*/
|
||||
@Override
|
||||
public List<LineManagementPO> queryList(LineManagementDO lineManagementDO)
|
||||
{
|
||||
return lineManagementMapper.queryList(lineManagementDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增路线管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(LineManagementDO lineManagementDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
LineManagement LineManagement = new LineManagement();
|
||||
BeanUtils.copyProperties(lineManagementDO,LineManagement);
|
||||
boolean save = this.save(LineManagement);
|
||||
//客户列表补充id
|
||||
List<LineManagementCustomer> lineManagementCustomers =
|
||||
JSONObject.parseArray(lineManagementDO.getCustomerJson(), LineManagementCustomer.class);
|
||||
for (LineManagementCustomer lineManagementCustomer : lineManagementCustomers) {
|
||||
UserDTO userDTO = new UserDTO();
|
||||
userDTO.setUserId(lineManagementCustomer.getUserId());
|
||||
userDTO.setDeliveryOrder(lineManagementCustomer.getDeliveryOrder());
|
||||
userDTO.setLineManagementId(LineManagement.getId().toString());
|
||||
userDTO.setRouteCode(lineManagementDO.getRouteCode());
|
||||
userDTO.setRouteName(lineManagementDO.getRouteName());
|
||||
userServiceFeign.updateLineManagement(userDTO);
|
||||
}
|
||||
return save;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LineManagement insertReturn(LineManagementDO lineManagementDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
LineManagement lineManagement = new LineManagement();
|
||||
BeanUtils.copyProperties(lineManagementDO,lineManagement);
|
||||
boolean save = this.save(lineManagement);
|
||||
if (save) {
|
||||
return lineManagement;
|
||||
}
|
||||
return lineManagement;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改路线管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(LineManagementDO lineManagementDO) {
|
||||
LineManagement lineManagement = new LineManagement();
|
||||
BeanUtils.copyProperties(lineManagementDO,lineManagement);
|
||||
LineManagement lineManagementDB = this.getById(lineManagement.getId());
|
||||
//删除用户
|
||||
List<LineManagementCustomer> lineManagementCustomers =
|
||||
JSONObject.parseArray(lineManagementDB.getCustomerJson(), LineManagementCustomer.class);
|
||||
for (LineManagementCustomer lineManagementCustomer : lineManagementCustomers) {
|
||||
UserDTO userDTO = new UserDTO();
|
||||
userDTO.setUserId(lineManagementCustomer.getUserId());
|
||||
userDTO.setDeliveryOrder("");
|
||||
userDTO.setLineManagementId("");
|
||||
userDTO.setRouteCode("");
|
||||
userDTO.setRouteName("");
|
||||
userServiceFeign.updateLineManagement(userDTO);
|
||||
}
|
||||
List<LineManagementCustomer> lineManagementCustomers2 =
|
||||
JSONObject.parseArray(lineManagementDO.getCustomerJson(), LineManagementCustomer.class);
|
||||
for (LineManagementCustomer lineManagementCustomer : lineManagementCustomers) {
|
||||
UserDTO userDTO = new UserDTO();
|
||||
userDTO.setUserId(lineManagementCustomer.getUserId());
|
||||
userDTO.setDeliveryOrder(lineManagementCustomer.getDeliveryOrder());
|
||||
userDTO.setLineManagementId(lineManagement.getId().toString());
|
||||
userDTO.setRouteCode(lineManagementDO.getRouteCode());
|
||||
userDTO.setRouteName(lineManagementDO.getRouteName());
|
||||
userServiceFeign.updateLineManagement(userDTO);
|
||||
}
|
||||
return this.updateById(lineManagement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除路线管理
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean delete(Long[] lineManagementIds ) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
List<LineManagement> list = new ArrayList<>();
|
||||
for (Long id : lineManagementIds) {
|
||||
LineManagement lineManagement = new LineManagement();
|
||||
lineManagement.setId(id);
|
||||
lineManagement.setDelFlag(2);
|
||||
lineManagement.setUpdateBy(loginUser.getUserid());
|
||||
lineManagement.setUpdateByName(loginUser.getUsername());
|
||||
lineManagement.setUpdateTime(new Date());
|
||||
list.add(lineManagement);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改路线管理
|
||||
*/
|
||||
@Override
|
||||
public LineManagementPO getInfo(Long lineManagementId) {
|
||||
LineManagement LineManagement = this.getById(lineManagementId);
|
||||
LineManagementPO lineManagementPO = new LineManagementPO();
|
||||
BeanUtils.copyProperties(LineManagement,lineManagementPO);
|
||||
return lineManagementPO;
|
||||
}
|
||||
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package com.mhd.wms.domain.lineManagement.repository.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 路线管理对象
|
||||
*
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class LineManagementPO 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;
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.mhd.wms.domain.lineManagement.repository.todo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 路线管理对象
|
||||
*
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class LineManagementCustomer {
|
||||
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 客户编码
|
||||
*/
|
||||
@ApiModelProperty("客户编码")
|
||||
private String customerCode;
|
||||
|
||||
/**
|
||||
* 客户名称
|
||||
*/
|
||||
@ApiModelProperty("客户名称")
|
||||
private String customerName;
|
||||
|
||||
/**
|
||||
* 配送顺序
|
||||
*/
|
||||
@ApiModelProperty("配送顺序")
|
||||
private String deliveryOrder;
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package com.mhd.wms.domain.lineManagement.repository.todo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 路线管理对象
|
||||
*
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class LineManagementDO 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;
|
||||
}
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
package com.mhd.wms.domain.lineManagement.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.wms.domain.lineManagement.entity.LineManagement;
|
||||
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 lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 租赁管理
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class LineManagementDomainService {
|
||||
|
||||
@Autowired
|
||||
private ILineManagementService lineManagementService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询租赁管理列表
|
||||
*/
|
||||
public List<LineManagementPO> queryList(LineManagementDO lineManagementDO) {
|
||||
return lineManagementService.queryList(lineManagementDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增租赁管理
|
||||
*/
|
||||
public Boolean insert(LineManagementDO lineManagementDO) {
|
||||
|
||||
return lineManagementService.insert(lineManagementDO);
|
||||
}
|
||||
|
||||
public LineManagement insertReturn(LineManagementDO lineManagementDO) {
|
||||
|
||||
return lineManagementService.insertReturn(lineManagementDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改租赁管理
|
||||
*/
|
||||
public Boolean update(LineManagementDO lineManagementDO) {
|
||||
return lineManagementService.update(lineManagementDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除租赁管理
|
||||
*/
|
||||
public Boolean delete(Long[] leaseIds) {
|
||||
return lineManagementService.delete(leaseIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取租赁管理详细信息
|
||||
*/
|
||||
public LineManagementPO getInfo(Long leaseId)
|
||||
{
|
||||
return lineManagementService.getInfo(leaseId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 批量作废租赁
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/13 9:46
|
||||
* @param leaseIds
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean nullifyByIds(List<Long> leaseIds) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
return lineManagementService.update(new UpdateWrapper<LineManagement>().lambda()
|
||||
.set(LineManagement::getUpdateBy, loginUser.getUserid())
|
||||
.set(LineManagement::getUpdateTime, new Date())
|
||||
.in(LineManagement::getId, leaseIds)
|
||||
.eq(LineManagement::getDelFlag, 1));
|
||||
}
|
||||
}
|
||||
@@ -97,13 +97,4 @@ public class ReviewOrderPO extends BaseVOEntity {
|
||||
/** 详情与上架单一致:头字段扁平 + 明细列表 */
|
||||
@ApiModelProperty("复核明细")
|
||||
private List<ReviewMaterialDetailPO> materialDetailList;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
private String shipperId;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("货主名字")
|
||||
private String shipperName;
|
||||
}
|
||||
|
||||
+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