1.修改单据相关实体类,对mongo实体类和mysql实体类分包存放,修改相关引用

master
x_z 3 years ago
parent c9dde7d795
commit d7ee22b16c

@ -87,4 +87,21 @@ public class TestController {
}
/**
* mongodbmysql
*
* @return
*/
@GetMapping("/test/copyData")
public String copyData() {
try {
return "success";
} catch (Exception e) {
log.error("复制数据失败", e);
}
return "error";
}
}

@ -14,7 +14,11 @@ import com.glxp.udi.admin.dao.inventory.InvWarehouseDao;
import com.glxp.udi.admin.entity.auth.AuthAdmin;
import com.glxp.udi.admin.entity.basic.BussinessTypeEntity;
import com.glxp.udi.admin.entity.info.PlatformEntity;
import com.glxp.udi.admin.entity.inout.*;
import com.glxp.udi.admin.entity.inout.OrderDetailEntity;
import com.glxp.udi.admin.entity.inout.UnitMaintainEntity;
import com.glxp.udi.admin.entity.inout.WarehouseEntity;
import com.glxp.udi.admin.entity.inout.WarehousetempEntity;
import com.glxp.udi.admin.entity.mongo.OrderMdEntity;
import com.glxp.udi.admin.mongo.service.OrderDetailMdService;
import com.glxp.udi.admin.mongo.service.OrderMdService;
import com.glxp.udi.admin.mongo.service.WarehouseMdService;

@ -8,10 +8,10 @@ import com.glxp.udi.admin.common.res.BaseResponse;
import com.glxp.udi.admin.constant.Constant;
import com.glxp.udi.admin.entity.basic.StockPrintEntity;
import com.glxp.udi.admin.entity.info.CompanyEntity;
import com.glxp.udi.admin.entity.inout.OrderMdEntity;
import com.glxp.udi.admin.entity.inout.StockOrderPrintEntity;
import com.glxp.udi.admin.entity.inout.StockQRCodeTextEntity;
import com.glxp.udi.admin.entity.inventory.StockPrintTempEntity;
import com.glxp.udi.admin.entity.mongo.OrderMdEntity;
import com.glxp.udi.admin.entity.param.SystemPDFModuleEntity;
import com.glxp.udi.admin.entity.param.SystemPDFTemplateEntity;
import com.glxp.udi.admin.mongo.service.OrderMdService;

@ -6,9 +6,9 @@ import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.common.res.BaseResponse;
import com.glxp.udi.admin.entity.inout.InvProductDetailEntity;
import com.glxp.udi.admin.entity.inout.OrderMdEntity;
import com.glxp.udi.admin.entity.inout.UdiInfoEntity;
import com.glxp.udi.admin.entity.inout.WarehouseEntity;
import com.glxp.udi.admin.entity.mongo.OrderMdEntity;
import com.glxp.udi.admin.entity.udid.UdiEntity;
import com.glxp.udi.admin.mongo.service.InvProductDetailMdService;
import com.glxp.udi.admin.mongo.service.OrderMdService;

@ -8,6 +8,7 @@ import com.glxp.udi.admin.common.res.BaseResponse;
import com.glxp.udi.admin.constant.ConstantStatus;
import com.glxp.udi.admin.entity.auth.AuthAdmin;
import com.glxp.udi.admin.entity.inout.*;
import com.glxp.udi.admin.entity.mongo.OrderMdEntity;
import com.glxp.udi.admin.entity.udid.UdiEntity;
import com.glxp.udi.admin.mongo.service.OrderMdService;
import com.glxp.udi.admin.mongo.service.WarehouseMdService;

@ -0,0 +1,12 @@
package com.glxp.udi.admin.dao.inout;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.udi.admin.entity.inout.WarehouseEntity;
import org.apache.ibatis.annotations.Mapper;
/**
*
*/
@Mapper
public interface CodesDao extends BaseMapper<WarehouseEntity> {
}

@ -0,0 +1,12 @@
package com.glxp.udi.admin.dao.inout;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.udi.admin.entity.inout.WarehousetempEntity;
import org.apache.ibatis.annotations.Mapper;
/**
*
*/
@Mapper
public interface CodesTempDao extends BaseMapper<WarehousetempEntity> {
}

@ -0,0 +1,12 @@
package com.glxp.udi.admin.dao.inout;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.udi.admin.entity.inout.InvProductEntity;
import org.apache.ibatis.annotations.Mapper;
/**
*
*/
@Mapper
public interface InvProductDao extends BaseMapper<InvProductEntity> {
}

