|
|
@ -80,10 +80,12 @@ public class PropertyChangeServiceImpl extends ServiceImpl<PropertyChangeMapper, |
|
|
|
|
|
|
|
|
// 获取变动信息 |
|
|
// 获取变动信息 |
|
|
String newLocationId = (String) params.get("newLocationId"); |
|
|
String newLocationId = (String) params.get("newLocationId"); |
|
|
|
|
|
String newStatus = (String) params.get("newStatus"); |
|
|
String newProductionDateStr = (String) params.get("newProductionDate"); |
|
|
String newProductionDateStr = (String) params.get("newProductionDate"); |
|
|
String newExpiryDateStr = (String) params.get("newExpiryDate"); |
|
|
String newExpiryDateStr = (String) params.get("newExpiryDate"); |
|
|
|
|
|
|
|
|
String oldLocationId = (String) params.get("oldLocationId"); |
|
|
String oldLocationId = (String) params.get("oldLocationId"); |
|
|
|
|
|
String oldStatus = (String) params.get("oldStatus"); |
|
|
String oldProductionDateStr = (String) params.get("oldProductionDate"); |
|
|
String oldProductionDateStr = (String) params.get("oldProductionDate"); |
|
|
String oldExpiryDateStr = (String) params.get("oldExpiryDate"); |
|
|
String oldExpiryDateStr = (String) params.get("oldExpiryDate"); |
|
|
|
|
|
|
|
|
@ -99,6 +101,10 @@ public class PropertyChangeServiceImpl extends ServiceImpl<PropertyChangeMapper, |
|
|
updateParams.put("newLocationId", newLocationId.trim()); |
|
|
updateParams.put("newLocationId", newLocationId.trim()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (newStatus != null && !newStatus.trim().isEmpty()) { |
|
|
|
|
|
updateParams.put("newStatus", newStatus.trim()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (newProductionDateStr != null && !newProductionDateStr.trim().isEmpty()) { |
|
|
if (newProductionDateStr != null && !newProductionDateStr.trim().isEmpty()) { |
|
|
Date newProductionDate = dateFormat.parse(newProductionDateStr); |
|
|
Date newProductionDate = dateFormat.parse(newProductionDateStr); |
|
|
updateParams.put("newProductionDate", newProductionDate); |
|
|
updateParams.put("newProductionDate", newProductionDate); |
|
|
@ -116,7 +122,7 @@ public class PropertyChangeServiceImpl extends ServiceImpl<PropertyChangeMapper, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 3. 生成标签变动事务记录 |
|
|
// 3. 生成标签变动事务记录 |
|
|
generatePropertyChangeTransaction(site, buNo, warehouseId, labelCode, partNo, batchNo, quantity, oldLocationId, newLocationId, oldProductionDateStr, newProductionDateStr, oldExpiryDateStr, newExpiryDateStr); |
|
|
|
|
|
|
|
|
generatePropertyChangeTransaction(site, buNo, warehouseId, labelCode, partNo, batchNo, quantity, oldLocationId, newLocationId, oldStatus, newStatus, oldProductionDateStr, newProductionDateStr, oldExpiryDateStr, newExpiryDateStr); |
|
|
logger.info("属性变动保存成功,标签条码: {}", labelCode); |
|
|
logger.info("属性变动保存成功,标签条码: {}", labelCode); |
|
|
return true; |
|
|
return true; |
|
|
|
|
|
|
|
|
@ -136,7 +142,7 @@ public class PropertyChangeServiceImpl extends ServiceImpl<PropertyChangeMapper, |
|
|
* 生成属性变动事务记录 |
|
|
* 生成属性变动事务记录 |
|
|
*/ |
|
|
*/ |
|
|
private void generatePropertyChangeTransaction(String site, String buNo, String warehouseId, String labelCode, String partNo, String batchNo, Float quantity, |
|
|
private void generatePropertyChangeTransaction(String site, String buNo, String warehouseId, String labelCode, String partNo, String batchNo, Float quantity, |
|
|
String oldLocationId, String newLocationId, String oldProductionDate, String newProductionDate, String oldExpiryDate, String newExpiryDate) { |
|
|
|
|
|
|
|
|
String oldLocationId, String newLocationId, String oldStatus, String newStatus, String oldProductionDate, String newProductionDate, String oldExpiryDate, String newExpiryDate) { |
|
|
logger.info("开始生成属性变动事务记录,标签条码: {}", labelCode); |
|
|
logger.info("开始生成属性变动事务记录,标签条码: {}", labelCode); |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
@ -145,6 +151,9 @@ public class PropertyChangeServiceImpl extends ServiceImpl<PropertyChangeMapper, |
|
|
if (newLocationId != null && !newLocationId.equals(oldLocationId)) { |
|
|
if (newLocationId != null && !newLocationId.equals(oldLocationId)) { |
|
|
changeDesc.append("库位[").append(oldLocationId).append("→").append(newLocationId).append("] "); |
|
|
changeDesc.append("库位[").append(oldLocationId).append("→").append(newLocationId).append("] "); |
|
|
} |
|
|
} |
|
|
|
|
|
if (newStatus != null && !newStatus.equals(oldStatus)) { |
|
|
|
|
|
changeDesc.append("状态[").append(oldStatus).append("→").append(newStatus).append("] "); |
|
|
|
|
|
} |
|
|
if (newProductionDate != null && !newProductionDate.equals(oldProductionDate)) { |
|
|
if (newProductionDate != null && !newProductionDate.equals(oldProductionDate)) { |
|
|
changeDesc.append("生产日期[").append(oldProductionDate).append("→").append(newProductionDate).append("] "); |
|
|
changeDesc.append("生产日期[").append(oldProductionDate).append("→").append(newProductionDate).append("] "); |
|
|
} |
|
|
} |
|
|
@ -175,6 +184,8 @@ public class PropertyChangeServiceImpl extends ServiceImpl<PropertyChangeMapper, |
|
|
labelInfo.put("quantity", quantity); |
|
|
labelInfo.put("quantity", quantity); |
|
|
labelInfo.put("oldLocationId", oldLocationId); |
|
|
labelInfo.put("oldLocationId", oldLocationId); |
|
|
labelInfo.put("newLocationId", newLocationId); |
|
|
labelInfo.put("newLocationId", newLocationId); |
|
|
|
|
|
labelInfo.put("oldStatus", oldStatus); |
|
|
|
|
|
labelInfo.put("newStatus", newStatus); |
|
|
labelInfo.put("oldProductionDate", oldProductionDate); |
|
|
labelInfo.put("oldProductionDate", oldProductionDate); |
|
|
labelInfo.put("newProductionDate", newProductionDate); |
|
|
labelInfo.put("newProductionDate", newProductionDate); |
|
|
labelInfo.put("oldExpiryDate", oldExpiryDate); |
|
|
labelInfo.put("oldExpiryDate", oldExpiryDate); |
|
|
|