opt:优化二楼扫码单据出库查询,任务申请失败返回400;
This commit is contained in:
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.domain.exception.BadRequestException;
|
||||
import org.nl.common.enums.StatusEnum;
|
||||
@@ -29,6 +30,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
@@ -106,8 +108,20 @@ public class GroupDickInStorageTask extends AbstractTask {
|
||||
);
|
||||
}
|
||||
}
|
||||
List<SchBaseTask> list = iSchBaseTaskService.list(new QueryWrapper<SchBaseTask>().in("vehicle_code", data.keySet())
|
||||
.lt("status", StatusEnum.FORM_STATUS.code("完成")));
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
if (ObjectUtils.isNotEmpty(list)) {
|
||||
if (list.size() == data.keySet().size()) {
|
||||
jsonObject.put("task_code", list.size() > 1 ? list.stream().map(SchBaseTask::getTask_code).collect(Collectors.joining(",")) : list.get(0).getTask_code());
|
||||
return jsonObject;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStatus(JSONObject data) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.domain.exception.BadRequestException;
|
||||
import org.nl.common.enums.StatusEnum;
|
||||
@@ -132,8 +133,16 @@ public class PalletInStorageTask extends AbstractTask {
|
||||
.build("md_pb_vehicleMater", item)
|
||||
);
|
||||
}
|
||||
List<SchBaseTask> list = iSchBaseTaskService.list(new QueryWrapper<SchBaseTask>().eq("vehicle_code", vehicle_code)
|
||||
.lt("status", StatusEnum.FORM_STATUS.code("完成")));
|
||||
if (ObjectUtils.isNotEmpty(list)) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("task_code", list.get(0).getTask_code());
|
||||
return jsonObject;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStatus(JSONObject data) {
|
||||
|
||||
@@ -74,7 +74,7 @@ public class CockpitServiceImpl implements CockpitService {
|
||||
*/
|
||||
@Override
|
||||
public List<SchBasePoint> queryPickingPoint() {
|
||||
return schBasePointServiceImpl.list(new LambdaQueryWrapper<SchBasePoint>().eq(SchBasePoint::getRegion_code, "PICK01").eq(SchBasePoint::getIs_used, true));
|
||||
return schBasePointServiceImpl.list(new LambdaQueryWrapper<SchBasePoint>().eq(SchBasePoint::getRegion_code, "PICK01"));
|
||||
}
|
||||
|
||||
|
||||
@@ -456,6 +456,7 @@ public class CockpitServiceImpl implements CockpitService {
|
||||
*/
|
||||
@Override
|
||||
public List<TaskInfo> pickingInfo(String code) {
|
||||
// List<SchBasePoint> pointList = schBasePointServiceImpl.list(new LambdaQueryWrapper<SchBasePoint>().eq(SchBasePoint::getRegion_code, "PICK01"));
|
||||
List<TaskInfo> taskList = cockpitMapper.getPickingTask(code);
|
||||
taskList.forEach(r -> {
|
||||
if (StringUtils.isNotBlank(r.getForm_data())) {
|
||||
|
||||
@@ -96,8 +96,7 @@ public class PmFormDataController {
|
||||
iPmFormDataService.update(
|
||||
new LambdaUpdateWrapper<PmFormData>()
|
||||
.set(PmFormData::getStatus, StatusEnum.FORM_STATUS.code("完成"))
|
||||
.in(PmFormData::getId, ids)
|
||||
);
|
||||
.in(PmFormData::getId, ids));
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -166,6 +166,7 @@
|
||||
left join md_me_materialbase material on vm.material_id = material.material_id
|
||||
<where>
|
||||
struct.vehicle_code is not null
|
||||
AND (struct.stor_code != 'HStockId' and struct.stor_code != 'CStockId' )
|
||||
and vm.is_delete = false
|
||||
<if test="query.search != null and query.search != ''">
|
||||
and (struct.struct_code LIKE '%${query.search}%'
|
||||
|
||||
@@ -426,9 +426,8 @@ export default {
|
||||
return
|
||||
}
|
||||
const ids = this.currentRow.map(row => row.id)
|
||||
// 构造参数
|
||||
const param = {
|
||||
data: ids // 将提取的 id 数组赋值给 param.data
|
||||
data: ids
|
||||
}
|
||||
crudFormData.confirm(param).then(res => {
|
||||
this.crud.notify('单据处理成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
|
||||
Reference in New Issue
Block a user