소스 검색

no message

FengChaoYu 1 년 전
부모
커밋
ff777f0d6e

+ 7 - 8
src/main/java/com/zfire/mall/manager/controller/engin/order/EnginOrderController.java

@@ -16,7 +16,6 @@ import com.zfire.mall.manager.exception.RemoteServiceException;
 import com.zfire.mall.manager.helper.ResponseHelper;
 import com.zfire.mall.manager.logic.common.CommonLogic;
 import com.zfire.mall.manager.logic.engin.order.EnginOrderLogic;
-import com.zfire.mall.manager.logic.engin.order.EnginSysLogic;
 import com.zfire.mall.manager.plus.entity.EnginOrder;
 import com.zfire.mall.manager.utils.excel.ExcelUtils;
 import io.swagger.annotations.Api;
@@ -50,8 +49,8 @@ public class EnginOrderController {
     EnginOrderLogic enginOrderLogic;
     @Resource
     RedisLockRegistry redisLockRegistry;
-    @Resource
-    EnginSysLogic enginSysLogic;
+//    @Resource
+//    EnginSysLogic enginSysLogic;
     @Resource
     CommonLogic commonLogic;
 
@@ -503,11 +502,11 @@ public class EnginOrderController {
                     } else {
                         if (orderType.equals(OrderTypeEnum.HOME.getKey())) {
                             EnginOrder enginOrder = enginOrderLogic.execHandlerHome(enginOrderBean, operType);
-                            if (Objects.nonNull(enginOrder)
-                                    && enginOrderBean.isExamineResult()
-                                    && operType.equals(SysDictConstant.EXAMINE)) {
-                                enginSysLogic.updEngineSystemBill(enginOrder, null);
-                            }
+//                            if (Objects.nonNull(enginOrder)
+//                                    && enginOrderBean.isExamineResult()
+//                                    && operType.equals(SysDictConstant.EXAMINE)) {
+//                                enginSysLogic.updEngineSystemBill(enginOrder, null);
+//                            }
                         } else {
                             //商用订单提交审核
                             enginOrderLogic.execHandlerTrade(enginOrderBean, operType);

+ 89 - 90
src/main/java/com/zfire/mall/manager/controller/engin/order/EnginSysController.java

@@ -1,90 +1,89 @@
-package com.zfire.mall.manager.controller.engin.order;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.zfire.mall.manager.annotation.ApiNotAuth;
-import com.zfire.mall.manager.bean.engin.order.EnginOrderListBean;
-import com.zfire.mall.manager.datasource.engin.entity.AgencyBills;
-import com.zfire.mall.manager.datasource.engin.entity.AgencyBillsBean;
-import com.zfire.mall.manager.helper.ResponseHelper;
-import com.zfire.mall.manager.logic.engin.order.EnginSysLogic;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import javax.validation.constraints.NotBlank;
-
-@Slf4j
-@RestController
-@Api(value = "工程系统接口API", tags ={"工程系统接口API"} )
-@RequestMapping(value = "/engin-sys/api", produces = "application/json; charset=utf-8")
-public class EnginSysController {
-
-    @Resource
-    EnginSysLogic enginSysLogic;
-
-    @ApiOperation(value = "工程订单列表")
-    @GetMapping("/list")
-    public ResponseHelper<IPage<AgencyBills>> list(
-            @ApiParam(value = "工程登录编号") @RequestParam(required = false) String recordNo,
-            @ApiParam(value = "工程项目") @RequestParam(required = false) String projectName,
-            @ApiParam(value = "使用单位") @RequestParam(required = false) String useUnit,
-            @ApiParam(value = "页号",required = true)@RequestParam Integer pageNum,
-            @ApiParam(value = "页大小",required = true)@RequestParam Integer pageSize
-    ) throws Exception {
-        IPage<AgencyBills> listPage = enginSysLogic.listPage(recordNo, projectName, useUnit, pageNum, pageSize);
-        return ResponseHelper.success(listPage);
-    }
-
-    @ApiOperation(value = "工程订单详情")
-    @GetMapping("/detail")
-    public ResponseHelper<AgencyBillsBean> detail(
-            @ApiParam(value = "销售类型") @NotBlank(message = "销售类型不能为空") @RequestParam String saleTypeId,
-            @ApiParam(value = "工程登录编号") @RequestParam(required = false) String recordNo,
-            @ApiParam(value = "工程登录用户编号") @RequestParam(required = false) String userId,
-            @ApiParam(value = "家用工程订单号") @RequestParam(required = false) String enginOrderId,
-            @ApiParam(value = "经销商id") @RequestParam(required = false) String customerId
-    ) throws Exception {
-        AgencyBillsBean bills = enginSysLogic.findBills(saleTypeId, recordNo, userId, enginOrderId, customerId);
-        return ResponseHelper.success(bills);
-    }
-
-    @ApiNotAuth
-    @ApiOperation(value = "平台查询工程登录单列表")
-    @PostMapping("/platform/query/list")
-    public ResponseHelper<IPage<EnginOrderListBean>> platformQueryList(
-            @ApiParam(value = "帐号",required = true) @RequestParam String userName,
-            @ApiParam(value = "密码",required = true) @RequestParam String password,
-            @ApiParam(value = "时间戳",required = true) @RequestParam String timestamp,
-            @ApiParam(value = "签名",required = true) @RequestParam String sign,
-            @ApiParam(value = "工程登录编号") @RequestParam(required = false) String recordNo,
-            @ApiParam(value = "订单编号") @RequestParam(required = false) String orderNo,
-            @ApiParam(value = "使用单位") @RequestParam(required = false) String useUnit,
-            @ApiParam(value = "规格机型") @RequestParam(required = false) String specs,
-            @ApiParam(value = "实装机型") @RequestParam(required = false) String realModel,
-            @ApiParam(value = "客户地址") @RequestParam(required = false) String address,
-            @ApiParam(value = "单据类型") @RequestParam(required = false) String orderType,
-            @ApiParam(value = "页号",required = true) @RequestParam Integer pageNum,
-            @ApiParam(value = "页大小",required = true) @RequestParam Integer pageSize
-    ) throws Exception {
-        IPage<EnginOrderListBean> listPage = enginSysLogic.platformQueryList(userName, password, timestamp, sign, recordNo,
-                orderNo, useUnit, specs, realModel, address, orderType, pageNum, pageSize);
-        return ResponseHelper.success(listPage);
-    }
-
-    @ApiNotAuth
-    @ApiOperation(value = "平台引用工程登录单")
-    @PostMapping("/platform/ref")
-    public ResponseHelper platformRef(
-            @ApiParam(value = "工程登录编号",required = true) @RequestParam String recordNo,
-            @ApiParam(value = "id",required = true) @RequestParam String itemId,
-            @ApiParam(value = "引用状态 true=是 false=否",required = true) @RequestParam Boolean isRef,
-            @ApiParam(value = "时间戳",required = true) @RequestParam String timestamp,
-            @ApiParam(value = "签名",required = true) @RequestParam String sign
-    ) throws Exception {
-        enginSysLogic.platformRef(recordNo, itemId, isRef, timestamp, sign);
-        return ResponseHelper.success();
-    }
-}
+//package com.zfire.mall.manager.controller.engin.order;
+//
+//import com.baomidou.mybatisplus.core.metadata.IPage;
+//import com.zfire.mall.manager.annotation.ApiNotAuth;
+//import com.zfire.mall.manager.bean.engin.order.EnginOrderListBean;
+//import com.zfire.mall.manager.datasource.engin.entity.AgencyBills;
+//import com.zfire.mall.manager.datasource.engin.entity.AgencyBillsBean;
+//import com.zfire.mall.manager.helper.ResponseHelper;
+//import io.swagger.annotations.Api;
+//import io.swagger.annotations.ApiOperation;
+//import io.swagger.annotations.ApiParam;
+//import lombok.extern.slf4j.Slf4j;
+//import org.springframework.web.bind.annotation.*;
+//
+//import javax.annotation.Resource;
+//import javax.validation.constraints.NotBlank;
+//
+//@Slf4j
+//@RestController
+//@Api(value = "工程系统接口API", tags ={"工程系统接口API"} )
+//@RequestMapping(value = "/engin-sys/api", produces = "application/json; charset=utf-8")
+//public class EnginSysController {
+//
+//    @Resource
+//    EnginSysLogic enginSysLogic;
+//
+//    @ApiOperation(value = "工程订单列表")
+//    @GetMapping("/list")
+//    public ResponseHelper<IPage<AgencyBills>> list(
+//            @ApiParam(value = "工程登录编号") @RequestParam(required = false) String recordNo,
+//            @ApiParam(value = "工程项目") @RequestParam(required = false) String projectName,
+//            @ApiParam(value = "使用单位") @RequestParam(required = false) String useUnit,
+//            @ApiParam(value = "页号",required = true)@RequestParam Integer pageNum,
+//            @ApiParam(value = "页大小",required = true)@RequestParam Integer pageSize
+//    ) throws Exception {
+//        IPage<AgencyBills> listPage = enginSysLogic.listPage(recordNo, projectName, useUnit, pageNum, pageSize);
+//        return ResponseHelper.success(listPage);
+//    }
+//
+//    @ApiOperation(value = "工程订单详情")
+//    @GetMapping("/detail")
+//    public ResponseHelper<AgencyBillsBean> detail(
+//            @ApiParam(value = "销售类型") @NotBlank(message = "销售类型不能为空") @RequestParam String saleTypeId,
+//            @ApiParam(value = "工程登录编号") @RequestParam(required = false) String recordNo,
+//            @ApiParam(value = "工程登录用户编号") @RequestParam(required = false) String userId,
+//            @ApiParam(value = "家用工程订单号") @RequestParam(required = false) String enginOrderId,
+//            @ApiParam(value = "经销商id") @RequestParam(required = false) String customerId
+//    ) throws Exception {
+//        AgencyBillsBean bills = enginSysLogic.findBills(saleTypeId, recordNo, userId, enginOrderId, customerId);
+//        return ResponseHelper.success(bills);
+//    }
+//
+//    @ApiNotAuth
+//    @ApiOperation(value = "平台查询工程登录单列表")
+//    @PostMapping("/platform/query/list")
+//    public ResponseHelper<IPage<EnginOrderListBean>> platformQueryList(
+//            @ApiParam(value = "帐号",required = true) @RequestParam String userName,
+//            @ApiParam(value = "密码",required = true) @RequestParam String password,
+//            @ApiParam(value = "时间戳",required = true) @RequestParam String timestamp,
+//            @ApiParam(value = "签名",required = true) @RequestParam String sign,
+//            @ApiParam(value = "工程登录编号") @RequestParam(required = false) String recordNo,
+//            @ApiParam(value = "订单编号") @RequestParam(required = false) String orderNo,
+//            @ApiParam(value = "使用单位") @RequestParam(required = false) String useUnit,
+//            @ApiParam(value = "规格机型") @RequestParam(required = false) String specs,
+//            @ApiParam(value = "实装机型") @RequestParam(required = false) String realModel,
+//            @ApiParam(value = "客户地址") @RequestParam(required = false) String address,
+//            @ApiParam(value = "单据类型") @RequestParam(required = false) String orderType,
+//            @ApiParam(value = "页号",required = true) @RequestParam Integer pageNum,
+//            @ApiParam(value = "页大小",required = true) @RequestParam Integer pageSize
+//    ) throws Exception {
+//        IPage<EnginOrderListBean> listPage = enginSysLogic.platformQueryList(userName, password, timestamp, sign, recordNo,
+//                orderNo, useUnit, specs, realModel, address, orderType, pageNum, pageSize);
+//        return ResponseHelper.success(listPage);
+//    }
+//
+//    @ApiNotAuth
+//    @ApiOperation(value = "平台引用工程登录单")
+//    @PostMapping("/platform/ref")
+//    public ResponseHelper platformRef(
+//            @ApiParam(value = "工程登录编号",required = true) @RequestParam String recordNo,
+//            @ApiParam(value = "id",required = true) @RequestParam String itemId,
+//            @ApiParam(value = "引用状态 true=是 false=否",required = true) @RequestParam Boolean isRef,
+//            @ApiParam(value = "时间戳",required = true) @RequestParam String timestamp,
+//            @ApiParam(value = "签名",required = true) @RequestParam String sign
+//    ) throws Exception {
+//        enginSysLogic.platformRef(recordNo, itemId, isRef, timestamp, sign);
+//        return ResponseHelper.success();
+//    }
+//}

+ 12 - 13
src/main/java/com/zfire/mall/manager/logic/admin/AdminUserLogic.java

@@ -29,7 +29,6 @@ import com.zfire.mall.manager.enums.SMSTypeEnum;
 import com.zfire.mall.manager.exception.RemoteServiceException;
 import com.zfire.mall.manager.logic.common.CommonLogic;
 import com.zfire.mall.manager.logic.common.SMSLogic;
-import com.zfire.mall.manager.logic.external.ExternalEnginLogic;
 import com.zfire.mall.manager.logic.k3.K3CustomerLogic;
 import com.zfire.mall.manager.logic.wallet.WalletLogic;
 import com.zfire.mall.manager.plus.entity.*;
@@ -66,8 +65,8 @@ public class AdminUserLogic {
     DefaultKaptcha defaultKaptcha;
     @Autowired
     CommonLogic commonLogic;
-    @Autowired
-    ExternalEnginLogic externalEnginLogic;
+//    @Autowired
+//    ExternalEnginLogic externalEnginLogic;
     @Autowired
     AdminWebsitLogic adminWebsitLogic;
     @Autowired
@@ -717,7 +716,7 @@ public class AdminUserLogic {
             AdminWebsit adminWebsit = adminWebsitService.getById(list.get(0).getAdminWebsitId());
             adminUserBean.setAdminWebsit(adminWebsit);
         }
-        adminUserBean.setEnginSysUrl(externalEnginLogic.getLoginUrl());
+//        adminUserBean.setEnginSysUrl(externalEnginLogic.getLoginUrl());
         if(detail != null) {
             adminUserBean.setIsZr(detail.getIsZr());
         }
@@ -791,11 +790,11 @@ public class AdminUserLogic {
      * 检查工程机系统是否合法
      */
     public void checkEnginUser(HttpServletRequest request){
-        AdminUserCom adminUser = commonLogic.getAdminUser(request);
-        Integer result = externalEnginLogic.checkEnginUser(adminUser.getEnginUserName(), adminUser.getEnginPassword());
-        if(Objects.isNull(result)){
-            throw new RemoteServiceException(4444,"帐号密码验证失败");
-        }
+//        AdminUserCom adminUser = commonLogic.getAdminUser(request);
+//        Integer result = externalEnginLogic.checkEnginUser(adminUser.getEnginUserName(), adminUser.getEnginPassword());
+//        if(Objects.isNull(result)){
+//            throw new RemoteServiceException(4444,"帐号密码验证失败");
+//        }
     }
 
 
@@ -826,10 +825,10 @@ public class AdminUserLogic {
 //            }
 //        }
 
-        Integer result = externalEnginLogic.checkEnginUser(userName, password);
-        if(Objects.isNull(result)){
-            throw new RemoteServiceException(4444,"帐号密码验证失败");
-        }
+//        Integer result = externalEnginLogic.checkEnginUser(userName, password);
+//        if(Objects.isNull(result)){
+//            throw new RemoteServiceException(4444,"帐号密码验证失败");
+//        }
 
 //        if (!isReset) {
 //            AdminUserBindEngin adminUserBindEngin = new AdminUserBindEngin();

+ 33 - 34
src/main/java/com/zfire/mall/manager/logic/engin/deposit/DepositManageLogic.java

@@ -31,7 +31,6 @@ import com.zfire.mall.manager.enums.*;
 import com.zfire.mall.manager.exception.RemoteServiceException;
 import com.zfire.mall.manager.logic.common.CommonLogic;
 import com.zfire.mall.manager.logic.engin.deposit.bacth.ExamineHomeLogic;
-import com.zfire.mall.manager.logic.engin.order.EnginSysLogic;
 import com.zfire.mall.manager.logic.retail.RetailOrderLogic;
 import com.zfire.mall.manager.logic.wallet.WalletLogic;
 import com.zfire.mall.manager.plus.entity.*;
@@ -92,8 +91,8 @@ public class DepositManageLogic {
     RedisLockRegistry redisLockRegistry;
     @Autowired
     OSSUtil ossUtil;
-    @Resource
-    EnginSysLogic enginSysLogic;
+//    @Resource
+//    EnginSysLogic enginSysLogic;
     @Resource
     ExamineHomeLogic examineHomeLogic;
     @Resource
@@ -239,13 +238,13 @@ public class DepositManageLogic {
         detail.setDataList(dataList);
         detail.setCheckRecordItems(checkRecords);
 
-        List<AgencyBills> sysAgencyBills = enginSysLogic.queryBills(new ArrayList<String>() {{ this.add(detail.getRefEnginRecordNo()); }});
-        if (CollectionUtil.isNotEmpty(sysAgencyBills)) {
-            AgencyBills agencyBill = sysAgencyBills.get(0);
-            if (Objects.isNull(detail.getInstallDate()) && Objects.nonNull(agencyBill.getInstallDate())) {
-                detail.setInstallDate(agencyBill.getInstallDate());
-            }
-        }
+//        List<AgencyBills> sysAgencyBills = enginSysLogic.queryBills(new ArrayList<String>() {{ this.add(detail.getRefEnginRecordNo()); }});
+//        if (CollectionUtil.isNotEmpty(sysAgencyBills)) {
+//            AgencyBills agencyBill = sysAgencyBills.get(0);
+//            if (Objects.isNull(detail.getInstallDate()) && Objects.nonNull(agencyBill.getInstallDate())) {
+//                detail.setInstallDate(agencyBill.getInstallDate());
+//            }
+//        }
 
         List<EnginOrderItem> orderItems = depositMangeReserveMapper.queryOrderHasSendQty(new ArrayList<String>() {{ this.add(detail.getRefEnginRecordNo()); }});
         Map<String, EnginOrderItem> orderItemMap = orderItems.stream()
@@ -1267,30 +1266,30 @@ public class DepositManageLogic {
     }
 
     public void syncEnginData(DepositManage depositManage) {
-        List<AgencyBills> sysAgencyBills = enginSysLogic.queryBills(new ArrayList<String>() {{ this.add(depositManage.getRefEnginRecordNo()); }});
-        if (CollectionUtil.isNotEmpty(sysAgencyBills)) {
-            AgencyBills agencyBill = sysAgencyBills.get(0);
-            depositManage.setRefPromiseProvide(Optional.ofNullable(agencyBill.getPromiseProvide()).orElse(0) == 0 ? "未保证" : "已保证")
-                    .setRefPromiseAcceptStatus(agencyBill.getPromiseAcceptStatus())
-                    .setRefPromisePriceRemark(agencyBill.getPromisePriceRemark())
-                    .setRefFollowAcceptRemark(agencyBill.getFollowAcceptRemark())
-                    .setRefFjShenPiRemark(agencyBill.getFjShenPiRemark())
-                    .setRefDatumProvide(Optional.ofNullable(agencyBill.getDatumProvide()).orElse(0) == 0 ? "未提供" : "已提供")
-                    .setRefDatumProvideDate(Objects.nonNull(agencyBill.getDatumProvideDate()) ? DateUtil.date(agencyBill.getDatumProvideDate().getTime()) : null)
-                    .setRefDatumAcceptStatus(agencyBill.getDatumAcceptStatus())
-                    .setRefIsBigAmounts(Optional.ofNullable(agencyBill.getIsBigAmount()).orElse(0) == 0 ? "否" : "是")
-                    .setRefContractResult(agencyBill.getContractResult())
-                    .setRefContractIdea(agencyBill.getContractIdea())
-                    .setRefToRetailResult(agencyBill.getToRetailResult())
-                    .setRefToRetailIdea(agencyBill.getToRetailIdea())
-                    .setRefDataDelayResult(agencyBill.getDataDelayResult())
-                    .setRefDataDelayIdea(agencyBill.getDataDelayIdea())
-                    .setRefOtherAnnexResult(agencyBill.getOtherAnnexResult())
-                    .setRefOtherAnnexIdea(agencyBill.getOtherAnnexIdea())
-                    .setRefDatumAcceptDate(agencyBill.getDatumAcceptDate());
-
-            depositManage.updateById();
-        }
+//        List<AgencyBills> sysAgencyBills = enginSysLogic.queryBills(new ArrayList<String>() {{ this.add(depositManage.getRefEnginRecordNo()); }});
+//        if (CollectionUtil.isNotEmpty(sysAgencyBills)) {
+//            AgencyBills agencyBill = sysAgencyBills.get(0);
+//            depositManage.setRefPromiseProvide(Optional.ofNullable(agencyBill.getPromiseProvide()).orElse(0) == 0 ? "未保证" : "已保证")
+//                    .setRefPromiseAcceptStatus(agencyBill.getPromiseAcceptStatus())
+//                    .setRefPromisePriceRemark(agencyBill.getPromisePriceRemark())
+//                    .setRefFollowAcceptRemark(agencyBill.getFollowAcceptRemark())
+//                    .setRefFjShenPiRemark(agencyBill.getFjShenPiRemark())
+//                    .setRefDatumProvide(Optional.ofNullable(agencyBill.getDatumProvide()).orElse(0) == 0 ? "未提供" : "已提供")
+//                    .setRefDatumProvideDate(Objects.nonNull(agencyBill.getDatumProvideDate()) ? DateUtil.date(agencyBill.getDatumProvideDate().getTime()) : null)
+//                    .setRefDatumAcceptStatus(agencyBill.getDatumAcceptStatus())
+//                    .setRefIsBigAmounts(Optional.ofNullable(agencyBill.getIsBigAmount()).orElse(0) == 0 ? "否" : "是")
+//                    .setRefContractResult(agencyBill.getContractResult())
+//                    .setRefContractIdea(agencyBill.getContractIdea())
+//                    .setRefToRetailResult(agencyBill.getToRetailResult())
+//                    .setRefToRetailIdea(agencyBill.getToRetailIdea())
+//                    .setRefDataDelayResult(agencyBill.getDataDelayResult())
+//                    .setRefDataDelayIdea(agencyBill.getDataDelayIdea())
+//                    .setRefOtherAnnexResult(agencyBill.getOtherAnnexResult())
+//                    .setRefOtherAnnexIdea(agencyBill.getOtherAnnexIdea())
+//                    .setRefDatumAcceptDate(agencyBill.getDatumAcceptDate());
+//
+//            depositManage.updateById();
+//        }
 
 //        List<DepositManage> depositManageList = depositManageService.lambdaQuery()
 //                .eq(DepositManage::getEnginOrderType, OrderTypeEnum.HOME.getKey())

+ 2 - 2
src/main/java/com/zfire/mall/manager/logic/engin/order/EnginOrderLogic.java

@@ -104,8 +104,8 @@ public class EnginOrderLogic {
     InvoiceMapper invoiceMapper;
     @Resource
     ReservedOrderItemService reservedOrderItemService;
-    @Resource
-    EnginSysLogic enginSysLogic;
+//    @Resource
+//    EnginSysLogic enginSysLogic;
     @Resource
     CommonCountMapper commonCountMapper;
     @Resource

+ 270 - 270
src/main/java/com/zfire/mall/manager/logic/engin/order/EnginSysLogic.java

@@ -1,279 +1,279 @@
-package com.zfire.mall.manager.logic.engin.order;
-
-import cn.hutool.core.collection.CollectionUtil;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.zfire.mall.manager.bean.admin.AdminUserCom;
-import com.zfire.mall.manager.bean.engin.order.EnginOrderBean;
-import com.zfire.mall.manager.bean.engin.order.EnginOrderListBean;
-import com.zfire.mall.manager.bean.retail.ProductPriceBean;
-import com.zfire.mall.manager.commonmapper.engin.order.EnginOrderReserveMapper;
-import com.zfire.mall.manager.datasource.engin.entity.AgencyBills;
-import com.zfire.mall.manager.datasource.engin.entity.AgencyBillsBean;
-import com.zfire.mall.manager.datasource.engin.entity.Machine4Agency;
-import com.zfire.mall.manager.datasource.engin.logic.AgencyBillsLogic;
-import com.zfire.mall.manager.enums.OrderTypeEnum;
-import com.zfire.mall.manager.exception.RemoteServiceException;
-import com.zfire.mall.manager.logic.admin.AdminUserLogic;
-import com.zfire.mall.manager.logic.common.CommonLogic;
-import com.zfire.mall.manager.logic.retail.RetailOrderLogic;
-import com.zfire.mall.manager.logic.wallet.WalletLogic;
-import com.zfire.mall.manager.plus.entity.AdminUser;
-import com.zfire.mall.manager.plus.entity.EnginOrder;
-import com.zfire.mall.manager.plus.entity.EnginOrderItem;
-import com.zfire.mall.manager.plus.entity.SaleType;
-import com.zfire.mall.manager.plus.service.*;
-import com.zfire.mall.manager.utils.JiaSMUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.util.*;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-@Service
-@Slf4j
-public class EnginSysLogic {
-
-    @Value("${spring.profiles.active}")
-    private String profiles;
-
-    @Value("${engin.url}")
-    private String enginUrl;
-    @Resource
-    CommonLogic commonLogic;
-    @Resource
-    KingDeeMaterialService kingDeeMaterialService;
-    @Resource
-    KingDeeCustomerService kingDeeCustomerService;
-    @Resource
-    SaleTypeService saleTypeService;
-    @Resource
-    WalletLogic walletLogic;
-    @Resource
-    EnginOrderLogic enginOrderLogic;
-    @Resource
-    RetailOrderLogic retailOrderLogic;
-    @Autowired
-    AdminUserService adminUserService;
-    @Resource
-    AgencyBillsLogic agencyBillsLogic;
-    @Resource
-    AdminUserLogic adminUserLogic;
-    @Resource
-    EnginOrderReserveMapper enginOrderReserveMapper;
-    @Resource
-    EnginOrderItemService enginOrderItemService;
-
-
-    public IPage<AgencyBills> listPage(String recordNo, String projectName, String useUnit,
-                                       Integer pageNum, Integer pageSize) {
-        AdminUserCom adminUser = commonLogic.getAdminUser();
-//        if (!adminUser.getIsCustomer()) {
-//            throw new RemoteServiceException("当前账号不是经销商,请使用经销商登录操作单据");
+//package com.zfire.mall.manager.logic.engin.order;
+//
+//import cn.hutool.core.collection.CollectionUtil;
+//import com.baomidou.mybatisplus.core.metadata.IPage;
+//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+//import com.zfire.mall.manager.bean.admin.AdminUserCom;
+//import com.zfire.mall.manager.bean.engin.order.EnginOrderBean;
+//import com.zfire.mall.manager.bean.engin.order.EnginOrderListBean;
+//import com.zfire.mall.manager.bean.retail.ProductPriceBean;
+//import com.zfire.mall.manager.commonmapper.engin.order.EnginOrderReserveMapper;
+//import com.zfire.mall.manager.datasource.engin.entity.AgencyBills;
+//import com.zfire.mall.manager.datasource.engin.entity.AgencyBillsBean;
+//import com.zfire.mall.manager.datasource.engin.entity.Machine4Agency;
+//import com.zfire.mall.manager.datasource.engin.logic.AgencyBillsLogic;
+//import com.zfire.mall.manager.enums.OrderTypeEnum;
+//import com.zfire.mall.manager.exception.RemoteServiceException;
+//import com.zfire.mall.manager.logic.admin.AdminUserLogic;
+//import com.zfire.mall.manager.logic.common.CommonLogic;
+//import com.zfire.mall.manager.logic.retail.RetailOrderLogic;
+//import com.zfire.mall.manager.logic.wallet.WalletLogic;
+//import com.zfire.mall.manager.plus.entity.AdminUser;
+//import com.zfire.mall.manager.plus.entity.EnginOrder;
+//import com.zfire.mall.manager.plus.entity.EnginOrderItem;
+//import com.zfire.mall.manager.plus.entity.SaleType;
+//import com.zfire.mall.manager.plus.service.*;
+//import com.zfire.mall.manager.utils.JiaSMUtil;
+//import lombok.extern.slf4j.Slf4j;
+//import org.apache.commons.lang3.StringUtils;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.beans.factory.annotation.Value;
+//import org.springframework.stereotype.Service;
+//
+//import javax.annotation.Resource;
+//import java.util.*;
+//import java.util.function.Function;
+//import java.util.stream.Collectors;
+//
+//@Service
+//@Slf4j
+//public class EnginSysLogic {
+//
+//    @Value("${spring.profiles.active}")
+//    private String profiles;
+//
+////    @Value("${engin.url}")
+////    private String enginUrl;
+//    @Resource
+//    CommonLogic commonLogic;
+//    @Resource
+//    KingDeeMaterialService kingDeeMaterialService;
+//    @Resource
+//    KingDeeCustomerService kingDeeCustomerService;
+//    @Resource
+//    SaleTypeService saleTypeService;
+//    @Resource
+//    WalletLogic walletLogic;
+//    @Resource
+//    EnginOrderLogic enginOrderLogic;
+//    @Resource
+//    RetailOrderLogic retailOrderLogic;
+//    @Autowired
+//    AdminUserService adminUserService;
+//    @Resource
+//    AgencyBillsLogic agencyBillsLogic;
+//    @Resource
+//    AdminUserLogic adminUserLogic;
+//    @Resource
+//    EnginOrderReserveMapper enginOrderReserveMapper;
+//    @Resource
+//    EnginOrderItemService enginOrderItemService;
+//
+//
+//    public IPage<AgencyBills> listPage(String recordNo, String projectName, String useUnit,
+//                                       Integer pageNum, Integer pageSize) {
+//        AdminUserCom adminUser = commonLogic.getAdminUser();
+////        if (!adminUser.getIsCustomer()) {
+////            throw new RemoteServiceException("当前账号不是经销商,请使用经销商登录操作单据");
+////        }
+//        AdminUser adminUserNew = adminUserService.getById(adminUser.getAdminUserId());
+//        if (!adminUserNew.getBindEngin()) {
+//            throw new RemoteServiceException("当前经销商,未绑定工程系统账号");
 //        }
-        AdminUser adminUserNew = adminUserService.getById(adminUser.getAdminUserId());
-        if (!adminUserNew.getBindEngin()) {
-            throw new RemoteServiceException("当前经销商,未绑定工程系统账号");
-        }
-
-//        HashMap<String, Object> paramMap = new HashMap<>();
-//        if (profiles.equals("dev")) {
-//            paramMap.put("userName", "test002");
-//            paramMap.put("userIds", Arrays.asList("266","268"));
-//        } else {
-//            paramMap.put("userName", adminUserNew.getEnginUserName());
-//            paramMap.put("userIds", adminUser.getEnginUserIds());
+//
+////        HashMap<String, Object> paramMap = new HashMap<>();
+////        if (profiles.equals("dev")) {
+////            paramMap.put("userName", "test002");
+////            paramMap.put("userIds", Arrays.asList("266","268"));
+////        } else {
+////            paramMap.put("userName", adminUserNew.getEnginUserName());
+////            paramMap.put("userIds", adminUser.getEnginUserIds());
+////        }
+////        paramMap.put("recordNo", recordNo);
+////        paramMap.put("projectName", projectName);
+////        paramMap.put("useUnit", useUnit);
+////        paramMap.put("pageNum", pageNum);
+////        paramMap.put("pageSize", pageSize);
+//
+////        String jsonStr = HttpUtil.post(enginUrl.replace("sysadmin", "") + "api/supply/queryAgencyBills", paramMap);
+////
+////        JSONObject data = this.CommonHandleInfo(jsonStr);
+////
+////        return JSONUtil.toBean(data, new TypeReference<Page<EnginSysAgencyBills>>() {
+////        }, false);
+//
+//        return agencyBillsLogic.queryAllowAgencyBills(adminUserNew.getEnginUserName(), recordNo, projectName, useUnit, pageNum, pageSize);
+//    }
+//
+//    public AgencyBillsBean findBills(String saleTypeId, String recordNo, String userId, String enginOrderId, String customerId) {
+//        AdminUserCom adminUser = commonLogic.getAdminUser();
+//
+//        if (!adminUser.getBindEngin()) {
+//            throw new RemoteServiceException("当前帐号,未绑定工程系统帐号");
 //        }
-//        paramMap.put("recordNo", recordNo);
-//        paramMap.put("projectName", projectName);
-//        paramMap.put("useUnit", useUnit);
-//        paramMap.put("pageNum", pageNum);
-//        paramMap.put("pageSize", pageSize);
-
-//        String jsonStr = HttpUtil.post(enginUrl.replace("sysadmin", "") + "api/supply/queryAgencyBills", paramMap);
-//
-//        JSONObject data = this.CommonHandleInfo(jsonStr);
-//
-//        return JSONUtil.toBean(data, new TypeReference<Page<EnginSysAgencyBills>>() {
-//        }, false);
-
-        return agencyBillsLogic.queryAllowAgencyBills(adminUserNew.getEnginUserName(), recordNo, projectName, useUnit, pageNum, pageSize);
-    }
-
-    public AgencyBillsBean findBills(String saleTypeId, String recordNo, String userId, String enginOrderId, String customerId) {
-        AdminUserCom adminUser = commonLogic.getAdminUser();
-
-        if (!adminUser.getBindEngin()) {
-            throw new RemoteServiceException("当前帐号,未绑定工程系统帐号");
-        }
-
-        SaleType saleType = saleTypeService.getById(saleTypeId);
-        if (Objects.isNull(saleType)) {
-            throw new RemoteServiceException("销售类型不存在");
-        }
-
-        // 查询引用单号历史
-        EnginOrderBean enginOrderBean = new EnginOrderBean();
-        enginOrderBean.setEnginOrderId(enginOrderId);
-        enginOrderBean.setAdminCompanyId(adminUser.getAdminCompanyId());
-        enginOrderBean.setRefEnginRecordNo(recordNo);
-        enginOrderBean.setEnginOrderType(OrderTypeEnum.HOME.getKey());
-        enginOrderBean.setCustomerId(StringUtils.isNotBlank(customerId) ? customerId : adminUser.getCustomerId());
-        Integer refCount = enginOrderLogic.checkEnginOrderRecord(enginOrderBean);
-        enginOrderBean.setRefCount(refCount);
-
-        AgencyBillsBean bills = this.reqFindBills(recordNo, userId);
-        Integer canUseCount = Objects.isNull(bills.getCanUse()) ? 1 : bills.getCanUse();
-
-        if (refCount >= canUseCount) {
-            throw new RemoteServiceException(recordNo + ":无法再引用,已达最大引用次数" + canUseCount);
-        }
-
-        bills.setSaleTypeId(saleType.getId());
-        bills.setSaleTypeCode(saleType.getSaleCode());
-        bills.setSaleTypeName(saleType.getSaleName());
-
-        queryItemDataHandle(bills, enginOrderBean, refCount, saleType);
-
-        return bills;
-    }
-
-    private void queryItemDataHandle(AgencyBillsBean bills, EnginOrderBean enginOrderBean, Integer refCount, SaleType saleType) {
-        List<String> oldNumbers = bills.getItems().stream()
-                .map(Machine4Agency::getCode)
-                .collect(Collectors.toList());
-        // 获取产品价格列表
-        IPage<ProductPriceBean> productPricePage = retailOrderLogic.queryProductList(null, null, null, null, null, null, null, enginOrderBean.getCustomerId(), oldNumbers, OrderTypeEnum.HOME.getKey(), 1, -1);
-        List<ProductPriceBean> records = productPricePage.getRecords();
-        Map<String, ProductPriceBean> priceBeanMap = records.stream()
-                .collect(Collectors.toMap(v -> v.getSaleCode() + v.getMaterialOldNumber(), Function.identity(), (key1, key2) -> key1));
-
-        for (Machine4Agency billsItem : bills.getItems()) {
-            ProductPriceBean priceBean = priceBeanMap.get(bills.getSaleTypeCode() + billsItem.getCode());
-            if (Objects.isNull(priceBean)) {
-                throw new RemoteServiceException(billsItem.getCode() + billsItem.getMachine() + ":没有找到关联价格产品");
-            }
-            billsItem.setUseRefCount(refCount);
-            billsItem.setSaleTypeId(saleType.getId());
-            billsItem.setSaleTypeCode(saleType.getSaleCode());
-            billsItem.setSaleTypeName(saleType.getSaleName());
-            billsItem.setMaterialId(priceBean.getMaterialId());
-            billsItem.setMaterialNumber(priceBean.getMaterialNumber());
-            billsItem.setMaterialOldNumber(priceBean.getMaterialOldNumber());
-            billsItem.setMaterialName(priceBean.getMaterialName());
-            billsItem.setSpecification(priceBean.getSpecification());
-            billsItem.setUnit(priceBean.getBaseUnit());
-
-            if (CollectionUtil.isEmpty(billsItem.getCustomerWalletList())) {
-                billsItem.setCustomerWalletList(new ArrayList<>());
-            }
-            billsItem.getCustomerWalletList().addAll(priceBean.getRebateWallets());
-            billsItem.getCustomerWalletList().addAll(priceBean.getWallets());
-        }
-    }
-
-    public AgencyBillsBean reqFindBills(String recordNo, String userId) {
-//        HashMap<String, Object> paramMap = new HashMap<>();
-//
-//        paramMap.put("userId", userId);
-//        paramMap.put("recordNo", recordNo);
-//
-//        String jsonStr = HttpUtil.post(enginUrl.replace("sysadmin", "") + "api/supply/findAgencyBills", paramMap);
-//
-//        JSONObject data = this.CommonHandleInfo(jsonStr);
-//
-//        EnginSysAgencyBills enginSysAgencyBills = JSONUtil.toBean(data, new TypeReference<EnginSysAgencyBills>() {
-//        }, true);
-//
-//        if (Objects.isNull(enginSysAgencyBills)) {
-//            throw new RemoteServiceException(recordNo + ":单据不存在");
+//
+//        SaleType saleType = saleTypeService.getById(saleTypeId);
+//        if (Objects.isNull(saleType)) {
+//            throw new RemoteServiceException("销售类型不存在");
 //        }
-
-        return agencyBillsLogic.findBills(recordNo, userId);
-    }
-
-//    private JSONObject CommonHandleInfo(String jsonStr) {
-//        try {
-//            if (StringUtils.isBlank(jsonStr)) {
-//                throw new RemoteServiceException("工程机系统返回数据异常");
-//            }
-//            log.info("工程机返回数据:{}", jsonStr);
-//            JSONObject result = JSONUtil.parseObj(jsonStr);
 //
-//            if (result.get("status", Integer.class) != 1) {
-//                throw new RemoteServiceException(result.get("msg", String.class));
-//            }
+//        // 查询引用单号历史
+//        EnginOrderBean enginOrderBean = new EnginOrderBean();
+//        enginOrderBean.setEnginOrderId(enginOrderId);
+//        enginOrderBean.setAdminCompanyId(adminUser.getAdminCompanyId());
+//        enginOrderBean.setRefEnginRecordNo(recordNo);
+//        enginOrderBean.setEnginOrderType(OrderTypeEnum.HOME.getKey());
+//        enginOrderBean.setCustomerId(StringUtils.isNotBlank(customerId) ? customerId : adminUser.getCustomerId());
+//        Integer refCount = enginOrderLogic.checkEnginOrderRecord(enginOrderBean);
+//        enginOrderBean.setRefCount(refCount);
 //
-//            return result.get("data", JSONObject.class);
-//        } catch (NullPointerException e) {
-//            throw new RemoteServiceException("工程机系统通信异常");
+//        AgencyBillsBean bills = this.reqFindBills(recordNo, userId);
+//        Integer canUseCount = Objects.isNull(bills.getCanUse()) ? 1 : bills.getCanUse();
+//
+//        if (refCount >= canUseCount) {
+//            throw new RemoteServiceException(recordNo + ":无法再引用,已达最大引用次数" + canUseCount);
 //        }
+//
+//        bills.setSaleTypeId(saleType.getId());
+//        bills.setSaleTypeCode(saleType.getSaleCode());
+//        bills.setSaleTypeName(saleType.getSaleName());
+//
+//        queryItemDataHandle(bills, enginOrderBean, refCount, saleType);
+//
+//        return bills;
 //    }
-
-    public void updEngineSystemBill(EnginOrder enginOrder, List<EnginOrderItem> orderItems) {
-//        List<Machine4Agency> items = new ArrayList<>();
-//        for (EnginOrderItem orderItem : orderItems) {
-//            Machine4Agency machine4Agency = new Machine4Agency();
-//            machine4Agency.setCode(orderItem.getMaterialOldNumber());
-//            machine4Agency.setHasDeliverQty(orderItem.getQty());
-//            items.add(machine4Agency);
+//
+//    private void queryItemDataHandle(AgencyBillsBean bills, EnginOrderBean enginOrderBean, Integer refCount, SaleType saleType) {
+//        List<String> oldNumbers = bills.getItems().stream()
+//                .map(Machine4Agency::getCode)
+//                .collect(Collectors.toList());
+//        // 获取产品价格列表
+//        IPage<ProductPriceBean> productPricePage = retailOrderLogic.queryProductList(null, null, null, null, null, null, null, enginOrderBean.getCustomerId(), oldNumbers, OrderTypeEnum.HOME.getKey(), 1, -1);
+//        List<ProductPriceBean> records = productPricePage.getRecords();
+//        Map<String, ProductPriceBean> priceBeanMap = records.stream()
+//                .collect(Collectors.toMap(v -> v.getSaleCode() + v.getMaterialOldNumber(), Function.identity(), (key1, key2) -> key1));
+//
+//        for (Machine4Agency billsItem : bills.getItems()) {
+//            ProductPriceBean priceBean = priceBeanMap.get(bills.getSaleTypeCode() + billsItem.getCode());
+//            if (Objects.isNull(priceBean)) {
+//                throw new RemoteServiceException(billsItem.getCode() + billsItem.getMachine() + ":没有找到关联价格产品");
+//            }
+//            billsItem.setUseRefCount(refCount);
+//            billsItem.setSaleTypeId(saleType.getId());
+//            billsItem.setSaleTypeCode(saleType.getSaleCode());
+//            billsItem.setSaleTypeName(saleType.getSaleName());
+//            billsItem.setMaterialId(priceBean.getMaterialId());
+//            billsItem.setMaterialNumber(priceBean.getMaterialNumber());
+//            billsItem.setMaterialOldNumber(priceBean.getMaterialOldNumber());
+//            billsItem.setMaterialName(priceBean.getMaterialName());
+//            billsItem.setSpecification(priceBean.getSpecification());
+//            billsItem.setUnit(priceBean.getBaseUnit());
+//
+//            if (CollectionUtil.isEmpty(billsItem.getCustomerWalletList())) {
+//                billsItem.setCustomerWalletList(new ArrayList<>());
+//            }
+//            billsItem.getCustomerWalletList().addAll(priceBean.getRebateWallets());
+//            billsItem.getCustomerWalletList().addAll(priceBean.getWallets());
 //        }
-
-//        HashMap<String, Object> paramMap = new HashMap<>();
-//        if (profiles.equals("dev")) {
-//            paramMap.put("userId", "268");
-//        } else {
-//            paramMap.put("userId", enginOrder.getEnginUserName());
+//    }
+//
+//    public AgencyBillsBean reqFindBills(String recordNo, String userId) {
+////        HashMap<String, Object> paramMap = new HashMap<>();
+////
+////        paramMap.put("userId", userId);
+////        paramMap.put("recordNo", recordNo);
+////
+////        String jsonStr = HttpUtil.post(enginUrl.replace("sysadmin", "") + "api/supply/findAgencyBills", paramMap);
+////
+////        JSONObject data = this.CommonHandleInfo(jsonStr);
+////
+////        EnginSysAgencyBills enginSysAgencyBills = JSONUtil.toBean(data, new TypeReference<EnginSysAgencyBills>() {
+////        }, true);
+////
+////        if (Objects.isNull(enginSysAgencyBills)) {
+////            throw new RemoteServiceException(recordNo + ":单据不存在");
+////        }
+//
+//        return agencyBillsLogic.findBills(recordNo, userId);
+//    }
+//
+////    private JSONObject CommonHandleInfo(String jsonStr) {
+////        try {
+////            if (StringUtils.isBlank(jsonStr)) {
+////                throw new RemoteServiceException("工程机系统返回数据异常");
+////            }
+////            log.info("工程机返回数据:{}", jsonStr);
+////            JSONObject result = JSONUtil.parseObj(jsonStr);
+////
+////            if (result.get("status", Integer.class) != 1) {
+////                throw new RemoteServiceException(result.get("msg", String.class));
+////            }
+////
+////            return result.get("data", JSONObject.class);
+////        } catch (NullPointerException e) {
+////            throw new RemoteServiceException("工程机系统通信异常");
+////        }
+////    }
+//
+//    public void updEngineSystemBill(EnginOrder enginOrder, List<EnginOrderItem> orderItems) {
+////        List<Machine4Agency> items = new ArrayList<>();
+////        for (EnginOrderItem orderItem : orderItems) {
+////            Machine4Agency machine4Agency = new Machine4Agency();
+////            machine4Agency.setCode(orderItem.getMaterialOldNumber());
+////            machine4Agency.setHasDeliverQty(orderItem.getQty());
+////            items.add(machine4Agency);
+////        }
+//
+////        HashMap<String, Object> paramMap = new HashMap<>();
+////        if (profiles.equals("dev")) {
+////            paramMap.put("userId", "268");
+////        } else {
+////            paramMap.put("userId", enginOrder.getEnginUserName());
+////        }
+////        paramMap.put("recordNo", enginOrder.getRefEnginRecordNo());
+////        paramMap.put("items", items);
+//
+////        String reqStr = JSONUtil.toJsonStr(paramMap);
+////        log.info("send engine system data:{}", reqStr);
+////        String jsonStr = HttpUtil.post(enginUrl.replace("sysadmin", "") + "api/supply/updateBill", reqStr);
+////
+////        this.CommonHandleInfo(jsonStr);
+//        agencyBillsLogic.updateAgencyBillsStatus(enginOrder.getEnginUserName(), enginOrder.getRefEnginRecordNo());
+//    }
+//
+//    public List<AgencyBills> queryBills(Collection<String> bills) {
+////        HashMap<String, Object> paramMap = new HashMap<>();
+////        paramMap.put("bills", bills);
+////
+////        String jsonStr = HttpUtil.get(enginUrl.replace("sysadmin", "") + "api/supply/queryBills", paramMap);
+////
+////        this.CommonHandleInfo(jsonStr);
+////
+////        JSONObject result = JSONUtil.parseObj(jsonStr);
+////        JSONArray data = result.getJSONArray("data");
+////
+////        return JSONUtil.toBean(data, new TypeReference<List<EnginSysAgencyBills>>() {
+////        }, true);
+//        return agencyBillsLogic.queryBills(bills);
+//    }
+//
+//    public IPage<EnginOrderListBean> platformQueryList(String userName, String password, String timestamp, String sign,
+//                                                       String recordNo, String orderNo, String useUnit, String specs,
+//                                                       String realModel, String address, String orderType, Integer pageNum, Integer pageSize) {
+//        AdminUser adminUser = adminUserLogic.checkPlatformBind(userName, password, timestamp, sign);
+//
+//        return enginOrderReserveMapper.platformQueryList(new Page<>(pageNum, pageSize), recordNo, orderNo, useUnit,
+//                specs, realModel, address, orderType);
+//    }
+//
+//    public void platformRef(String recordNo, String itemId, Boolean isRef, String timestamp, String sign) {
+//        String newSign = JiaSMUtil.jiasmDigest(recordNo, timestamp);
+//        if (!sign.equals(newSign) || Objects.isNull(isRef)) {
+//            throw new RemoteServiceException("请求不合法");
 //        }
-//        paramMap.put("recordNo", enginOrder.getRefEnginRecordNo());
-//        paramMap.put("items", items);
-
-//        String reqStr = JSONUtil.toJsonStr(paramMap);
-//        log.info("send engine system data:{}", reqStr);
-//        String jsonStr = HttpUtil.post(enginUrl.replace("sysadmin", "") + "api/supply/updateBill", reqStr);
-//
-//        this.CommonHandleInfo(jsonStr);
-        agencyBillsLogic.updateAgencyBillsStatus(enginOrder.getEnginUserName(), enginOrder.getRefEnginRecordNo());
-    }
-
-    public List<AgencyBills> queryBills(Collection<String> bills) {
-//        HashMap<String, Object> paramMap = new HashMap<>();
-//        paramMap.put("bills", bills);
-//
-//        String jsonStr = HttpUtil.get(enginUrl.replace("sysadmin", "") + "api/supply/queryBills", paramMap);
-//
-//        this.CommonHandleInfo(jsonStr);
-//
-//        JSONObject result = JSONUtil.parseObj(jsonStr);
-//        JSONArray data = result.getJSONArray("data");
-//
-//        return JSONUtil.toBean(data, new TypeReference<List<EnginSysAgencyBills>>() {
-//        }, true);
-        return agencyBillsLogic.queryBills(bills);
-    }
-
-    public IPage<EnginOrderListBean> platformQueryList(String userName, String password, String timestamp, String sign,
-                                                       String recordNo, String orderNo, String useUnit, String specs,
-                                                       String realModel, String address, String orderType, Integer pageNum, Integer pageSize) {
-        AdminUser adminUser = adminUserLogic.checkPlatformBind(userName, password, timestamp, sign);
-
-        return enginOrderReserveMapper.platformQueryList(new Page<>(pageNum, pageSize), recordNo, orderNo, useUnit,
-                specs, realModel, address, orderType);
-    }
-
-    public void platformRef(String recordNo, String itemId, Boolean isRef, String timestamp, String sign) {
-        String newSign = JiaSMUtil.jiasmDigest(recordNo, timestamp);
-        if (!sign.equals(newSign) || Objects.isNull(isRef)) {
-            throw new RemoteServiceException("请求不合法");
-        }
-        enginOrderItemService.lambdaUpdate()
-                .set(EnginOrderItem::getPlatformRef, isRef)
-                .eq(EnginOrderItem::getRefEnginRecordNo, recordNo)
-                .eq(EnginOrderItem::getId, itemId);
-    }
-}
+//        enginOrderItemService.lambdaUpdate()
+//                .set(EnginOrderItem::getPlatformRef, isRef)
+//                .eq(EnginOrderItem::getRefEnginRecordNo, recordNo)
+//                .eq(EnginOrderItem::getId, itemId);
+//    }
+//}

+ 51 - 51
src/main/java/com/zfire/mall/manager/logic/external/ExternalEnginLogic.java

@@ -1,51 +1,51 @@
-package com.zfire.mall.manager.logic.external;
-
-import cn.hutool.http.HttpUtil;
-import com.alibaba.fastjson.JSONObject;
-import com.zfire.mall.manager.exception.RemoteServiceException;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 第三方系统/外部系统对接
- *  工程机系统服务
- */
-@Slf4j
-@Service
-public class ExternalEnginLogic {
-
-    @Value("${engin.user.check.url}")
-    private String enginUserCheckUrl;
-    @Value("${engin.user.login.url}")
-    private String enginUserLoginUrl;
-
-    /**
-     * 检查工程机帐号密码是否正确
-     * @param userName
-     * @param password
-     * @return
-     */
-    public Integer checkEnginUser(String userName, String password){
-        Map<String,Object> map = new HashMap<>();
-        map.put("username",userName);
-        map.put("password",password);
-        log.info("【工程机系统帐号验证】request:"+JSONObject.toJSONString(map));
-        String post = HttpUtil.post(enginUserCheckUrl, map);
-        JSONObject result = JSONObject.parseObject(post);
-        log.info("【工程机系统帐号验证】response:"+result);
-        if(!result.get("code").toString().equals("200")){
-            throw new RemoteServiceException(4444,"工程机系统认证失败");
-        }
-        return result.getInteger("data");
-    }
-
-
-    public String getLoginUrl(){
-        return this.enginUserLoginUrl;
-    }
-
-}
+//package com.zfire.mall.manager.logic.external;
+//
+//import cn.hutool.http.HttpUtil;
+//import com.alibaba.fastjson.JSONObject;
+//import com.zfire.mall.manager.exception.RemoteServiceException;
+//import lombok.extern.slf4j.Slf4j;
+//import org.springframework.beans.factory.annotation.Value;
+//import org.springframework.stereotype.Service;
+//
+//import java.util.HashMap;
+//import java.util.Map;
+//
+///**
+// * 第三方系统/外部系统对接
+// *  工程机系统服务
+// */
+//@Slf4j
+//@Service
+//public class ExternalEnginLogic {
+//
+//    @Value("${engin.user.check.url}")
+//    private String enginUserCheckUrl;
+//    @Value("${engin.user.login.url}")
+//    private String enginUserLoginUrl;
+//
+//    /**
+//     * 检查工程机帐号密码是否正确
+//     * @param userName
+//     * @param password
+//     * @return
+//     */
+//    public Integer checkEnginUser(String userName, String password){
+//        Map<String,Object> map = new HashMap<>();
+//        map.put("username",userName);
+//        map.put("password",password);
+//        log.info("【工程机系统帐号验证】request:"+JSONObject.toJSONString(map));
+//        String post = HttpUtil.post(enginUserCheckUrl, map);
+//        JSONObject result = JSONObject.parseObject(post);
+//        log.info("【工程机系统帐号验证】response:"+result);
+//        if(!result.get("code").toString().equals("200")){
+//            throw new RemoteServiceException(4444,"工程机系统认证失败");
+//        }
+//        return result.getInteger("data");
+//    }
+//
+//
+//    public String getLoginUrl(){
+//        return this.enginUserLoginUrl;
+//    }
+//
+//}