@ -0,0 +1,12 @@
package com.glxp.udi.admin.dao.inout;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.udi.admin.entity.inout.InvProductDetailEntity;
import org.apache.ibatis.annotations.Mapper;
/**
*
*/
@Mapper
public interface InvProductDetailDao extends BaseMapper<InvProductDetailEntity> {
}

@ -0,0 +1,13 @@
package com.glxp.udi.admin.dao.inout;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.udi.admin.entity.inout.OrderEntity;
import org.apache.ibatis.annotations.Mapper;
/**
*
*/
@Mapper
public interface OrderDao extends BaseMapper<OrderEntity> {
}

@ -0,0 +1,12 @@
package com.glxp.udi.admin.dao.inout;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.udi.admin.entity.inout.OrderDetailEntity;
import org.apache.ibatis.annotations.Mapper;
/**
*
*/
@Mapper
public interface OrderDetailDao extends BaseMapper<OrderDetailEntity> {
}

@ -0,0 +1,81 @@
package com.glxp.udi.admin.entity.inout;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class OrderEntity {
private String id;
private String orderId;
private String action;
private String corpOrderId;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private String actDate;
private String fromCorpId;
private String actor;
private String mainAction;
private String fromCorp;
private Integer status;
private String remark;
/**
*
*/
private String exportStatus;
private String fromType;
/**
*
*/
private String uploadStatus; //上传状态0未上传1已上传
private Long customerId;
private String locStorageCode;
//复制单号,多个单号之间使用英文逗号,分隔
private String replicateNo;
//补单单号
private String supplementNo;
//验收状态0未验收1.已验收2.不需要验收
private Integer receiveStatus;
private Integer reviewUser;
//单据更新时间
private Date updateTime;
public void setActDate(String actDate) {
if (StrUtil.isNotBlank(actDate)) {
actDate = DateUtil.parse(actDate).toString(DatePattern.NORM_DATETIME_PATTERN);
}
this.actDate = actDate;
}
public String getActDate() {
if (StrUtil.isNotBlank(actDate)) {
actDate = DateUtil.parse(actDate).toString(DatePattern.NORM_DATETIME_PATTERN);
}
return actDate;
}
}

@ -0,0 +1,59 @@
package com.glxp.udi.admin.entity.mongo;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class ErpOrderEntity {
private String id;
private String companyid;
private String docid;
private String iodtlid;
private String inoutid;
private String goodsunit;
private String goodsid;
private String lotid;
private String goodsname;
private String companyname;
private String lotno; //批次号
private Integer dtlgoodsqty;
private String credate;
private Integer reCount;
private String uuidFk;
private String nameCode;
private String productCompany;
private String coName;
private String produceDate;
private String expireDate;
private String authCode;
private String batchNo;
private String packSpec;
private String packRatio;
private Integer bhzxxsbzsl;
private Integer zxxsbzbhsydysl;
private String isDownload;
private String orderIdFk;
private Integer count;
private String nameCodes;
private String status;
//价格
private BigDecimal price;
//销售发票号(第一票)
private String firstSalesInvNo;
//销售发票号(第二票)
private String secSalesInvNo;
//销售清单号(第二票)
private String secSalesListNo;
//开票日期
private String invoiceDate;
}

@ -0,0 +1,28 @@
package com.glxp.udi.admin.entity.mongo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class InvProductDetailEntity {
private String id;
private String code;
private String productIdFk;
private String orderIdFk;
private String customerId;
private String mainAction;
private String action;
private Integer count;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;
private String batchNo;
private String productionDate;
private String expireDate;
private String invProductIdFk;
//仓库码
private String locStorageCode;
}

@ -0,0 +1,42 @@
package com.glxp.udi.admin.entity.mongo;
import lombok.Data;
@Data
public class InvProductEntity {
private String id;
private String productsName;
private String nameCode;
private String relIdFk;
private String ggxh;
private String batchNo;
private String productionDate;
private String expireDate;
private String ylqxzcrbarmc;
private String zczbhhzbapzbh;
private Integer inCount;
private Integer outCount;
private Integer reCount;
private String customerId;
private String supId;
private String unitFk;
private String invWarehouseCode;
//生产厂家
private String manufactory;
//仓库码
private String locStorageCode;
public Integer getInCount() {
if (inCount == null)
return 0;
return inCount;
}
public Integer getOutCount() {
if (outCount == null)
return 0;
return outCount;
}
}

