‘linchangsheng’ 8 月之前
父節點
當前提交
a627800776

+ 5 - 0
mall-server-api/pom.xml

@@ -215,6 +215,11 @@
                 </exclusion>
             </exclusions>
         </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+
 
         <dependency>
             <groupId>com.alibaba</groupId>

+ 491 - 0
mall-server-api/src/main/java/com/gree/mall/manager/bean/es/OrderBaseEs.java

@@ -0,0 +1,491 @@
+package com.gree.mall.manager.bean.es;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.gree.mall.manager.plus.entity.PgOrderBase;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.data.annotation.Id;
+import org.springframework.data.elasticsearch.annotations.Document;
+import org.springframework.data.elasticsearch.annotations.Field;
+import org.springframework.data.elasticsearch.annotations.FieldType;
+
+
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author qinrongjun
+ * @description
+ * @date 2023/6/19 10:39 星期一
+ */
+@Data
+@Document(indexName = "pg_order_base")
+public class OrderBaseEs   {
+
+    @Id
+    @Field(value = "id", type = FieldType.Keyword)
+    private String id;
+
+    @ApiModelProperty(value = "服务说明(例如:家用空调x1,洗衣机x1)")
+    @Field(value = "order_title", type = FieldType.Keyword)
+    private String orderTitle;
+
+    @ApiModelProperty(value = "所属业务线   INSTALL=安装 REPAIR=维修")
+    @Field(value = "order_type", type = FieldType.Keyword)
+    private String orderType;
+
+    @ApiModelProperty(value = "所属业务线名称")
+    @Field(value = "order_type_text", type = FieldType.Keyword)
+    private String orderTypeText;
+
+    @ApiModelProperty(value = "工单类型")
+    @Field(value = "order_small_type", type = FieldType.Keyword)
+    private String orderSmallType;
+
+    @ApiModelProperty(value = "工单类型名称")
+    @Field(value = "order_small_type_text", type = FieldType.Keyword)
+    private String orderSmallTypeText;
+
+    @ApiModelProperty(value = "商户id")
+    @Field(value = "company_wechat_id", type = FieldType.Keyword)
+    private String companyWechatId;
+
+    @ApiModelProperty(value = "商户名称")
+    @Field(value = "company_wechat_name", type = FieldType.Keyword)
+    private String companyWechatName;
+
+    @ApiModelProperty(value = "主要师傅id")
+    @Field(value = "worker_id", type = FieldType.Keyword)
+    private String workerId;
+
+    @ApiModelProperty(value = "师傅名称")
+    @Field(value = "worker_name", type = FieldType.Keyword)
+    private String workerName;
+
+    @ApiModelProperty(value = "师傅电话")
+    @Field(value = "worker_mobile", type = FieldType.Keyword)
+    private String workerMobile;
+
+    @ApiModelProperty(value = "师傅身份证")
+    @Field(value = "worker_idcard", type = FieldType.Keyword)
+    private String workerIdcard;
+
+    @ApiModelProperty(value = "所有师傅的id(冗余字段),实际请看order_worker")
+    @Field(value = "worker_id_list", type = FieldType.Keyword)
+    private String workerIdList;
+
+    @ApiModelProperty(value = "工单状态 DYY=待预约 DSHPG=待商户派工 DWDPG=待网点派工 DQD=待抢单 DJD=待接单 FWZ=服务中 YCD=异常单 YWG=已完工待结算 YJS=已结算 YQX=已取消")
+    @Field(value = "order_status", type = FieldType.Keyword)
+    private String orderStatus;
+
+    @ApiModelProperty(value = "工单状态中文名称")
+    @Field(value = "order_status_text", type = FieldType.Keyword)
+    private String orderStatusText;
+
+    @ApiModelProperty(value = "派单给师傅的时间")
+    @Field(value = "dispatch_time", type = FieldType.Keyword)
+    private Date dispatchTime;
+
+    @ApiModelProperty(value = "师傅接单时间")
+    @Field(value = "worker_rece_time", type = FieldType.Keyword)
+    private Date workerReceTime;
+
+    @ApiModelProperty(value = "派工网点时间")
+    @Field(value = "dispatch_websit_time", type = FieldType.Keyword)
+    private Date dispatchWebsitTime;
+
+    @ApiModelProperty(value = "客户id(客户建单才有)")
+    @Field(value = "user_id", type = FieldType.Keyword)
+    private String userId;
+
+    @ApiModelProperty(value = "客户名称")
+    @Field(value = "user_name", type = FieldType.Keyword)
+    private String userName;
+
+    @ApiModelProperty(value = "联系人")
+    @Field(value = "link_name", type = FieldType.Keyword)
+    private String linkName;
+
+    @ApiModelProperty(value = "客户电话")
+    @Field(value = "user_mobile", type = FieldType.Keyword)
+    private String userMobile;
+
+    @ApiModelProperty(value = "客户电话2")
+    @Field(value = "user_mobile2", type = FieldType.Keyword)
+    private String userMobile2;
+
+    @ApiModelProperty(value = "省")
+    @Field(value = "province", type = FieldType.Keyword)
+    private String province;
+
+    @ApiModelProperty(value = "省id")
+    @Field(value = "province_id", type = FieldType.Keyword)
+    private String provinceId;
+
+    @ApiModelProperty(value = "市")
+    @Field(value = "city", type = FieldType.Keyword)
+    private String city;
+
+    @ApiModelProperty(value = "市id")
+    @Field(value = "city_id", type = FieldType.Keyword)
+    private String cityId;
+
+    @ApiModelProperty(value = "区")
+    @Field(value = "area", type = FieldType.Keyword)
+    private String area;
+
+    @ApiModelProperty(value = "区id")
+    @Field(value = "area_id", type = FieldType.Keyword)
+    private String areaId;
+
+    @ApiModelProperty(value = "街道")
+    @Field(value = "street", type = FieldType.Keyword)
+    private String street;
+
+    @ApiModelProperty(value = "街道id")
+    @Field(value = "street_id", type = FieldType.Keyword)
+    private String streetId;
+
+    @ApiModelProperty(value = "详细地址")
+    @Field(value = "address", type = FieldType.Keyword)
+    private String address;
+
+    @ApiModelProperty(value = "备注")
+    @Field(value = "remark", type = FieldType.Keyword)
+    private String remark;
+
+    @ApiModelProperty(value = "安装或维修网点名称(售后网点)")
+    @Field(value = "websit_name", type = FieldType.Keyword)
+    private String websitName;
+
+    @ApiModelProperty(value = "安装或维修网点编号(售后网点)")
+    @Field(value = "websit_id", type = FieldType.Keyword)
+    private String websitId;
+
+    @ApiModelProperty(value = "售后网点联系电话")
+    @Field(value = "websit_phone", type = FieldType.Keyword)
+    private String websitPhone;
+
+    @ApiModelProperty(value = "创建网点编号")
+    @Field(value = "create_websit_id", type = FieldType.Keyword)
+    private String createWebsitId;
+
+    @ApiModelProperty(value = "创建网点名称")
+    @Field(value = "create_websit_name", type = FieldType.Keyword)
+    private String createWebsitName;
+
+    @ApiModelProperty(value = "gps地址信息")
+    @Field(value = "gps_address", type = FieldType.Keyword)
+    private String gpsAddress;
+
+    @ApiModelProperty(value = "最新反馈记录")
+    @Field(value = "last_operator", type = FieldType.Keyword)
+    private String lastOperator;
+
+    @ApiModelProperty(value = "最近操作网点")
+    @Field(value = "last_operator_websit", type = FieldType.Keyword)
+    private String lastOperatorWebsit;
+
+    @ApiModelProperty(value = "最近操作网点编号")
+    @Field(value = "last_operator_by", type = FieldType.Keyword)
+    private String lastOperatorBy;
+
+    @ApiModelProperty(value = "最近操作时间")
+    @Field(value = "last_operator_time", type = FieldType.Keyword)
+    private Date lastOperatorTime;
+
+    @ApiModelProperty(value = "预约安装/维修时间")
+    @Field(value = "appointment_time", type = FieldType.Keyword)
+    private Date appointmentTime;
+
+    @ApiModelProperty(value = "预约结束时间")
+    @Field(value = "appointment_end_time", type = FieldType.Keyword)
+    private Date appointmentEndTime;
+
+    @ApiModelProperty(value = "预约备注")
+    @Field(value = "appointment_remark", type = FieldType.Keyword)
+    private String appointmentRemark;
+
+    @ApiModelProperty(value = "安装/维修总数量")
+    @Field(value = "total_num", type = FieldType.Keyword)
+    private Integer totalNum;
+
+    @ApiModelProperty(value = "未完成数量")
+    @Field(value = "undone_num", type = FieldType.Keyword)
+    private Integer undoneNum;
+
+    @ApiModelProperty(value = "经度")
+    @Field(value = "lng", type = FieldType.Keyword)
+    private String lng;
+
+    @ApiModelProperty(value = "纬度")
+    @Field(value = "lat", type = FieldType.Keyword)
+    private String lat;
+
+    @ApiModelProperty(value = "师傅报完工时间")
+    @Field(value = "over_time", type = FieldType.Keyword)
+    private Date overTime;
+
+    @ApiModelProperty(value = "网点报完工时间")
+    @Field(value = "websit_over_time", type = FieldType.Keyword)
+    private Date websitOverTime;
+
+    @ApiModelProperty(value = "完工时间(精确到天)")
+    @Field(value = "over_date", type = FieldType.Keyword)
+    private Date overDate;
+
+    @ApiModelProperty(value = "正常关闭时间")
+    @Field(value = "close_time", type = FieldType.Keyword)
+    private Date closeTime;
+
+    @ApiModelProperty(value = "创建时间(精确到天)")
+    @Field(value = "create_date", type = FieldType.Keyword)
+    private Date createDate;
+
+    @ApiModelProperty(value = "创建时间")
+    @Field(value = "create_time", type = FieldType.Keyword)
+    private Date createTime;
+
+    @ApiModelProperty(value = "创建人手机")
+    @Field(value = "create_mobile", type = FieldType.Keyword)
+    private String createMobile;
+
+    @ApiModelProperty(value = "创建人")
+    @Field(value = "create_by", type = FieldType.Keyword)
+    private String createBy;
+
+    @ApiModelProperty(value = "创建人名称")
+    @Field(value = "create_name", type = FieldType.Keyword)
+    private String createName;
+
+    @ApiModelProperty(value = "修改时间")
+    @Field(value = "update_time", type = FieldType.Keyword)
+    private Date updateTime;
+
+    @ApiModelProperty(value = "修改人")
+    @Field(value = "update_by", type = FieldType.Keyword)
+    private String updateBy;
+
+    @ApiModelProperty(value = "首次评价(A:好评,B:中评,C:差评,N:未评价,O:其他")
+    @Field(value = "appraise_status", type = FieldType.Keyword)
+    private String appraiseStatus;
+
+    @ApiModelProperty(value = "首次评价内容")
+    @Field(value = "appraise_content", type = FieldType.Keyword)
+    private String appraiseContent;
+
+    @ApiModelProperty(value = "首次评价时间")
+    @Field(value = "appraise_time", type = FieldType.Keyword)
+    private Date appraiseTime;
+
+    @ApiModelProperty(value = "评价来源 1=用户评价 2=商家评价")
+    @Field(value = "appraise_source", type = FieldType.Keyword)
+    private Integer appraiseSource;
+
+    @ApiModelProperty(value = "多个图片逗号隔开")
+    @Field(value = "appraise_img_url", type = FieldType.Keyword)
+    private String appraiseImgUrl;
+
+    @ApiModelProperty(value = "师傅记事备注")
+    @Field(value = "worker_remark", type = FieldType.Keyword)
+    private String workerRemark;
+
+    @ApiModelProperty(value = "销售单位")
+    @Field(value = "sale_company", type = FieldType.Keyword)
+    private String saleCompany;
+
+    @ApiModelProperty(value = "最近一次操作预约/改约的时间")
+    @Field(value = "last_operator_appointment_time", type = FieldType.Keyword)
+    private Date lastOperatorAppointmentTime;
+
+    @ApiModelProperty(value = "工单渠道id")
+    @Field(value = "order_channel_id", type = FieldType.Keyword)
+    private String orderChannelId;
+
+    @ApiModelProperty(value = "工单渠道")
+    @Field(value = "order_channel_text", type = FieldType.Keyword)
+    private String orderChannelText;
+
+    @ApiModelProperty(value = "改约备注")
+    @Field(value = "change_remark", type = FieldType.Keyword)
+    private String changeRemark;
+
+    @ApiModelProperty(value = "销售单号")
+    @Field(value = "sale_order_id", type = FieldType.Keyword)
+    private String saleOrderId;
+
+    @ApiModelProperty(value = "销售单下单时间")
+    @Field(value = "sale_create_time", type = FieldType.Keyword)
+    private Date saleCreateTime;
+
+    @ApiModelProperty(value = "销售单订单金额")
+    @Field(value = "sale_total_amount", type = FieldType.Keyword)
+    private BigDecimal saleTotalAmount;
+
+    @ApiModelProperty(value = "销售单备注")
+    @Field(value = "sale_remark", type = FieldType.Keyword)
+    private String saleRemark;
+
+    @ApiModelProperty(value = "内部来源")
+    @Field(value = "source", type = FieldType.Keyword)
+    private String source;
+
+    @ApiModelProperty(value = "完工反馈备注")
+    @Field(value = "over_remark", type = FieldType.Keyword)
+    private String overRemark;
+
+    @ApiModelProperty(value = "客户签名")
+    @Field(value = "user_sign", type = FieldType.Keyword)
+    private String userSign;
+
+    @ApiModelProperty(value = "是否为导入工单,true=是 false=否")
+    @Field(value = "is_import", type = FieldType.Keyword)
+    private Boolean isImport;
+
+    @ApiModelProperty(value = "是否已采集 YES 是 NO 否")
+    @Field(value = "is_gather", type = FieldType.Keyword)
+    private String isGather;
+
+    @ApiModelProperty(value = "是否异常工单 true/false")
+    @Field(value = "is_exception", type = FieldType.Keyword)
+    private Boolean isException;
+
+    @ApiModelProperty(value = "增置服务id")
+    @Field(value = "pg_incre_id", type = FieldType.Keyword)
+    private String pgIncreId;
+
+    @ApiModelProperty(value = "增置服务订单id")
+    @Field(value = "pg_incre_order_id", type = FieldType.Keyword)
+    private String pgIncreOrderId;
+
+    @ApiModelProperty(value = "增置服务明细id")
+    @Field(value = "pg_incre_item_id", type = FieldType.Keyword)
+    private String pgIncreItemId;
+
+    @ApiModelProperty(value = "增置服务售卖网点")
+    @Field(value = "pg_incre_websit_name", type = FieldType.Keyword)
+    private String pgIncreWebsitName;
+
+    @ApiModelProperty(value = "增置服务售卖网点id")
+    @Field(value = "pg_incre_websit_id", type = FieldType.Keyword)
+    private String pgIncreWebsitId;
+
+    @ApiModelProperty(value = "结算服务费用")
+    @Field(value = "settle_service_amount", type = FieldType.Keyword)
+    private BigDecimal settleServiceAmount;
+
+    @ApiModelProperty(value = "维保基础id")
+    @Field(value = "rp_project_repair_id", type = FieldType.Keyword)
+    private String rpProjectRepairId;
+
+    @ApiModelProperty(value = "工程维保名称")
+    @Field(value = "rp_project_repair_name", type = FieldType.Keyword)
+    private String rpProjectRepairName;
+
+    @ApiModelProperty(value = "费用支付方式 EXAMINE=审批后结算 SITE=现场支付")
+    @Field(value = "fee_pay_method", type = FieldType.Keyword)
+    private String feePayMethod;
+
+    @ApiModelProperty(value = "是否包含全部费用 YES=是 NO=否")
+    @Field(value = "is_all_fee", type = FieldType.Keyword)
+    private String isAllFee;
+
+    @ApiModelProperty(value = "销售类型 1=零售 2=工程 3=延保 4=工程维保")
+    @Field(value = "sale_type", type = FieldType.Keyword)
+    private Integer saleType;
+
+    @ApiModelProperty(value = "工程编号")
+    @Field(value = "project_no", type = FieldType.Keyword)
+    private String projectNo;
+
+    @ApiModelProperty(value = "工程名称")
+    @Field(value = "project_name", type = FieldType.Keyword)
+    private String projectName;
+
+    @ApiModelProperty(value = "是否开启抢单")
+    @Field(value = "is_qd", type = FieldType.Keyword)
+    private Boolean isQd;
+
+    @ApiModelProperty(value = "是否已产生通知 true=是 false=否")
+    @Field(value = "is_qd_notice", type = FieldType.Keyword)
+    private Boolean isQdNotice;
+
+    @ApiModelProperty(value = "是否为拆机")
+    @Field(value = "is_cj", type = FieldType.Keyword)
+    private Boolean isCj;
+
+    @ApiModelProperty(value = "是否为租赁单 true/false")
+    @Field(value = "is_zl", type = FieldType.Keyword)
+    private Boolean isZl;
+
+
+
+    @ApiModelProperty(value = "是否为工单导入 true/false")
+    @Field(value = "is_import_excel", type = FieldType.Keyword)
+    private Boolean isImportExcel;
+
+    @ApiModelProperty(value = "服务状态")
+    @Field(value = "service_status", type = FieldType.Keyword)
+    private String serviceStatus;
+
+    @ApiModelProperty(value = "投诉等级")
+    @Field(value = "complaint", type = FieldType.Keyword)
+    private String complaint;
+
+    @ApiModelProperty(value = "紧急程度")
+    @Field(value = "urgent", type = FieldType.Keyword)
+    private String urgent;
+
+    @ApiModelProperty(value = "评价结果")
+    @Field(value = "evaluate", type = FieldType.Keyword)
+    private String evaluate;
+
+    @ApiModelProperty(value = "销售平台")
+    @Field(value = "sales_platform", type = FieldType.Keyword)
+    private String salesPlatform;
+
+    @ApiModelProperty(value = "购买单位")
+    @Field(value = "buy_name", type = FieldType.Keyword)
+    private String buyName;
+
+    @ApiModelProperty(value = "销售类型")
+    @Field(value = "sales_type_name", type = FieldType.Keyword)
+    private String salesTypeName;
+
+    @ApiModelProperty(value = "要求状态")
+    @Field(value = "req_status", type = FieldType.Keyword)
+    private String reqStatus;
+
+    @ApiModelProperty(value = "要求类型")
+    @Field(value = "req_type", type = FieldType.Keyword)
+    private String reqType;
+
+    @ApiModelProperty(value = "要求内容")
+    @Field(value = "req_text", type = FieldType.Keyword)
+    private String reqText;
+
+    @ApiModelProperty(value = "服务单号")
+    @Field(value = "service_order_id", type = FieldType.Keyword)
+    private String serviceOrderId;
+
+    @ApiModelProperty(value = "销售单号")
+    @Field(value = "sales_order_id", type = FieldType.Keyword)
+    private String salesOrderId;
+
+    @ApiModelProperty(value = "管理组织")
+    @Field(value = "manager_name", type = FieldType.Keyword)
+    private String managerName;
+
+    @ApiModelProperty(value = "运营主体")
+    @Field(value = "operate_entity", type = FieldType.Keyword)
+    private String operateEntity;
+
+    @ApiModelProperty(value = "大类名称")
+    @Field(value = "main_name", type = FieldType.Keyword)
+    private String mainName;
+
+
+}

