mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-13 13:22:07 +08:00
打包接口参数修改,工序加工bug修改
This commit is contained in:
+2
-1
@@ -1,5 +1,6 @@
|
||||
package com.cf.imes.module.executor.controller.admin.orderParts.vo;
|
||||
|
||||
import com.cf.imes.framework.es.core.dal.ESDocument;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@@ -11,7 +12,7 @@ import lombok.NoArgsConstructor;
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OrderPartsRemark {
|
||||
public class OrderPartsRemark extends ESDocument {
|
||||
|
||||
@Schema(description = "配件 ID")
|
||||
private Long partsId;
|
||||
|
||||
+27
@@ -4,6 +4,7 @@ import co.elastic.clients.elasticsearch.core.BulkResponse;
|
||||
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
||||
import com.cf.imes.framework.common.exception.ServiceException;
|
||||
import com.cf.imes.framework.es.core.service.ESDocumentService;
|
||||
import com.cf.imes.module.executor.controller.admin.orderParts.vo.OrderPartsRemark;
|
||||
import com.cf.imes.module.executor.dal.dataobject.goods.GoodsDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.orderBody.OrderBodyDO;
|
||||
@@ -80,6 +81,9 @@ public class OrderInputProcessor {
|
||||
|
||||
public static final String ORDER_PLATE_MODEL = "imes_order_plate_model";
|
||||
|
||||
|
||||
public static final String ORDER_PARTS_REMARK_MODEL = "imes_order_parts_remark_model";
|
||||
|
||||
/**
|
||||
* 批量保存生产单小板五金数据
|
||||
*
|
||||
@@ -170,4 +174,27 @@ public class OrderInputProcessor {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存生产单配件备注数据
|
||||
*
|
||||
* @param orderPartsRemarks
|
||||
*/
|
||||
public void batchSaveOrderPartsModel(List<OrderPartsRemark> orderPartsRemarks) {
|
||||
try {
|
||||
BulkResponse bulkResponse = esDocumentService.bulkCreate(ORDER_PARTS_REMARK_MODEL, orderPartsRemarks);
|
||||
boolean errors = bulkResponse.errors();
|
||||
if (errors) {
|
||||
log.error(bulkResponse.items().toString());
|
||||
throw new ServiceException(500, "未知异常");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage());
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user