mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-13 05:12:07 +08:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
+5
@@ -209,6 +209,7 @@ public class OrderController {
|
||||
// api-生产单导入
|
||||
@GetMapping("getApiData")
|
||||
@Operation(summary = "生产单api数据导入新增")
|
||||
@OperateLog(module="管理后台 - 生产单管理",name = "生产单api数据导入新增",type = IMPORT)
|
||||
@Parameter(name = "orderNo", description = "原订单号", required = true, example = "20230809027818")
|
||||
@PreAuthorize("@ss.hasPermission('production:manager-list:create')")
|
||||
public CommonResult<String> getApiData(@RequestParam(value = "orderNo") String orderNo){
|
||||
@@ -451,6 +452,7 @@ public class OrderController {
|
||||
|
||||
@PostMapping("/get-platesDetailsPage")
|
||||
@Operation(summary = "生产单详情-板件详细信息(分页)")
|
||||
@OperateLog(enable = false)
|
||||
@PreAuthorize("@ss.hasPermission('production:manager-list:detail')")
|
||||
public CommonResult<PageResult<OrderPlatesDetailReqVO>> platesDetails(@Valid @RequestBody OrderBodyPageRespVO orderBodyPageRespVO) {
|
||||
if (orderBodyPageRespVO.getDeleted() == null) {
|
||||
@@ -464,6 +466,7 @@ public class OrderController {
|
||||
|
||||
@PostMapping("/get-partsDetailsPage")
|
||||
@Operation(summary = "生产单详情-配件详细信息(分页)")
|
||||
@OperateLog(enable = false)
|
||||
@PreAuthorize("@ss.hasPermission('production:manager-list:detail')")
|
||||
public CommonResult<PageResult<OrderPartsRespVO>> partsDetails(@Valid @RequestBody OrderBodyPageRespVO orderBodyPageRespVO) {
|
||||
if (orderBodyPageRespVO.getDeleted() == null) {
|
||||
@@ -483,6 +486,7 @@ public class OrderController {
|
||||
|
||||
@PostMapping("/get-goodsDetailsPage")
|
||||
@Operation(summary = "生产单详情-板材详细信息(分页)")
|
||||
@OperateLog(enable = false)
|
||||
@PreAuthorize("@ss.hasPermission('production:manager-list:detail')")
|
||||
public CommonResult<PageResult<OrderGoodsDetailRespVO>> goodsDetails(@Valid @RequestBody OrderBodyPageRespVO orderBodyPageRespVO) {
|
||||
if (orderBodyPageRespVO.getDeleted() == null) {
|
||||
@@ -496,6 +500,7 @@ public class OrderController {
|
||||
|
||||
@PostMapping("/get-componentDetailsPage")
|
||||
@Operation(summary = "生产单详情-组件详细信息(分页)")
|
||||
@OperateLog(enable = false)
|
||||
@PreAuthorize("@ss.hasPermission('production:manager-list:detail')")
|
||||
public CommonResult<PageResult<OrderPartsRespVO>> componentDetails(@Valid @RequestBody OrderBodyPageRespVO orderBodyPageRespVO) {
|
||||
if (orderBodyPageRespVO.getDeleted() == null) {
|
||||
|
||||
+3
-2
@@ -29,7 +29,7 @@ import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static com.cf.imes.framework.common.pojo.CommonResult.success;
|
||||
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
@Tag(name = "管理后台 - 排单")
|
||||
@RestController
|
||||
@@ -108,7 +108,7 @@ public class PlanController {
|
||||
|
||||
|
||||
|
||||
@PostMapping("/setSort")
|
||||
@PutMapping("/setSort")
|
||||
@Operation(summary = "设置排单优先级")
|
||||
@PreAuthorize("@ss.hasPermission('placeorder:priority')")
|
||||
public CommonResult<Boolean> setSort(@Valid @NotEmpty(message = "参数不能空") @Size(max = 2,message = "做多两条数据") @RequestBody List<SortVO> sortVos) {
|
||||
@@ -188,6 +188,7 @@ public class PlanController {
|
||||
|
||||
@PostMapping("getPlanGoodsList")
|
||||
@Operation(summary = "未排单混单获取分类的排单信息")
|
||||
@OperateLog(enable = false)
|
||||
@PreAuthorize("@ss.hasPermission('manage:un-order-olan:create')")
|
||||
public CommonResult<List<PlanActualGoodsResp>> getPlanGoodsList(@Valid @RequestBody SavePlanPlateList savePlanPlateList) {
|
||||
|
||||
|
||||
+12
-13
@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import co.elastic.clients.elasticsearch.ElasticsearchClient;
|
||||
import co.elastic.clients.elasticsearch._types.ElasticsearchException;
|
||||
import co.elastic.clients.elasticsearch._types.FieldValue;
|
||||
import co.elastic.clients.elasticsearch._types.query_dsl.Query;
|
||||
import co.elastic.clients.elasticsearch.core.DeleteByQueryRequest;
|
||||
import co.elastic.clients.elasticsearch.core.DeleteByQueryResponse;
|
||||
import co.elastic.clients.elasticsearch.core.SearchRequest;
|
||||
@@ -216,26 +217,25 @@ public class EsUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteEsDocument(String filedName1,String filedName2, Long value1,Long value2, String index) {
|
||||
|
||||
public void deleteEsDocument(String fieldName1,String fieldName2, Long value1,Long value2, String index) {
|
||||
DeleteByQueryRequest.Builder builder = new DeleteByQueryRequest.Builder();
|
||||
builder.index(index);
|
||||
|
||||
builder.query(q->q.bool(b->b.filter(f->{
|
||||
f.term(t->t.field(filedName1).value(value1));
|
||||
f.term(t->t.field(filedName2).value(value2));
|
||||
return f;
|
||||
})));
|
||||
builder.query(q -> q.bool(b -> b.filter(
|
||||
Query.of(q1 -> q1.term(t -> t.field(fieldName1).value(value1))),
|
||||
Query.of(q2 -> q2.term(t -> t.field(fieldName2).value(value2)))
|
||||
)));
|
||||
|
||||
try {
|
||||
elasticsearchClient.deleteByQuery(builder.build());
|
||||
} catch (IOException | ElasticsearchException e) {
|
||||
log.error("ES文档删除失败:", e.getMessage());
|
||||
log.error("ES文档删除失败:{}", e.getMessage());
|
||||
throw new ServiceException(ES_DATA_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void deleteEsDocument(String filedName1,String filedName2, Long value1,List<Long> values2, String index) {
|
||||
|
||||
List<FieldValue> fieldValues = values2.stream().map(FieldValue::of).toList();
|
||||
@@ -243,11 +243,10 @@ public class EsUtils {
|
||||
DeleteByQueryRequest.Builder builder = new DeleteByQueryRequest.Builder();
|
||||
builder.index(index);
|
||||
|
||||
builder.query(q->q.bool(b->b.filter(f->{
|
||||
f.term(t->t.field(filedName1).value(value1));
|
||||
f.terms(t->t.field(filedName2).terms(v2->v2.value(fieldValues)));
|
||||
return f;
|
||||
})));
|
||||
builder.query(q-> q.bool(b-> b.filter(
|
||||
Query.of(q1->q1.term(t->t.field(filedName1).value(value1))),
|
||||
Query.of(q2-> q2.terms(t->t.field(filedName2).terms(v2-> v2.value(fieldValues))))
|
||||
)));
|
||||
|
||||
try {
|
||||
elasticsearchClient.deleteByQuery(builder.build());
|
||||
|
||||
Reference in New Issue
Block a user