板材造型压缩 索引去除

This commit is contained in:
liuzhaotian
2025-03-07 14:20:54 +08:00
parent c6fec72adf
commit 34cacc6d51
3 changed files with 19 additions and 23 deletions
@@ -110,7 +110,7 @@ public class OrderController {
private String errKey = "生产数据导入异常,{}";
public static final String ORDER_PLATE_MODEL = "imes_order_plate_model";
public static final String ORDER_PLATE_MODEL_COMPRESS = "imes_order_plate_model_compress";
// public static final String ORDER_PLATE_MODEL_COMPRESS = "imes_order_plate_model_compress";
public static final String ORDER_PARTS_REMARK_MODEL = "imes_order_parts_remark_model";
@PutMapping("/update")
@Operation(summary = "更新生产单")
@@ -232,7 +232,7 @@ public class OrderController {
OrderDO orderDO = orderMapper.selectById(orderId);
if (orderDO == null) {
orderInputProcessor.deleteByOrderId(orderId, ORDER_PLATE_MODEL);
orderInputProcessor.deleteByOrderId(orderId, ORDER_PLATE_MODEL_COMPRESS);
// orderInputProcessor.deleteByOrderId(orderId, ORDER_PLATE_MODEL_COMPRESS);
orderInputProcessor.deleteByOrderId(orderId, ORDER_PARTS_REMARK_MODEL);
}
@@ -382,7 +382,7 @@ public class OrderController {
if (ObjectUtil.isNotNull(orderDO) && ObjectUtil.isNotNull(orderMapper.selectById(orderDO.getId()))) {
Long deleteOrderId = orderDO.getId();
orderInputProcessor.deleteByOrderId(deleteOrderId, ORDER_PLATE_MODEL);
orderInputProcessor.deleteByOrderId(deleteOrderId, ORDER_PLATE_MODEL_COMPRESS);
// orderInputProcessor.deleteByOrderId(deleteOrderId, ORDER_PLATE_MODEL_COMPRESS);
orderInputProcessor.deleteByOrderId(deleteOrderId, ORDER_PARTS_REMARK_MODEL);
}
@@ -16,7 +16,6 @@ import com.cf.imes.module.executor.dal.dataobject.orderGroup.OrderGroupDO;
import com.cf.imes.module.executor.dal.dataobject.orderItem.OrderItemDO;
import com.cf.imes.module.executor.dal.dataobject.orderParts.OrderPartsDO;
import com.cf.imes.module.executor.dal.dataobject.orderParts.PartsDO;
import com.cf.imes.module.executor.dal.dataobject.ordermodel.OrderModelCompressDO;
import com.cf.imes.module.executor.dal.dataobject.ordermodel.OrderModelDO;
import com.cf.imes.module.executor.dal.dataobject.plate.PlateDO;
import com.cf.imes.module.executor.dal.dataobject.plate.PlateGoodDO;
@@ -99,7 +98,7 @@ public class OrderInputProcessor {
public static final String ORDER_PARTS_REMARK_MODEL = "imes_order_parts_remark_model";
public static final String ORDER_PLATE_MODEL_COMPRESS = "imes_order_plate_model_compress";
// public static final String ORDER_PLATE_MODEL_COMPRESS = "imes_order_plate_model_compress";
/**
* 批量保存生产单小板五金数据
@@ -210,21 +209,21 @@ public class OrderInputProcessor {
*
* @param orderModelDOs
*/
public void batchSaveCompressModel(List<OrderModelCompressDO> orderModelDOs) {
try {
BulkResponse bulkResponse = esDocumentService.bulkCreate(ORDER_PLATE_MODEL_COMPRESS, orderModelDOs);
boolean errors = bulkResponse.errors();
if (errors) {
log.error(bulkResponse.items().toString());
throw new ServiceException(500, "未知异常");
}
} catch (IOException | ElasticsearchException e) {
e.printStackTrace();
log.error(e.getMessage());
throw new RuntimeException(e);
}
}
// public void batchSaveCompressModel(List<OrderModelCompressDO> orderModelDOs) {
// try {
// BulkResponse bulkResponse = esDocumentService.bulkCreate(ORDER_PLATE_MODEL_COMPRESS, orderModelDOs);
// boolean errors = bulkResponse.errors();
// if (errors) {
// log.error(bulkResponse.items().toString());
// throw new ServiceException(500, "未知异常");
// }
// } catch (IOException | ElasticsearchException e) {
// e.printStackTrace();
// log.error(e.getMessage());
// throw new RuntimeException(e);
// }
//
// }