fix:任务查询时间带上时分秒
This commit is contained in:
@@ -16,6 +16,7 @@ import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.nl.wms.basedata.st.service.StructattrService;
|
||||
import org.nl.wms.basedata.st.service.dto.StructattrDto;
|
||||
import org.nl.wms.sch.AcsTaskDto;
|
||||
@@ -71,7 +72,6 @@ public class TwoOutTask extends AbstractAcsTask {
|
||||
List<JSONObject> taskArr = new ArrayList<>();
|
||||
|
||||
// 用于判断下发几个任务组
|
||||
int flag = 2;
|
||||
|
||||
// 判断当前正在执行或者下发的任务有几种规格:根据任务组进行判断,同一任务组代表同一木箱规格
|
||||
List<JSONObject> likeAllArr = WQLObject.getWQLObject("SCH_BASE_Task").query("handle_class = '" + THIS_CLASS + "' and task_status IN ('05','06') and is_delete = '0' " )
|
||||
@@ -80,9 +80,11 @@ public class TwoOutTask extends AbstractAcsTask {
|
||||
Map<String, List<JSONObject>> likeArr = likeAllArr.stream()
|
||||
.collect(Collectors.groupingBy(row -> row.getString("task_group_id")));
|
||||
|
||||
|
||||
int flag = Integer.parseInt(SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("out_queue_num").getValue());
|
||||
// 判断长度
|
||||
if (likeArr.size() >= 2) {
|
||||
log.warn("twoOutTasklikeArr>2");
|
||||
if (likeArr.size() >= flag) {
|
||||
log.warn("twoOutTasklikeArr>out_queue_num");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -93,10 +93,10 @@ public class TaskServiceImpl implements TaskService {
|
||||
map.put("finishTypeList", whereJson.getString("finishTypeList"));
|
||||
}
|
||||
if (StrUtil.isNotEmpty(whereJson.getString("begin_time"))) {
|
||||
map.put("begin_time", whereJson.getString("begin_time").substring(0, 10)+" 00:00:00");
|
||||
map.put("begin_time", whereJson.getString("begin_time"));
|
||||
}
|
||||
if (StrUtil.isNotEmpty(whereJson.getString("end_time"))) {
|
||||
map.put("end_time", whereJson.getString("end_time").substring(0, 10)+" 99:99:99");
|
||||
map.put("end_time", whereJson.getString("end_time"));
|
||||
}
|
||||
if (StrUtil.isNotEmpty(whereJson.getString("is_delete"))) {
|
||||
map.put("is_delete", whereJson.getString("is_delete"));
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
type="datetimerange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@@ -269,16 +269,31 @@ export default {
|
||||
crudTask.getFinishType().then(data => {
|
||||
this.finishTypeList = data
|
||||
})
|
||||
const afterD = new Date(new Date().getTime() + 2 * 8.64E7)
|
||||
this.crud.query.createTime = [new Date().daysAgo(3), afterD]
|
||||
const today = new Date()
|
||||
const year = today.getFullYear()
|
||||
const month = String(today.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(today.getDate()).padStart(2, '0')
|
||||
|
||||
// 2. 构造固定时分秒的时间字符串(符合datetime-local格式)
|
||||
const startTime = `${year}-${month}-${day - 3} 00:00:00`
|
||||
const endTime = `${year}-${month}-${day} 23:59:59`
|
||||
this.crud.query.createTime = [startTime, endTime]
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if (this.query_flag) {
|
||||
const afterD = new Date(new Date().getTime() + 2 * 8.64E7)
|
||||
this.crud.query.begin_time = (new Date().daysAgo(3)).strftime('%F', 'zh')
|
||||
this.crud.query.end_time = (afterD).strftime('%F', 'zh')
|
||||
const today = new Date()
|
||||
const year = today.getFullYear()
|
||||
const month = String(today.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(today.getDate()).padStart(2, '0')
|
||||
|
||||
// 2. 构造固定时分秒的时间字符串(符合datetime-local格式)
|
||||
const startTime = `${year}-${month}-${day - 3} 00:00:00`
|
||||
const endTime = `${year}-${month}-${day} 23:59:59`
|
||||
this.crud.query.createTime = [startTime, endTime]
|
||||
this.crud.query.begin_time = startTime
|
||||
this.crud.query.end_time = endTime
|
||||
this.query_flag = false
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user