+ 54 - 0
mall-server-api/src/main/java/com/gree/mall/manager/controller/es/ESOrderBaserController.java

@@ -0,0 +1,54 @@
+package com.gree.mall.manager.controller.es;
+
+import cn.hutool.core.lang.TypeReference;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gree.mall.manager.annotation.ApiNotAuth;
+import com.gree.mall.manager.annotation.ZfireList;
+import com.gree.mall.manager.bean.es.ESGoodsBean;
+import com.gree.mall.manager.bean.es.ESGoodsVO;
+import com.gree.mall.manager.bean.es.OrderBaseEs;
+import com.gree.mall.manager.enums.es.ESGoodsStatusEnum;
+import com.gree.mall.manager.es.OrderBaseEsRepository;
+import com.gree.mall.manager.exception.RemoteServiceException;
+import com.gree.mall.manager.helper.ResponseHelper;
+import com.gree.mall.manager.logic.es.ESGoodsLogic;
+import com.gree.mall.manager.plus.entity.EsGoodsOperateRecord;
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
+import com.gree.mall.manager.zfire.util.FieldUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
+import org.springframework.data.elasticsearch.core.IndexOperations;
+import org.springframework.data.elasticsearch.core.document.Document;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+@Slf4j
+@RestController
+@Api(value = "esapi", tags ={"esapi"} )
+@RequestMapping(value = "/esOrderbase/goods", produces = "application/json; charset=utf-8")
+public class ESOrderBaserController {
+
+
+    @Resource
+    private ElasticsearchRestTemplate elasticsearchRestTemplate;
+
+    @Resource
+    private OrderBaseEsRepository orderBaseEsRepository;
+
+    @ApiNotAuth
+    @PostMapping("add")
+    public ResponseHelper add() {
+
+
+
+        return ResponseHelper.success();
+    }
+
+}

