diff --git a/src/main/java/com/huaheng/framework/web/exception/DefaultExceptionHandler.java b/src/main/java/com/huaheng/framework/web/exception/DefaultExceptionHandler.java index 66fb7a3..371cd93 100644 --- a/src/main/java/com/huaheng/framework/web/exception/DefaultExceptionHandler.java +++ b/src/main/java/com/huaheng/framework/web/exception/DefaultExceptionHandler.java @@ -120,4 +120,4 @@ public class DefaultExceptionHandler return AjaxResult.error("演示模式,不允许操作"); } -} +} \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/domain/ShipmentHeader.java b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/domain/ShipmentHeader.java index ee6f95e..b645c74 100644 --- a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/domain/ShipmentHeader.java +++ b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/domain/ShipmentHeader.java @@ -1,428 +1,486 @@ package com.huaheng.pc.shipment.shipmentHeader.domain; -import com.huaheng.framework.web.domain.BaseEntity; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; -import java.util.List; - - -/** - * 出库单主表 shipment_header - * - * @author huaheng - * @date 2018-08-19 - */ -public class ShipmentHeader extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 出库id */ - private Integer id; - /** 出库单号 */ - private String code; - /** 仓库Id */ - private Integer warehouseId; - /** 仓库编码 */ - private String warehouseCode; - //u8仓库 - private String uWarehouseCode; - /** 货主id */ - private Integer companyId; - /** 货主code */ - private String companyCode; - /** 上游系统单号 */ - private String sourceCode; - /** 上游平台 */ - private String sourcePlatform; - /** 出库单类型 */ - private String type; - /** 客户编码 */ - private String shipTo; - /** 优先级 */ - private Integer priority; - /** 发货站台 */ - private String station; - /** 总数量 */ - private BigDecimal totalQty; - /** 总行数 */ - private Integer totalLines; - /** 备注 */ - private String remark; - /** 上传备注 */ - private String uploadremark; - /** 上传时间 */ - private Date uploadTime; - /** 发货预约时间 */ - private Date appointmentTime; - /** 单据头状态 */ - private Integer firstStatus; - /** 单据尾状态 */ - private Integer lastStatus; - /** upload状态 */ - private Integer uploadStatus; - /** 创建时间 */ - private Date created; - /** 创建用户 */ - private String createdBy; - /** 最后修改时间 */ - private Date lastUpdated; - /** 更新用户 */ - private String lastUpdatedBy; - /** 是否有效 */ - private Boolean enable; - /** 删除标记 */ - private Boolean deleted; - /** 扫描标识 */ - private String scanid; - /** 自定义字段1 */ - private String userDef1; - /** 自定义字段2 */ - private String userDef2; - /** 自定义字段3 */ - private String userDef3; - /** 货主id组 */ - private List<Integer> companyIdList; - /** 货主编码组 */ - private List<String> companyCodeList; - - public String getuWarehouseCode() { - return uWarehouseCode; - } - - public void setuWarehouseCode(String uWarehouseCode) { - this.uWarehouseCode = uWarehouseCode; - } - - public void setId(Integer id) - { - this.id = id; - } - - public Integer getId() - { - return id; - } - public void setCode(String code) - { - this.code = code; - } - - public String getCode() - { - return code; - } - public void setWarehouseId(Integer warehouseId) - { - this.warehouseId = warehouseId; - } - - public Integer getWarehouseId() - { - return warehouseId; - } - public void setWarehouseCode(String warehouseCode) - { - this.warehouseCode = warehouseCode; - } - - public String getWarehouseCode() - { - return warehouseCode; - } - public void setCompanyId(Integer companyId) - { - this.companyId = companyId; - } - - public Integer getCompanyId() - { - return companyId; - } - public void setCompanyCode(String companyCode) - { - this.companyCode = companyCode; - } - - public String getCompanyCode() - { - return companyCode; - } - public void setSourceCode(String sourceCode) - { - this.sourceCode = sourceCode; - } - - public String getSourceCode() - { - return sourceCode; - } - public void setSourcePlatform(String sourcePlatform) - { - this.sourcePlatform = sourcePlatform; - } - - public String getSourcePlatform() - { - return sourcePlatform; - } - public void setType(String type) - { - this.type = type; - } - - public String getType() - { - return type; - } - public void setShipTo(String shipTo) - { - this.shipTo = shipTo; - } - - public String getShipTo() - { - return shipTo; - } - public void setPriority(Integer priority) - { - this.priority = priority; - } - - public Integer getPriority() - { - return priority; - } - public void setStation(String station) - { - this.station = station; - } - - public String getStation() - { - return station; - } - public void setTotalQty(BigDecimal totalQty) - { - this.totalQty = totalQty; - } - - public BigDecimal getTotalQty() - { - return totalQty; - } - public void setTotalLines(Integer totalLines) - { - this.totalLines = totalLines; - } - - public Integer getTotalLines() - { - return totalLines; - } - public void setRemark(String remark) - { - this.remark = remark; - } - - public String getRemark() - { - return remark; - } - public void setUploadremark(String uploadremark) - { - this.uploadremark = uploadremark; - } - - public String getUploadremark() - { - return uploadremark; - } - public void setUploadTime(Date uploadTime) - { - this.uploadTime = uploadTime; - } - - public Date getUploadTime() - { - return uploadTime; - } - public void setAppointmentTime(Date appointmentTime) - { - this.appointmentTime = appointmentTime; - } - - public Date getAppointmentTime() - { - return appointmentTime; - } - public void setFirstStatus(Integer firstStatus) - { - this.firstStatus = firstStatus; - } - - public Integer getFirstStatus() - { - return firstStatus; - } - public void setLastStatus(Integer lastStatus) - { - this.lastStatus = lastStatus; - } - - public Integer getLastStatus() - { - return lastStatus; - } - public void setUploadStatus(Integer uploadStatus) - { - this.uploadStatus = uploadStatus; - } - - public Integer getUploadStatus() - { - return uploadStatus; - } - public void setCreated(Date created) - { - this.created = created; - } - - public Date getCreated() - { - return created; - } - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - - public String getCreatedBy() - { - return createdBy; - } - public void setLastUpdated(Date lastUpdated) - { - this.lastUpdated = lastUpdated; - } - - public Date getLastUpdated() - { - return lastUpdated; - } - public void setLastUpdatedBy(String lastUpdatedBy) - { - this.lastUpdatedBy = lastUpdatedBy; - } - - public String getLastUpdatedBy() - { - return lastUpdatedBy; - } - public void setEnable(Boolean enable) - { - this.enable = enable; - } - - public Boolean getEnable() - { - return enable; - } - public void setUserDef1(String userDef1) - { - this.userDef1 = userDef1; - } - - public String getUserDef1() - { - return userDef1; - } - public void setUserDef2(String userDef2) - { - this.userDef2 = userDef2; - } - - public String getUserDef2() - { - return userDef2; - } - public void setUserDef3(String userDef3) - { - this.userDef3 = userDef3; - } - - public String getUserDef3() - { - return userDef3; - } - - public Boolean getDeleted() { - return deleted; - } - - public void setDeleted(Boolean deleted) { - this.deleted = deleted; - } - - public List<Integer> getCompanyIdList() { - return companyIdList; - } - - public void setCompanyIdList(List<Integer> companyIdList) { - this.companyIdList = companyIdList; - } - - public List<String> getCompanyCodeList() { - return companyCodeList; - } - - public void setCompanyCodeList(List<String> companyCodeList) { - this.companyCodeList = companyCodeList; - } - - public String getScanid() { - return scanid; - } - - public void setScanid(String scanid) { - this.scanid = scanid; - } - - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("code", getCode()) - .append("warehouseId", getWarehouseId()) - .append("warehouseCode", getWarehouseCode()) - .append("uWarehouseCode",getuWarehouseCode()) - .append("companyId", getCompanyId()) - .append("companyCode", getCompanyCode()) - .append("sourceCode", getSourceCode()) - .append("sourcePlatform", getSourcePlatform()) - .append("type", getType()) - .append("shipTo", getShipTo()) - .append("priority", getPriority()) - .append("station", getStation()) - .append("totalQty", getTotalQty()) - .append("totalLines", getTotalLines()) - .append("remark", getRemark()) - .append("uploadremark", getUploadremark()) - .append("uploadTime", getUploadTime()) - .append("appointmentTime", getAppointmentTime()) - .append("firstStatus", getFirstStatus()) - .append("lastStatus", getLastStatus()) - .append("uploadStatus", getUploadStatus()) - .append("created", getCreated()) - .append("createdBy", getCreatedBy()) - .append("lastUpdated", getLastUpdated()) - .append("lastUpdatedBy", getLastUpdatedBy()) - .append("enable", getEnable()) - .append("deleted", getDeleted()) - .append("scanid",getScanid()) - .append("userDef1", getUserDef1()) - .append("userDef2", getUserDef2()) - .append("userDef3", getUserDef3()) - .toString(); - } -} +import lombok.Data; + +@Data +@TableName(value = "shipment_header") +public class ShipmentHeader implements Serializable { + /** + * 出库单内部号 + */ + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + /** + * 仓库 + */ + @TableField(value = "warehouseCode") + private String warehouseCode; + + /** + * 货主 + */ + @TableField(value = "companyCode") + private String companyCode; + + /** + * 装载号 + */ + @TableField(value = "loadId") + private Integer loadId; + + /** + * 出库单号 + */ + @TableField(value = "code") + private String code; + + /** + * erp订单号 + */ + @TableField(value = "referCode") + private String referCode; + + /** + * erp订单类型 + */ + @TableField(value = "referCodeType") + private String referCodeType; + + /** + * erp订单内部号 + */ + @TableField(value = "referId") + private Integer referId; + + /** + * 订单平台 + */ + @TableField(value = "referPlatform") + private Integer referPlatform; + + /** + * 主状态 + */ + @TableField(value = "firstStatus") + private Integer firstStatus; + + /** + * 拖状态 + */ + @TableField(value = "lastStatus") + private Integer lastStatus; + + /** + * 出库单类型 + */ + @TableField(value = "shipmentType") + private String shipmentType; + + /** + * 路线 + */ + @TableField(value = "route") + private String route; + + /** + * 客户编号 + */ + @TableField(value = "customerCode") + private String customerCode; + + /** + * 客户名称 + */ + @TableField(value = "customerName") + private String customerName; + + /** + * 优先级 + */ + @TableField(value = "priority") + private Integer priority; + + /** + * 要求到货时间 + */ + @TableField(value = "requestedDeliveryDate") + private Date requestedDeliveryDate; + + /** + * 要求到货类型 + */ + @TableField(value = "requestedDeliveryType") + private String requestedDeliveryType; + + /** + * 计划发车日期 + */ + @TableField(value = "scheduledShipDate") + private Date scheduledShipDate; + + /** + * 实际发车时间 + */ + @TableField(value = "actualShipDateTime") + private Date actualShipDateTime; + + /** + * 实际到货时间 + */ + @TableField(value = "actualDeliveryDate") + private Date actualDeliveryDate; + + /** + * 配送要求 + */ + @TableField(value = "deliveryNote") + private String deliveryNote; + + /** + * 失败原因 + */ + @TableField(value = "rejectionNote") + private String rejectionNote; + + /** + * 波次号 + */ + @TableField(value = "waveId") + private Integer waveId; + + /** + * 发货月台 + */ + @TableField(value = "shipDock") + private String shipDock; + + /** + * 分配完成 + */ + @TableField(value = "allocateComplete") + private Integer allocateComplete; + + /** + * 总重量 + */ + @TableField(value = "totalWeight") + private BigDecimal totalWeight; + + /** + * 总数量 + */ + @TableField(value = "totalQty") + private Integer totalQty; + + /** + * 总体积 + */ + @TableField(value = "totalVolume") + private BigDecimal totalVolume; + + /** + * 总行数 + */ + @TableField(value = "totalLines") + private Integer totalLines; + + /** + * 总拼箱数 + */ + @TableField(value = "totalContainers") + private Integer totalContainers; + + /** + * 总整箱数 + */ + @TableField(value = "totalCases") + private Integer totalCases; + + /** + * 总价值 + */ + @TableField(value = "totalValue") + private BigDecimal totalValue; + + /** + * 处理类型 + */ + @TableField(value = "processType") + private String processType; + + /** + * 上次波次号 + */ + @TableField(value = "lastWaveId") + private Integer lastWaveId; + + /** + * 特征值 + */ + @TableField(value = "signValue") + private String signValue; + + /** + * 承运人 + */ + @TableField(value = "carrierCode") + private String carrierCode; + + /** + * 承运人服务商 + */ + @TableField(value = "carrierService") + private String carrierService; + + /** + * 订单备注 + */ + @TableField(value = "shipmentNote") + private String shipmentNote; + + /** + * 承运商编码 + */ + @TableField(value = "carrierServer") + private String carrierServer; + + /** + * 承运商名称 + */ + @TableField(value = "carrierServerName") + private String carrierServerName; + + /** + * 车牌号 + */ + @TableField(value = "plateNumber") + private String plateNumber; + + /** + * 车型 + */ + @TableField(value = "carModel") + private String carModel; + + /** + * 司机名称 + */ + @TableField(value = "driverName") + private String driverName; + + /** + * 司机联系方式 + */ + @TableField(value = "driverTel") + private String driverTel; + + /** + * 创建时间 + */ + @TableField(value = "created") + private Date created; + + /** + * 创建用户 + */ + @TableField(value = "createdBy") + private String createdBy; + + /** + * 创建时间 + */ + @TableField(value = "lastUpdated") + private Date lastUpdated; + + /** + * 更新用户 + */ + @TableField(value = "lastUpdatedBy") + private String lastUpdatedBy; + + /** + * 数据版本 + */ + @TableField(value = "version") + private Integer version; + + /** + * 自定义字段1 + */ + @TableField(value = "userDef1") + private String userDef1; + + /** + * 自定义字段2 + */ + @TableField(value = "userDef2") + private String userDef2; + + /** + * 自定义字段3 + */ + @TableField(value = "userDef3") + private String userDef3; + + /** + * 自定义字段4 + */ + @TableField(value = "userDef4") + private String userDef4; + + /** + * 自定义字段5 + */ + @TableField(value = "userDef5") + private String userDef5; + + /** + * 自定义字段6 + */ + @TableField(value = "userDef6") + private String userDef6; + + /** + * 自定义字段7 + */ + @TableField(value = "userDef7") + private String userDef7; + + /** + * 自定义字段8 + */ + @TableField(value = "userDef8") + private String userDef8; + + /** + * 处理标记 + */ + @TableField(value = "processStamp") + private String processStamp; + + private static final long serialVersionUID = 1L; + + public static final String COL_WAREHOUSECODE = "warehouseCode"; + + public static final String COL_COMPANYCODE = "companyCode"; + + public static final String COL_LOADID = "loadId"; + + public static final String COL_CODE = "code"; + + public static final String COL_REFERCODE = "referCode"; + + public static final String COL_REFERCODETYPE = "referCodeType"; + + public static final String COL_REFERID = "referId"; + + public static final String COL_REFERPLATFORM = "referPlatform"; + + public static final String COL_FIRSTSTATUS = "firstStatus"; + + public static final String COL_LASTSTATUS = "lastStatus"; + + public static final String COL_SHIPMENTTYPE = "shipmentType"; + + public static final String COL_ROUTE = "route"; + + public static final String COL_CUSTOMERCODE = "customerCode"; + + public static final String COL_CUSTOMERNAME = "customerName"; + + public static final String COL_PRIORITY = "priority"; + + public static final String COL_REQUESTEDDELIVERYDATE = "requestedDeliveryDate"; + + public static final String COL_REQUESTEDDELIVERYTYPE = "requestedDeliveryType"; + + public static final String COL_SCHEDULEDSHIPDATE = "scheduledShipDate"; + + public static final String COL_ACTUALSHIPDATETIME = "actualShipDateTime"; + + public static final String COL_ACTUALDELIVERYDATE = "actualDeliveryDate"; + + public static final String COL_DELIVERYNOTE = "deliveryNote"; + + public static final String COL_REJECTIONNOTE = "rejectionNote"; + + public static final String COL_WAVEID = "waveId"; + + public static final String COL_SHIPDOCK = "shipDock"; + + public static final String COL_ALLOCATECOMPLETE = "allocateComplete"; + + public static final String COL_TOTALWEIGHT = "totalWeight"; + + public static final String COL_TOTALQTY = "totalQty"; + + public static final String COL_TOTALVOLUME = "totalVolume"; + + public static final String COL_TOTALLINES = "totalLines"; + + public static final String COL_TOTALCONTAINERS = "totalContainers"; + + public static final String COL_TOTALCASES = "totalCases"; + + public static final String COL_TOTALVALUE = "totalValue"; + + public static final String COL_PROCESSTYPE = "processType"; + + public static final String COL_LASTWAVEID = "lastWaveId"; + + public static final String COL_SIGNVALUE = "signValue"; + + public static final String COL_CARRIERCODE = "carrierCode"; + + public static final String COL_CARRIERSERVICE = "carrierService"; + + public static final String COL_SHIPMENTNOTE = "shipmentNote"; + + public static final String COL_CARRIERSERVER = "carrierServer"; + + public static final String COL_CARRIERSERVERNAME = "carrierServerName"; + + public static final String COL_PLATENUMBER = "plateNumber"; + + public static final String COL_CARMODEL = "carModel"; + + public static final String COL_DRIVERNAME = "driverName"; + + public static final String COL_DRIVERTEL = "driverTel"; + + public static final String COL_CREATED = "created"; + + public static final String COL_CREATEDBY = "createdBy"; + + public static final String COL_LASTUPDATED = "lastUpdated"; + + public static final String COL_LASTUPDATEDBY = "lastUpdatedBy"; + + public static final String COL_VERSION = "version"; + + public static final String COL_USERDEF1 = "userDef1"; + + public static final String COL_USERDEF2 = "userDef2"; + + public static final String COL_USERDEF3 = "userDef3"; + + public static final String COL_USERDEF4 = "userDef4"; + + public static final String COL_USERDEF5 = "userDef5"; + + public static final String COL_USERDEF6 = "userDef6"; + + public static final String COL_USERDEF7 = "userDef7"; + + public static final String COL_USERDEF8 = "userDef8"; + + public static final String COL_PROCESSSTAMP = "processStamp"; +} \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/system/user/controller/LoginController.java b/src/main/java/com/huaheng/pc/system/user/controller/LoginController.java index dfd6abf..756c6ff 100644 --- a/src/main/java/com/huaheng/pc/system/user/controller/LoginController.java +++ b/src/main/java/com/huaheng/pc/system/user/controller/LoginController.java @@ -65,15 +65,14 @@ public class LoginController extends BaseController @PostMapping(value = "/login") @ResponseBody - public AjaxResult ajaxLogin(String username, String password, String warehouse, Integer warehouseId, String warehouseCode, Boolean rememberMe) + public AjaxResult ajaxLogin(String username, String password, String warehouse, String warehouseCode, Boolean rememberMe) { if (StringUtils.isNotEmpty(warehouse)) { String[] warehouseArray = warehouse.split(","); - warehouseId = Integer.valueOf(warehouseArray[0]); warehouseCode = warehouseArray[1]; } - AjaxResult ajaxResult = userService.login(username, password, warehouseId, warehouseCode, rememberMe); + AjaxResult ajaxResult = userService.login(username, password, warehouseCode, rememberMe); return ajaxResult; } diff --git a/src/main/java/com/huaheng/pc/system/user/service/IUserService.java b/src/main/java/com/huaheng/pc/system/user/service/IUserService.java index e762099..ea3b9f3 100644 --- a/src/main/java/com/huaheng/pc/system/user/service/IUserService.java +++ b/src/main/java/com/huaheng/pc/system/user/service/IUserService.java @@ -20,11 +20,10 @@ public interface IUserService * 登陆验证 * @param username 用户名 * @param password 密 码 - * @param warehouseId 仓库id * @param warehouseCode 仓库编码 * @return */ - AjaxResult login(String username, String password, Integer warehouseId, String warehouseCode, Boolean rememberMe); + AjaxResult login(String username, String password, String warehouseCode, Boolean rememberMe); /** * 登陆验证 diff --git a/src/main/java/com/huaheng/pc/system/user/service/UserServiceImpl.java b/src/main/java/com/huaheng/pc/system/user/service/UserServiceImpl.java index 1b3c709..12d3a55 100644 --- a/src/main/java/com/huaheng/pc/system/user/service/UserServiceImpl.java +++ b/src/main/java/com/huaheng/pc/system/user/service/UserServiceImpl.java @@ -77,13 +77,13 @@ public class UserServiceImpl implements IUserService * @return */ @Override - public AjaxResult login(String username, String password, Integer warehouseId, String warehouseCode, Boolean rememberMe) + public AjaxResult login(String username, String password, String warehouseCode, Boolean rememberMe) { if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) { return AjaxResult.error("用户名和密码不能为空"); } - if (warehouseId == null || StringUtils.isEmpty(warehouseCode)) + if (StringUtils.isEmpty(warehouseCode)) { return AjaxResult.error("请选择仓库"); } @@ -103,7 +103,6 @@ public class UserServiceImpl implements IUserService return AjaxResult.error(msg); } User user = ShiroUtils.getUser(); - user.setWarehouseId(warehouseId); user.setWarehouseCode(warehouseCode); ShiroUtils.setUser(user); List<Company> Companys = companyService.selectCompanyByCurrentUserId();