Commit eb3f2377 LN

查找出库界面增加首次入库时间显示

1 个父辈 cd25d21c
...@@ -11,6 +11,8 @@ import lombok.Setter; ...@@ -11,6 +11,8 @@ import lombok.Setter;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import java.io.Serializable; import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -220,4 +222,12 @@ public class BarcodeDto implements Serializable { ...@@ -220,4 +222,12 @@ public class BarcodeDto implements Serializable {
* 料箱中的物料信息 * 料箱中的物料信息
*/ */
private Map<String, BarcodeDto> subCodeMap; private Map<String, BarcodeDto> subCodeMap;
public String getPutInTimeStr() {
if (putInTime == -1) {
return null;
}
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:SS");
return dateFormat.format( new Date(putInTime));
}
} }
...@@ -139,7 +139,7 @@ public class Barcode extends BasePo implements Serializable { ...@@ -139,7 +139,7 @@ public class Barcode extends BasePo implements Serializable {
private long startWarmTime = -1; private long startWarmTime = -1;
/** /**
* 入库时间 * 最后一次 入库时间
*/ */
private Date putInDate; private Date putInDate;
...@@ -246,9 +246,9 @@ public class Barcode extends BasePo implements Serializable { ...@@ -246,9 +246,9 @@ public class Barcode extends BasePo implements Serializable {
public void setPutInTime(long putInTime) { public void setPutInTime(long putInTime) {
if (this.putInTime == -1) { if (this.putInTime == -1) {
this.putInTime = putInTime; this.putInTime = putInTime;
this.putInDate = new Date(putInTime);
} }
this.putInDate = new Date(putInTime);
status = BARCODE_STATUS.IN_STORE; status = BARCODE_STATUS.IN_STORE;
updateExpTime(); updateExpTime();
......
...@@ -61,7 +61,7 @@ public class BaseDeviceHandler implements IDeviceHandler { ...@@ -61,7 +61,7 @@ public class BaseDeviceHandler implements IDeviceHandler {
private IHumitureManager humitureManager; private IHumitureManager humitureManager;
@Autowired @Autowired
private IBarcodeManager barcodeManager; protected IBarcodeManager barcodeManager;
@Autowired @Autowired
protected TaskService taskService; protected TaskService taskService;
......
...@@ -143,6 +143,10 @@ public class SensorShelfHandler extends BaseDeviceHandler { ...@@ -143,6 +143,10 @@ public class SensorShelfHandler extends BaseDeviceHandler {
dataLog.setBarcode(reelId); dataLog.setBarcode(reelId);
dataLog.setPartNumber(pn); dataLog.setPartNumber(pn);
dataLog.setType(OP.PUT_IN); dataLog.setType(OP.PUT_IN);
barcode.setPutInTime(System.currentTimeMillis());
barcodeManager.saveBarcode(barcode);
dataLog.setNum(barcode.getAmount()); dataLog.setNum(barcode.getAmount());
dataLog.setStatus(OP_STATUS.WAIT.name()); dataLog.setStatus(OP_STATUS.WAIT.name());
dataLog.setGroupId(groupId); dataLog.setGroupId(groupId);
......
...@@ -82,6 +82,10 @@ public class TaskService { ...@@ -82,6 +82,10 @@ public class TaskService {
task.setType(OP.PUT_IN); task.setType(OP.PUT_IN);
task.setStatus(OP_STATUS.EXECUTING.name()); task.setStatus(OP_STATUS.EXECUTING.name());
if(barcode!=null){
barcode.setPutInTime(System.currentTimeMillis());
barcodeManager.saveBarcode(barcode);
}
String loginUser = SecurityUtils.getLoginUsername(); String loginUser = SecurityUtils.getLoginUsername();
task.setOperator(loginUser); task.setOperator(loginUser);
task = updateQueueTask(task); task = updateQueueTask(task);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!