add:停止过账状态
This commit is contained in:
@@ -10,8 +10,8 @@ import org.nl.wms.warehouse_manage.stockReturn.service.enums.StockReturnStatusEn
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.YearMonth;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -30,7 +30,10 @@ public class ReceiveReturnAutoTask {
|
||||
public void run() {
|
||||
log.info("========>倒冲领料定时回传任务");
|
||||
YearMonth currentMonth = YearMonth.now();
|
||||
LocalDateTime startOfMonth = currentMonth.atDay(1).atStartOfDay();
|
||||
String startOfMonth = currentMonth
|
||||
.atDay(1)
|
||||
.atStartOfDay()
|
||||
.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
List<ReceiveOutReturn> list = receiveOutReturnService.list(new LambdaQueryWrapper<ReceiveOutReturn>()
|
||||
.and(wrapper -> wrapper.eq(ReceiveOutReturn::getStatus, StockReturnStatusEnum.TODO.getCode())
|
||||
.or()
|
||||
@@ -47,5 +50,13 @@ public class ReceiveReturnAutoTask {
|
||||
}
|
||||
Thread.sleep(1000 * 3);
|
||||
}
|
||||
//停止过账本月之前的记录
|
||||
List<ReceiveOutReturn> formerData = receiveOutReturnService.list(new LambdaQueryWrapper<ReceiveOutReturn>()
|
||||
.eq(ReceiveOutReturn::getStatus, StockReturnStatusEnum.FAIL.getCode())
|
||||
.lt(ReceiveOutReturn::getBiztime, startOfMonth));
|
||||
if (!formerData.isEmpty()) {
|
||||
formerData.forEach(item -> item.setStatus(StockReturnStatusEnum.STOP.getCode()));
|
||||
receiveOutReturnService.updateBatchById(formerData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ public enum StockReturnStatusEnum {
|
||||
FAIL("2","过账中"),
|
||||
ERROR("3","过账异常"),
|
||||
IGNORE("4","忽略过账"),
|
||||
STOP("5","停止过账"),
|
||||
;
|
||||
|
||||
StockReturnStatusEnum(String code, String desc) {
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<el-table-column prop="sn" label="序列码" min-width="110" />
|
||||
<el-table-column prop="trackNo" label="跟踪号" min-width="110" />
|
||||
<el-table-column prop="workArea" label="产线" min-width="60" />
|
||||
<el-table-column prop="status" label="过账状态" width="80">
|
||||
<el-table-column prop="status" label="过账状态" width="82">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="statusTagType(scope.row.status)" size="mini">{{ statusLabel(scope.row.status) }}</el-tag>
|
||||
</template>
|
||||
@@ -269,7 +269,8 @@ export default {
|
||||
{ value: '1', label: '过账完成' },
|
||||
{ value: '2', label: '过账中' },
|
||||
{ value: '3', label: '重新提交' },
|
||||
{ value: '4', label: '忽略过账' }
|
||||
{ value: '4', label: '忽略过账' },
|
||||
{ value: '5', label: '停止过账' }
|
||||
],
|
||||
rules: {
|
||||
orgno: [{ required: true, message: '请输入机构编号', trigger: 'blur' }],
|
||||
@@ -469,7 +470,7 @@ export default {
|
||||
// { value: '1', label: '回传成功' },
|
||||
// { value: '2', label: '回传失败' },
|
||||
// { value: '3', label: '回传异常' }
|
||||
const map = { '0': 'primary', '2': 'info', '1': 'success', '3': 'danger' }
|
||||
const map = { '0': 'primary', '2': 'info', '1': 'success', '3': 'danger', '5': 'info' }
|
||||
return map[String(status)] || ''
|
||||
},
|
||||
statusFormat(row) {
|
||||
|
||||
Reference in New Issue
Block a user