| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.zy.asrs.common.utils.Synchro; |
| | | import com.zy.asrs.common.wms.service.DocTypeService; |
| | | import com.zy.asrs.common.wms.service.LocMastService; |
| | | import com.zy.asrs.common.wms.service.OrderService; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | |
| | | public class LocDetl implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 库位号 |
| | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 授权商户 |
| | | */ |
| | | @ApiModelProperty(value= "授权商户") |
| | | private Long hostId; |
| | | |
| | | @ApiModelProperty(value= "货主") |
| | | private Integer owner; |
| | | |
| | | public LocDetl() {} |
| | | |
| | | public LocDetl(String locNo,String zpallet,Double anfme,String matnr,String maktx,String batch,String orderNo,String specs,String model,String color,String brand,String unit,Double price,String sku,Double units,String barcode,String origin,String manu,String manuDate,String itemNum,Double safeQty,Double weight,Double length,Double volume,String threeCode,String supp,String suppCode,Integer beBatch,String deadTime,Integer deadWarn,Integer source,Integer inspect,Integer danger,Long modiUser,Date modiTime,Long appeUser,Date appeTime,String memo) { |
| | | public LocDetl(String locNo,String zpallet,Double anfme,String matnr,String maktx,String batch,String orderNo,String specs,String model,String color,String brand,String unit,Double price,String sku,Double units,String barcode,String origin,String manu,String manuDate,String itemNum,Double safeQty,Double weight,Double length,Double volume,String threeCode,String supp,String suppCode,Integer beBatch,String deadTime,Integer deadWarn,Integer source,Integer inspect,Integer danger,Long modiUser,Date modiTime,Long appeUser,Date appeTime,String memo,Long hostId,Integer owner) { |
| | | this.locNo = locNo; |
| | | this.zpallet = zpallet; |
| | | this.anfme = anfme; |
| | |
| | | this.appeUser = appeUser; |
| | | this.appeTime = appeTime; |
| | | this.memo = memo; |
| | | this.hostId = hostId; |
| | | this.owner = owner; |
| | | } |
| | | |
| | | // LocDetl locDetl = new LocDetl( |
| | |
| | | // null, // 修改时间 |
| | | // null, // 创建者 |
| | | // null, // 添加时间 |
| | | // null // 备注 |
| | | // null, // 备注 |
| | | // null // 授权商户 |
| | | // ); |
| | | |
| | | public String getLocNo$(){ |
| | |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getOwner$(){ |
| | | if (null == this.owner){ return null; } |
| | | switch (this.owner){ |
| | | case 1: |
| | | return "宁波"; |
| | | case 2: |
| | | return "新昌"; |
| | | default: |
| | | return String.valueOf(this.owner); |
| | | } |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public String getHostId$(){ |
| | | HostService service = SpringUtils.getBean(HostService.class); |
| | | Host host = service.getById(this.hostId); |
| | | if (!Cools.isEmpty(host)){ |
| | | return String.valueOf(host.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getOrderType() { |
| | | if (Cools.isEmpty(this.orderNo)){ |
| | | return ""; |
| | | } |
| | | OrderService orderService = SpringUtils.getBean(OrderService.class); |
| | | DocTypeService docTypeService = SpringUtils.getBean(DocTypeService.class); |
| | | Order order = orderService.selectByNo(orderNo, hostId); |
| | | if (order != null) { |
| | | return order.getDocType$(); |
| | | } |
| | | return this.orderNo; |
| | | } |
| | | |
| | | public void sync(Object source) { |
| | | Synchro.Copy(source, this); |
| | | } |
| | | |
| | | } |