@ -1,4 +1,4 @@
package com.glxp.udi.admin.entity.inout;
package com.glxp.udi.admin.entity.mongo;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
@ -12,43 +12,28 @@ import java.util.Date;
public class OrderMdEntity {
private String id;
private String orderId;
private String action;
private String corpOrderId;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private String actDate;
private String fromCorpId;
private String actor;
private String mainAction;
private String fromCorp;
private Integer status;
private String remark;
/**
*
*/
private String exportStatus;
private String fromType;
/**
*
*/
private String contrastStatus;
private String erpFk;
private String uploadStatus; //上传状态0未上传1已上传
private Long customerId;
private String invStorageCode;
private String invWarehouseCode;
private String locStorageCode;
private String nameCode; //最小销售标识
//复制单号,多个单号之间使用英文逗号,分隔
private String replicateNo;
@ -58,12 +43,14 @@ public class OrderMdEntity {
//验收状态0未验收1.已验收2.不需要验收
private Integer receiveStatus;
private Integer reviewUser;
//单据更新时间
private Date updateTime;
//单据创建时间
private String createTime;
public void setActDate(String actDate) {
if (StrUtil.isNotBlank(actDate)) {
actDate = DateUtil.parse(actDate).toString(DatePattern.NORM_DATETIME_PATTERN);
@ -72,10 +59,8 @@ public class OrderMdEntity {
}
public String getActDate() {
if (StrUtil.isNotBlank(actDate)) {
if (StrUtil.isNotBlank(actDate))
actDate = DateUtil.parse(actDate).toString(DatePattern.NORM_DATETIME_PATTERN);
}
return actDate;
}
}

@ -0,0 +1,55 @@
package com.glxp.udi.admin.entity.mongo;
import lombok.Data;
@Data
public class WarehouseEntity {
private String id;
private String action;
private String mainAction;
private String code;
private String corpOrderId;
private String actor;
private String actDate;
private String fromCorpId;
private String fromCorp;
private String orderId;
private String batchNo;
private String produceDate;
private String expireDate;
private String serialNo;
private Integer count;
private String packageLevel;
private String warehouseCode;
private String customerId;
private String nameCode;
private String supId;//供应商ID
private String supName;
private String invStorageCode;
private String invWarehouseCode;
private String relId;
private Integer status;
private String locStorageCode;
private String udi;
public String getSupId() {
// if (supId == null) {
// return fromCorpId;
// }
return supId;
}
public Integer getCount() {
if (count == null) {
return 1;
}
if (count == 0)
return 1;
return count;
}
}

@ -0,0 +1,38 @@
package com.glxp.udi.admin.entity.mongo;
import lombok.Data;
@Data
public class WarehousetempEntity {
private String action;
private String mainAction;
private String code;
private String corpOrderId;
private String actor;
private String actDate;
private Integer wrongCode;
private String upperCorpOrderId;
private String fromCorpId;
private String id;
private String fromCorp;
private String orderId;
private String batchNo;
private String produceDate;
private String expireDate;
private String serialNo;
private String udi;
private Integer count;
private Integer type;
private Long customerId;
private String invStorageCode;
private String invWarehouseCode;
private Integer status;
private String locStorageCode;
private String nameCode; //最小销售标识
private String relId;
private String supId;//供应商ID
}

@ -3,7 +3,7 @@ package com.glxp.udi.admin.mongo.dao;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.ReflectUtil;
import cn.hutool.core.util.StrUtil;
import com.glxp.udi.admin.entity.inout.OrderMdEntity;
import com.glxp.udi.admin.entity.mongo.OrderMdEntity;
import com.glxp.udi.admin.mongo.MongoDBName;
import com.glxp.udi.admin.mongo.dao.base.MongoBaseDao;
import com.glxp.udi.admin.mongo.utils.MongoPageHelper;

@ -16,6 +16,7 @@ import com.glxp.udi.admin.dao.inventory.InvWarehouseDao;
import com.glxp.udi.admin.entity.auth.CustomerInfoEntity;
import com.glxp.udi.admin.entity.basic.BussinessTypeEntity;
import com.glxp.udi.admin.entity.inout.*;
import com.glxp.udi.admin.entity.mongo.OrderMdEntity;
import com.glxp.udi.admin.entity.param.SystemParamConfigEntity;
import com.glxp.udi.admin.mongo.MongoDBName;
import com.glxp.udi.admin.mongo.dao.OrderDao;

@ -4,7 +4,11 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.glxp.udi.admin.constant.ConstantStatus;
import com.glxp.udi.admin.constant.ConstantType;
import com.glxp.udi.admin.entity.inout.*;
import com.glxp.udi.admin.entity.inout.InvProductDetailEntity;
import com.glxp.udi.admin.entity.inout.InvProductEntity;
import com.glxp.udi.admin.entity.inout.OrderDetailEntity;
import com.glxp.udi.admin.entity.inout.WarehouseEntity;
import com.glxp.udi.admin.entity.mongo.OrderMdEntity;
import com.glxp.udi.admin.mongo.MongoDBName;
import com.glxp.udi.admin.mongo.utils.MongoPageHelper;
import com.glxp.udi.admin.mongo.utils.PageResult;
@ -18,7 +22,10 @@ import org.springframework.data.mongodb.core.query.Update;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@Service
public class WarehouseMdService {

@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
import com.glxp.udi.admin.constant.ConstantStatus;
import com.glxp.udi.admin.constant.TypeConstant;
import com.glxp.udi.admin.entity.inout.*;
import com.glxp.udi.admin.entity.mongo.OrderMdEntity;
import com.glxp.udi.admin.mongo.service.*;
import com.glxp.udi.admin.req.inout.FilterErpOrderRequest;
import com.glxp.udi.admin.req.inout.OrderFilterRequest;

@ -12,9 +12,9 @@ import com.glxp.udi.admin.dao.info.ScheduledDao;
import com.glxp.udi.admin.entity.info.PlatformEntity;
import com.glxp.udi.admin.entity.info.ScheduledEntity;
import com.glxp.udi.admin.entity.inout.OrderDetailEntity;
import com.glxp.udi.admin.entity.inout.OrderMdEntity;
import com.glxp.udi.admin.entity.inout.UnitMaintainEntity;
import com.glxp.udi.admin.entity.inout.WarehouseEntity;
import com.glxp.udi.admin.entity.mongo.OrderMdEntity;
import com.glxp.udi.admin.entity.param.SystemParamConfigEntity;
import com.glxp.udi.admin.mongo.service.OrderDetailMdService;
import com.glxp.udi.admin.mongo.service.OrderMdService;

@ -5,7 +5,7 @@ import com.glxp.udi.admin.common.res.BaseResponse;
import com.glxp.udi.admin.constant.SystemParamConstant;
import com.glxp.udi.admin.dao.info.ScheduledDao;
import com.glxp.udi.admin.entity.info.ScheduledEntity;
import com.glxp.udi.admin.entity.inout.OrderMdEntity;
import com.glxp.udi.admin.entity.mongo.OrderMdEntity;
import com.glxp.udi.admin.entity.param.SystemParamConfigEntity;
import com.glxp.udi.admin.mongo.service.OrderMdService;
import com.glxp.udi.admin.req.udidl.ScheduledRequest;

@ -4,7 +4,11 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.glxp.udi.admin.constant.ConstantStatus;
import com.glxp.udi.admin.entity.basic.BussinessTypeEntity;
import com.glxp.udi.admin.entity.inout.*;
import com.glxp.udi.admin.entity.inout.UdiInfoEntity;
import com.glxp.udi.admin.entity.inout.UnitMaintainEntity;
import com.glxp.udi.admin.entity.inout.WarehouseEntity;
import com.glxp.udi.admin.entity.inout.WarehousetempEntity;
import com.glxp.udi.admin.entity.mongo.OrderMdEntity;
import com.glxp.udi.admin.mongo.service.OrderDetailMdService;
import com.glxp.udi.admin.mongo.service.OrderMdService;
import com.glxp.udi.admin.mongo.service.WarehouseMdService;

@ -5,7 +5,7 @@ import com.glxp.udi.admin.constant.ConstantStatus;
import com.glxp.udi.admin.constant.SystemParamConstant;
import com.glxp.udi.admin.dao.info.ScheduledDao;
import com.glxp.udi.admin.entity.info.ScheduledEntity;
import com.glxp.udi.admin.entity.inout.OrderMdEntity;
import com.glxp.udi.admin.entity.mongo.OrderMdEntity;
import com.glxp.udi.admin.entity.param.SystemParamConfigEntity;
import com.glxp.udi.admin.mongo.service.OrderMdService;
import com.glxp.udi.admin.req.inout.OrderFilterRequest;

Loading…
Cancel
Save