mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
错误提示语句修改
This commit is contained in:
+4
-2
@@ -58,8 +58,10 @@ public class ErrorCodeConstants {
|
||||
public static final ErrorCode PLATE_DATA_ERROR = new ErrorCode(1_002_029_012, "小板获取为空");
|
||||
public static final ErrorCode PLATE_PRODUCE_DATA_ERROR = new ErrorCode(1_002_029_012, "小板生产数据获取为空");
|
||||
public static final ErrorCode ORDER_STATUS_CONFLICT = new ErrorCode(1_002_029_006, "生产单状态冲突,禁止投入生产");
|
||||
public static final ErrorCode ORDER_READ_ERR = new ErrorCode(1_002_029_006, "订单列表获取失败,请刷新重试");
|
||||
public static final ErrorCode ORDER_DATE_ERR = new ErrorCode(1_002_029_006, "获取订单列表,时间超出范围,请在30天范围内选择");
|
||||
public static final ErrorCode ORDER_READ_ERR = new ErrorCode(1_002_029_007, "订单列表获取失败,请刷新重试");
|
||||
public static final ErrorCode ORDER_DATE_ERR = new ErrorCode(1_002_029_008, "获取订单列表,时间超出范围,请在30天范围内选择");
|
||||
public static final ErrorCode ORDER_TIME_ERR = new ErrorCode(1_002_029_009, "获取订单列表,时间格式输入出错,请更换格式");
|
||||
public static final ErrorCode FILE_TYPE_ERR = new ErrorCode(1_002_029_010, "当前文件类型尚未开发,敬请期待");
|
||||
public static final ErrorCode ORDER_DETAIL_DATE_ERR = new ErrorCode(1_002_029_006, "板件生产数据缺失,请确认数据源中是否存在相关数据");
|
||||
|
||||
public static final ErrorCode SOURCE_NOT_EXITS_ERROR = new ErrorCode(1_002_029_013, "源数据查询失败");
|
||||
|
||||
+9
-3
@@ -89,6 +89,7 @@ import static com.cf.imes.framework.common.util.json.JsonUtils.toJsonString;
|
||||
import static com.cf.imes.framework.common.util.json.JsonUtils.zipString;
|
||||
import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId;
|
||||
import static com.cf.imes.module.executor.enums.ErrorCodeConstants.*;
|
||||
import static com.cf.imes.module.infra.enums.ErrorCodeConstants.FILE_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 生产单表 order_{N} Service 实现类
|
||||
@@ -224,6 +225,11 @@ public class OrderServiceImpl implements OrderService {
|
||||
public List<OrderRoomBodyRespVO> getRoomAndBody(Long planId) {
|
||||
PlanDO planDO = planMapper.selectById(planId);
|
||||
|
||||
// 判断是否存在排单
|
||||
if (planDO == null) {
|
||||
throw exception(PLAN_NOT_EXISTS);
|
||||
}
|
||||
|
||||
List<Long> orderIds = JSON.parseArray(planDO.getOrderNos()).toJavaList(Long.class);
|
||||
|
||||
return orderBodyMapper.selectRoomAndBody(orderIds, getUserOrganId());
|
||||
@@ -568,7 +574,8 @@ public class OrderServiceImpl implements OrderService {
|
||||
outputStream.write(buffer);
|
||||
outputStream.flush();
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
throw exception(FILE_NOT_EXISTS);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1035,8 +1042,7 @@ public class OrderServiceImpl implements OrderService {
|
||||
map.put(plateCountKey, plateMapper.countPlateByOrderId(orderDO.getId(), OrganContextHolder.getOrganId(), deleted));
|
||||
break;
|
||||
default:
|
||||
// 处理默认情况,可以选择忽略或者做其他处理
|
||||
break;
|
||||
throw exception(FILE_TYPE_ERR);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
+12
-4
@@ -202,10 +202,9 @@ public class ApiDataAchieve {
|
||||
return order;
|
||||
}
|
||||
|
||||
// 订单列表
|
||||
public Future<JSONObject> getApiOrderList(String token,String shopId,String createDateMin, String createDateMax, String orderNo, String customOrderNo) {
|
||||
JSONObject jsonOrders = new JSONObject();
|
||||
if (createDateMin != null && createDateMax != null){
|
||||
// 日期格式转换
|
||||
private void getDate(String createDateMin, String createDateMax, JSONObject jsonOrders) {
|
||||
try {
|
||||
// 定义日期格式
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
||||
@@ -219,6 +218,15 @@ public class ApiDataAchieve {
|
||||
|
||||
jsonOrders.put("create_date_min", createDateMin + " 00:00:00");
|
||||
jsonOrders.put("create_date_max", createDateMax + " 23:59:59");
|
||||
} catch (Exception e) {
|
||||
throw exception(ORDER_TIME_ERR);
|
||||
}
|
||||
}
|
||||
// 订单列表
|
||||
public Future<JSONObject> getApiOrderList(String token,String shopId,String createDateMin, String createDateMax, String orderNo, String customOrderNo) {
|
||||
JSONObject jsonOrders = new JSONObject();
|
||||
if (createDateMin != null && createDateMax != null){
|
||||
getDate(createDateMin, createDateMax, jsonOrders);
|
||||
}
|
||||
|
||||
jsonOrders.put(CURR_PAGE_KEY, 1);
|
||||
|
||||
Reference in New Issue
Block a user