点位载具类型可人工修改

This commit is contained in:
2023-02-23 23:21:59 +08:00
parent bcc9bbaf6e
commit 81bbac29de
4 changed files with 28 additions and 1 deletions

View File

@@ -3,6 +3,8 @@ package org.nl.wms.sch.service.dto;
import lombok.Data;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.List;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
@@ -51,6 +53,7 @@ public class PointDto implements Serializable {
/** 允许的载具类型 */
private String can_vehicle_type;
private List<String> can_vehicle_types;
/** 载具类型 */
private String vehicle_type;

View File

@@ -27,6 +27,7 @@ import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
/**
* @author ldjun
@@ -60,6 +61,9 @@ public class PointServiceImpl implements PointService {
JSONArray res = new JSONArray();
for (int i = 0; i < content.size(); i++) {
JSONObject object = content.getJSONObject(i);
// 可以存放的载具类型
String[] can_vehicle_types = object.getString("can_vehicle_type").split(",");
object.put("can_vehicle_types", can_vehicle_types);
Long region_id = object.getLong("region_id");
String point_status = object.getString("point_status");
String point_type = object.getString("point_type");
@@ -130,6 +134,10 @@ public class PointServiceImpl implements PointService {
if (ObjectUtil.isNotEmpty(byCode)) {
throw new BadRequestException("存在相同的点位编码");
}
String can_vehicle_type = String.join(",", dto.getCan_vehicle_types());
dto.setCan_vehicle_type(can_vehicle_type);
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
@@ -164,6 +172,9 @@ public class PointServiceImpl implements PointService {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String can_vehicle_type = String.join(",", dto.getCan_vehicle_types());
dto.setCan_vehicle_type(can_vehicle_type);
String now = DateUtil.now();
dto.setUpdate_time(now);
dto.setUpdate_optid(currentUserId);