集成oms服务模块
This commit is contained in:
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.oms.interfaces.assembler.deliveryInfo;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.deliveryInfo.repository.todo.DeliveryInfoDO;
|
||||
import com.mhd.oms.interfaces.dto.deliveryInfo.DeliveryInfoDTO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 发货信息Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
@Component
|
||||
public class DeliveryInfoAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public DeliveryInfoDO toDO(DeliveryInfoDTO deliveryInfoDTO) {
|
||||
DeliveryInfoDO deliveryInfoDO = new DeliveryInfoDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(deliveryInfoDTO, deliveryInfoDO, IgnoreNullUtil.getNullPropertyNames(deliveryInfoDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(deliveryInfoDTO.getId() != null){
|
||||
if(userId != null){
|
||||
deliveryInfoDO.setUpdateBy(userId);
|
||||
}else {
|
||||
deliveryInfoDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
deliveryInfoDO.setUpdateByName(userName);
|
||||
deliveryInfoDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
deliveryInfoDO.setCreateBy(userId);
|
||||
deliveryInfoDO.setUpdateBy(userId);
|
||||
}else {
|
||||
deliveryInfoDO.setCreateBy(new Long("0"));
|
||||
deliveryInfoDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
deliveryInfoDO.setCreateByName(userName);
|
||||
deliveryInfoDO.setUpdateByName(userName);
|
||||
deliveryInfoDO.setCreateTime(new Date());
|
||||
deliveryInfoDO.setUpdateTime(new Date());
|
||||
deliveryInfoDO.setDelFlag(1);
|
||||
}
|
||||
return deliveryInfoDO;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.mhd.oms.interfaces.assembler.goods;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.goods.repository.todo.GoodsDO;
|
||||
import com.mhd.oms.interfaces.dto.goods.GoodsDTO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 商品信息Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
@Component
|
||||
public class GoodsAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public GoodsDO toDO(GoodsDTO goodsDTO) {
|
||||
GoodsDO goodsDO = new GoodsDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(goodsDTO, goodsDO, IgnoreNullUtil.getNullPropertyNames(goodsDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(goodsDTO.getId() != null){
|
||||
if(userId != null){
|
||||
goodsDO.setUpdateBy(userId);
|
||||
}else {
|
||||
goodsDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
goodsDO.setUpdateByName(userName);
|
||||
goodsDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
goodsDO.setCreateBy(userId);
|
||||
goodsDO.setUpdateBy(userId);
|
||||
}else {
|
||||
goodsDO.setCreateBy(new Long("0"));
|
||||
goodsDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
goodsDO.setCreateByName(userName);
|
||||
goodsDO.setUpdateByName(userName);
|
||||
goodsDO.setCreateTime(new Date());
|
||||
goodsDO.setUpdateTime(new Date());
|
||||
goodsDO.setDelFlag(1);
|
||||
}
|
||||
return goodsDO;
|
||||
}
|
||||
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.oms.interfaces.assembler.interceptOrder;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.interceptOrder.repository.todo.InterceptOrderDO;
|
||||
import com.mhd.oms.interfaces.dto.interceptOrder.InterceptOrderDTO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 拦截订单Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-30
|
||||
*/
|
||||
@Component
|
||||
public class InterceptOrderAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public InterceptOrderDO toDO(InterceptOrderDTO interceptOrderDTO) {
|
||||
InterceptOrderDO interceptOrderDO = new InterceptOrderDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(interceptOrderDTO, interceptOrderDO, IgnoreNullUtil.getNullPropertyNames(interceptOrderDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(interceptOrderDTO.getId() != null){
|
||||
if(userId != null){
|
||||
interceptOrderDO.setUpdateBy(userId);
|
||||
}else {
|
||||
interceptOrderDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
interceptOrderDO.setUpdateByName(userName);
|
||||
interceptOrderDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
interceptOrderDO.setCreateBy(userId);
|
||||
interceptOrderDO.setUpdateBy(userId);
|
||||
}else {
|
||||
interceptOrderDO.setCreateBy(new Long("0"));
|
||||
interceptOrderDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
interceptOrderDO.setCreateByName(userName);
|
||||
interceptOrderDO.setUpdateByName(userName);
|
||||
interceptOrderDO.setCreateTime(new Date());
|
||||
interceptOrderDO.setUpdateTime(new Date());
|
||||
interceptOrderDO.setDelFlag(1);
|
||||
}
|
||||
return interceptOrderDO;
|
||||
}
|
||||
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.oms.interfaces.assembler.logistics;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.logistics.repository.todo.LogisticsDO;
|
||||
import com.mhd.oms.interfaces.dto.logistics.LogisticsDTO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 物流信息Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
@Component
|
||||
public class LogisticsAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public LogisticsDO toDO(LogisticsDTO logisticsDTO) {
|
||||
LogisticsDO logisticsDO = new LogisticsDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(logisticsDTO, logisticsDO, IgnoreNullUtil.getNullPropertyNames(logisticsDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(logisticsDTO.getId() != null){
|
||||
if(userId != null){
|
||||
logisticsDO.setUpdateBy(userId);
|
||||
}else {
|
||||
logisticsDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
logisticsDO.setUpdateByName(userName);
|
||||
logisticsDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
logisticsDO.setCreateBy(userId);
|
||||
logisticsDO.setUpdateBy(userId);
|
||||
}else {
|
||||
logisticsDO.setCreateBy(new Long("0"));
|
||||
logisticsDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
logisticsDO.setCreateByName(userName);
|
||||
logisticsDO.setUpdateByName(userName);
|
||||
logisticsDO.setCreateTime(new Date());
|
||||
logisticsDO.setUpdateTime(new Date());
|
||||
logisticsDO.setDelFlag(1);
|
||||
}
|
||||
return logisticsDO;
|
||||
}
|
||||
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.oms.interfaces.assembler.orderType;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.orderType.repository.todo.OrderTypeDO;
|
||||
import com.mhd.oms.interfaces.dto.orderType.OrderTypeDTO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 订单类型关系Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-15
|
||||
*/
|
||||
@Component
|
||||
public class OrderTypeAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public OrderTypeDO toDO(OrderTypeDTO orderTypeDTO) {
|
||||
OrderTypeDO orderTypeDO = new OrderTypeDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(orderTypeDTO, orderTypeDO, IgnoreNullUtil.getNullPropertyNames(orderTypeDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(orderTypeDTO.getId() != null){
|
||||
if(userId != null){
|
||||
orderTypeDO.setUpdateBy(userId);
|
||||
}else {
|
||||
orderTypeDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
orderTypeDO.setUpdateByName(userName);
|
||||
orderTypeDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
orderTypeDO.setCreateBy(userId);
|
||||
orderTypeDO.setUpdateBy(userId);
|
||||
}else {
|
||||
orderTypeDO.setCreateBy(new Long("0"));
|
||||
orderTypeDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
orderTypeDO.setCreateByName(userName);
|
||||
orderTypeDO.setUpdateByName(userName);
|
||||
orderTypeDO.setCreateTime(new Date());
|
||||
orderTypeDO.setUpdateTime(new Date());
|
||||
orderTypeDO.setDelFlag(1);
|
||||
}
|
||||
return orderTypeDO;
|
||||
}
|
||||
|
||||
}
|
||||
+230
@@ -0,0 +1,230 @@
|
||||
package com.mhd.oms.interfaces.assembler.purchaseOrder;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.deliveryInfo.repository.todo.DeliveryInfoDO;
|
||||
import com.mhd.oms.domain.goods.repository.todo.GoodsDO;
|
||||
import com.mhd.oms.domain.logistics.repository.todo.LogisticsDO;
|
||||
import com.mhd.oms.domain.purchaseOrder.repository.todo.PurchaseOrderAddDO;
|
||||
import com.mhd.oms.domain.purchaseOrder.repository.todo.PurchaseOrderAuditDO;
|
||||
import com.mhd.oms.domain.purchaseOrder.repository.todo.PurchaseOrderDO;
|
||||
import com.mhd.oms.domain.receiptInfo.repository.todo.ReceiptInfoDO;
|
||||
import com.mhd.oms.domain.settlement.repository.todo.SettlementDO;
|
||||
import com.mhd.oms.interfaces.dto.deliveryInfo.DeliveryInfoDTO;
|
||||
import com.mhd.oms.interfaces.dto.goods.GoodsDTO;
|
||||
import com.mhd.oms.interfaces.dto.logistics.LogisticsDTO;
|
||||
import com.mhd.oms.interfaces.dto.purchaseOrder.PurchaseOrderAddDTO;
|
||||
import com.mhd.oms.interfaces.dto.purchaseOrder.PurchaseOrderAuditDTO;
|
||||
import com.mhd.oms.interfaces.dto.purchaseOrder.PurchaseOrderDTO;
|
||||
import com.mhd.oms.interfaces.dto.receiptInfo.ReceiptInfoDTO;
|
||||
import com.mhd.oms.interfaces.dto.settlement.SettlementDTO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 采购订单管理Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
@Component
|
||||
public class PurchaseOrderAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public PurchaseOrderDO toDO(PurchaseOrderDTO purchaseOrderDTO) {
|
||||
PurchaseOrderDO purchaseOrderDO = new PurchaseOrderDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(purchaseOrderDTO, purchaseOrderDO, IgnoreNullUtil.getNullPropertyNames(purchaseOrderDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(purchaseOrderDTO.getId() != null){
|
||||
if(userId != null){
|
||||
purchaseOrderDO.setUpdateBy(userId);
|
||||
}else {
|
||||
purchaseOrderDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
purchaseOrderDO.setUpdateByName(userName);
|
||||
purchaseOrderDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
purchaseOrderDO.setCreateBy(userId);
|
||||
purchaseOrderDO.setUpdateBy(userId);
|
||||
}else {
|
||||
purchaseOrderDO.setCreateBy(new Long("0"));
|
||||
purchaseOrderDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
purchaseOrderDO.setCreateByName(userName);
|
||||
purchaseOrderDO.setUpdateByName(userName);
|
||||
purchaseOrderDO.setCreateTime(new Date());
|
||||
purchaseOrderDO.setUpdateTime(new Date());
|
||||
purchaseOrderDO.setDelFlag(1);
|
||||
}
|
||||
return purchaseOrderDO;
|
||||
}
|
||||
|
||||
public PurchaseOrderAddDO toOrderDo(PurchaseOrderAddDTO purchaseOrderAddDTO) {
|
||||
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
// 获取登陆人姓名
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
|
||||
PurchaseOrderAddDO purchaseOrderAddDO = new PurchaseOrderAddDO();
|
||||
/**采购订单基本信息处理**/
|
||||
PurchaseOrderDO purchaseOrderDO = new PurchaseOrderDO();
|
||||
PurchaseOrderDTO purchaseOrderDTO = purchaseOrderAddDTO.getPurchaseOrderDTO();
|
||||
BeanUtils.copyProperties(purchaseOrderDTO, purchaseOrderDO, IgnoreNullUtil.getNullPropertyNames(purchaseOrderDTO));
|
||||
if(purchaseOrderDTO.getId() != null){
|
||||
purchaseOrderDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
purchaseOrderDO.setUpdateByName(userName);
|
||||
purchaseOrderDO.setUpdateTime(new Date());
|
||||
} else {
|
||||
purchaseOrderDO.setCreateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
purchaseOrderDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
purchaseOrderDO.setCreateByName(userName);
|
||||
purchaseOrderDO.setUpdateByName(userName);
|
||||
purchaseOrderDO.setCreateTime(new Date());
|
||||
purchaseOrderDO.setUpdateTime(new Date());
|
||||
purchaseOrderDO.setDelFlag(1);
|
||||
}
|
||||
purchaseOrderAddDO.setPurchaseOrderDo(purchaseOrderDO);
|
||||
/**采购订单基本信息处理**/
|
||||
/**采购订单结算信息处理**/
|
||||
SettlementDO settlementDO = new SettlementDO();
|
||||
SettlementDTO settlementDTO = purchaseOrderAddDTO.getSettlementDTO();
|
||||
BeanUtils.copyProperties(settlementDTO, settlementDO, IgnoreNullUtil.getNullPropertyNames(settlementDTO));
|
||||
if(settlementDTO.getId() != null){
|
||||
settlementDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
settlementDO.setUpdateByName(userName);
|
||||
settlementDO.setUpdateTime(new Date());
|
||||
} else {
|
||||
settlementDO.setCreateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
settlementDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
settlementDO.setCreateByName(userName);
|
||||
settlementDO.setUpdateByName(userName);
|
||||
settlementDO.setCreateTime(new Date());
|
||||
settlementDO.setUpdateTime(new Date());
|
||||
settlementDO.setDelFlag(1);
|
||||
}
|
||||
purchaseOrderAddDO.setSettlementDo(settlementDO);
|
||||
/**采购订单结算信息处理**/
|
||||
/**采购订单发货信息处理**/
|
||||
DeliveryInfoDO deliveryInfoDO = new DeliveryInfoDO();
|
||||
DeliveryInfoDTO deliveryInfoDTO = purchaseOrderAddDTO.getDeliveryInfoDTO();
|
||||
BeanUtils.copyProperties(deliveryInfoDTO, deliveryInfoDO, IgnoreNullUtil.getNullPropertyNames(deliveryInfoDTO));
|
||||
if(deliveryInfoDTO.getId() != null){
|
||||
deliveryInfoDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
deliveryInfoDO.setUpdateByName(userName);
|
||||
deliveryInfoDO.setUpdateTime(new Date());
|
||||
} else {
|
||||
deliveryInfoDO.setCreateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
deliveryInfoDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
deliveryInfoDO.setCreateByName(userName);
|
||||
deliveryInfoDO.setUpdateByName(userName);
|
||||
deliveryInfoDO.setCreateTime(new Date());
|
||||
deliveryInfoDO.setUpdateTime(new Date());
|
||||
deliveryInfoDO.setDelFlag(1);
|
||||
}
|
||||
purchaseOrderAddDO.setDeliveryInfoDo(deliveryInfoDO);
|
||||
/**采购订单发货信息处理**/
|
||||
/**采购订单收货信息处理**/
|
||||
ReceiptInfoDO receiptInfoDO = new ReceiptInfoDO();
|
||||
ReceiptInfoDTO receiptInfoDTO = purchaseOrderAddDTO.getReceiptInfoDTO();
|
||||
BeanUtils.copyProperties(receiptInfoDTO, receiptInfoDO, IgnoreNullUtil.getNullPropertyNames(receiptInfoDTO));
|
||||
if(receiptInfoDTO.getId() != null){
|
||||
receiptInfoDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
receiptInfoDO.setUpdateByName(userName);
|
||||
receiptInfoDO.setUpdateTime(new Date());
|
||||
} else {
|
||||
receiptInfoDO.setCreateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
receiptInfoDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
receiptInfoDO.setCreateByName(userName);
|
||||
receiptInfoDO.setUpdateByName(userName);
|
||||
receiptInfoDO.setCreateTime(new Date());
|
||||
receiptInfoDO.setUpdateTime(new Date());
|
||||
receiptInfoDO.setDelFlag(1);
|
||||
}
|
||||
purchaseOrderAddDO.setReceiptInfoDo(receiptInfoDO);
|
||||
/**采购订单收货信息处理**/
|
||||
/**采购订单物流信息处理**/
|
||||
LogisticsDO logisticsDO = new LogisticsDO();
|
||||
LogisticsDTO logisticsDTO = purchaseOrderAddDTO.getLogisticsDTO();
|
||||
BeanUtils.copyProperties(logisticsDTO, logisticsDO, IgnoreNullUtil.getNullPropertyNames(logisticsDTO));
|
||||
if(logisticsDTO.getId() != null){
|
||||
logisticsDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
logisticsDO.setUpdateByName(userName);
|
||||
logisticsDO.setUpdateTime(new Date());
|
||||
} else {
|
||||
logisticsDO.setCreateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
logisticsDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
logisticsDO.setCreateByName(userName);
|
||||
logisticsDO.setUpdateByName(userName);
|
||||
logisticsDO.setCreateTime(new Date());
|
||||
logisticsDO.setUpdateTime(new Date());
|
||||
logisticsDO.setDelFlag(1);
|
||||
}
|
||||
purchaseOrderAddDO.setLogisticsDo(logisticsDO);
|
||||
/**采购订单物流信息处理**/
|
||||
/**采购订单物料信息处理**/
|
||||
List<GoodsDTO> goodsDTOList = purchaseOrderAddDTO.getGoodsDTOList();
|
||||
List<GoodsDO> goodsDOList = goodsDTOList.stream().map(goodsDTO -> {
|
||||
GoodsDO goodsDO = new GoodsDO();
|
||||
BeanUtils.copyProperties(goodsDTO, goodsDO, IgnoreNullUtil.getNullPropertyNames(goodsDTO));
|
||||
goodsDO.setCreateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
goodsDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
goodsDO.setCreateByName(userName);
|
||||
goodsDO.setUpdateByName(userName);
|
||||
goodsDO.setCreateTime(new Date());
|
||||
goodsDO.setUpdateTime(new Date());
|
||||
goodsDO.setDelFlag(1);
|
||||
return goodsDO;
|
||||
}).collect(Collectors.toList());
|
||||
purchaseOrderAddDO.setGoodsDOList(goodsDOList);
|
||||
/**采购订单物料信息处理**/
|
||||
return purchaseOrderAddDO;
|
||||
}
|
||||
|
||||
public PurchaseOrderAuditDO toAuditDO(PurchaseOrderAuditDTO purchaseOrderAuditDTO) {
|
||||
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
// 获取登陆人姓名
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
|
||||
|
||||
PurchaseOrderAuditDO purchaseOrderAuditDO = new PurchaseOrderAuditDO();
|
||||
BeanUtils.copyProperties(purchaseOrderAuditDTO, purchaseOrderAuditDO, IgnoreNullUtil.getNullPropertyNames(purchaseOrderAuditDTO));
|
||||
purchaseOrderAuditDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
purchaseOrderAuditDO.setUpdateByName(userName);
|
||||
purchaseOrderAuditDO.setUpdateTime(new Date());
|
||||
purchaseOrderAuditDO.setAuditBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
purchaseOrderAuditDO.setAuditTime(new Date());
|
||||
|
||||
return purchaseOrderAuditDO;
|
||||
|
||||
}
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.oms.interfaces.assembler.receiptInfo;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.receiptInfo.repository.todo.ReceiptInfoDO;
|
||||
import com.mhd.oms.interfaces.dto.receiptInfo.ReceiptInfoDTO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 收货信息Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
@Component
|
||||
public class ReceiptInfoAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public ReceiptInfoDO toDO(ReceiptInfoDTO receiptInfoDTO) {
|
||||
ReceiptInfoDO receiptInfoDO = new ReceiptInfoDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(receiptInfoDTO, receiptInfoDO, IgnoreNullUtil.getNullPropertyNames(receiptInfoDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(receiptInfoDTO.getId() != null){
|
||||
if(userId != null){
|
||||
receiptInfoDO.setUpdateBy(userId);
|
||||
}else {
|
||||
receiptInfoDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
receiptInfoDO.setUpdateByName(userName);
|
||||
receiptInfoDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
receiptInfoDO.setCreateBy(userId);
|
||||
receiptInfoDO.setUpdateBy(userId);
|
||||
}else {
|
||||
receiptInfoDO.setCreateBy(new Long("0"));
|
||||
receiptInfoDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
receiptInfoDO.setCreateByName(userName);
|
||||
receiptInfoDO.setUpdateByName(userName);
|
||||
receiptInfoDO.setCreateTime(new Date());
|
||||
receiptInfoDO.setUpdateTime(new Date());
|
||||
receiptInfoDO.setDelFlag(1);
|
||||
}
|
||||
return receiptInfoDO;
|
||||
}
|
||||
|
||||
}
|
||||
+228
@@ -0,0 +1,228 @@
|
||||
package com.mhd.oms.interfaces.assembler.salesOrder;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.deliveryInfo.repository.todo.DeliveryInfoDO;
|
||||
import com.mhd.oms.domain.goods.repository.todo.GoodsDO;
|
||||
import com.mhd.oms.domain.logistics.repository.todo.LogisticsDO;
|
||||
import com.mhd.oms.domain.receiptInfo.repository.todo.ReceiptInfoDO;
|
||||
import com.mhd.oms.domain.salesOrder.repository.todo.SalesOrderAddDO;
|
||||
import com.mhd.oms.domain.salesOrder.repository.todo.SalesOrderAuditDO;
|
||||
import com.mhd.oms.domain.salesOrder.repository.todo.SalesOrderDO;
|
||||
import com.mhd.oms.domain.settlement.repository.todo.SettlementDO;
|
||||
import com.mhd.oms.interfaces.dto.deliveryInfo.DeliveryInfoDTO;
|
||||
import com.mhd.oms.interfaces.dto.goods.GoodsDTO;
|
||||
import com.mhd.oms.interfaces.dto.logistics.LogisticsDTO;
|
||||
import com.mhd.oms.interfaces.dto.receiptInfo.ReceiptInfoDTO;
|
||||
import com.mhd.oms.interfaces.dto.salesOrder.SalesOrderAddDTO;
|
||||
import com.mhd.oms.interfaces.dto.salesOrder.SalesOrderAuditDTO;
|
||||
import com.mhd.oms.interfaces.dto.salesOrder.SalesOrderDTO;
|
||||
import com.mhd.oms.interfaces.dto.settlement.SettlementDTO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 销售订单Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-06-08
|
||||
*/
|
||||
@Component
|
||||
public class SalesOrderAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public SalesOrderDO toDO(SalesOrderDTO salesOrderDTO) {
|
||||
SalesOrderDO salesOrderDO = new SalesOrderDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(salesOrderDTO, salesOrderDO, IgnoreNullUtil.getNullPropertyNames(salesOrderDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(salesOrderDTO.getId() != null){
|
||||
if(userId != null){
|
||||
salesOrderDO.setUpdateBy(userId);
|
||||
}else {
|
||||
salesOrderDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
salesOrderDO.setUpdateByName(userName);
|
||||
salesOrderDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
salesOrderDO.setCreateBy(userId);
|
||||
salesOrderDO.setUpdateBy(userId);
|
||||
}else {
|
||||
salesOrderDO.setCreateBy(new Long("0"));
|
||||
salesOrderDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
salesOrderDO.setCreateByName(userName);
|
||||
salesOrderDO.setUpdateByName(userName);
|
||||
salesOrderDO.setCreateTime(new Date());
|
||||
salesOrderDO.setUpdateTime(new Date());
|
||||
salesOrderDO.setDelFlag(1);
|
||||
}
|
||||
return salesOrderDO;
|
||||
}
|
||||
|
||||
public SalesOrderAuditDO toAuditDO(SalesOrderAuditDTO salesOrderAuditDTO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
// 获取登陆人姓名
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
|
||||
|
||||
SalesOrderAuditDO salesOrderAuditDO = new SalesOrderAuditDO();
|
||||
BeanUtils.copyProperties(salesOrderAuditDTO, salesOrderAuditDO, IgnoreNullUtil.getNullPropertyNames(salesOrderAuditDTO));
|
||||
salesOrderAuditDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
salesOrderAuditDO.setUpdateByName(userName);
|
||||
salesOrderAuditDO.setUpdateTime(new Date());
|
||||
salesOrderAuditDO.setAuditBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
salesOrderAuditDO.setAuditTime(new Date());
|
||||
|
||||
return salesOrderAuditDO;
|
||||
}
|
||||
|
||||
public SalesOrderAddDO toOrderDo(SalesOrderAddDTO salesOrderAddDTO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
// 获取登陆人姓名
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
|
||||
SalesOrderAddDO salesOrderAddDO = new SalesOrderAddDO();
|
||||
/**销售订单基本信息处理**/
|
||||
SalesOrderDO salesOrderDO = new SalesOrderDO();
|
||||
SalesOrderDTO salesOrderDTO = salesOrderAddDTO.getSalesOrderDTO();
|
||||
BeanUtils.copyProperties(salesOrderDTO, salesOrderDO, IgnoreNullUtil.getNullPropertyNames(salesOrderDTO));
|
||||
if (salesOrderDTO.getId() != null) {
|
||||
salesOrderDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
salesOrderDO.setUpdateByName(userName);
|
||||
salesOrderDO.setUpdateTime(new Date());
|
||||
salesOrderDO.setDelFlag(1);
|
||||
} else {
|
||||
salesOrderDO.setCreateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
salesOrderDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
salesOrderDO.setCreateByName(userName);
|
||||
salesOrderDO.setUpdateByName(userName);
|
||||
salesOrderDO.setCreateTime(new Date());
|
||||
salesOrderDO.setUpdateTime(new Date());
|
||||
salesOrderDO.setDelFlag(1);
|
||||
}
|
||||
salesOrderAddDO.setSalesOrderDO(salesOrderDO);
|
||||
/**销售订单基本信息处理**/
|
||||
/**采购订单结算信息处理**/
|
||||
SettlementDO settlementDO = new SettlementDO();
|
||||
SettlementDTO settlementDTO = salesOrderAddDTO.getSettlementDTO();
|
||||
BeanUtils.copyProperties(settlementDTO, settlementDO, IgnoreNullUtil.getNullPropertyNames(settlementDTO));
|
||||
if (settlementDTO.getId() != null) {
|
||||
settlementDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
settlementDO.setUpdateByName(userName);
|
||||
settlementDO.setUpdateTime(new Date());
|
||||
} else {
|
||||
settlementDO.setCreateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
settlementDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
settlementDO.setCreateByName(userName);
|
||||
settlementDO.setUpdateByName(userName);
|
||||
settlementDO.setCreateTime(new Date());
|
||||
settlementDO.setUpdateTime(new Date());
|
||||
settlementDO.setDelFlag(1);
|
||||
}
|
||||
salesOrderAddDO.setSettlementDO(settlementDO);
|
||||
/**采购订单结算信息处理**/
|
||||
/**采购订单发货信息处理**/
|
||||
DeliveryInfoDO deliveryInfoDO = new DeliveryInfoDO();
|
||||
DeliveryInfoDTO deliveryInfoDTO = salesOrderAddDTO.getDeliveryInfoDTO();
|
||||
BeanUtils.copyProperties(deliveryInfoDTO, deliveryInfoDO, IgnoreNullUtil.getNullPropertyNames(deliveryInfoDTO));
|
||||
if (deliveryInfoDTO.getId() != null) {
|
||||
deliveryInfoDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
deliveryInfoDO.setUpdateByName(userName);
|
||||
deliveryInfoDO.setUpdateTime(new Date());
|
||||
} else {
|
||||
deliveryInfoDO.setCreateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
deliveryInfoDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
deliveryInfoDO.setCreateByName(userName);
|
||||
deliveryInfoDO.setUpdateByName(userName);
|
||||
deliveryInfoDO.setCreateTime(new Date());
|
||||
deliveryInfoDO.setUpdateTime(new Date());
|
||||
deliveryInfoDO.setDelFlag(1);
|
||||
}
|
||||
salesOrderAddDO.setDeliveryInfoDO(deliveryInfoDO);
|
||||
/**采购订单发货信息处理**/
|
||||
/**采购订单收货信息处理**/
|
||||
ReceiptInfoDO receiptInfoDO = new ReceiptInfoDO();
|
||||
ReceiptInfoDTO receiptInfoDTO = salesOrderAddDTO.getReceiptInfoDTO();
|
||||
BeanUtils.copyProperties(receiptInfoDTO, receiptInfoDO, IgnoreNullUtil.getNullPropertyNames(receiptInfoDTO));
|
||||
if (receiptInfoDTO.getId() != null) {
|
||||
receiptInfoDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
receiptInfoDO.setUpdateByName(userName);
|
||||
receiptInfoDO.setUpdateTime(new Date());
|
||||
} else {
|
||||
receiptInfoDO.setCreateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
receiptInfoDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
receiptInfoDO.setCreateByName(userName);
|
||||
receiptInfoDO.setUpdateByName(userName);
|
||||
receiptInfoDO.setCreateTime(new Date());
|
||||
receiptInfoDO.setUpdateTime(new Date());
|
||||
receiptInfoDO.setDelFlag(1);
|
||||
}
|
||||
salesOrderAddDO.setReceiptInfoDO(receiptInfoDO);
|
||||
/**采购订单收货信息处理**/
|
||||
/**采购订单物流信息处理**/
|
||||
LogisticsDO logisticsDO = new LogisticsDO();
|
||||
LogisticsDTO logisticsDTO = salesOrderAddDTO.getLogisticsDTO();
|
||||
BeanUtils.copyProperties(logisticsDTO, logisticsDO, IgnoreNullUtil.getNullPropertyNames(logisticsDTO));
|
||||
if (logisticsDTO.getId() != null) {
|
||||
logisticsDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
logisticsDO.setUpdateByName(userName);
|
||||
logisticsDO.setUpdateTime(new Date());
|
||||
} else {
|
||||
logisticsDO.setCreateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
logisticsDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
logisticsDO.setCreateByName(userName);
|
||||
logisticsDO.setUpdateByName(userName);
|
||||
logisticsDO.setCreateTime(new Date());
|
||||
logisticsDO.setUpdateTime(new Date());
|
||||
logisticsDO.setDelFlag(1);
|
||||
}
|
||||
salesOrderAddDO.setLogisticsDO(logisticsDO);
|
||||
/**采购订单物流信息处理**/
|
||||
/**采购订单物料信息处理**/
|
||||
List<GoodsDTO> goodsDTOList = salesOrderAddDTO.getGoodsDTOList();
|
||||
List<GoodsDO> goodsDOList = goodsDTOList.stream().map(goodsDTO -> {
|
||||
GoodsDO goodsDO = new GoodsDO();
|
||||
BeanUtils.copyProperties(goodsDTO, goodsDO, IgnoreNullUtil.getNullPropertyNames(goodsDTO));
|
||||
goodsDO.setCreateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
goodsDO.setUpdateBy(ObjectUtil.defaultIfNull(userId, new Long("0")));
|
||||
goodsDO.setCreateByName(userName);
|
||||
goodsDO.setUpdateByName(userName);
|
||||
goodsDO.setCreateTime(new Date());
|
||||
goodsDO.setUpdateTime(new Date());
|
||||
goodsDO.setDelFlag(1);
|
||||
return goodsDO;
|
||||
}).collect(Collectors.toList());
|
||||
salesOrderAddDO.setGoodsDOS(goodsDOList);
|
||||
/**采购订单物料信息处理**/
|
||||
return salesOrderAddDO;
|
||||
}
|
||||
}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
package com.mhd.oms.interfaces.assembler.scmOrder;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.scmOrder.repository.todo.ScmOrderDO;
|
||||
import com.mhd.oms.domain.taskOrder.repository.todo.CreateTaskOrderDO;
|
||||
import com.mhd.oms.interfaces.dto.scmOrder.ScmOrderDTO;
|
||||
import com.mhd.oms.interfaces.dto.taskOrder.CreateTaskOrderDTO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 供应链订单Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Component
|
||||
public class ScmOrderAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public ScmOrderDO toDO(ScmOrderDTO scmOrderDTO) {
|
||||
ScmOrderDO scmOrderDO = new ScmOrderDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(scmOrderDTO, scmOrderDO, IgnoreNullUtil.getNullPropertyNames(scmOrderDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(scmOrderDTO.getId() != null){
|
||||
if(userId != null){
|
||||
scmOrderDO.setUpdateBy(userId);
|
||||
}else {
|
||||
scmOrderDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
scmOrderDO.setUpdateByName(userName);
|
||||
scmOrderDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
scmOrderDO.setCreateBy(userId);
|
||||
scmOrderDO.setUpdateBy(userId);
|
||||
}else {
|
||||
scmOrderDO.setCreateBy(new Long("0"));
|
||||
scmOrderDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
scmOrderDO.setCreateByName(userName);
|
||||
scmOrderDO.setUpdateByName(userName);
|
||||
scmOrderDO.setCreateTime(new Date());
|
||||
scmOrderDO.setUpdateTime(new Date());
|
||||
scmOrderDO.setDelFlag(1);
|
||||
}
|
||||
return scmOrderDO;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public CreateTaskOrderDO toCreateTaskOrderDO(CreateTaskOrderDTO createTaskOrderDTO) {
|
||||
CreateTaskOrderDO createTaskOrderDO = new CreateTaskOrderDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(createTaskOrderDTO, createTaskOrderDO, IgnoreNullUtil.getNullPropertyNames(createTaskOrderDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(createTaskOrderDTO.getId() != null){
|
||||
if(userId != null){
|
||||
createTaskOrderDO.setUpdateBy(userId);
|
||||
}else {
|
||||
createTaskOrderDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
createTaskOrderDO.setUpdateByName(userName);
|
||||
createTaskOrderDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
createTaskOrderDO.setCreateBy(userId);
|
||||
createTaskOrderDO.setUpdateBy(userId);
|
||||
}else {
|
||||
createTaskOrderDO.setCreateBy(new Long("0"));
|
||||
createTaskOrderDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
createTaskOrderDO.setCreateByName(userName);
|
||||
createTaskOrderDO.setUpdateByName(userName);
|
||||
createTaskOrderDO.setCreateTime(new Date());
|
||||
createTaskOrderDO.setUpdateTime(new Date());
|
||||
createTaskOrderDO.setDelFlag(1);
|
||||
}
|
||||
createTaskOrderDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
return createTaskOrderDO;
|
||||
}
|
||||
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.oms.interfaces.assembler.settlement;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.settlement.repository.todo.SettlementDO;
|
||||
import com.mhd.oms.interfaces.dto.settlement.SettlementDTO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 结算信息Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
@Component
|
||||
public class SettlementAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public SettlementDO toDO(SettlementDTO settlementDTO) {
|
||||
SettlementDO settlementDO = new SettlementDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(settlementDTO, settlementDO, IgnoreNullUtil.getNullPropertyNames(settlementDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(settlementDTO.getId() != null){
|
||||
if(userId != null){
|
||||
settlementDO.setUpdateBy(userId);
|
||||
}else {
|
||||
settlementDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
settlementDO.setUpdateByName(userName);
|
||||
settlementDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
settlementDO.setCreateBy(userId);
|
||||
settlementDO.setUpdateBy(userId);
|
||||
}else {
|
||||
settlementDO.setCreateBy(new Long("0"));
|
||||
settlementDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
settlementDO.setCreateByName(userName);
|
||||
settlementDO.setUpdateByName(userName);
|
||||
settlementDO.setCreateTime(new Date());
|
||||
settlementDO.setUpdateTime(new Date());
|
||||
settlementDO.setDelFlag(1);
|
||||
}
|
||||
return settlementDO;
|
||||
}
|
||||
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package com.mhd.oms.interfaces.assembler.taskOrder;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.taskOrder.repository.todo.TaskOrderDO;
|
||||
import com.mhd.oms.interfaces.dto.taskOrder.TaskOrderDTO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 作业任务Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-24
|
||||
*/
|
||||
@Component
|
||||
public class TaskOrderAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public TaskOrderDO toDO(TaskOrderDTO taskOrderDTO) {
|
||||
TaskOrderDO taskOrderDO = new TaskOrderDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(taskOrderDTO, taskOrderDO, IgnoreNullUtil.getNullPropertyNames(taskOrderDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(taskOrderDTO.getId() != null){
|
||||
if(userId != null){
|
||||
taskOrderDO.setUpdateBy(userId);
|
||||
}else {
|
||||
taskOrderDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
taskOrderDO.setUpdateByName(userName);
|
||||
taskOrderDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
taskOrderDO.setCreateBy(userId);
|
||||
taskOrderDO.setUpdateBy(userId);
|
||||
}else {
|
||||
taskOrderDO.setCreateBy(new Long("0"));
|
||||
taskOrderDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
taskOrderDO.setCreateByName(userName);
|
||||
taskOrderDO.setUpdateByName(userName);
|
||||
taskOrderDO.setCreateTime(new Date());
|
||||
taskOrderDO.setUpdateTime(new Date());
|
||||
taskOrderDO.setDelFlag(1);
|
||||
}
|
||||
return taskOrderDO;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.mhd.oms.interfaces.dto.common;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class IdsSetDTO implements Serializable {
|
||||
|
||||
@ApiModelProperty("ids,多个用英文逗号分割")
|
||||
@NotNull(message = "传递的ID值缺失或为空")
|
||||
private String ids;
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.mhd.oms.interfaces.dto.deliveryInfo;
|
||||
|
||||
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.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发货信息对象 oms_delivery_info
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class DeliveryInfoDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("订单管理表ID")
|
||||
@Excel(name = "订单管理表ID")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("发货人")
|
||||
@Excel(name = "发货人")
|
||||
private String consigner;
|
||||
|
||||
@ApiModelProperty("发货人联系电话")
|
||||
@Excel(name = "发货人联系电话")
|
||||
private String consignerPhone;
|
||||
|
||||
@ApiModelProperty("发货人所在区域编码")
|
||||
@Excel(name = "发货人所在区域编码")
|
||||
private String consignerAreaCode;
|
||||
|
||||
@ApiModelProperty("发货人所在区域")
|
||||
@Excel(name = "发货人所在区域")
|
||||
private String consignerArea;
|
||||
|
||||
@ApiModelProperty("发货人详细地址")
|
||||
@Excel(name = "发货人详细地址")
|
||||
private String consignerAddress;
|
||||
|
||||
@ApiModelProperty("发货地址经纬度")
|
||||
@Excel(name = "发货地址经纬度")
|
||||
private String saddressLatLon;
|
||||
|
||||
@ApiModelProperty("预计发货时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date estimatedDeliveryTime;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.mhd.oms.interfaces.dto.goods;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品信息对象 oms_goods
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class GoodsDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("订单管理表ID")
|
||||
@Excel(name = "订单管理表ID")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("商品编码")
|
||||
@Excel(name = "商品编码")
|
||||
private String goodsNo;
|
||||
|
||||
@ApiModelProperty("商品名称")
|
||||
@Excel(name = "商品名称")
|
||||
private String goodsName;
|
||||
|
||||
@ApiModelProperty("包装规格")
|
||||
@Excel(name = "包装规格")
|
||||
private String packingSize;
|
||||
|
||||
@ApiModelProperty("辅助单位ID")
|
||||
@Excel(name = "辅助单位ID")
|
||||
private String supportUnitId;
|
||||
|
||||
@ApiModelProperty("辅助单位")
|
||||
@Excel(name = "辅助单位")
|
||||
private String supportUnit;
|
||||
|
||||
@ApiModelProperty("辅助单位数量")
|
||||
@Excel(name = "辅助单位数量")
|
||||
private Integer supportUnitQuantity;
|
||||
|
||||
@ApiModelProperty("物料单位EA")
|
||||
@Excel(name = "物料单位EA")
|
||||
private String materialUnitEa;
|
||||
|
||||
@ApiModelProperty("物料数量EA")
|
||||
@Excel(name = "物料数量EA")
|
||||
private Integer materialUnitEaQuantity;
|
||||
|
||||
@ApiModelProperty("单价")
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@ApiModelProperty("含税单价")
|
||||
@Excel(name = "含税单价")
|
||||
private BigDecimal taxUnitPrice;
|
||||
|
||||
@ApiModelProperty("税率")
|
||||
@Excel(name = "税率")
|
||||
private BigDecimal taxRate;
|
||||
|
||||
@ApiModelProperty("税金")
|
||||
@Excel(name = "税金")
|
||||
private BigDecimal taxes;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("含税金额")
|
||||
@Excel(name = "含税金额")
|
||||
private BigDecimal taxAmount;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("供应链订单ID")
|
||||
private Long scmId;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
@Excel(name = "物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.mhd.oms.interfaces.dto.interceptOrder;
|
||||
|
||||
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 java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 拦截订单对象 oms_intercept_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-30
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class InterceptOrderDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("订单ID")
|
||||
@Excel(name = "订单ID")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("拦截状态:0-无拦截、1-拦截成功、2-拦截失败")
|
||||
@Excel(name = "拦截状态:0-无拦截、1-拦截成功、2-拦截失败")
|
||||
private Integer interceptState;
|
||||
|
||||
@ApiModelProperty("拦截人ID")
|
||||
@Excel(name = "拦截人ID")
|
||||
private String interceptBy;
|
||||
|
||||
@ApiModelProperty("拦截人名称")
|
||||
@Excel(name = "拦截人名称")
|
||||
private String interceptByName;
|
||||
|
||||
@ApiModelProperty("拦截时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "拦截时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date interceptTime;
|
||||
|
||||
@ApiModelProperty("失败原因")
|
||||
@Excel(name = "失败原因")
|
||||
private String failCause;
|
||||
|
||||
@ApiModelProperty("作业任务号")
|
||||
@Excel(name = "作业任务号")
|
||||
private String taskNos;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.mhd.oms.interfaces.dto.logistics;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物流信息对象 oms_logistics
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class LogisticsDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("订单管理表ID")
|
||||
@Excel(name = "订单管理表ID")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("运输方式ID")
|
||||
@Excel(name = "运输方式ID")
|
||||
private String shippingTypeId;
|
||||
|
||||
@ApiModelProperty("运输方式")
|
||||
@Excel(name = "运输方式")
|
||||
private String shippingType;
|
||||
|
||||
@ApiModelProperty("承运商ID")
|
||||
@Excel(name = "承运商ID")
|
||||
private Long carrierId;
|
||||
|
||||
@ApiModelProperty("承运商")
|
||||
@Excel(name = "承运商")
|
||||
private String carrier;
|
||||
|
||||
@ApiModelProperty("物流单号")
|
||||
@Excel(name = "物流单号")
|
||||
private String trackingNum;
|
||||
|
||||
@ApiModelProperty("运费金额")
|
||||
@Excel(name = "运费金额")
|
||||
private BigDecimal freightAmount;
|
||||
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String plateNum;
|
||||
|
||||
@ApiModelProperty("司机")
|
||||
@Excel(name = "司机")
|
||||
private String driverName;
|
||||
|
||||
@ApiModelProperty("联系电话")
|
||||
@Excel(name = "联系电话")
|
||||
private String driverPhone;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.mhd.oms.interfaces.dto.orderType;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单类型关系对象 oms_order_type
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-15
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class OrderTypeDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("业务订单类型ID")
|
||||
@Excel(name = "业务订单类型ID")
|
||||
private String businessOrderTypeId;
|
||||
|
||||
@ApiModelProperty("业务订单类型")
|
||||
@Excel(name = "业务订单类型")
|
||||
private String businessOrderType;
|
||||
|
||||
@ApiModelProperty("作业任务类型ID")
|
||||
@Excel(name = "作业任务类型ID")
|
||||
private Integer jobTaskTypeId;
|
||||
|
||||
@ApiModelProperty("作业任务类型")
|
||||
@Excel(name = "作业任务类型")
|
||||
private String jobTaskType;
|
||||
|
||||
@ApiModelProperty("下发系统ID")
|
||||
@Excel(name = "下发系统ID")
|
||||
private String deliverySystemId;
|
||||
|
||||
@ApiModelProperty("下发系统")
|
||||
@Excel(name = "下发系统")
|
||||
private String deliverySystem;
|
||||
|
||||
@ApiModelProperty("下发订单类型ID")
|
||||
@Excel(name = "下发订单类型ID")
|
||||
private String orderTypeId;
|
||||
|
||||
@ApiModelProperty("下发订单类型")
|
||||
@Excel(name = "下发订单类型")
|
||||
private String orderType;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.mhd.oms.interfaces.dto.purchaseOrder;
|
||||
|
||||
import com.mhd.oms.interfaces.dto.deliveryInfo.DeliveryInfoDTO;
|
||||
import com.mhd.oms.interfaces.dto.goods.GoodsDTO;
|
||||
import com.mhd.oms.interfaces.dto.logistics.LogisticsDTO;
|
||||
import com.mhd.oms.interfaces.dto.receiptInfo.ReceiptInfoDTO;
|
||||
import com.mhd.oms.interfaces.dto.settlement.SettlementDTO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 采购订单管理对象 oms_purchase_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class PurchaseOrderAddDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("基本信息")
|
||||
private PurchaseOrderDTO purchaseOrderDTO;
|
||||
|
||||
@ApiModelProperty("结算信息")
|
||||
private SettlementDTO settlementDTO;
|
||||
|
||||
@ApiModelProperty("发货信息")
|
||||
private DeliveryInfoDTO deliveryInfoDTO;
|
||||
|
||||
@ApiModelProperty("收货信息")
|
||||
private ReceiptInfoDTO receiptInfoDTO;
|
||||
|
||||
@ApiModelProperty("物流信息")
|
||||
private LogisticsDTO logisticsDTO;
|
||||
|
||||
@ApiModelProperty("物料信息")
|
||||
private List<GoodsDTO> goodsDTOList;
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.mhd.oms.interfaces.dto.purchaseOrder;
|
||||
|
||||
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 java.util.Date;
|
||||
|
||||
|
||||
@Data
|
||||
public class PurchaseOrderAuditDTO extends BaseVOEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ApiModelProperty("采购订单ID集合")
|
||||
private String ids;
|
||||
|
||||
|
||||
@ApiModelProperty("审核人")
|
||||
@Excel(name = "审核人")
|
||||
private Long auditBy;
|
||||
|
||||
@ApiModelProperty("审核时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date auditTime;
|
||||
|
||||
@ApiModelProperty("审核状态;1待审核2通过3拒绝")
|
||||
@Excel(name = "审核状态;1待审核2通过3拒绝")
|
||||
private Integer auditState;
|
||||
|
||||
@ApiModelProperty("审核结果")
|
||||
@Excel(name = "审核结果")
|
||||
private String auditResult;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
package com.mhd.oms.interfaces.dto.purchaseOrder;
|
||||
|
||||
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 java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 采购订单管理对象 oms_purchase_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class PurchaseOrderDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("审核人")
|
||||
@Excel(name = "审核人")
|
||||
private Long auditBy;
|
||||
|
||||
@ApiModelProperty("审核时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date auditTime;
|
||||
|
||||
@ApiModelProperty("审核状态;1待审核2通过3拒绝")
|
||||
@Excel(name = "审核状态;1待审核2通过3拒绝")
|
||||
private Integer auditState;
|
||||
|
||||
@ApiModelProperty("审核结果")
|
||||
@Excel(name = "审核结果")
|
||||
private String auditResult;
|
||||
|
||||
@ApiModelProperty("采购单号")
|
||||
@Excel(name = "采购单号")
|
||||
private String orderNo;
|
||||
|
||||
@ApiModelProperty("订单状态;1待审核2已审核3已拒绝4已生成5部分采购6完成采购7已取消8已拦截")
|
||||
@Excel(name = "订单状态;1待审核2已审核3已拒绝4已生成5部分采购6完成采购7已取消8已拦截")
|
||||
private Integer orderState;
|
||||
|
||||
@ApiModelProperty("供应商ID")
|
||||
@Excel(name = "供应商ID")
|
||||
private Long supplierId;
|
||||
|
||||
@ApiModelProperty("供应商")
|
||||
@Excel(name = "供应商")
|
||||
private String supplier;
|
||||
|
||||
@ApiModelProperty("货主ID")
|
||||
@Excel(name = "货主ID")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主")
|
||||
@Excel(name = "货主")
|
||||
private String shipper;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
@Excel(name = "组织ID")
|
||||
private Long orgId;
|
||||
|
||||
@ApiModelProperty("组织")
|
||||
@Excel(name = "组织")
|
||||
private String org;
|
||||
|
||||
@ApiModelProperty("订单时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "订单时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderTime;
|
||||
|
||||
@ApiModelProperty("订单类型ID")
|
||||
@Excel(name = "订单类型ID")
|
||||
private Long orderTypeId;
|
||||
|
||||
@ApiModelProperty("订单类型")
|
||||
@Excel(name = "订单类型")
|
||||
private String orderType;
|
||||
|
||||
@ApiModelProperty("作业任务类型ID")
|
||||
@Excel(name = "作业任务类型ID")
|
||||
private Integer jobTaskTypeId;
|
||||
|
||||
@ApiModelProperty("作业任务类型")
|
||||
@Excel(name = "作业任务类型")
|
||||
private String jobTaskType;
|
||||
|
||||
@ApiModelProperty("收货仓库ID")
|
||||
@Excel(name = "收货仓库ID")
|
||||
private Long receivingWarehouseId;
|
||||
|
||||
@ApiModelProperty("收货仓库")
|
||||
@Excel(name = "收货仓库")
|
||||
private String receivingWarehouse;
|
||||
|
||||
@ApiModelProperty("交货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "交货日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date deliveryDate;
|
||||
|
||||
@ApiModelProperty("客户订单号")
|
||||
@Excel(name = "客户订单号")
|
||||
private String customerOrders;
|
||||
|
||||
@ApiModelProperty("合同号")
|
||||
@Excel(name = "合同号")
|
||||
private String contractNo;
|
||||
|
||||
@ApiModelProperty("项目ID")
|
||||
@Excel(name = "项目ID")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("项目")
|
||||
@Excel(name = "项目")
|
||||
private String project;
|
||||
|
||||
@ApiModelProperty("优惠率")
|
||||
@Excel(name = "优惠率")
|
||||
private BigDecimal rateConcession;
|
||||
|
||||
@ApiModelProperty("优惠金额")
|
||||
@Excel(name = "优惠金额")
|
||||
private BigDecimal discountAmount;
|
||||
|
||||
@ApiModelProperty("合计金额")
|
||||
@Excel(name = "合计金额")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
@ApiModelProperty("附件名称")
|
||||
@Excel(name = "附件名称")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("附件地址")
|
||||
@Excel(name = "附件地址")
|
||||
private String fileUrl;
|
||||
|
||||
@ApiModelProperty("来源;0-内部1-外部")
|
||||
@Excel(name = "来源;0-内部1-外部")
|
||||
private Integer source;
|
||||
|
||||
@ApiModelProperty("拦截状态;0未拦截1拦截成功2拦截失败")
|
||||
@Excel(name = "拦截状态;0未拦截1拦截成功2拦截失败")
|
||||
private Integer tacklState;
|
||||
|
||||
@ApiModelProperty("拦截时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "拦截时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date tacklTime;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("价税合计")
|
||||
@Excel(name = "价税合计")
|
||||
private BigDecimal totalPriceTax;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
+243
@@ -0,0 +1,243 @@
|
||||
package com.mhd.oms.interfaces.dto.purchaseOrder;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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.util.Date;
|
||||
|
||||
/**
|
||||
* 采购订单管理对象 oms_purchase_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class PurchaseOrderExcelDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ================= 采购订单信息 =================== */
|
||||
|
||||
@ExcelProperty(index = 0)
|
||||
@ApiModelProperty("采购单号")
|
||||
private String orderNo;
|
||||
|
||||
@ExcelProperty(index = 1)
|
||||
@ApiModelProperty("供应商")
|
||||
private String supplier;
|
||||
|
||||
@ExcelProperty(index = 2)
|
||||
@ApiModelProperty("货主")
|
||||
private String shipper;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("货主ID")
|
||||
private String shipperId;
|
||||
|
||||
@ExcelProperty(index = 3)
|
||||
@ApiModelProperty("组织")
|
||||
private String org;
|
||||
|
||||
@ExcelProperty(index = 4)
|
||||
@ApiModelProperty("订单日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date orderTime;
|
||||
|
||||
@ExcelProperty(index = 5)
|
||||
@ApiModelProperty("订单类型")
|
||||
private String orderType;
|
||||
|
||||
@ExcelProperty(index = 6)
|
||||
@ApiModelProperty("收货仓库")
|
||||
private String receivingWarehouse;
|
||||
|
||||
@ExcelProperty(index = 7)
|
||||
@ApiModelProperty("交货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date deliveryDate;
|
||||
|
||||
@ExcelProperty(index = 8)
|
||||
@ApiModelProperty("客户订单号")
|
||||
private String customerOrders;
|
||||
|
||||
@ExcelProperty(index = 9)
|
||||
@ApiModelProperty("合同号")
|
||||
private String contractNo;
|
||||
|
||||
@ExcelProperty(index = 10)
|
||||
@ApiModelProperty("项目")
|
||||
private String project;
|
||||
|
||||
@ExcelProperty(index = 11)
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty(index = 12)
|
||||
@ApiModelProperty("优惠率")
|
||||
private BigDecimal rateConcession;
|
||||
|
||||
@ExcelProperty(index = 13)
|
||||
@ApiModelProperty("优惠金额")
|
||||
private BigDecimal discountAmount;
|
||||
|
||||
@ExcelProperty(index = 14)
|
||||
@ApiModelProperty("附件(地址)")
|
||||
private String fileUrl;
|
||||
|
||||
/** =================== 结算信息 ===================== */
|
||||
@ExcelProperty(index = 15)
|
||||
@ApiModelProperty("结算对象")
|
||||
private String settlementObj;
|
||||
|
||||
@ExcelProperty(index = 16)
|
||||
@ApiModelProperty("结算方式")
|
||||
private String settlementWay;
|
||||
|
||||
@ExcelProperty(index = 17)
|
||||
@ApiModelProperty("支付状态")
|
||||
private String payStatus;
|
||||
|
||||
@ExcelProperty(index = 18)
|
||||
@ApiModelProperty("实付金额;采购订单:本次付款")
|
||||
private BigDecimal paidAmount;
|
||||
|
||||
@ExcelProperty(index = 19)
|
||||
@ApiModelProperty("付款账号")
|
||||
private String paymentAccNo;
|
||||
|
||||
@ExcelProperty(index = 20)
|
||||
@ApiModelProperty("付款单号")
|
||||
private String paymentOrderNo;
|
||||
|
||||
@ExcelProperty(index = 21)
|
||||
@ApiModelProperty("结算信息备注")
|
||||
private String settlementRemark;
|
||||
|
||||
@ExcelProperty(index = 22)
|
||||
@ApiModelProperty("附件地址")
|
||||
private String settlementFileUrl;
|
||||
|
||||
/** ========================= 发货信息 ========================== */
|
||||
@ExcelProperty(index = 23)
|
||||
@ApiModelProperty("发货人")
|
||||
private String consigner;
|
||||
|
||||
@ExcelProperty(index = 24)
|
||||
@ApiModelProperty("发货人联系电话")
|
||||
private String consignerPhone;
|
||||
|
||||
@ExcelProperty(index = 25)
|
||||
@ApiModelProperty("发货人所在区域")
|
||||
private String consignerArea;
|
||||
|
||||
@ExcelProperty(index = 26)
|
||||
@ApiModelProperty("发货人详细地址")
|
||||
private String consignerAddress;
|
||||
|
||||
@ExcelProperty(index = 27)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("预计发货时间")
|
||||
private Date estimatedDeliveryTime;
|
||||
|
||||
/** ========================= 收货信息 ========================== */
|
||||
@ExcelProperty(index = 28)
|
||||
@ApiModelProperty("收货人")
|
||||
private String consignee;
|
||||
|
||||
@ExcelProperty(index = 29)
|
||||
@ApiModelProperty("收货人联系电话")
|
||||
private String consigneePhone;
|
||||
|
||||
@ExcelProperty(index = 30)
|
||||
@ApiModelProperty("收货人所在区域")
|
||||
private String consigneeArea;
|
||||
|
||||
@ExcelProperty(index = 31)
|
||||
@ApiModelProperty("收货人详细地址")
|
||||
private String consigneeAddress;
|
||||
|
||||
@ExcelProperty(index = 32)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("预计到货时间")
|
||||
private Date estimatedReceivingTime;
|
||||
|
||||
/** ========================= 物流信息 ========================== */
|
||||
@ExcelProperty(index = 33)
|
||||
@ApiModelProperty("运输方式")
|
||||
private String shippingType;
|
||||
|
||||
@ExcelProperty(index = 34)
|
||||
@ApiModelProperty("承运商")
|
||||
private String carrier;
|
||||
|
||||
@ExcelProperty(index = 35)
|
||||
@ApiModelProperty("物流单号")
|
||||
private String trackingNum;
|
||||
|
||||
@ExcelProperty(index = 36)
|
||||
@ApiModelProperty("运费金额")
|
||||
private BigDecimal freightAmount;
|
||||
|
||||
@ExcelProperty(index = 37)
|
||||
@ApiModelProperty("车牌号")
|
||||
private String plateNum;
|
||||
|
||||
@ExcelProperty(index = 38)
|
||||
@ApiModelProperty("司机")
|
||||
private String driverName;
|
||||
|
||||
@ExcelProperty(index = 39)
|
||||
@ApiModelProperty("联系电话")
|
||||
private String driverPhone;
|
||||
|
||||
/** ========================= 采购物料信息 ========================== */
|
||||
@ExcelProperty(index = 40)
|
||||
@ApiModelProperty("物料名称")
|
||||
private String goodsName;
|
||||
|
||||
@ExcelProperty(index = 41)
|
||||
@ApiModelProperty("辅助单位")
|
||||
private String supportUnit;
|
||||
|
||||
@ExcelProperty(index = 42)
|
||||
@ApiModelProperty("辅助单位数量")
|
||||
private Integer supportUnitQuantity;
|
||||
|
||||
@ExcelProperty(index = 43)
|
||||
@ApiModelProperty("物料单位EA")
|
||||
private String materialUnitEa;
|
||||
|
||||
@ExcelProperty(index = 44)
|
||||
@ApiModelProperty("单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@ExcelProperty(index = 45)
|
||||
@ApiModelProperty("含税单价")
|
||||
private BigDecimal taxUnitPrice;
|
||||
|
||||
@ExcelProperty(index = 46)
|
||||
@ApiModelProperty("金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ExcelProperty(index = 47)
|
||||
@ApiModelProperty("税率")
|
||||
private BigDecimal taxRate;
|
||||
|
||||
@ExcelProperty(index = 48)
|
||||
@ApiModelProperty("含税金额/价税合计")
|
||||
private BigDecimal taxAmount;
|
||||
|
||||
@ExcelProperty(index = 49)
|
||||
@ApiModelProperty("备注")
|
||||
private String goodsRemark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.mhd.oms.interfaces.dto.receiptInfo;
|
||||
|
||||
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.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 收货信息对象 oms_receipt_info
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ReceiptInfoDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("订单管理表ID")
|
||||
@Excel(name = "订单管理表ID")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("收货人")
|
||||
@Excel(name = "收货人")
|
||||
private String consignee;
|
||||
|
||||
@ApiModelProperty("收货人联系电话")
|
||||
@Excel(name = "收货人联系电话")
|
||||
private String consigneePhone;
|
||||
|
||||
@ApiModelProperty("收货人所在区域编码")
|
||||
@Excel(name = "收货人所在区域编码")
|
||||
private String consigneeAreaCode;
|
||||
|
||||
@ApiModelProperty("收货人所在区域")
|
||||
@Excel(name = "收货人所在区域")
|
||||
private String consigneeArea;
|
||||
|
||||
@ApiModelProperty("收货人详细地址")
|
||||
@Excel(name = "收货人详细地址")
|
||||
private String consigneeAddress;
|
||||
|
||||
@ApiModelProperty("收货地址经纬度")
|
||||
@Excel(name = "收货地址经纬度")
|
||||
private String raddressLatLon;
|
||||
|
||||
@ApiModelProperty("预计到货时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date estimatedReceivingTime;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.mhd.oms.interfaces.dto.salesOrder;
|
||||
|
||||
import com.mhd.oms.interfaces.dto.deliveryInfo.DeliveryInfoDTO;
|
||||
import com.mhd.oms.interfaces.dto.goods.GoodsDTO;
|
||||
import com.mhd.oms.interfaces.dto.logistics.LogisticsDTO;
|
||||
import com.mhd.oms.interfaces.dto.receiptInfo.ReceiptInfoDTO;
|
||||
import com.mhd.oms.interfaces.dto.settlement.SettlementDTO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 销售订单对象 oms_sales_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-06-08
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class SalesOrderAddDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("基本信息")
|
||||
private SalesOrderDTO salesOrderDTO;
|
||||
|
||||
|
||||
@ApiModelProperty("结算信息")
|
||||
private SettlementDTO settlementDTO;
|
||||
|
||||
@ApiModelProperty("发货信息")
|
||||
private DeliveryInfoDTO deliveryInfoDTO;
|
||||
|
||||
@ApiModelProperty("收货信息")
|
||||
private ReceiptInfoDTO receiptInfoDTO;
|
||||
|
||||
@ApiModelProperty("物流信息")
|
||||
private LogisticsDTO logisticsDTO;
|
||||
|
||||
@ApiModelProperty("物料信息")
|
||||
private List<GoodsDTO> goodsDTOList;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.mhd.oms.interfaces.dto.salesOrder;
|
||||
|
||||
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 java.util.Date;
|
||||
|
||||
/**
|
||||
* 销售订单对象 oms_sales_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-06-08
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class SalesOrderAuditDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("采购订单ID集合")
|
||||
private String ids;
|
||||
|
||||
|
||||
@ApiModelProperty("审核人")
|
||||
@Excel(name = "审核人")
|
||||
private Long auditBy;
|
||||
|
||||
@ApiModelProperty("审核时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date auditTime;
|
||||
|
||||
@ApiModelProperty("审核状态;1待审核2通过3拒绝")
|
||||
@Excel(name = "审核状态;1待审核2通过3拒绝")
|
||||
private Integer auditState;
|
||||
|
||||
@ApiModelProperty("审核结果")
|
||||
@Excel(name = "审核结果")
|
||||
private String auditResult;
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
package com.mhd.oms.interfaces.dto.salesOrder;
|
||||
|
||||
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 java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 销售订单对象 oms_sales_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-06-08
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class SalesOrderDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("审核人")
|
||||
@Excel(name = "审核人")
|
||||
private String auditBy;
|
||||
|
||||
@ApiModelProperty("审核时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date auditTime;
|
||||
|
||||
@ApiModelProperty("审核状态;0待审核1通过2拒绝")
|
||||
@Excel(name = "审核状态;0待审核1通过2拒绝")
|
||||
private Integer auditState;
|
||||
|
||||
@ApiModelProperty("审核结果")
|
||||
@Excel(name = "审核结果")
|
||||
private String auditResult;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("销售单号")
|
||||
@Excel(name = "销售单号")
|
||||
private String orderNo;
|
||||
|
||||
@ApiModelProperty("订单状态;1待审核2已审核3已拒绝4已生成5部分销售6完成7已取消8已拦截")
|
||||
@Excel(name = "订单状态;1待审核2已审核3已拒绝4已生成5部分销售6完成7已取消8已拦截")
|
||||
private Integer orderState;
|
||||
|
||||
@ApiModelProperty("供应链订单号;生产供应链订单回填此字段,取消供应链置空此字段")
|
||||
@Excel(name = "供应链订单号;生产供应链订单回填此字段,取消供应链置空此字段")
|
||||
private String scoNo;
|
||||
|
||||
@ApiModelProperty("客户ID")
|
||||
@Excel(name = "客户ID")
|
||||
private Long customerId;
|
||||
|
||||
@ApiModelProperty("客户姓名")
|
||||
@Excel(name = "客户姓名")
|
||||
private String customer;
|
||||
|
||||
@ApiModelProperty("合计金额")
|
||||
@Excel(name = "合计金额")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
@ApiModelProperty("含税金额")
|
||||
@Excel(name = "含税金额")
|
||||
private BigDecimal taxAmount;
|
||||
|
||||
@ApiModelProperty("出库数量")
|
||||
@Excel(name = "出库数量")
|
||||
private Long inStorageNum;
|
||||
|
||||
@ApiModelProperty("订单类型ID")
|
||||
@Excel(name = "订单类型ID")
|
||||
private Long orderTypeId;
|
||||
|
||||
@ApiModelProperty("订单类型")
|
||||
@Excel(name = "订单类型")
|
||||
private String orderType;
|
||||
|
||||
@ApiModelProperty("货主ID")
|
||||
@Excel(name = "货主ID")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主")
|
||||
@Excel(name = "货主")
|
||||
private String shipper;
|
||||
|
||||
@ApiModelProperty("合同号")
|
||||
@Excel(name = "合同号")
|
||||
private String contractNo;
|
||||
|
||||
@ApiModelProperty("项目ID")
|
||||
@Excel(name = "项目ID")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("项目")
|
||||
@Excel(name = "项目")
|
||||
private String project;
|
||||
|
||||
@ApiModelProperty("拦截状态;0未拦截1拦截成功2拦截失败")
|
||||
@Excel(name = "拦截状态;0未拦截1拦截成功2拦截失败")
|
||||
private Integer tacklState;
|
||||
|
||||
@ApiModelProperty("拦截时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "拦截时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date tacklTime;
|
||||
|
||||
@ApiModelProperty("来源;0-内部1-外部")
|
||||
@Excel(name = "来源;0-内部1-外部")
|
||||
private Integer source;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
@Excel(name = "组织ID")
|
||||
private Long orgId;
|
||||
|
||||
@ApiModelProperty("组织")
|
||||
@Excel(name = "组织")
|
||||
private String org;
|
||||
|
||||
@ApiModelProperty("订单时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "订单时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderTime;
|
||||
|
||||
@ApiModelProperty("发货仓库ID")
|
||||
@Excel(name = "发货仓库ID")
|
||||
private Long deliveryWarehouseId;
|
||||
|
||||
@ApiModelProperty("发货仓库")
|
||||
@Excel(name = "发货仓库")
|
||||
private String deliveryWarehouse;
|
||||
|
||||
@ApiModelProperty("发货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "发货日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date deliveryDate;
|
||||
|
||||
@ApiModelProperty("客户订单号")
|
||||
@Excel(name = "客户订单号")
|
||||
private String customerOrders;
|
||||
|
||||
@ApiModelProperty("校验库存是否充足;0-不校验1-校验")
|
||||
@Excel(name = "校验库存是否充足;0-不校验1-校验")
|
||||
private Long checkInventory;
|
||||
|
||||
@ApiModelProperty("优惠率")
|
||||
@Excel(name = "优惠率")
|
||||
private BigDecimal rateConcession;
|
||||
|
||||
@ApiModelProperty("优惠金额")
|
||||
@Excel(name = "优惠金额")
|
||||
private BigDecimal discountAmount;
|
||||
|
||||
@ApiModelProperty("成交价税合计")
|
||||
@Excel(name = "成交价税合计")
|
||||
private BigDecimal totalPriceTax;
|
||||
|
||||
@ApiModelProperty("附件名称")
|
||||
@Excel(name = "附件名称")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("附件地址")
|
||||
@Excel(name = "附件地址")
|
||||
private String fileUrl;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
@@ -0,0 +1,307 @@
|
||||
package com.mhd.oms.interfaces.dto.salesOrder;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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.util.Date;
|
||||
|
||||
/**
|
||||
* 销售订单管理对象 oms_sales_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class SalesOrderExcelDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ================= 采购订单信息 =================== */
|
||||
|
||||
@ExcelProperty(index = 0)
|
||||
@ApiModelProperty("销售单号")
|
||||
private String orderNo;
|
||||
|
||||
@ExcelProperty(index = 1)
|
||||
@ApiModelProperty("客户")
|
||||
private String customer;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("客户ID")
|
||||
private String customerId;
|
||||
|
||||
@ExcelProperty(index = 2)
|
||||
@ApiModelProperty("货主")
|
||||
private String shipper;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("货主ID")
|
||||
private String shipperId;
|
||||
|
||||
@ExcelProperty(index = 3)
|
||||
@ApiModelProperty("组织")
|
||||
private String organizationName;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("组织id")
|
||||
private String organizationId;
|
||||
|
||||
@ExcelProperty(index = 4)
|
||||
@ApiModelProperty("订单日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date orderTime;
|
||||
|
||||
@ExcelProperty(index = 5)
|
||||
@ApiModelProperty("订单类型")
|
||||
private String orderType;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("订单类型id")
|
||||
private Long orderTypeId;
|
||||
|
||||
@ExcelProperty(index = 6)
|
||||
@ApiModelProperty("发货仓库")
|
||||
private String deliveryWarehouse;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("发货仓库ID")
|
||||
private Long deliveryWarehouseId;
|
||||
|
||||
@ExcelProperty(index = 7)
|
||||
@ApiModelProperty("发货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date deliveryDate;
|
||||
|
||||
@ExcelProperty(index = 8)
|
||||
@ApiModelProperty("客户订单号")
|
||||
private String customerOrders;
|
||||
|
||||
@ExcelProperty(index = 9)
|
||||
@ApiModelProperty("合同号")
|
||||
private String contractNo;
|
||||
|
||||
@ExcelProperty(index = 10)
|
||||
@ApiModelProperty("项目")
|
||||
private String project;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("项目ID")
|
||||
private Long projectId;
|
||||
|
||||
@ExcelProperty(index = 11)
|
||||
@ApiModelProperty("校验库存是否充足:0-不校验、1-校验")
|
||||
private Long checkInventory;
|
||||
|
||||
@ExcelProperty(index = 12)
|
||||
@ApiModelProperty("优惠率")
|
||||
private BigDecimal rateConcession;
|
||||
|
||||
@ExcelProperty(index = 13)
|
||||
@ApiModelProperty("优惠金额")
|
||||
private BigDecimal discountAmount;
|
||||
|
||||
@ExcelProperty(index = 14)
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty(index = 15)
|
||||
@ApiModelProperty("附件(地址)")
|
||||
private String fileUrl;
|
||||
|
||||
/** =================== 结算信息 ===================== */
|
||||
@ExcelProperty(index = 16)
|
||||
@ApiModelProperty("结算对象")
|
||||
private String settlementObj;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("结算对象ID")
|
||||
private Long settlementObjId;
|
||||
|
||||
@ExcelProperty(index = 17)
|
||||
@ApiModelProperty("结算方式")
|
||||
private String settlementWay;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("结算方式ID")
|
||||
private Long settlementWayId;
|
||||
|
||||
@ExcelProperty(index = 18)
|
||||
@ApiModelProperty("支付状态")
|
||||
private String payStatus;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("支付状态ID")
|
||||
private Long payStatusId;
|
||||
|
||||
@ExcelProperty(index = 19)
|
||||
@ApiModelProperty("实付金额:销售订单-本次付款")
|
||||
private BigDecimal paidAmount;
|
||||
|
||||
@ExcelProperty(index = 20)
|
||||
@ApiModelProperty("付款账号")
|
||||
private String paymentAccNo;
|
||||
|
||||
@ExcelProperty(index = 21)
|
||||
@ApiModelProperty("付款单号")
|
||||
private String paymentOrderNo;
|
||||
|
||||
@ExcelProperty(index = 22)
|
||||
@ApiModelProperty("结算信息备注")
|
||||
private String settlementRemark;
|
||||
|
||||
@ExcelProperty(index = 23)
|
||||
@ApiModelProperty("附件地址")
|
||||
private String settlementFileUrl;
|
||||
|
||||
/** ========================= 发货信息 ========================== */
|
||||
@ExcelProperty(index = 24)
|
||||
@ApiModelProperty("发货人")
|
||||
private String consigner;
|
||||
|
||||
@ExcelProperty(index = 25)
|
||||
@ApiModelProperty("发货人联系电话")
|
||||
private String consignerPhone;
|
||||
|
||||
@ExcelProperty(index = 26)
|
||||
@ApiModelProperty("发货人所在区域")
|
||||
private String consignerArea;
|
||||
|
||||
@ExcelProperty(index = 27)
|
||||
@ApiModelProperty("发货人详细地址")
|
||||
private String consignerAddress;
|
||||
|
||||
@ExcelProperty(index = 28)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("预计发货时间")
|
||||
private Date estimatedDeliveryTime;
|
||||
|
||||
/** ========================= 收货信息 ========================== */
|
||||
@ExcelProperty(index = 29)
|
||||
@ApiModelProperty("收货人")
|
||||
private String consignee;
|
||||
|
||||
@ExcelProperty(index = 30)
|
||||
@ApiModelProperty("收货人联系电话")
|
||||
private String consigneePhone;
|
||||
|
||||
@ExcelProperty(index = 31)
|
||||
@ApiModelProperty("收货人所在区域")
|
||||
private String consigneeArea;
|
||||
|
||||
@ExcelProperty(index = 32)
|
||||
@ApiModelProperty("收货人详细地址")
|
||||
private String consigneeAddress;
|
||||
|
||||
@ExcelProperty(index = 33)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("预计到货时间")
|
||||
private Date estimatedReceivingTime;
|
||||
|
||||
/** ========================= 物流信息 ========================== */
|
||||
@ExcelProperty(index = 34)
|
||||
@ApiModelProperty("运输方式")
|
||||
private String shippingType;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("运输方式ID")
|
||||
private String shippingTypeId;
|
||||
|
||||
@ExcelProperty(index = 35)
|
||||
@ApiModelProperty("承运商")
|
||||
private String carrier;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("承运商ID")
|
||||
private Long carrierId;
|
||||
|
||||
@ExcelProperty(index = 36)
|
||||
@ApiModelProperty("物流单号")
|
||||
private String trackingNum;
|
||||
|
||||
@ExcelProperty(index = 37)
|
||||
@ApiModelProperty("运费金额")
|
||||
private BigDecimal freightAmount;
|
||||
|
||||
@ExcelProperty(index = 38)
|
||||
@ApiModelProperty("车牌号")
|
||||
private String plateNum;
|
||||
|
||||
@ExcelProperty(index = 39)
|
||||
@ApiModelProperty("司机")
|
||||
private String driverName;
|
||||
|
||||
@ExcelProperty(index = 40)
|
||||
@ApiModelProperty("联系电话")
|
||||
private String driverPhone;
|
||||
|
||||
/** ========================= 采购物料信息 ========================== */
|
||||
@ExcelProperty(index = 41)
|
||||
@ApiModelProperty("物料名称")
|
||||
private String goodsName;
|
||||
|
||||
@ExcelProperty(index = 42)
|
||||
@ApiModelProperty("物料编码")
|
||||
private String goodsNo;
|
||||
|
||||
@ExcelProperty(index = 43)
|
||||
@ApiModelProperty("包装规格")
|
||||
private String packingSize;
|
||||
|
||||
@ExcelProperty(index = 44)
|
||||
@ApiModelProperty("辅助单位")
|
||||
private String supportUnit;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("辅助单位ID")
|
||||
private Long supportUnitId;
|
||||
|
||||
@ExcelProperty(index = 45)
|
||||
@ApiModelProperty("辅助单位数量")
|
||||
private Integer supportUnitQuantity;
|
||||
|
||||
@ExcelProperty(index = 46)
|
||||
@ApiModelProperty("物料单位EA")
|
||||
private String materialUnitEa;
|
||||
|
||||
@ExcelProperty(index = 47)
|
||||
@ApiModelProperty("物料数量EA")
|
||||
private String materialUnitEaQuantity;
|
||||
|
||||
@ExcelProperty(index = 48)
|
||||
@ApiModelProperty("单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@ExcelProperty(index = 49)
|
||||
@ApiModelProperty("含税单价")
|
||||
private BigDecimal taxUnitPrice;
|
||||
|
||||
@ExcelProperty(index = 50)
|
||||
@ApiModelProperty("金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ExcelProperty(index = 51)
|
||||
@ApiModelProperty("税率")
|
||||
private BigDecimal taxRate;
|
||||
|
||||
@ExcelProperty(index = 52)
|
||||
@ApiModelProperty("税金|税额")
|
||||
private BigDecimal taxes;
|
||||
|
||||
@ExcelProperty(index = 53)
|
||||
@ApiModelProperty("含税金额/价税合计")
|
||||
private BigDecimal taxAmount;
|
||||
|
||||
@ExcelProperty(index = 54)
|
||||
@ApiModelProperty("备注")
|
||||
private String goodsRemark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.mhd.oms.interfaces.dto.scmOrder;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 供应链订单对象 oms_scm_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ScmOrderDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("供应链订单来源;1采购订单2销售订单3运输订单")
|
||||
@Excel(name = "供应链订单来源;1采购订单2销售订单3运输订单")
|
||||
private Integer scmSource;
|
||||
|
||||
@ApiModelProperty("订单管理表ID")
|
||||
@Excel(name = "订单管理表ID")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("供应链订单号")
|
||||
@Excel(name = "供应链订单号")
|
||||
private String scmNo;
|
||||
|
||||
@ApiModelProperty("订单状态;1未审核2已审核3部分生成4全部生成5部分完成6已完成7已取消8已拦截")
|
||||
@Excel(name = "订单状态;1未审核2已审核3部分生成4全部生成5部分完成6已完成7已取消8已拦截")
|
||||
private Integer orderState;
|
||||
|
||||
@ApiModelProperty("任务数量")
|
||||
@Excel(name = "任务数量")
|
||||
private Long taskNum;
|
||||
|
||||
@ApiModelProperty("有效数量")
|
||||
@Excel(name = "有效数量")
|
||||
private Long activeTaskNum;
|
||||
|
||||
@ApiModelProperty("完成数量")
|
||||
@Excel(name = "完成数量")
|
||||
private Long finishTaskNum;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.mhd.oms.interfaces.dto.settlement;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 结算信息对象 oms_settlement
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class SettlementDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("订单管理表ID")
|
||||
@Excel(name = "订单管理表ID")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("结算对象ID")
|
||||
@Excel(name = "结算对象ID")
|
||||
private Long settlementObjId;
|
||||
|
||||
@ApiModelProperty("结算对象")
|
||||
@Excel(name = "结算对象")
|
||||
private String settlementObj;
|
||||
|
||||
@ApiModelProperty("结算方式ID")
|
||||
@Excel(name = "结算方式ID")
|
||||
private String settlementWayId;
|
||||
|
||||
@ApiModelProperty("结算方式")
|
||||
@Excel(name = "结算方式")
|
||||
private String settlementWay;
|
||||
|
||||
@ApiModelProperty("支付方式")
|
||||
@Excel(name = "支付方式")
|
||||
private String payMethod;
|
||||
|
||||
@ApiModelProperty("支付状态ID")
|
||||
@Excel(name = "支付状态ID")
|
||||
private String payStatusId;
|
||||
|
||||
@ApiModelProperty("支付状态")
|
||||
@Excel(name = "支付状态")
|
||||
private String payStatus;
|
||||
|
||||
@ApiModelProperty("预付金额")
|
||||
@Excel(name = "预付金额")
|
||||
private BigDecimal prepaidAmount;
|
||||
|
||||
@ApiModelProperty("实付金额;采购订单:本次付款")
|
||||
@Excel(name = "实付金额;采购订单:本次付款")
|
||||
private BigDecimal paidAmount;
|
||||
|
||||
@ApiModelProperty("欠款金额;采购订单:本次欠款")
|
||||
@Excel(name = "欠款金额;采购订单:本次欠款")
|
||||
private BigDecimal debtAmount;
|
||||
|
||||
@ApiModelProperty("付款账号")
|
||||
@Excel(name = "付款账号")
|
||||
private String paymentAccNo;
|
||||
|
||||
@ApiModelProperty("付款单号")
|
||||
@Excel(name = "付款单号")
|
||||
private String paymentOrderNo;
|
||||
|
||||
@ApiModelProperty("附件地址")
|
||||
@Excel(name = "附件地址")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("附件地址")
|
||||
@Excel(name = "附件地址")
|
||||
private String fileUrl;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.mhd.oms.interfaces.dto.taskOrder;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作业任务对象 oms_task_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-24
|
||||
*/
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class CreateTaskOrderDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("供应链订单ID")
|
||||
@NotNull(message = "供应链订单ID不能为空")
|
||||
private Long scmId;
|
||||
|
||||
@ApiModelProperty("下发仓库ID")
|
||||
@NotNull(message = "下发仓库ID不能为空")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("商品信息")
|
||||
@NotNull(message = "商品信息不能为空")
|
||||
private List<CreateTaskOrderGoodsInfoDTO> goodsInfoList;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Size(message = "备注不能超过个{max}个字符", max = 255)
|
||||
private String remark;
|
||||
|
||||
@NotNull(message = "生成作业任务方式不能为空")
|
||||
@ApiModelProperty("生成作业任务方式:0-根据所填数量生成、1-全部生成")
|
||||
private Integer createType;
|
||||
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.mhd.oms.interfaces.dto.taskOrder;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 作业任务对象 oms_task_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-24
|
||||
*/
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class CreateTaskOrderGoodsInfoDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("计划任务数量(生成作业任务方式为根据所填数量生成时必填)")
|
||||
private BigDecimal planNum;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.mhd.oms.interfaces.dto.taskOrder;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class PoMergeTaskDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("作业任务号")
|
||||
private String taskNo;
|
||||
|
||||
@ApiModelProperty("下发仓库ID")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("下发仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("货主ID")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主")
|
||||
private String shipper;
|
||||
|
||||
@ApiModelProperty("任务数量")
|
||||
private Integer taskNum;
|
||||
|
||||
@ApiModelProperty("合并作业任务号")
|
||||
private String mergeTaskNo;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.mhd.oms.interfaces.dto.taskOrder;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作业任务对象 oms_task_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-24
|
||||
*/
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class TaskOrderDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("供应链订单ID")
|
||||
@Excel(name = "供应链订单ID")
|
||||
private Long scmId;
|
||||
@ApiModelProperty("供应链订单ID列表")
|
||||
private List<Long> scmIdList;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("仓库ID")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("作业任务类型ID")
|
||||
private Integer taskTypeId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.mhd.oms.interfaces.facade.deliveryInfo;
|
||||
|
||||
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.oms.application.service.deliveryInfo.DeliveryInfoApplicationService;
|
||||
import com.mhd.oms.domain.deliveryInfo.repository.po.DeliveryInfoPO;
|
||||
import com.mhd.oms.domain.deliveryInfo.repository.todo.DeliveryInfoDO;
|
||||
import com.mhd.oms.interfaces.assembler.deliveryInfo.DeliveryInfoAssembler;
|
||||
import com.mhd.oms.interfaces.dto.deliveryInfo.DeliveryInfoDTO;
|
||||
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
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/deliveryInfoApi")
|
||||
public class DeliveryInfoApi extends BaseController {
|
||||
@Autowired
|
||||
private DeliveryInfoApplicationService deliveryInfoApplicationService;
|
||||
|
||||
@Resource
|
||||
private DeliveryInfoAssembler deliveryInfoAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询发货信息列表
|
||||
*/
|
||||
@ApiOperation("查询发货信息列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DeliveryInfoDTO deliveryInfoDTO)
|
||||
{
|
||||
//转换实体
|
||||
DeliveryInfoDO deliveryInfoDO = deliveryInfoAssembler.toDO(deliveryInfoDTO);
|
||||
startPage();
|
||||
List<DeliveryInfoPO> list = deliveryInfoApplicationService.queryList(deliveryInfoDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑发货信息
|
||||
*/
|
||||
@ApiOperation("编辑发货信息")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody DeliveryInfoDTO deliveryInfoDTO)
|
||||
{
|
||||
//转换实体
|
||||
DeliveryInfoDO deliveryInfoDO = deliveryInfoAssembler.toDO(deliveryInfoDTO);
|
||||
if(deliveryInfoDTO.getId() != null){
|
||||
return toAjax(deliveryInfoApplicationService.update(deliveryInfoDO));
|
||||
}else {
|
||||
return toAjax(deliveryInfoApplicationService.insert(deliveryInfoDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除发货信息
|
||||
*/
|
||||
@ApiOperation("批量删除发货信息")
|
||||
@DeleteMapping("/deleteByIds/{ids}")
|
||||
public AjaxResult delete(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(deliveryInfoApplicationService.delete(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取发货信息详细信息
|
||||
*/
|
||||
@ApiOperation("获取发货信息")
|
||||
@GetMapping(value = "/getInfo/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(deliveryInfoApplicationService.getInfo(id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.mhd.oms.interfaces.facade.goods;
|
||||
|
||||
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.oms.application.service.goods.GoodsApplicationService;
|
||||
import com.mhd.oms.domain.goods.repository.po.GoodsPO;
|
||||
import com.mhd.oms.domain.goods.repository.todo.GoodsDO;
|
||||
import com.mhd.oms.interfaces.assembler.goods.GoodsAssembler;
|
||||
import com.mhd.oms.interfaces.dto.goods.GoodsDTO;
|
||||
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
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/goodsApi")
|
||||
public class GoodsApi extends BaseController {
|
||||
@Autowired
|
||||
private GoodsApplicationService goodsApplicationService;
|
||||
|
||||
@Resource
|
||||
private GoodsAssembler goodsAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询商品信息列表
|
||||
*/
|
||||
@ApiOperation("查询商品信息列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(GoodsDTO goodsDTO)
|
||||
{
|
||||
//转换实体
|
||||
GoodsDO goodsDO = goodsAssembler.toDO(goodsDTO);
|
||||
startPage();
|
||||
List<GoodsPO> list = goodsApplicationService.queryList(goodsDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation("查询商品信息列表(不分页)")
|
||||
@GetMapping("/noPageList")
|
||||
public TableDataInfo noPageList(GoodsDTO goodsDTO)
|
||||
{
|
||||
//转换实体
|
||||
GoodsDO goodsDO = goodsAssembler.toDO(goodsDTO);
|
||||
List<GoodsPO> list = goodsApplicationService.queryList(goodsDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑商品信息
|
||||
*/
|
||||
@ApiOperation("编辑商品信息")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody GoodsDTO goodsDTO)
|
||||
{
|
||||
//转换实体
|
||||
GoodsDO goodsDO = goodsAssembler.toDO(goodsDTO);
|
||||
if(goodsDTO.getId() != null){
|
||||
return toAjax(goodsApplicationService.update(goodsDO));
|
||||
}else {
|
||||
return toAjax(goodsApplicationService.insert(goodsDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商品信息
|
||||
*/
|
||||
@ApiOperation("批量删除商品信息")
|
||||
@DeleteMapping("/deleteByIds/{ids}")
|
||||
public AjaxResult delete(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(goodsApplicationService.delete(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品信息详细信息
|
||||
*/
|
||||
@ApiOperation("获取商品信息")
|
||||
@GetMapping(value = "/getInfo/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(goodsApplicationService.getInfo(id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
package com.mhd.oms.interfaces.facade.interceptOrder;
|
||||
|
||||
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.oms.application.service.interceptOrder.InterceptOrderApplicationService;
|
||||
import com.mhd.oms.domain.interceptOrder.repository.po.InterceptOrderPO;
|
||||
import com.mhd.oms.domain.interceptOrder.repository.todo.InterceptOrderDO;
|
||||
import com.mhd.oms.interfaces.assembler.interceptOrder.InterceptOrderAssembler;
|
||||
import com.mhd.oms.interfaces.dto.interceptOrder.InterceptOrderDTO;
|
||||
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
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/interceptOrderApi")
|
||||
public class InterceptOrderApi extends BaseController {
|
||||
@Autowired
|
||||
private InterceptOrderApplicationService interceptOrderApplicationService;
|
||||
|
||||
@Resource
|
||||
private InterceptOrderAssembler interceptOrderAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询拦截订单列表
|
||||
*/
|
||||
@ApiOperation("查询拦截订单列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InterceptOrderDTO interceptOrderDTO)
|
||||
{
|
||||
//转换实体
|
||||
InterceptOrderDO interceptOrderDO = interceptOrderAssembler.toDO(interceptOrderDTO);
|
||||
startPage();
|
||||
List<InterceptOrderPO> list = interceptOrderApplicationService.queryList(interceptOrderDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑拦截订单
|
||||
*/
|
||||
@ApiOperation("编辑拦截订单")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody InterceptOrderDTO interceptOrderDTO)
|
||||
{
|
||||
//转换实体
|
||||
InterceptOrderDO interceptOrderDO = interceptOrderAssembler.toDO(interceptOrderDTO);
|
||||
if(interceptOrderDTO.getId() != null){
|
||||
return toAjax(interceptOrderApplicationService.update(interceptOrderDO));
|
||||
}else {
|
||||
return toAjax(interceptOrderApplicationService.insert(interceptOrderDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除拦截订单
|
||||
*/
|
||||
@ApiOperation("批量删除拦截订单")
|
||||
@DeleteMapping("/deleteByIds/{ids}")
|
||||
public AjaxResult delete(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(interceptOrderApplicationService.delete(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取拦截订单详细信息
|
||||
*/
|
||||
@ApiOperation("获取拦截订单")
|
||||
@GetMapping(value = "/getInfo/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(interceptOrderApplicationService.getInfo(id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.mhd.oms.interfaces.facade.logistics;
|
||||
|
||||
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.oms.application.service.logistics.LogisticsApplicationService;
|
||||
import com.mhd.oms.domain.logistics.repository.po.LogisticsPO;
|
||||
import com.mhd.oms.domain.logistics.repository.todo.LogisticsDO;
|
||||
import com.mhd.oms.interfaces.assembler.logistics.LogisticsAssembler;
|
||||
import com.mhd.oms.interfaces.dto.logistics.LogisticsDTO;
|
||||
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
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/logisticsApi")
|
||||
public class LogisticsApi extends BaseController {
|
||||
@Autowired
|
||||
private LogisticsApplicationService logisticsApplicationService;
|
||||
|
||||
@Resource
|
||||
private LogisticsAssembler logisticsAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询物流信息列表
|
||||
*/
|
||||
@ApiOperation("查询物流信息列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(LogisticsDTO logisticsDTO)
|
||||
{
|
||||
//转换实体
|
||||
LogisticsDO logisticsDO = logisticsAssembler.toDO(logisticsDTO);
|
||||
startPage();
|
||||
List<LogisticsPO> list = logisticsApplicationService.queryList(logisticsDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑物流信息
|
||||
*/
|
||||
@ApiOperation("编辑物流信息")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody LogisticsDTO logisticsDTO)
|
||||
{
|
||||
//转换实体
|
||||
LogisticsDO logisticsDO = logisticsAssembler.toDO(logisticsDTO);
|
||||
if(logisticsDTO.getId() != null){
|
||||
return toAjax(logisticsApplicationService.update(logisticsDO));
|
||||
}else {
|
||||
return toAjax(logisticsApplicationService.insert(logisticsDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除物流信息
|
||||
*/
|
||||
@ApiOperation("批量删除物流信息")
|
||||
@DeleteMapping("/deleteByIds/{ids}")
|
||||
public AjaxResult delete(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(logisticsApplicationService.delete(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物流信息详细信息
|
||||
*/
|
||||
@ApiOperation("获取物流信息")
|
||||
@GetMapping(value = "/getInfo/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(logisticsApplicationService.getInfo(id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.mhd.oms.interfaces.facade.orderType;
|
||||
|
||||
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.oms.application.service.orderType.OrderTypeApplicationService;
|
||||
import com.mhd.oms.domain.orderType.repository.po.OrderTypeDictPO;
|
||||
import com.mhd.oms.domain.orderType.repository.po.OrderTypePO;
|
||||
import com.mhd.oms.domain.orderType.repository.todo.OrderTypeDO;
|
||||
import com.mhd.oms.interfaces.assembler.orderType.OrderTypeAssembler;
|
||||
import com.mhd.oms.interfaces.dto.orderType.OrderTypeDTO;
|
||||
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
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/orderTypeApi")
|
||||
public class OrderTypeApi extends BaseController {
|
||||
@Autowired
|
||||
private OrderTypeApplicationService orderTypeApplicationService;
|
||||
|
||||
@Resource
|
||||
private OrderTypeAssembler orderTypeAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询订单类型关系列表
|
||||
*/
|
||||
@ApiOperation("查询订单类型关系列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<List<OrderTypePO>> list(OrderTypeDTO orderTypeDTO)
|
||||
{
|
||||
//转换实体
|
||||
OrderTypeDO orderTypeDO = orderTypeAssembler.toDO(orderTypeDTO);
|
||||
startPage();
|
||||
List<OrderTypePO> list = orderTypeApplicationService.queryList(orderTypeDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 订单类型数据数据字典
|
||||
*/
|
||||
@ApiOperation("订单类型数据数据字典")
|
||||
@GetMapping("/listDict")
|
||||
public AjaxResult listDict()
|
||||
{
|
||||
List<OrderTypeDictPO> list = orderTypeApplicationService.listDict();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 编辑订单类型关系
|
||||
*/
|
||||
@ApiOperation("编辑订单类型关系")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody OrderTypeDTO orderTypeDTO)
|
||||
{
|
||||
//转换实体
|
||||
OrderTypeDO orderTypeDO = orderTypeAssembler.toDO(orderTypeDTO);
|
||||
if(orderTypeDTO.getId() != null){
|
||||
return toAjax(orderTypeApplicationService.update(orderTypeDO));
|
||||
}else {
|
||||
return toAjax(orderTypeApplicationService.insert(orderTypeDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单类型关系
|
||||
*/
|
||||
@ApiOperation("批量删除订单类型关系")
|
||||
@DeleteMapping("/deleteByIds/{ids}")
|
||||
public AjaxResult delete(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(orderTypeApplicationService.delete(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单类型关系详细信息
|
||||
*/
|
||||
@ApiOperation("获取订单类型关系")
|
||||
@GetMapping(value = "/getInfo/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(orderTypeApplicationService.getInfo(id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
package com.mhd.oms.interfaces.facade.purchaseOrder;
|
||||
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
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.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.oms.application.service.purchaseOrder.PurchaseOrderApplicationService;
|
||||
import com.mhd.oms.domain.purchaseOrder.repository.po.PurchaseOrderPO;
|
||||
import com.mhd.oms.domain.purchaseOrder.repository.todo.PurchaseOrderAddDO;
|
||||
import com.mhd.oms.domain.purchaseOrder.repository.todo.PurchaseOrderAuditDO;
|
||||
import com.mhd.oms.domain.purchaseOrder.repository.todo.PurchaseOrderDO;
|
||||
import com.mhd.oms.interfaces.assembler.purchaseOrder.PurchaseOrderAssembler;
|
||||
import com.mhd.oms.interfaces.dto.purchaseOrder.PurchaseOrderAddDTO;
|
||||
import com.mhd.oms.interfaces.dto.purchaseOrder.PurchaseOrderAuditDTO;
|
||||
import com.mhd.oms.interfaces.dto.purchaseOrder.PurchaseOrderDTO;
|
||||
import com.mhd.oms.interfaces.dto.purchaseOrder.PurchaseOrderExcelDTO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 采购订单管理Api
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/purchaseOrderApi")
|
||||
public class PurchaseOrderApi extends BaseController {
|
||||
@Autowired
|
||||
private PurchaseOrderApplicationService purchaseOrderApplicationService;
|
||||
|
||||
@Resource
|
||||
private PurchaseOrderAssembler purchaseOrderAssembler;
|
||||
|
||||
/**
|
||||
* 查询采购订单管理列表【订单池】
|
||||
*/
|
||||
@ApiOperation("查询采购订单管理列表【订单池】")
|
||||
@GetMapping("/orderPoolList")
|
||||
public TableDataInfo orderPoolList(PurchaseOrderDTO purchaseOrderDTO)
|
||||
{
|
||||
//转换实体
|
||||
PurchaseOrderDO purchaseOrderDO = purchaseOrderAssembler.toDO(purchaseOrderDTO);
|
||||
startPage();
|
||||
List<PurchaseOrderPO> list = purchaseOrderApplicationService.orderPoolList(purchaseOrderDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 分页查询采购订单管理列表
|
||||
*/
|
||||
@ApiOperation("查询采购订单管理列表【订单管理】")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PurchaseOrderDTO purchaseOrderDTO)
|
||||
{
|
||||
//转换实体
|
||||
PurchaseOrderDO purchaseOrderDO = purchaseOrderAssembler.toDO(purchaseOrderDTO);
|
||||
startPage();
|
||||
List<PurchaseOrderPO> list = purchaseOrderApplicationService.queryList(purchaseOrderDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑采购订单管理
|
||||
*/
|
||||
@ApiOperation("编辑采购订单管理")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody PurchaseOrderAddDTO purchaseOrderAddDTO)
|
||||
{
|
||||
//转换实体
|
||||
PurchaseOrderAddDO purchaseOrderAddDO = purchaseOrderAssembler.toOrderDo(purchaseOrderAddDTO);
|
||||
if(purchaseOrderAddDTO.getPurchaseOrderDTO().getId() != null){
|
||||
return toAjax(purchaseOrderApplicationService.update(purchaseOrderAddDO));
|
||||
|
||||
}else {
|
||||
return toAjax(purchaseOrderApplicationService.insert(purchaseOrderAddDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 【采购订单】生成供应链订单
|
||||
*/
|
||||
@ApiOperation("【采购订单】生成供应链订单")
|
||||
@PostMapping("/createSco")
|
||||
public AjaxResult createSco(@RequestBody List<Long> ids)
|
||||
{
|
||||
return toAjax(purchaseOrderApplicationService.createSco(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 【采购订单】取消供应链订单
|
||||
*/
|
||||
@ApiOperation("【采购订单】取消供应链订单")
|
||||
@PostMapping("/cancelSco")
|
||||
public AjaxResult cancelSco(@RequestBody List<Long> ids)
|
||||
{
|
||||
return toAjax(purchaseOrderApplicationService.cancelSco(ids));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除采购订单管理
|
||||
*/
|
||||
@ApiOperation("批量删除采购订单管理")
|
||||
@DeleteMapping("/deleteByIds/{ids}")
|
||||
public AjaxResult delete(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(purchaseOrderApplicationService.delete(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取采购订单管理详细信息
|
||||
*/
|
||||
@ApiOperation("获取采购订单管理")
|
||||
@GetMapping(value = "/getInfo/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(purchaseOrderApplicationService.getInfo(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 采购订单审核
|
||||
*/
|
||||
@ApiOperation("采购订单审核")
|
||||
@PostMapping(value = "/audit")
|
||||
public AjaxResult audit(@RequestBody PurchaseOrderAuditDTO purchaseOrderAuditDTO)
|
||||
{
|
||||
//转换实体
|
||||
PurchaseOrderAuditDO purchaseOrderAuditDO = purchaseOrderAssembler.toAuditDO(purchaseOrderAuditDTO);
|
||||
return toAjax(purchaseOrderApplicationService.audit(purchaseOrderAuditDO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 采购订单取消审核
|
||||
*/
|
||||
@ApiOperation("采购订单取消审核")
|
||||
@PostMapping(value = "/cancelAudit")
|
||||
public AjaxResult cancelAudit(@RequestBody PurchaseOrderAuditDTO purchaseOrderAuditDTO)
|
||||
{
|
||||
//转换实体
|
||||
PurchaseOrderAuditDO purchaseOrderAuditDO = purchaseOrderAssembler.toAuditDO(purchaseOrderAuditDTO);
|
||||
return toAjax(purchaseOrderApplicationService.cancelAudit(purchaseOrderAuditDO));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 采购订单导入
|
||||
*/
|
||||
@Log(title = "采购订单导入", description ="采购订单导入",businessType = BusinessType.IMPORT)
|
||||
@ApiOperation("采购订单导入")
|
||||
@PostMapping("/importPurchaseOrder")
|
||||
public R<?> importPurchaseOrder(@RequestBody List<PurchaseOrderExcelDTO> purchaseOrderExcelDtoList)
|
||||
{
|
||||
try {
|
||||
purchaseOrderApplicationService.importPurOrderExcel(purchaseOrderExcelDtoList);
|
||||
return R.ok(null,"导入成功!");
|
||||
} catch (ServiceException | DigitalLogisticsException ser) {
|
||||
log.error("导入失败!",ser);
|
||||
return R.fail("导入失败!" + ser.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error("导入失败",e);
|
||||
return R.fail("导入失败!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 拦截采购订单
|
||||
*/
|
||||
@Log(title = "拦截采购订单", description ="拦截采购订单",businessType = BusinessType.IMPORT)
|
||||
@ApiOperation("拦截采购订单")
|
||||
@PostMapping("/interceptOrder")
|
||||
public AjaxResult interceptOrder(@RequestBody List<Long> idList)
|
||||
{
|
||||
try {
|
||||
purchaseOrderApplicationService.interceptOrder(idList);
|
||||
return AjaxResult.success("操作成功!");
|
||||
} catch (ServiceException | DigitalLogisticsException ser) {
|
||||
log.error("拦截失败!",ser);
|
||||
return AjaxResult.error("拦截失败!" + ser.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error("拦截失败",e);
|
||||
return AjaxResult.error("拦截失败!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.mhd.oms.interfaces.facade.receiptInfo;
|
||||
|
||||
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.oms.application.service.receiptInfo.ReceiptInfoApplicationService;
|
||||
import com.mhd.oms.domain.receiptInfo.repository.po.ReceiptInfoPO;
|
||||
import com.mhd.oms.domain.receiptInfo.repository.todo.ReceiptInfoDO;
|
||||
import com.mhd.oms.interfaces.assembler.receiptInfo.ReceiptInfoAssembler;
|
||||
import com.mhd.oms.interfaces.dto.receiptInfo.ReceiptInfoDTO;
|
||||
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
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/receiptInfoApi")
|
||||
public class ReceiptInfoApi extends BaseController {
|
||||
@Autowired
|
||||
private ReceiptInfoApplicationService receiptInfoApplicationService;
|
||||
|
||||
@Resource
|
||||
private ReceiptInfoAssembler receiptInfoAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询收货信息列表
|
||||
*/
|
||||
@ApiOperation("查询收货信息列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ReceiptInfoDTO receiptInfoDTO)
|
||||
{
|
||||
//转换实体
|
||||
ReceiptInfoDO receiptInfoDO = receiptInfoAssembler.toDO(receiptInfoDTO);
|
||||
startPage();
|
||||
List<ReceiptInfoPO> list = receiptInfoApplicationService.queryList(receiptInfoDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑收货信息
|
||||
*/
|
||||
@ApiOperation("编辑收货信息")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody ReceiptInfoDTO receiptInfoDTO)
|
||||
{
|
||||
//转换实体
|
||||
ReceiptInfoDO receiptInfoDO = receiptInfoAssembler.toDO(receiptInfoDTO);
|
||||
if(receiptInfoDTO.getId() != null){
|
||||
return toAjax(receiptInfoApplicationService.update(receiptInfoDO));
|
||||
}else {
|
||||
return toAjax(receiptInfoApplicationService.insert(receiptInfoDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除收货信息
|
||||
*/
|
||||
@ApiOperation("批量删除收货信息")
|
||||
@DeleteMapping("/deleteByIds/{ids}")
|
||||
public AjaxResult delete(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(receiptInfoApplicationService.delete(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取收货信息详细信息
|
||||
*/
|
||||
@ApiOperation("获取收货信息")
|
||||
@GetMapping(value = "/getInfo/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(receiptInfoApplicationService.getInfo(id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
package com.mhd.oms.interfaces.facade.salesOrder;
|
||||
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
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.common.log.annotation.Log;
|
||||
import com.mhd.common.log.enums.BusinessType;
|
||||
import com.mhd.oms.application.service.salesOrder.SalesOrderApplicationService;
|
||||
import com.mhd.oms.domain.salesOrder.repository.po.SalesOrderPO;
|
||||
import com.mhd.oms.domain.salesOrder.repository.todo.SalesOrderAddDO;
|
||||
import com.mhd.oms.domain.salesOrder.repository.todo.SalesOrderAuditDO;
|
||||
import com.mhd.oms.domain.salesOrder.repository.todo.SalesOrderDO;
|
||||
import com.mhd.oms.interfaces.assembler.salesOrder.SalesOrderAssembler;
|
||||
import com.mhd.oms.interfaces.dto.salesOrder.SalesOrderAddDTO;
|
||||
import com.mhd.oms.interfaces.dto.salesOrder.SalesOrderAuditDTO;
|
||||
import com.mhd.oms.interfaces.dto.salesOrder.SalesOrderDTO;
|
||||
import com.mhd.oms.interfaces.dto.salesOrder.SalesOrderExcelDTO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 销售订单Api
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-06-08
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/salesOrderApi")
|
||||
public class SalesOrderApi extends BaseController {
|
||||
@Autowired
|
||||
private SalesOrderApplicationService salesOrderApplicationService;
|
||||
|
||||
@Resource
|
||||
private SalesOrderAssembler salesOrderAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询销售订单列表
|
||||
*/
|
||||
@ApiOperation("查询销售订单列表【订单管理】")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SalesOrderDTO salesOrderDTO)
|
||||
{
|
||||
//转换实体
|
||||
SalesOrderDO salesOrderDO = salesOrderAssembler.toDO(salesOrderDTO);
|
||||
startPage();
|
||||
List<SalesOrderPO> list = salesOrderApplicationService.queryList(salesOrderDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ApiOperation("查询销售订单列表【订单池】")
|
||||
@GetMapping("/listPool")
|
||||
public TableDataInfo listPool(SalesOrderDTO salesOrderDTO)
|
||||
{
|
||||
//转换实体
|
||||
SalesOrderDO salesOrderDO = salesOrderAssembler.toDO(salesOrderDTO);
|
||||
startPage();
|
||||
List<SalesOrderPO> list = salesOrderApplicationService.listPool(salesOrderDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑销售订单
|
||||
*/
|
||||
@ApiOperation("编辑销售订单")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody SalesOrderAddDTO salesOrderAddDTO)
|
||||
{
|
||||
//转换实体
|
||||
SalesOrderAddDO salesOrderAddDO = salesOrderAssembler.toOrderDo(salesOrderAddDTO);
|
||||
if(salesOrderAddDO.getSalesOrderDO().getId() != null){
|
||||
return toAjax(salesOrderApplicationService.update(salesOrderAddDO));
|
||||
}else {
|
||||
return toAjax(salesOrderApplicationService.insert(salesOrderAddDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除销售订单
|
||||
*/
|
||||
@ApiOperation("批量删除销售订单")
|
||||
@DeleteMapping("/deleteByIds/{ids}")
|
||||
public AjaxResult delete(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(salesOrderApplicationService.delete(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取销售订单详细信息
|
||||
*/
|
||||
@ApiOperation("获取销售订单")
|
||||
@GetMapping(value = "/getInfo")
|
||||
public AjaxResult getInfo(@RequestParam("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(salesOrderApplicationService.getetails(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 【销售订单】生成供应链订单
|
||||
*/
|
||||
@ApiOperation("【销售订单】生成供应链订单")
|
||||
@PostMapping("/createSco")
|
||||
public AjaxResult createSco(@RequestBody List<Long> ids)
|
||||
{
|
||||
return toAjax(salesOrderApplicationService.createSco(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 【销售订单】取消供应链订单
|
||||
*/
|
||||
@ApiOperation("【销售订单】取消供应链订单")
|
||||
@PostMapping("/cancelSco")
|
||||
public AjaxResult cancelSco(@RequestBody List<Long> ids)
|
||||
{
|
||||
return toAjax(salesOrderApplicationService.cancelSco(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 销售订单审核
|
||||
*/
|
||||
@ApiOperation("销售订单审核")
|
||||
@PostMapping(value = "/audit")
|
||||
public AjaxResult audit(@RequestBody SalesOrderAuditDTO salesOrderAuditDTO)
|
||||
{
|
||||
//转换实体
|
||||
SalesOrderAuditDO salesOrderAuditDO = salesOrderAssembler.toAuditDO(salesOrderAuditDTO);
|
||||
return toAjax(salesOrderApplicationService.audit(salesOrderAuditDO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 销售订单取消审核
|
||||
*/
|
||||
@ApiOperation("销售订单取消审核")
|
||||
@PostMapping(value = "/cancelAudit")
|
||||
public AjaxResult cancelAudit(@RequestBody SalesOrderAuditDTO salesOrderAuditDTO)
|
||||
{
|
||||
//转换实体
|
||||
SalesOrderAuditDO salesOrderAuditDO = salesOrderAssembler.toAuditDO(salesOrderAuditDTO);
|
||||
return toAjax(salesOrderApplicationService.cancelAudit(salesOrderAuditDO));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 拦截销售订单
|
||||
*/
|
||||
@Log(title = "拦截销售订单", description ="拦截销售订单",businessType = BusinessType.IMPORT)
|
||||
@ApiOperation("拦截销售订单")
|
||||
@PostMapping("/interceptOrder")
|
||||
public AjaxResult interceptOrder(@RequestBody List<Long> idList)
|
||||
{
|
||||
|
||||
return toAjax(salesOrderApplicationService.interceptOrder(idList));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入销售订单
|
||||
*/
|
||||
@Log(title = "导入销售订单", description ="导入销售订单",businessType = BusinessType.IMPORT)
|
||||
@ApiOperation("导入销售订单")
|
||||
@PostMapping("/importSalesOrder")
|
||||
public R<?> importSalesOrder(@RequestBody List<SalesOrderExcelDTO> salesOrderExcelDtoList)
|
||||
{
|
||||
try {
|
||||
salesOrderApplicationService.importSalesOrder(salesOrderExcelDtoList);
|
||||
return R.ok(null,"导入成功!");
|
||||
} catch (ServiceException | DigitalLogisticsException ser) {
|
||||
log.error("导入失败!",ser);
|
||||
return R.fail("导入失败!" + ser.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error("导入失败",e);
|
||||
return R.fail("导入失败!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
package com.mhd.oms.interfaces.facade.scmOrder;
|
||||
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
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.oms.application.service.scmOrder.ScmOrderApplicationService;
|
||||
import com.mhd.oms.domain.scmOrder.repository.po.ScmOrderPO;
|
||||
import com.mhd.oms.domain.scmOrder.repository.todo.ScmOrderDO;
|
||||
import com.mhd.oms.domain.taskOrder.repository.todo.CreateTaskOrderDO;
|
||||
import com.mhd.oms.interfaces.assembler.scmOrder.ScmOrderAssembler;
|
||||
import com.mhd.oms.interfaces.dto.scmOrder.ScmOrderDTO;
|
||||
import com.mhd.oms.interfaces.dto.taskOrder.CreateTaskOrderDTO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 供应链订单Api
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/scmOrderApi")
|
||||
public class ScmOrderApi extends BaseController {
|
||||
@Autowired
|
||||
private ScmOrderApplicationService scmOrderApplicationService;
|
||||
|
||||
@Resource
|
||||
private ScmOrderAssembler scmOrderAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询供应链订单列表
|
||||
*/
|
||||
@ApiOperation("查询供应链订单列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ScmOrderDTO scmOrderDTO)
|
||||
{
|
||||
//转换实体
|
||||
ScmOrderDO scmOrderDO = scmOrderAssembler.toDO(scmOrderDTO);
|
||||
startPage();
|
||||
List<ScmOrderPO> list = scmOrderApplicationService.queryList(scmOrderDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑供应链订单
|
||||
*/
|
||||
@ApiOperation("编辑供应链订单")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody ScmOrderDTO scmOrderDTO)
|
||||
{
|
||||
//转换实体
|
||||
ScmOrderDO scmOrderDO = scmOrderAssembler.toDO(scmOrderDTO);
|
||||
if(scmOrderDTO.getId() != null){
|
||||
return toAjax(scmOrderApplicationService.update(scmOrderDO));
|
||||
}else {
|
||||
return toAjax(scmOrderApplicationService.insert(scmOrderDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除供应链订单
|
||||
*/
|
||||
@ApiOperation("批量删除供应链订单")
|
||||
@DeleteMapping("/deleteByIds/{ids}")
|
||||
public AjaxResult delete(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(scmOrderApplicationService.delete(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取供应链订单详细信息
|
||||
*/
|
||||
@ApiOperation("获取供应链订单")
|
||||
@GetMapping(value = "/getInfo/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(scmOrderApplicationService.getInfo(id));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成作业任务
|
||||
*/
|
||||
@ApiOperation("生成作业任务")
|
||||
@PostMapping("/createTaskOrder")
|
||||
public AjaxResult createTaskOrder(@RequestBody @Valid CreateTaskOrderDTO createTaskOrderDTO)
|
||||
{
|
||||
try{
|
||||
CreateTaskOrderDO createTaskOrderDO = scmOrderAssembler.toCreateTaskOrderDO(createTaskOrderDTO);
|
||||
scmOrderApplicationService.createTaskOrder(createTaskOrderDO);
|
||||
}
|
||||
catch(ServiceException e){
|
||||
log.error("生成作业任务失败", e);
|
||||
return AjaxResult.error("生成作业任务失败!" + e.getMessage());
|
||||
}
|
||||
catch(Exception e){
|
||||
log.error("生成作业任务失败", e);
|
||||
return AjaxResult.error("生成作业任务失败!");
|
||||
}
|
||||
return AjaxResult.success("作业任务生成成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成作业任务【批量】
|
||||
*/
|
||||
@ApiOperation("生成作业任务【批量】")
|
||||
@PostMapping("/batchCreateTaskOrder")
|
||||
public AjaxResult batchCreateTaskOrder(@RequestBody List<Long> idList)
|
||||
{
|
||||
try{
|
||||
scmOrderApplicationService.batchCreateTaskOrder(idList);
|
||||
}
|
||||
catch(ServiceException e){
|
||||
log.error("生成作业任务失败", e);
|
||||
return AjaxResult.error("生成作业任务失败!" + e.getMessage());
|
||||
}
|
||||
catch(Exception e){
|
||||
log.error("生成作业任务失败", e);
|
||||
return AjaxResult.error("生成作业任务失败!");
|
||||
}
|
||||
return AjaxResult.success("作业任务生成成功!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 订单审核【批量】
|
||||
*/
|
||||
@ApiOperation("订单审核【批量】")
|
||||
@PostMapping("/batchAudit")
|
||||
public AjaxResult batchAudit(@RequestBody List<String> idList)
|
||||
{
|
||||
try{
|
||||
scmOrderApplicationService.batchAudit(idList);
|
||||
}
|
||||
catch(ServiceException e){
|
||||
log.error("订单审核失败!", e);
|
||||
return AjaxResult.error("订单审核失败!" + e.getMessage());
|
||||
}
|
||||
catch(Exception e){
|
||||
log.error("订单审核失败!", e);
|
||||
return AjaxResult.error("订单审核失败!");
|
||||
}
|
||||
return AjaxResult.success("订单审核成功!");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 订单取消审核【批量】
|
||||
*/
|
||||
@ApiOperation("订单取消审核【批量】")
|
||||
@PostMapping("/batchCancelAudit")
|
||||
public AjaxResult batchCancelAudit(@RequestBody List<String> idList)
|
||||
{
|
||||
try{
|
||||
scmOrderApplicationService.batchCancelAudit(idList);
|
||||
}
|
||||
catch(ServiceException e){
|
||||
log.error("订单取消审核失败!", e);
|
||||
return AjaxResult.error("订单取消审核失败!" + e.getMessage());
|
||||
}
|
||||
catch(Exception e){
|
||||
log.error("订单取消审核失败!", e);
|
||||
return AjaxResult.error("订单取消审核失败!");
|
||||
}
|
||||
return AjaxResult.success("订单取消审核成功!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.mhd.oms.interfaces.facade.settlement;
|
||||
|
||||
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.oms.application.service.settlement.SettlementApplicationService;
|
||||
import com.mhd.oms.domain.settlement.repository.po.SettlementPO;
|
||||
import com.mhd.oms.domain.settlement.repository.todo.SettlementDO;
|
||||
import com.mhd.oms.interfaces.assembler.settlement.SettlementAssembler;
|
||||
import com.mhd.oms.interfaces.dto.settlement.SettlementDTO;
|
||||
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
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/settlementApi")
|
||||
public class SettlementApi extends BaseController {
|
||||
@Autowired
|
||||
private SettlementApplicationService settlementApplicationService;
|
||||
|
||||
@Resource
|
||||
private SettlementAssembler settlementAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询结算信息列表
|
||||
*/
|
||||
@ApiOperation("查询结算信息列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SettlementDTO settlementDTO)
|
||||
{
|
||||
//转换实体
|
||||
SettlementDO settlementDO = settlementAssembler.toDO(settlementDTO);
|
||||
startPage();
|
||||
List<SettlementPO> list = settlementApplicationService.queryList(settlementDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑结算信息
|
||||
*/
|
||||
@ApiOperation("编辑结算信息")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody SettlementDTO settlementDTO)
|
||||
{
|
||||
//转换实体
|
||||
SettlementDO settlementDO = settlementAssembler.toDO(settlementDTO);
|
||||
if(settlementDTO.getId() != null){
|
||||
return toAjax(settlementApplicationService.update(settlementDO));
|
||||
}else {
|
||||
return toAjax(settlementApplicationService.insert(settlementDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除结算信息
|
||||
*/
|
||||
@ApiOperation("批量删除结算信息")
|
||||
@DeleteMapping("/deleteByIds/{ids}")
|
||||
public AjaxResult delete(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(settlementApplicationService.delete(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取结算信息详细信息
|
||||
*/
|
||||
@ApiOperation("获取结算信息")
|
||||
@GetMapping(value = "/getInfo/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(settlementApplicationService.getInfo(id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
package com.mhd.oms.interfaces.facade.taskOrder;
|
||||
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
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.oms.application.service.taskOrder.TaskOrderApplicationService;
|
||||
import com.mhd.oms.domain.taskOrder.repository.po.TaskOrderPO;
|
||||
import com.mhd.oms.domain.taskOrder.repository.todo.TaskOrderDO;
|
||||
import com.mhd.oms.interfaces.assembler.taskOrder.TaskOrderAssembler;
|
||||
import com.mhd.oms.interfaces.dto.taskOrder.PoMergeTaskDTO;
|
||||
import com.mhd.oms.interfaces.dto.taskOrder.TaskOrderDTO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作业任务Api
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-24
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/taskOrderApi")
|
||||
public class TaskOrderApi extends BaseController {
|
||||
@Autowired
|
||||
private TaskOrderApplicationService taskOrderApplicationService;
|
||||
|
||||
@Resource
|
||||
private TaskOrderAssembler taskOrderAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询作业任务列表
|
||||
*/
|
||||
@ApiOperation("查询作业任务列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TaskOrderDTO taskOrderDTO)
|
||||
{
|
||||
//转换实体
|
||||
TaskOrderDO taskOrderDO = taskOrderAssembler.toDO(taskOrderDTO);
|
||||
startPage();
|
||||
List<TaskOrderPO> list = taskOrderApplicationService.queryList(taskOrderDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑作业任务
|
||||
*/
|
||||
@ApiOperation("编辑作业任务")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody TaskOrderDTO taskOrderDTO)
|
||||
{
|
||||
//转换实体
|
||||
TaskOrderDO taskOrderDO = taskOrderAssembler.toDO(taskOrderDTO);
|
||||
if(taskOrderDTO.getId() != null){
|
||||
return toAjax(taskOrderApplicationService.update(taskOrderDO));
|
||||
}else {
|
||||
return toAjax(taskOrderApplicationService.insert(taskOrderDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除作业任务
|
||||
*/
|
||||
@ApiOperation("批量删除作业任务")
|
||||
@DeleteMapping("/deleteByIds/{ids}")
|
||||
public AjaxResult delete(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(taskOrderApplicationService.delete(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取作业任务详细信息
|
||||
*/
|
||||
@ApiOperation("获取作业任务")
|
||||
@GetMapping(value = "/getInfo/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(taskOrderApplicationService.getInfo(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 下发任务
|
||||
*/
|
||||
@ApiOperation("下发任务")
|
||||
@PostMapping("/deliverTask")
|
||||
public AjaxResult deliverTask(@RequestBody List<Long> ids)
|
||||
{
|
||||
return AjaxResult.success(taskOrderApplicationService.deliverTask(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 完成任务
|
||||
*/
|
||||
@ApiOperation("完成任务")
|
||||
@PostMapping("/finishTask")
|
||||
public AjaxResult finishTask(@RequestBody List<Long> ids)
|
||||
{
|
||||
return AjaxResult.success(taskOrderApplicationService.finishTask(ids));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 【采购订单】合并任务前置工作,点击合并任务弹出合并后的列表
|
||||
*/
|
||||
@ApiOperation("【采购订单】合并任务前置工作,点击合并任务弹出合并后的列表")
|
||||
@PostMapping("/poPreMergeTask")
|
||||
public AjaxResult poPreMergeTask(@RequestBody List<Long> ids)
|
||||
{
|
||||
return AjaxResult.success(taskOrderApplicationService.poPreMergeTask(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 【采购订单】合并任务
|
||||
*/
|
||||
@ApiOperation("【采购订单】合并任务")
|
||||
@PostMapping("/poMergeTask")
|
||||
public AjaxResult poMergeTask(@RequestBody List<PoMergeTaskDTO> poMergeTaskDTOS)
|
||||
{
|
||||
return AjaxResult.success(taskOrderApplicationService.poMergeTask(poMergeTaskDTOS));
|
||||
}
|
||||
|
||||
/**
|
||||
* 【采购订单】还原合并任务
|
||||
*/
|
||||
@ApiOperation("【采购订单】还原合并任务")
|
||||
@PostMapping("/restoreMergeTask")
|
||||
public AjaxResult restoreMergeTask(@RequestBody List<Long> ids)
|
||||
{
|
||||
return AjaxResult.success(taskOrderApplicationService.restoreMergeTask(ids));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 取消作业任务
|
||||
*/
|
||||
@ApiOperation("取消作业任务")
|
||||
@PostMapping("/cancelTaskOrder")
|
||||
public AjaxResult cancelTaskOrder(@RequestBody List<Long> idList)
|
||||
{
|
||||
try{
|
||||
taskOrderApplicationService.cancelTaskOrder(idList);
|
||||
}
|
||||
catch(ServiceException e){
|
||||
log.error("取消作业任务失败", e);
|
||||
return AjaxResult.error("取消作业任务失败!" + e.getMessage());
|
||||
}
|
||||
catch(Exception e){
|
||||
log.error("取消作业任务失败", e);
|
||||
return AjaxResult.error("取消作业任务失败!");
|
||||
}
|
||||
return AjaxResult.success("取消作业任务成功!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user