+ 1 - 0
mall-server-api/src/main/java/com/gree/mall/manager/enums/workorder/OrderOperatorLogTypeEnum.java

@@ -16,6 +16,7 @@ public enum OrderOperatorLogTypeEnum implements BaseEnum {
 
     QITA("其他","其他"),
     YUYUE("用户预约","用户预约"),
+    YUYUEY("预约","用户预约"),
     WORKER("指派师傅","指派师傅"),
     GP("派工","派工"),
     GAIYUE("改约","改约"),

+ 13 - 0
mall-server-api/src/main/java/com/gree/mall/manager/es/OrderBaseEsRepository.java

@@ -0,0 +1,13 @@
+package com.gree.mall.manager.es;
+
+
+import com.gree.mall.manager.bean.es.OrderBaseEs;
+import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
+
+/**
+ * @author qinrongjun
+ * @description
+ * @date 2023/6/19 10:37 星期一
+ */
+public interface OrderBaseEsRepository extends ElasticsearchRepository<OrderBaseEs, String> {
+}

+ 72 - 1
mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/OrderBaseExcelLogic.java

@@ -1066,7 +1066,7 @@ public class OrderBaseExcelLogic {
                 }
             }
 
-            if (!StringUtil.isEmpty(pSize)) {
+            if (Convert.toInt(totalNum) > 0) {
 
                 GoodsCategory mainGoodsCategory = categoryMap1.get(categoryType);
 
@@ -1104,6 +1104,9 @@ public class OrderBaseExcelLogic {
             //生成新的产品数据
             pgOrderProductService.saveBatch(pgOrderProducts);
 
+            //重新生成产品信息和待采集数据
+            doProductDetailGonDan(pgOrderProducts,addPgOrderBase);
+
             //创建工单添加消息
             if (CollectionUtils.isNotEmpty(addPgOrderBase)) {
                 for (PgOrderBase pgOrderBase : addPgOrderBase) {
@@ -1115,4 +1118,72 @@ public class OrderBaseExcelLogic {
         }
     }
 
+
+    private void doProductDetailGonDan(List<PgOrderProduct> pgOrderProducts,List<PgOrderBase> addPgOrderBaseList) {
+
+        for (PgOrderBase pgOrderBase : addPgOrderBaseList) {
+
+            List<PgOrderProduct> pgOrderProductList = pgOrderProducts.stream()
+                    .filter(item -> item.getOrderBaseId().equals(pgOrderBase.getId()))
+                    .collect(Collectors.toList());
+
+            if (CollectionUtils.isNotEmpty(pgOrderProductList)) {
+                for (PgOrderProduct pgOrderProduct : pgOrderProductList) {
+
+                 //判断有无导入过
+                    PgOrderProduct pgOrderProductUp = pgOrderProductService.lambdaQuery()
+                            .in(PgOrderProduct::getOrderBaseId, pgOrderBase.getId()).last("limit 1").one();
+
+                    if (pgOrderProductUp != null){
+
+                        pgOrderProduct.setId(pgOrderProductUp.getId());
+                        pgOrderProduct.updateById();
+
+                        List<PgOrderProductDetail> pgOrderProductDetails = pgOrderProductDetailService.lambdaQuery()
+                                .in(PgOrderProductDetail::getOrderBaseId, pgOrderBase.getId()).list();
+
+                        int sort = 0;
+                        List<PgOrderProductDetail> pgOrderProductDetailList = pgOrderProductDetails.stream()
+                                .filter(item -> !item.getStatus().equals("WAIT")).collect(Collectors.toList());
+
+                        for (PgOrderProductDetail pgOrderProductDetail : pgOrderProductDetailList) {
+                            pgOrderProductDetail.setSort(sort+1);
+                            pgOrderProductDetail.setOrderProductId(pgOrderProductUp.getProductId());
+
+                            pgOrderProductDetail.updateById();
+                        }
+
+                        List<PgOrderProductDetail> pgOrderProductDetailListWait = pgOrderProductDetails.stream()
+                                .filter(item -> item.getStatus().equals("WAIT")).collect(Collectors.toList());
+
+                        for (PgOrderProductDetail pgOrderProductDetail : pgOrderProductDetailListWait) {
+
+                        }
+
+                    }
+
+
+                    //生成新的产品数据
+                    pgOrderProductService.saveBatch(pgOrderProductList);
+                    //生成新的待采集数据
+                    int sort = 0;
+                    List<PgOrderProductDetail> newProductDetail = new ArrayList<>();
+                    for (PgOrderProduct pgOrderProductOne : pgOrderProducts) {
+                        PgOrderProductDetail pgOrderProductDetail = BeanUtil.toBean(pgOrderProductOne, PgOrderProductDetail.class);
+                        pgOrderProductDetail.setId(null);
+                        pgOrderProductDetail.setNum(1);
+                        pgOrderProductDetail.setSort(sort + 1);
+                        pgOrderProductDetail.setOrderProductId(pgOrderProductOne.getId());
+                        newProductDetail.add(pgOrderProductDetail);
+                        sort++;
+                    }
+                    pgOrderProductDetailService.saveBatch(newProductDetail);
+                }
+
+            }
+
+        }
+
+    }
+
 }

+ 9 - 0
mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/OrderBaseLogic.java

@@ -881,6 +881,15 @@ public class OrderBaseLogic {
         if(!StringUtils.equals(pgOrderBase.getOrderStatus(),OrderBaseStatusEnum.YWG.getKey())){
             throw new RemoteServiceException("非已完工待结算状态不可驳回");
         }
+        if(!StringUtils.equals(pgOrderBase.getOrderStatus(),OrderBaseStatusEnum.GCSZX.getKey())){
+            throw new RemoteServiceException("非已完工待结算状态不可驳回");
+        }
+        if(!StringUtils.equals(pgOrderBase.getOrderStatus(),OrderBaseStatusEnum.WDWG.getKey())){
+            throw new RemoteServiceException("非已完工待结算状态不可驳回");
+        }
+        if(!StringUtils.equals(pgOrderBase.getOrderStatus(),OrderBaseStatusEnum.YWGO.getKey())){
+            throw new RemoteServiceException("非已完工待结算状态不可驳回");
+        }
         pgOrderBase.setOrderStatus(OrderBaseStatusEnum.FWZ.getKey());
         pgOrderBase.setOrderStatusText(OrderBaseStatusEnum.FWZ.getRemark());
         pgOrderBase.updateById();

+ 1 - 1
mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/OrderLogLogic.java

@@ -100,7 +100,7 @@ public class OrderLogLogic {
         SimpleDateFormat sdf2 = new SimpleDateFormat("HH");
 
         //预约
-        if(pgOrderOperatorLog.getType().equals(OrderOperatorLogTypeEnum.YUYUE.getKey())){
+        if(pgOrderOperatorLog.getType().equals(OrderOperatorLogTypeEnum.YUYUEY.getKey())){
             if(pgOrderBase.getAppointmentTime() != null){
                 throw new RemoteServiceException("已预约工单请操作改约");
             }

+ 1 - 0
mall-server-api/src/main/resources/bootstrap-dev.properties

@@ -100,6 +100,7 @@ spring.elasticsearch.username=elastic
 spring.elasticsearch.password=zfire2022@
 spring.elasticsearch.connection-timeout=5s
 spring.elasticsearch.socket-timeout=30s
+management.health.elasticsearch.enabled=false
 
 #cmc bank request setting
 cmc.bank.url=http://cdctest.cmburl.cn:80/cdcserver/api/v2

+ 9 - 1
mall-server-api/src/main/resources/bootstrap-prd.propertiesb

@@ -76,4 +76,12 @@ wechat.mp.url=https://sxbh5.zfire.top/
 allIn.payment.notifyUrl=${sys.url}/zfdminiapp/pay/allinpay/callback
 
 #cmc bank request setting
-cmc.bank.url=https://cdc.cmbchina.com/cdcserver/api/v2
+cmc.bank.url=https://cdc.cmbchina.com/cdcserver/api/v2
+
+#elasticsearch
+spring.elasticsearch.uris=http://116.62.158.92:9200
+spring.elasticsearch.username=elastic
+spring.elasticsearch.password=zfire2022@
+spring.elasticsearch.connection-timeout=5s
+spring.elasticsearch.socket-timeout=30s
+management.health.elasticsearch.enabled=false

+ 1 - 0
mall-server-api/src/main/resources/bootstrap-test.properties

@@ -85,6 +85,7 @@ spring.elasticsearch.username=elastic
 spring.elasticsearch.password=zfire2022@
 spring.elasticsearch.connection-timeout=5s
 spring.elasticsearch.socket-timeout=30s
+management.health.elasticsearch.enabled=false
 
 #cmc bank request setting
 cmc.bank.url=http://cdctest.cmburl.cn:80/cdcserver/api/v2