Commit c3c25073 张少辉

1.SO1374-PokaNon入库通知对接

1 个父辈 1a544c4e
......@@ -19,6 +19,10 @@ import java.util.Locale;
@Data
public class ResultBean<T> {
public static ResultBean newErrorResult(int code, String msg) {
return newErrorResult(code, "", msg);
}
public static ResultBean newErrorResult(int code, String msgKey, String msg ) {
return newErrorResult(code, msgKey, msg, new String[]{},true);
}
......
......@@ -17,4 +17,6 @@ public interface IBarcodeManager extends IBaseManager<Barcode> {
void download(List<Barcode> list, HttpServletResponse response) throws IOException;
void deleteBarcodes(Set<String> ids);
Barcode findOneByLockName(String lockName);
}
......@@ -96,6 +96,11 @@ public class BarcodeManagerImpl implements IBarcodeManager {
}
@Override
public Barcode findOneByLockName(String lockName) {
return barcodeDao.findOne(new Query(Criteria.where("lockName").is(lockName)));
}
@Override
public Barcode saveBarcode(Barcode resources) {
validateSave(resources);
......
package com.neotel.smfcore.custom.so1374.bean;
import lombok.Data;
/**
* 入库/退货请求实体类 (PokaNon INBOUND/RETURN Request)
* 对应I/F 定義表的字段规范
*/
@Data // Lombok注解,自动生成getter/setter/toString/equals/hashCode
public class PokaNonInboundReturnRequest {
/**
* PokaNon交易ID(幂等键)
* 类型:string | 必填:Y
* 示例:POKANON-INB-20260124-000123
*/
private String clientTxnId;
/**
* 客户编码(Panasonic可能固定)
* 类型:string | 必填:Y
* 示例:PANASONIC
*/
private String customerCode;
/**
* 操作类型:INBOUND(新品入库) / RETURN(退货重新入库)
* 类型:string | 必填:Y
* 示例:INBOUND
*/
private String operation;
/**
* 操作人员信息
* 类型:object | 必填:Y(子字段operatorId必填)
*/
private Operator operator;
/**
* 物料信息
* 类型:object | 必填:Y(核心子字段必填)
*/
private Material material;
/**
* 库位信息
* 类型:object | 必填:Y(子字段locationId必填)
*/
private Location location;
/**
* 标签信息
* 类型:object | 必填:N
*/
private Label label;
/**
* 客户端时间戳(审计用)
* 类型:string | 必填:N
* 格式:YYYY-MM-DD HH:mm:ss
* 示例:2026-01-24 10:12:30
*/
private String timestamp;
/**
* 操作人员子实体
*/
@Data
public static class Operator {
/**
* 操作人员ID
* 类型:string | 必填:Y
* 示例:U001
*/
private String operatorId;
}
/**
* 物料子实体
*/
@Data
public static class Material {
/**
* PokaNon序列号(标签序列号)
* 类型:string | 必填:Y
* 示例:ID-2026012400001-001
*/
private String serial;
/**
* 主物料编号(建议必填)
* 类型:string | 必填:Y*
* 示例:GLOBAL-PN-001
*/
private String partNo;
/**
* 制造商物料编号
* 类型:string | 必填:N
* 示例:ABC-123
*/
private String makerPartNo;
/**
* 内部批次号(如有)
* 类型:string | 必填:N
* 示例:LOT202601
*/
private String lotNo;
/**
* 制造商批次号
* 类型:string | 必填:N
* 示例:MLOT-5566
*/
private String makerLot;
/**
* 实际入库数量(已确认)
* 类型:number | 必填:Y
* 示例:500
*/
private Integer qty;
/**
* 计量单位
* 类型:string | 必填:N
* 示例:PCS
*/
private String uom;
/**
* 接收日期
* 类型:date | 必填:N
* 格式:YYYY-MM-DD
* 示例:2026-01-24
*/
private String receiveDate; // 用String避免日期序列化问题,也可改用LocalDate
/**
* 有效期
* 类型:date | 必填:N
* 格式:YYYY-MM-DD
* 示例:2027-01-31
*/
private String expireDate; // 同上
}
/**
* 库位子实体
*/
@Data
public static class Location {
/**
* SMF库位地址(扫描的QR文本)
* 类型:string | 必填:Y
* 示例:R01-S03
*/
private String locationId;
/**
* 库位类型(固定字面量,避免混淆)
* 类型:string | 必填:N
* 示例:SMF_ADDRESS
*/
private String locationType;
}
/**
* 标签子实体
*/
@Data
public static class Label {
/**
* 原始标签QR文本(可选存储/校验)
* 类型:string | 必填:N
* 示例:(raw QR text)
*/
private String fullCode;
/**
* QR标签上打印的数量(参考用)
* 类型:number | 必填:N
* 示例:500
*/
private Integer qrQty;
}
}
\ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!