Browse Source

2026-01-08

pda其他入库传关联单号和关联单行号
master
fengyuan_yang 6 days ago
parent
commit
4b8a4e0ff4
  1. 11
      src/main/java/com/gaotao/modules/otherInbound/controller/OtherInboundController.java
  2. 6
      src/main/java/com/gaotao/modules/otherInbound/service/OtherInboundService.java
  3. 27
      src/main/java/com/gaotao/modules/otherInbound/service/impl/OtherInboundServiceImpl.java

11
src/main/java/com/gaotao/modules/otherInbound/controller/OtherInboundController.java

@ -133,6 +133,8 @@ public class OtherInboundController extends AbstractController {
String operationType = (String) params.get("operationType"); String operationType = (String) params.get("operationType");
String documentType = (String) params.get("documentType"); String documentType = (String) params.get("documentType");
String rollNo = (String) params.get("labelCode"); String rollNo = (String) params.get("labelCode");
String relatedOrderNo = (String) params.get("relatedOrderNo");
String relatedOrderLineNo = (String) params.get("relatedOrderLineNo");
if (site == null || site.trim().isEmpty()) { if (site == null || site.trim().isEmpty()) {
return R.error("站点不能为空"); return R.error("站点不能为空");
@ -163,8 +165,8 @@ public class OtherInboundController extends AbstractController {
String userName = getUser().getUsername(); String userName = getUser().getUsername();
// 调用存储过程GetScanLabelVerification // 调用存储过程GetScanLabelVerification
otherInboundService.validateLabelWithOtherInbound(
site, buNo, inboundNo, materialCode, actualQty, batchNo, warehouseId, operationType, documentType, userName, rollNo);
otherInboundService.validateLabelWithOtherInbound(site, buNo, inboundNo, materialCode, actualQty, batchNo,
warehouseId, operationType, documentType, userName, rollNo, relatedOrderNo, relatedOrderLineNo);
return R.ok("操作成功"); return R.ok("操作成功");
} catch (Exception e) { } catch (Exception e) {
logger.error("验证标签失败", e); logger.error("验证标签失败", e);
@ -217,6 +219,8 @@ public class OtherInboundController extends AbstractController {
String inboundNo = (String) params.get("inboundNo"); String inboundNo = (String) params.get("inboundNo");
String locationCode = (String) params.get("locationCode"); String locationCode = (String) params.get("locationCode");
String documentType = (String) params.get("documentType"); String documentType = (String) params.get("documentType");
String relatedOrderNo = (String) params.get("relatedOrderNo");
String relatedOrderLineNo = (String) params.get("relatedOrderLineNo");
if (inboundNo == null || inboundNo.trim().isEmpty()) { if (inboundNo == null || inboundNo.trim().isEmpty()) {
return R.error("入库单号不能为空"); return R.error("入库单号不能为空");
@ -232,7 +236,8 @@ public class OtherInboundController extends AbstractController {
String userName = getUser().getUsername(); String userName = getUser().getUsername();
// 调用存储过程GetSaveLabelVerification返回包含打印数据的结果 // 调用存储过程GetSaveLabelVerification返回包含打印数据的结果
Map<String, Object> result = otherInboundService.confirmOtherInboundByProcedure(site, buNo, inboundNo, locationCode, documentType, userName);
Map<String, Object> result = otherInboundService.confirmOtherInboundByProcedure(site, buNo, inboundNo, locationCode,
documentType, userName, relatedOrderNo, relatedOrderLineNo);
Boolean success = (Boolean) result.get("success"); Boolean success = (Boolean) result.get("success");
if (success != null && success) { if (success != null && success) {

6
src/main/java/com/gaotao/modules/otherInbound/service/OtherInboundService.java

@ -59,7 +59,8 @@ public interface OtherInboundService {
*/ */
void validateLabelWithOtherInbound(String site, String buNo, String inboundNo, String materialCode, void validateLabelWithOtherInbound(String site, String buNo, String inboundNo, String materialCode,
Double actualQty, String batchNo, String warehouseId, Double actualQty, String batchNo, String warehouseId,
String operationType, String documentType, String userName, String rollNo);
String operationType, String documentType, String userName,
String rollNo, String relatedOrderNo, String relatedOrderLineNo);
/** /**
* 获取已扫描标签列表从ScannedRollTempTable缓存表 * 获取已扫描标签列表从ScannedRollTempTable缓存表
@ -82,7 +83,8 @@ public interface OtherInboundService {
* @return 处理结果包含success和printList * @return 处理结果包含success和printList
*/ */
Map<String, Object> confirmOtherInboundByProcedure(String site, String buNo, String inboundNo, Map<String, Object> confirmOtherInboundByProcedure(String site, String buNo, String inboundNo,
String locationCode, String documentType, String userName);
String locationCode, String documentType, String userName,
String relatedOrderNo, String relatedOrderLineNo);
/** /**
* 确认其他入库 * 确认其他入库

27
src/main/java/com/gaotao/modules/otherInbound/service/impl/OtherInboundServiceImpl.java

@ -72,9 +72,10 @@ public class OtherInboundServiceImpl implements OtherInboundService {
@Override @Override
public void validateLabelWithOtherInbound(String site, String buNo, String inboundNo, String materialCode, public void validateLabelWithOtherInbound(String site, String buNo, String inboundNo, String materialCode,
Double actualQty, String batchNo, String warehouseId, Double actualQty, String batchNo, String warehouseId,
String operationType, String documentType, String userName, String rollNo) {
logger.info("调用GetScanLabelVerification存储过程,站点: {}, 入库单: {}, 物料: {}, 数量: {}, 批次: {}, 操作类型: {}, 单据类型: {}, 用户: {}, rollNo:{}",
site, inboundNo, materialCode, actualQty, batchNo, operationType, documentType, userName, rollNo);
String operationType, String documentType, String userName,
String rollNo, String relatedOrderNo, String relatedOrderLineNo) {
logger.info("调用GetScanLabelVerification存储过程,站点: {}, 入库单: {}, 物料: {}, 数量: {}, 批次: {}, 操作类型: {}, 单据类型: {}, 用户: {}, rollNo:{}, relatedOrderNo:{}, relatedOrderLineNo:{}",
site, inboundNo, materialCode, actualQty, batchNo, operationType, documentType, userName, rollNo, relatedOrderNo, relatedOrderLineNo);
try { try {
// 调用存储过程 GetScanLabelVerification参考采购入库功能 // 调用存储过程 GetScanLabelVerification参考采购入库功能
@ -83,8 +84,8 @@ public class OtherInboundServiceImpl implements OtherInboundService {
params.add(site != null ? site : ""); // 参数1: site params.add(site != null ? site : ""); // 参数1: site
params.add(buNo != null ? buNo : ""); // 参数2: buNo params.add(buNo != null ? buNo : ""); // 参数2: buNo
params.add(inboundNo != null ? inboundNo : ""); // 参数3: 入库单号 params.add(inboundNo != null ? inboundNo : ""); // 参数3: 入库单号
params.add(""); // 参数4: 空字符串
params.add(""); // 参数5: 空字符串
params.add(relatedOrderNo != null ? relatedOrderNo : ""); // 参数4: 空字符串
params.add(relatedOrderLineNo != null ? relatedOrderLineNo : ""); // 参数5: 空字符串
params.add(materialCode != null ? materialCode : ""); // 参数6: 物料编码 params.add(materialCode != null ? materialCode : ""); // 参数6: 物料编码
params.add(actualQty != null ? actualQty : 0.0); // 参数7: 数量 params.add(actualQty != null ? actualQty : 0.0); // 参数7: 数量
params.add(rollNo != null ? rollNo : ""); // 参数8: rollNo params.add(rollNo != null ? rollNo : ""); // 参数8: rollNo
@ -144,10 +145,10 @@ public class OtherInboundServiceImpl implements OtherInboundService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Map<String, Object> confirmOtherInboundByProcedure(String site, String buNo, String inboundNo,
String locationCode, String documentType, String userName) {
logger.info("调用GetSaveLabelVerification存储过程确认入库,站点: {}, 入库单: {}, 库位: {}, 单据类型: {}, 用户: {}",
site, inboundNo, locationCode, documentType, userName);
public Map<String, Object> confirmOtherInboundByProcedure(String site, String buNo, String inboundNo, String locationCode,
String documentType, String userName, String relatedOrderNo, String relatedOrderLineNo) {
logger.info("调用GetSaveLabelVerification存储过程确认入库,站点: {}, 入库单: {}, 库位: {}, 单据类型: {}, 用户: {}, relatedOrderNo:{}, relatedOrderLineNo:{}",
site, inboundNo, locationCode, documentType, userName, relatedOrderNo, relatedOrderLineNo);
Map<String, Object> returnResult = new HashMap<>(); Map<String, Object> returnResult = new HashMap<>();
@ -161,8 +162,8 @@ public class OtherInboundServiceImpl implements OtherInboundService {
params.add(site != null ? site : ""); // 参数1: site params.add(site != null ? site : ""); // 参数1: site
params.add(buNo != null ? buNo : ""); // 参数2: buNo params.add(buNo != null ? buNo : ""); // 参数2: buNo
params.add(inboundNo != null ? inboundNo : ""); // 参数3: 入库单号 params.add(inboundNo != null ? inboundNo : ""); // 参数3: 入库单号
params.add(""); // 参数4: 空字符串
params.add(""); // 参数5: 空字符串
params.add(relatedOrderNo != null ? relatedOrderNo : ""); // 参数4: 空字符串
params.add(relatedOrderLineNo != null ? relatedOrderLineNo : ""); // 参数5: 空字符串
params.add(""); // 参数6: 空字符串 params.add(""); // 参数6: 空字符串
params.add(""); // 参数7: 空字符串 params.add(""); // 参数7: 空字符串
params.add(locationCode != null ? locationCode : ""); // 参数8: 入库库位 params.add(locationCode != null ? locationCode : ""); // 参数8: 入库库位
@ -218,8 +219,8 @@ public class OtherInboundServiceImpl implements OtherInboundService {
site, // site site, // site
buNo, // buNo buNo, // buNo
"*", // menuID - PDA功能传 "*" "*", // menuID - PDA功能传 "*"
"", // relatedOrderNo - 关联单号
"", // relatedOrderLineNo - 关联单号行号传空字符串
relatedOrderNo, // relatedOrderNo - 关联单号
relatedOrderLineNo, // relatedOrderLineNo - 关联单号行号传空字符串
inboundNo, // documentNo - 入库单号 inboundNo, // documentNo - 入库单号
materialCode, // PartNo - 物料编码 materialCode, // PartNo - 物料编码
"", // LabelNo - 标签模版编码传空字符串由存储过程返回 "", // LabelNo - 标签模版编码传空字符串由存储过程返回

Loading…
Cancel
Save