‘linchangsheng’ 7 months ago
parent
commit
8e3e55366e
36 changed files with 1118 additions and 1005 deletions
  1. 18 0
      src/main/java/com/zfire/mall/manager/bean/k3/KingDeeOtherStockInAdd.java
  2. 20 0
      src/main/java/com/zfire/mall/manager/bean/k3/KingDeeOtherStockOutAdd.java
  3. 20 0
      src/main/java/com/zfire/mall/manager/bean/k3/KingDeePurchaseStockOutAdd.java
  4. 16 0
      src/main/java/com/zfire/mall/manager/bean/k3/KingTransferAdd.java
  5. 20 0
      src/main/java/com/zfire/mall/manager/bean/stock/KingDeePurchaseStockInAdd.java
  6. 0 164
      src/main/java/com/zfire/mall/manager/controller/customer/CodeSupplyController.java
  7. 0 67
      src/main/java/com/zfire/mall/manager/controller/customer/CustomerApplyController.java
  8. 0 191
      src/main/java/com/zfire/mall/manager/controller/customer/CustomerCodeController.java
  9. 40 0
      src/main/java/com/zfire/mall/manager/controller/customer/CustomerController.java
  10. 25 4
      src/main/java/com/zfire/mall/manager/controller/k3/K3CategoryController.java
  11. 41 0
      src/main/java/com/zfire/mall/manager/controller/k3/K3MaterialController.java
  12. 59 0
      src/main/java/com/zfire/mall/manager/controller/k3/K3OtherStockInController.java
  13. 60 0
      src/main/java/com/zfire/mall/manager/controller/k3/K3OtherStockOutController.java
  14. 37 16
      src/main/java/com/zfire/mall/manager/controller/k3/K3PurchaseStockInController.java
  15. 71 0
      src/main/java/com/zfire/mall/manager/controller/k3/K3PurchaseStockOutController.java
  16. 35 0
      src/main/java/com/zfire/mall/manager/controller/k3/K3ReceiptController.java
  17. 49 0
      src/main/java/com/zfire/mall/manager/controller/k3/K3SupplierController.java
  18. 35 0
      src/main/java/com/zfire/mall/manager/controller/k3/K3TransferController.java
  19. 74 0
      src/main/java/com/zfire/mall/manager/controller/wallet/WalletNewController.java
  20. 0 91
      src/main/java/com/zfire/mall/manager/logic/customer/CustomerApplyLogic.java
  21. 0 180
      src/main/java/com/zfire/mall/manager/logic/front/CustomerCodeLogic.java
  22. 0 280
      src/main/java/com/zfire/mall/manager/logic/front/EquipmentCodeLogic.java
  23. 8 0
      src/main/java/com/zfire/mall/manager/logic/k3/K3CategoryLogic.java
  24. 60 0
      src/main/java/com/zfire/mall/manager/logic/k3/K3CustomerLogic.java
  25. 79 8
      src/main/java/com/zfire/mall/manager/logic/k3/K3MaterialLogic.java
  26. 57 0
      src/main/java/com/zfire/mall/manager/logic/k3/K3OtherStockInLogic.java
  27. 60 0
      src/main/java/com/zfire/mall/manager/logic/k3/K3OtherStockOutLogic.java
  28. 34 0
      src/main/java/com/zfire/mall/manager/logic/k3/K3PurchaseStockInLogic.java
  29. 57 0
      src/main/java/com/zfire/mall/manager/logic/k3/K3PurchaseStockOutLogic.java
  30. 15 0
      src/main/java/com/zfire/mall/manager/logic/k3/K3ReceiptLogic.java
  31. 90 0
      src/main/java/com/zfire/mall/manager/logic/k3/K3SupplierLogic.java
  32. 31 4
      src/main/java/com/zfire/mall/manager/logic/k3/K3TransferLogic.java
  33. 7 0
      src/main/java/com/zfire/mall/manager/logic/wallet/WalletLogic.java
  34. BIN
      src/main/resources/template/供应商导入.xlsx
  35. BIN
      src/main/resources/template/物料导入.xlsx
  36. BIN
      src/main/resources/template/经销商导入.xlsx

+ 18 - 0
src/main/java/com/zfire/mall/manager/bean/k3/KingDeeOtherStockInAdd.java

@@ -0,0 +1,18 @@
+package com.zfire.mall.manager.bean.k3;
+
+import com.zfire.mall.manager.plus.entity.KingDeeOtherStockIn;
+import com.zfire.mall.manager.plus.entity.KingDeeOtherStockInItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@ApiModel
+public class KingDeeOtherStockInAdd extends KingDeeOtherStockIn {
+
+
+    @ApiModelProperty(value = "item")
+    private List<KingDeeOtherStockInItem> kingDeeOtherStockInItems;
+}

+ 20 - 0
src/main/java/com/zfire/mall/manager/bean/k3/KingDeeOtherStockOutAdd.java

@@ -0,0 +1,20 @@
+package com.zfire.mall.manager.bean.k3;
+
+
+import com.zfire.mall.manager.plus.entity.KingDeeOtherStockInItem;
+import com.zfire.mall.manager.plus.entity.KingDeeOtherStockOut;
+import com.zfire.mall.manager.plus.entity.KingDeeOtherStockOutItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@ApiModel
+public class KingDeeOtherStockOutAdd extends KingDeeOtherStockOut {
+
+
+    @ApiModelProperty(value = "item")
+    private List<KingDeeOtherStockOutItem> kingDeeOtherStockOutItems;
+}

+ 20 - 0
src/main/java/com/zfire/mall/manager/bean/k3/KingDeePurchaseStockOutAdd.java

@@ -0,0 +1,20 @@
+package com.zfire.mall.manager.bean.k3;
+
+import com.zfire.mall.manager.plus.entity.KingDeePurchaseStockOut;
+import com.zfire.mall.manager.plus.entity.KingDeePurchaseStockOutItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class KingDeePurchaseStockOutAdd extends KingDeePurchaseStockOut {
+
+
+    @ApiModelProperty(value = "item")
+    private List<KingDeePurchaseStockOutItem> kingDeePurchaseStockOutItems;
+
+
+}

+ 16 - 0
src/main/java/com/zfire/mall/manager/bean/k3/KingTransferAdd.java

@@ -0,0 +1,16 @@
+package com.zfire.mall.manager.bean.k3;
+
+import com.zfire.mall.manager.plus.entity.KingDeeTransfer;
+import com.zfire.mall.manager.plus.entity.KingDeeTransferItem;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class KingTransferAdd extends KingDeeTransfer {
+
+
+    @ApiModelProperty(value = "item")
+    private List<KingDeeTransferItem> kingDeeTransferItems;
+}

+ 20 - 0
src/main/java/com/zfire/mall/manager/bean/stock/KingDeePurchaseStockInAdd.java

@@ -0,0 +1,20 @@
+package com.zfire.mall.manager.bean.stock;
+
+import com.zfire.mall.manager.plus.entity.KingDeePurchaseStockIn;
+import com.zfire.mall.manager.plus.entity.KingDeePurchaseStockInItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class KingDeePurchaseStockInAdd extends KingDeePurchaseStockIn {
+
+    @ApiModelProperty(value = "item")
+    private List<KingDeePurchaseStockInItem> kingDeePurchaseStockInItem;
+
+
+
+}

+ 0 - 164
src/main/java/com/zfire/mall/manager/controller/customer/CodeSupplyController.java

@@ -1,164 +0,0 @@
-package com.zfire.mall.manager.controller.customer;
-
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.zfire.mall.manager.bean.ExcelData;
-import com.zfire.mall.manager.bean.front.EquipmentCodeBatchVO;
-import com.zfire.mall.manager.bean.front.EquipmentCodeVO;
-import com.zfire.mall.manager.exception.RemoteServiceException;
-import com.zfire.mall.manager.helper.ResponseHelper;
-import com.zfire.mall.manager.logic.front.EquipmentCodeLogic;
-import com.zfire.mall.manager.utils.CommonUtils;
-import com.zfire.mall.manager.utils.excel.ExcelUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.integration.redis.util.RedisLockRegistry;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.InputStream;
-import java.text.ParseException;
-import java.util.Date;
-import java.util.List;
-
-/**
- * <p>
- * 设备条码管理 前端控制器
- * </p>
- *
- * @author chang
- * @since 2022-03-21
- */
-@Slf4j
-@RestController
-@Api(value = "外部查询得条码核验", tags = {"外部查询得条码核验"})
-@RequestMapping(value = "/externalCode/equipment", produces = "application/json; charset=utf-8")
-public class CodeSupplyController {
-
-    @Autowired
-    EquipmentCodeLogic equipmentCodeLogic;
-
-    @Autowired
-    RedisLockRegistry redisLockRegistry;
-
-
-    @GetMapping("/list")
-    @ApiOperation("设备条码记录List")
-    public ResponseHelper<IPage<EquipmentCodeVO>> list(
-            @ApiParam(value = "条形码", required = false) @RequestParam(required = false) String barCode,
-            @ApiParam(value = "订单号", required = false) @RequestParam(required = false) String orderNumber,
-            @ApiParam(value = "销售公司", required = false) @RequestParam(required = false) String salesCompany,
-            @ApiParam(value = "客户地址", required = false) @RequestParam(required = false) String address,
-            @ApiParam(value = "扫描开始时间", required = false) @RequestParam(required = false) String startTime,
-            @ApiParam(value = "扫描结束时间", required = false) @RequestParam(required = false) String endTime,
-            @ApiParam(value = "核验开始时间", required = false) @RequestParam(required = false) String verificationStartTime,
-            @ApiParam(value = "核验结束时间", required = false) @RequestParam(required = false) String verificationEndTime,
-            @ApiParam(value = "产品名称", required = false) @RequestParam(required = false) String productName,
-            @ApiParam(value = "仓库", required = false) @RequestParam(required = false) String warehouse,
-            @ApiParam(value = "网点信息", required = false) @RequestParam(required = false) String websitNumber,
-            @ApiParam(value = "服务人员信息", required = false) @RequestParam(required = false) String workerName,
-            @ApiParam(value = "页号", required = true) @RequestParam(required = true) Integer pageNo,
-            @ApiParam(value = "页大小", required = true) @RequestParam(required = true) Integer pageSize,
-            HttpServletRequest request
-    ) {
-        IPage<EquipmentCodeVO> list = equipmentCodeLogic.list(barCode,orderNumber,pageNo,salesCompany,address,startTime,endTime,verificationStartTime,
-                verificationEndTime,productName,warehouse,websitNumber,workerName, pageSize, request);
-        return ResponseHelper.success(list);
-    }
-
-    @GetMapping("/export")
-    @ApiOperation("设备条码记录-导出")
-    public void export(
-            @ApiParam(value = "条形码", required = false) @RequestParam(required = false) String barCode,
-            @ApiParam(value = "订单号", required = false) @RequestParam(required = false) String orderNumber,
-            @ApiParam(value = "销售公司", required = false) @RequestParam(required = false) String salesCompany,
-            @ApiParam(value = "客户地址", required = false) @RequestParam(required = false) String address,
-            @ApiParam(value = "扫描开始时间", required = true) @RequestParam(required = true) String startTime,
-            @ApiParam(value = "扫描结束时间", required = true) @RequestParam(required = true) String endTime,
-            @ApiParam(value = "核验开始时间", required = false) @RequestParam(required = false) String verificationStartTime,
-            @ApiParam(value = "核验结束时间", required = false) @RequestParam(required = false) String verificationEndTime,
-            @ApiParam(value = "产品名称", required = false) @RequestParam(required = false) String productName,
-            @ApiParam(value = "仓库", required = false) @RequestParam(required = false) String warehouse,
-            @ApiParam(value = "网点信息", required = false) @RequestParam(required = false) String websitNumber,
-            @ApiParam(value = "服务人员信息", required = false) @RequestParam(required = false) String workerName,
-            HttpServletRequest request,
-            HttpServletResponse response
-    ) throws Exception {
-        ExcelData excelData = equipmentCodeLogic.export(orderNumber,salesCompany,barCode,address,verificationStartTime,
-                startTime,endTime, verificationEndTime,productName,warehouse,websitNumber,workerName, request);
-        ExcelUtils.exportExcel(request, response, "条码记录导出.csv", excelData);
-    }
-
-
-
-    /////////////////////////批量条码核验////////////////////////////////////////////////////////
-
-
-
-    @PostMapping("/importBatch")
-    @ApiOperation("批量导入判断是否广佛设备")
-    public ResponseHelper<String> importBatch(
-            @ApiParam(required = true, value = "附件") @RequestPart("file") MultipartFile file,
-            HttpServletRequest request
-    ) throws RemoteServiceException, IOException, ParseException {
-        InputStream inputStream = file.getInputStream();
-        String filePath = equipmentCodeLogic.importBatch(file,request);
-        return ResponseHelper.success(filePath);
-    }
-
-
-    @GetMapping("/listBatch")
-    @ApiOperation("批量条码核验记录List")
-    public ResponseHelper<IPage<EquipmentCodeBatchVO>> listBatch(
-            @ApiParam(value = "开始时间", required = false) @RequestParam(required = false) String startTime,
-            @ApiParam(value = "结束时间", required = false) @RequestParam(required = false) String endTime,
-            @ApiParam(value = "外机条码", required = false) @RequestParam(required = false) String barCode,
-            @ApiParam(value = "批次号", required = false) @RequestParam(required = false) String batch,
-            @ApiParam(value = "单个筛选时间", required = false) @RequestParam(required = false) String startTimeSingle,
-            @ApiParam(value = "页号", required = true) @RequestParam(required = true) Integer pageNo,
-            @ApiParam(value = "页大小", required = true) @RequestParam(required = true) Integer pageSize,
-            HttpServletRequest request
-    ) {
-        IPage<EquipmentCodeBatchVO> list = equipmentCodeLogic.listBatch(startTimeSingle,batch,barCode,pageNo,startTime,endTime, pageSize, request);
-        return ResponseHelper.success(list);
-    }
-
-
-    @GetMapping("/exportBatch")
-    @ApiOperation("批量条码核验记录List导出")
-    public void exportBatch(
-            @ApiParam(value = "开始时间", required = false) @RequestParam(required = false) String startTime,
-            @ApiParam(value = "结束时间", required = false) @RequestParam(required = false) String endTime,
-            @ApiParam(value = "外机条码", required = false) @RequestParam(required = false) String barCode,
-            @ApiParam(value = "批次号", required = false) @RequestParam(required = false) String batch,
-            @ApiParam(value = "单个筛选时间", required = false) @RequestParam(required = false) String startTimeSingle,
-            @ApiParam(value = "页号", required = false) @RequestParam(required = false) Integer pageNo,
-            @ApiParam(value = "页大小", required = false) @RequestParam(required = false) Integer pageSize,
-            HttpServletRequest request,
-            HttpServletResponse response
-    ) throws Exception {
-        // IPage<EquipmentCodeCheck> list = equipmentCodeLogic.listCodeCheck(startTimeSingle,batch,outsideCode,withinCode,pageNo,informationKey,startTime,endTime, pageSize, request);
-        ExcelData excelData = equipmentCodeLogic.exportBatch(startTimeSingle,batch,barCode,pageNo,startTime,endTime, pageSize, request);
-        ExcelUtils.exportExcel(request, response, "条码复验记录导出.csv", excelData);
-    }
-
-
-    @GetMapping("/downloadBatch")
-    @ApiOperation("批量条码下载模板")
-    public void downloadBatche(
-            HttpServletRequest request,
-            HttpServletResponse response
-    ) throws Exception {
-        CommonUtils.downloadFile("tiaoma.xlsx",response);
-    }
-
-
-
-}
-

+ 0 - 67
src/main/java/com/zfire/mall/manager/controller/customer/CustomerApplyController.java

@@ -1,67 +0,0 @@
-package com.zfire.mall.manager.controller.customer;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.zfire.mall.manager.bean.manage.customer.CustomerApplyBean;
-import com.zfire.mall.manager.helper.ResponseHelper;
-import com.zfire.mall.manager.logic.customer.CustomerApplyLogic;
-import com.zfire.mall.manager.plus.entity.CustomerApply;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-@Slf4j
-@RestController
-@Api(value = "经销商申请入驻API", tags ={"经销商申请入驻API"} )
-@RequestMapping(value = "/customer/apply", produces = "application/json; charset=utf-8")
-public class CustomerApplyController {
-
-    @Autowired
-    CustomerApplyLogic customerApplyLogic;
-
-
-    @ApiOperation(value = "列表")
-    @GetMapping("/list")
-    public ResponseHelper<IPage<CustomerApply>> list(
-            @ApiParam(required = false, value = "企业名称") @RequestParam(required = false) String customerName,
-            @ApiParam(required = false, value = "联系人") @RequestParam(required = false) String linkName,
-            @ApiParam(required = false, value = "联系电话") @RequestParam(required = false) String linkPhone,
-            @ApiParam(required = false, value = "邮箱") @RequestParam(required = false) String email,
-            @ApiParam(value = "页号",required = true)@RequestParam Integer pageNum,
-            @ApiParam(value = "页大小",required = true)@RequestParam Integer pageSize
-    ) throws Exception {
-        IPage<CustomerApply> list = customerApplyLogic.list(customerName, linkName, linkPhone, email, pageNum, pageSize);
-        return ResponseHelper.success(list);
-    }
-
-    @ApiOperation(value = "详情")
-    @GetMapping("/detail")
-    public ResponseHelper<CustomerApplyBean> detail(
-            @ApiParam(required = true, value = "id") @RequestParam(required = true) String id
-    ) throws Exception {
-        CustomerApplyBean detail = customerApplyLogic.detail(id);
-        return ResponseHelper.success(detail);
-    }
-
-    @ApiOperation(value = "跟进")
-    @GetMapping("/follow")
-    public ResponseHelper follow(
-            @ApiParam(required = true, value = "id") @RequestParam(required = true) String id,
-            @ApiParam(required = true, value = "状态 1=跟进中 2=已关闭") @RequestParam(required = true) Integer status,
-            @ApiParam(required = true, value = "处理意见") @RequestParam(required = true) String remark
-    ) throws Exception {
-        customerApplyLogic.follow(id,status,remark);
-        return ResponseHelper.success();
-    }
-
-
-
-
-
-
-}

+ 0 - 191
src/main/java/com/zfire/mall/manager/controller/customer/CustomerCodeController.java

@@ -1,191 +0,0 @@
-package com.zfire.mall.manager.controller.customer;
-
-import cn.hutool.core.lang.TypeReference;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.zfire.mall.manager.annotation.ZfireList;
-import com.zfire.mall.manager.bean.front.CustomerCodeCustomerCheckVO;
-import com.zfire.mall.manager.bean.front.CustomerCodeCustomerVO;
-import com.zfire.mall.manager.bean.front.CustomerCodeVO;
-import com.zfire.mall.manager.bean.listV2.StageK3CustomerVO;
-import com.zfire.mall.manager.bean.manage.customer.CustomerApplyBean;
-import com.zfire.mall.manager.exception.RemoteServiceException;
-import com.zfire.mall.manager.helper.ResponseHelper;
-import com.zfire.mall.manager.logic.customer.CustomerApplyLogic;
-import com.zfire.mall.manager.logic.front.CustomerCodeLogic;
-import com.zfire.mall.manager.plus.entity.CustomerApply;
-import com.zfire.mall.manager.plus.entity.CustomerCode;
-import com.zfire.mall.manager.utils.CommonUtils;
-import com.zfire.mall.manager.zfire.bean.ZfireParamBean;
-import com.zfire.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.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.InputStream;
-import java.text.ParseException;
-
-@Slf4j
-@RestController
-@Api(value = "嘉贤出库条码库API", tags ={"嘉贤出库条码库API"} )
-@RequestMapping(value = "/customer/code", produces = "application/json; charset=utf-8")
-public class CustomerCodeController {
-
-    @Autowired
-    CustomerCodeLogic customerCodeLogic;
-
-    @ZfireList
-    @PostMapping("/list/v2")
-    @ApiOperation(value = "出库条码库")
-    public ResponseHelper<CustomerCodeVO> listV2(
-            @RequestBody ZfireParamBean zfireParamBean
-    ){
-        IPage<CustomerCodeVO> k3CustomerVOIPage = customerCodeLogic.listV2(zfireParamBean);
-        return ResponseHelper.success(k3CustomerVOIPage, new TypeReference<CustomerCodeVO>() {});
-    }
-
-    @PostMapping("/user/export/v2")
-    @ApiOperation("出库条码库-导出")
-    public void listExport(
-            @RequestBody ZfireParamBean zfireParamBean,
-            HttpServletRequest request,
-            HttpServletResponse response
-    ) throws Exception {
-        //1.组装查询条件
-        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
-        //2.查询要导出的内容
-        IPage<CustomerCodeVO> stockBeanIPage = customerCodeLogic.listV2(zfireParam);
-        //3.导出
-        FieldUtils.exportData(stockBeanIPage.getRecords(),zfireParam.getExportFields(),request,response);
-    }
-
-
-
-    @ZfireList
-    @PostMapping("/listCustomer/v2")
-    @ApiOperation(value = "商家仓条码列表")
-    public ResponseHelper<CustomerCodeCustomerVO> listCustomer(
-            @RequestBody ZfireParamBean zfireParamBean
-    ){
-        IPage<CustomerCodeCustomerVO> customerCodeCustomerVOIPage = customerCodeLogic.listCustomer(zfireParamBean);
-        return ResponseHelper.success(customerCodeCustomerVOIPage, new TypeReference<CustomerCodeVO>() {});
-    }
-
-    @PostMapping("/listCustomer/export/v2")
-    @ApiOperation("商家仓条码列表-导出")
-    public void listCustomerExport(
-            @RequestBody ZfireParamBean zfireParamBean,
-            HttpServletRequest request,
-            HttpServletResponse response
-    ) throws Exception {
-        //1.组装查询条件
-        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
-        //2.查询要导出的内容
-        IPage<CustomerCodeCustomerVO> customerCodeCustomerVOIPage = customerCodeLogic.listCustomer(zfireParam);
-        //3.导出
-        FieldUtils.exportData(customerCodeCustomerVOIPage.getRecords(),zfireParam.getExportFields(),request,response);
-    }
-
-    @GetMapping("/ShangJiaDownload")
-    @ApiOperation("商家仓条码-下载模板")
-    public void luBaoDownload(
-            HttpServletRequest request,
-            HttpServletResponse response
-    ) throws Exception {
-        CommonUtils.downloadFile("商家仓导入.xlsx",response);
-    }
-
-
-    @PostMapping("/import")
-    @ApiOperation("导入商家仓条码")
-    public ResponseHelper importData(
-            @ApiParam(required = true, value = "附件") @RequestPart("file") MultipartFile file,
-            HttpServletRequest request
-    ) throws RemoteServiceException, IOException, ParseException {
-        InputStream inputStream = file.getInputStream();
-        customerCodeLogic.importData(inputStream,request);
-        return ResponseHelper.success();
-    }
-
-
-
-    @ZfireList
-    @PostMapping("/listCustomerCheck/v2")
-    @ApiOperation(value = "条码校验列表")
-    public ResponseHelper<CustomerCodeCustomerCheckVO> listCustomerCheck(
-            @RequestBody ZfireParamBean zfireParamBean
-    ){
-        IPage<CustomerCodeCustomerCheckVO> customerCodeCustomerVOIPage = customerCodeLogic.listCustomerCheck(zfireParamBean);
-        return ResponseHelper.success(customerCodeCustomerVOIPage, new TypeReference<CustomerCodeCustomerCheckVO>() {});
-    }
-
-    @PostMapping("/listCustomerCheck/export/v2")
-    @ApiOperation("条码校验列表-导出")
-    public void listCustomerCheckExport(
-            @RequestBody ZfireParamBean zfireParamBean,
-            HttpServletRequest request,
-            HttpServletResponse response
-    ) throws Exception {
-        //1.组装查询条件
-        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
-        //2.查询要导出的内容
-        IPage<CustomerCodeCustomerCheckVO> customerCodeCustomerVOIPage = customerCodeLogic.listCustomerCheck(zfireParam);
-        //3.导出
-        FieldUtils.exportData(customerCodeCustomerVOIPage.getRecords(),zfireParam.getExportFields(),request,response);
-    }
-
-    @GetMapping("/download")
-    @ApiOperation("条码校验-下载模板")
-    public void download(
-            HttpServletRequest request,
-            HttpServletResponse response
-    ) throws Exception {
-        CommonUtils.downloadFile("条码核验.xlsx",response);
-    }
-
-
-    @PostMapping("/importCheck")
-    @ApiOperation("导入条码校验")
-    public ResponseHelper importCheck(
-            @ApiParam(required = true, value = "附件") @RequestPart("file") MultipartFile file,
-            HttpServletRequest request
-    ) throws RemoteServiceException, IOException, ParseException {
-        InputStream inputStream = file.getInputStream();
-        customerCodeLogic.importCheck(inputStream,request);
-        return ResponseHelper.success();
-    }
-
-
-    @ZfireList
-    @PostMapping("/listDaCang/v2")
-    @ApiOperation(value = "大仓出库条码库")
-    public ResponseHelper<CustomerCodeVO> listDaCang(
-            @RequestBody ZfireParamBean zfireParamBean
-    ){
-        IPage<CustomerCodeVO> k3CustomerVOIPage = customerCodeLogic.listDaCang(zfireParamBean);
-        return ResponseHelper.success(k3CustomerVOIPage, new TypeReference<CustomerCodeVO>() {});
-    }
-
-    @PostMapping("/listDaCang/export/v2")
-    @ApiOperation("大仓出库条码库-导出")
-    public void listDaCangExport(
-            @RequestBody ZfireParamBean zfireParamBean,
-            HttpServletRequest request,
-            HttpServletResponse response
-    ) throws Exception {
-        //1.组装查询条件
-        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
-        //2.查询要导出的内容
-        IPage<CustomerCodeVO> stockBeanIPage = customerCodeLogic.listDaCang(zfireParam);
-        //3.导出
-        FieldUtils.exportData(stockBeanIPage.getRecords(),zfireParam.getExportFields(),request,response);
-    }
-
-
-}

+ 40 - 0
src/main/java/com/zfire/mall/manager/controller/customer/CustomerController.java

@@ -15,6 +15,7 @@ import com.zfire.mall.manager.helper.ResponseHelper;
 import com.zfire.mall.manager.logic.k3.K3CustomerLogic;
 import com.zfire.mall.manager.plus.entity.InvoiceApplication;
 import com.zfire.mall.manager.plus.entity.KingDeeCustomer;
+import com.zfire.mall.manager.utils.CommonUtils;
 import com.zfire.mall.manager.utils.excel.ExcelUtils;
 import com.zfire.mall.manager.zfire.bean.ZfireParamBean;
 import com.zfire.mall.manager.zfire.util.FieldUtils;
@@ -134,6 +135,45 @@ public class CustomerController {
     }
 
 
+    @ApiOperation(value = "新增经销商")
+    @PostMapping("/add")
+    public ResponseHelper add(
+            @RequestBody KingDeeCustomer kingDeeCustomer
+    ) throws Exception {
+        k3CustomerLogic.add(kingDeeCustomer);
+        return ResponseHelper.success();
+    }
+
+    @ApiOperation(value = "修改经销商")
+    @PostMapping("/updateCustomer")
+    public ResponseHelper updateCustomer(
+            @RequestBody KingDeeCustomer kingDeeCustomer
+    ) throws Exception {
+        k3CustomerLogic.updateCustomer(kingDeeCustomer);
+        return ResponseHelper.success();
+    }
+
+
+    @GetMapping("/downloadCustomer")
+    @ApiOperation("下载经销商导入模板")
+    public void download(
+            HttpServletResponse response
+    ) throws IOException {
+        CommonUtils.downloadFile("经销商导入.xlsx",response);
+    }
+
+
+    @PostMapping("/importCustomer")
+    @ApiOperation("导入经销商")
+    public ResponseHelper importData(
+            @RequestPart("file") MultipartFile file
+    ) throws IOException {
+        List<Object> objects = ExcelUtils.importExcel(file);
+        k3CustomerLogic.importData(objects);
+        return ResponseHelper.success();
+    }
+
+
 
     @ApiOperation(value = "查询同个集团的经销商")
     @GetMapping("/group/list")

+ 25 - 4
src/main/java/com/zfire/mall/manager/controller/k3/K3CategoryController.java

@@ -1,18 +1,17 @@
 package com.zfire.mall.manager.controller.k3;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.zfire.mall.manager.bean.k3.KingDeeMaterialBean;
 import com.zfire.mall.manager.helper.ResponseHelper;
 import com.zfire.mall.manager.logic.k3.K3CategoryLogic;
 import com.zfire.mall.manager.plus.entity.KingDeeCategory;
+import com.zfire.mall.manager.plus.entity.KingDeeMaterial;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 @Slf4j
 @RestController
@@ -33,4 +32,26 @@ public class K3CategoryController {
         IPage<KingDeeCategory> list = k3CategoryLogic.list(keyword, pageNum, pageSize);
         return ResponseHelper.success(list);
     }
+
+
+    @ApiOperation(value = "编辑存货类别")
+    @PostMapping("/edit")
+    public ResponseHelper edit(
+            @ApiParam(required = true, value = "存货类别") @RequestBody KingDeeCategory kingDeeCategory
+    ) throws Exception {
+        k3CategoryLogic.edit(kingDeeCategory);
+        return ResponseHelper.success();
+    }
+
+
+
+    @ApiOperation(value = "新增存货类别")
+    @PostMapping("/add")
+    public ResponseHelper add(
+            @RequestBody KingDeeCategory kingDeeCategory
+    ) throws Exception {
+        k3CategoryLogic.add(kingDeeCategory);
+        return ResponseHelper.success();
+    }
+
 }

+ 41 - 0
src/main/java/com/zfire/mall/manager/controller/k3/K3MaterialController.java

@@ -8,6 +8,10 @@ import com.zfire.mall.manager.bean.listV2.K3CustomerVO;
 import com.zfire.mall.manager.bean.listV2.K3MaterialVO;
 import com.zfire.mall.manager.helper.ResponseHelper;
 import com.zfire.mall.manager.logic.k3.K3MaterialLogic;
+import com.zfire.mall.manager.plus.entity.KingDeeMaterial;
+import com.zfire.mall.manager.plus.entity.KingDeeSupplier;
+import com.zfire.mall.manager.utils.CommonUtils;
+import com.zfire.mall.manager.utils.excel.ExcelUtils;
 import com.zfire.mall.manager.zfire.bean.ZfireParamBean;
 import com.zfire.mall.manager.zfire.util.FieldUtils;
 import io.swagger.annotations.Api;
@@ -16,9 +20,12 @@ import io.swagger.annotations.ApiParam;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
 
 @Slf4j
 @RestController
@@ -93,4 +100,38 @@ public class K3MaterialController {
         k3MaterialLogic.edit(kingDeeMaterialBean);
         return ResponseHelper.success();
     }
+
+
+
+    @ApiOperation(value = "新增物料")
+    @PostMapping("/add")
+    public ResponseHelper add(
+            @RequestBody KingDeeMaterial kingDeeMaterial
+    ) throws Exception {
+        k3MaterialLogic.add(kingDeeMaterial);
+        return ResponseHelper.success();
+    }
+
+
+
+    @GetMapping("/downloadCustomer")
+    @ApiOperation("下载物料导入模板")
+    public void download(
+            HttpServletResponse response
+    ) throws IOException {
+        CommonUtils.downloadFile("物料导入.xlsx",response);
+    }
+
+
+    @PostMapping("/importCustomer")
+    @ApiOperation("导入物料")
+    public ResponseHelper importData(
+            @RequestPart("file") MultipartFile file
+    ) throws IOException {
+        List<Object> objects = ExcelUtils.importExcel(file);
+        k3MaterialLogic.importData(objects);
+        return ResponseHelper.success();
+    }
+
+
 }

+ 59 - 0
src/main/java/com/zfire/mall/manager/controller/k3/K3OtherStockInController.java

@@ -0,0 +1,59 @@
+package com.zfire.mall.manager.controller.k3;
+
+
+import com.zfire.mall.manager.bean.k3.KingDeeOtherStockInAdd;
+import com.zfire.mall.manager.helper.ResponseHelper;
+import com.zfire.mall.manager.logic.k3.K3OtherStockInLogic;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author CHANGE
+ */
+@Slf4j
+@RestController
+@Api(value = "其他入库单", tags = {"其他入库单"})
+@RequestMapping(value = "/otherStockIn", produces = "application/json; charset=utf-8")
+public class K3OtherStockInController {
+
+
+    @Autowired
+    K3OtherStockInLogic k3OtherStockInLogic;
+
+
+    @ApiOperation(value = "新增其他入库单")
+    @PostMapping("/add")
+    public ResponseHelper add(
+            @RequestBody KingDeeOtherStockInAdd kingDeePurchaseStockInAdd
+    ) throws Exception {
+        k3OtherStockInLogic.add(kingDeePurchaseStockInAdd);
+        return ResponseHelper.success();
+    }
+
+    @ApiOperation(value = "修改其他入库单")
+    @PostMapping("/updateCustomer")
+    public ResponseHelper updateCustomer(
+            @RequestBody KingDeeOtherStockInAdd kingDeePurchaseStockInAdd
+    ) throws Exception {
+        k3OtherStockInLogic.update(kingDeePurchaseStockInAdd);
+        return ResponseHelper.success();
+    }
+
+
+    @ApiOperation(value = "审批其他入库单")
+    @PostMapping("/examine")
+    public ResponseHelper examine(
+            @ApiParam(required = false, value = "单据编号") @RequestParam(required = false) String billNo,
+            @ApiParam(required = false, value = "  OK通过  WAIT待审 FAIL 不通过") @RequestParam(required = false) String cancelStatus
+    ) throws Exception {
+        k3OtherStockInLogic.examine(billNo, cancelStatus);
+        return ResponseHelper.success();
+    }
+
+
+}

+ 60 - 0
src/main/java/com/zfire/mall/manager/controller/k3/K3OtherStockOutController.java

@@ -0,0 +1,60 @@
+package com.zfire.mall.manager.controller.k3;
+
+
+import com.zfire.mall.manager.bean.k3.KingDeeOtherStockInAdd;
+import com.zfire.mall.manager.bean.k3.KingDeeOtherStockOutAdd;
+import com.zfire.mall.manager.helper.ResponseHelper;
+import com.zfire.mall.manager.logic.k3.K3OtherStockInLogic;
+import com.zfire.mall.manager.logic.k3.K3OtherStockOutLogic;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author CHANGE
+ */
+@Slf4j
+@RestController
+@Api(value = "其他出库单", tags = {"其他出库单"})
+@RequestMapping(value = "/otherStockOut", produces = "application/json; charset=utf-8")
+public class K3OtherStockOutController {
+
+
+    @Autowired
+    K3OtherStockOutLogic k3OtherStockOutLogic;
+
+
+    @ApiOperation(value = "新增其他出库单")
+    @PostMapping("/add")
+    public ResponseHelper add(
+            @RequestBody KingDeeOtherStockOutAdd KingDeeOtherStockOutAdd
+    ) throws Exception {
+        k3OtherStockOutLogic.add(KingDeeOtherStockOutAdd);
+        return ResponseHelper.success();
+    }
+
+    @ApiOperation(value = "修改其他出库单")
+    @PostMapping("/updateCustomer")
+    public ResponseHelper updateCustomer(
+            @RequestBody KingDeeOtherStockOutAdd kingDeeOtherStockOutAdd
+    ) throws Exception {
+        k3OtherStockOutLogic.update(kingDeeOtherStockOutAdd);
+        return ResponseHelper.success();
+    }
+
+
+    @ApiOperation(value = "审批其他出库单")
+    @PostMapping("/examine")
+    public ResponseHelper examine(
+            @ApiParam(required = false, value = "单据编号") @RequestParam(required = false) String billNo,
+            @ApiParam(required = false, value = "  OK通过  WAIT待审 FAIL 不通过") @RequestParam(required = false) String cancelStatus
+    ) throws Exception {
+        k3OtherStockOutLogic.examine(billNo, cancelStatus);
+        return ResponseHelper.success();
+    }
+
+
+}

+ 37 - 16
src/main/java/com/zfire/mall/manager/controller/k3/K3PurchaseStockInController.java

@@ -5,18 +5,18 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zfire.mall.manager.bean.ExcelData;
 import com.zfire.mall.manager.bean.k3.KingDeePurchaseStockInBean;
 import com.zfire.mall.manager.bean.k3.KingDeePurchaseStockInData;
+import com.zfire.mall.manager.bean.stock.KingDeePurchaseStockInAdd;
 import com.zfire.mall.manager.helper.ResponseHelper;
 import com.zfire.mall.manager.logic.k3.K3PurchaseStockInLogic;
+import com.zfire.mall.manager.plus.entity.KingDeeCustomer;
+import com.zfire.mall.manager.plus.entity.KingDeePurchaseStockIn;
 import com.zfire.mall.manager.utils.excel.ExcelUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -34,18 +34,6 @@ public class K3PurchaseStockInController {
     @Autowired
     K3PurchaseStockInLogic k3PurchaseStockInLogic;
 
-//    @ApiOperation(value = "同步采购入库单列表")
-//    @PostMapping("/syncPurchaseStockIn")
-//    public ResponseHelper sync(
-//            @ApiParam(required = true, value = "组织机构") @RequestParam(required = true) String orgId,
-//            @ApiParam(required = true, value = "组织机构编码") @RequestParam(required = true) String orgNumber,
-//            @ApiParam(required = false, value = "开始时间") @RequestParam(required = false) String startTime,
-//            @ApiParam(required = false, value = "结束时间") @RequestParam(required = false) String endTime
-//    ) throws Exception {
-//        k3PurchaseStockInLogic.allSync(orgId,orgNumber,startTime,endTime);
-//        return ResponseHelper.success();
-//    }
-
     @ApiOperation(value = "采购入库单列表")
     @GetMapping("/list")
     public ResponseHelper<IPage<KingDeePurchaseStockInBean>> list(
@@ -92,4 +80,37 @@ public class K3PurchaseStockInController {
         ExcelData excelData = k3PurchaseStockInLogic.export(kingDeePurchaseStockInBean.getRecords());
         ExcelUtils.exportExcel(request,response,"采购入库单.xlsx",excelData);
     }
+
+
+    @ApiOperation(value = "新增采购入库单")
+    @PostMapping("/add")
+    public ResponseHelper add(
+            @RequestBody KingDeePurchaseStockInAdd kingDeePurchaseStockInAdd
+    ) throws Exception {
+        k3PurchaseStockInLogic.add(kingDeePurchaseStockInAdd);
+        return ResponseHelper.success();
+    }
+
+    @ApiOperation(value = "修改采购入库单")
+    @PostMapping("/updateCustomer")
+    public ResponseHelper updateCustomer(
+            @RequestBody KingDeePurchaseStockInAdd kingDeePurchaseStockInAdd
+    ) throws Exception {
+        k3PurchaseStockInLogic.update(kingDeePurchaseStockInAdd);
+        return ResponseHelper.success();
+    }
+
+
+
+    @ApiOperation(value = "审批采购入库单")
+    @PostMapping("/examine")
+    public ResponseHelper examine(
+            @ApiParam(required = false, value = "单据编号") @RequestParam(required = false) String billNo,
+            @ApiParam(required = false, value = "  OK通过  WAIT待审 FAIL 不通过") @RequestParam(required = false) String cancelStatus
+    ) throws Exception {
+        k3PurchaseStockInLogic.examine(billNo,cancelStatus);
+        return ResponseHelper.success();
+    }
+
+
 }

+ 71 - 0
src/main/java/com/zfire/mall/manager/controller/k3/K3PurchaseStockOutController.java

@@ -0,0 +1,71 @@
+package com.zfire.mall.manager.controller.k3;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.zfire.mall.manager.bean.ExcelData;
+import com.zfire.mall.manager.bean.k3.KingDeePurchaseStockInBean;
+import com.zfire.mall.manager.bean.k3.KingDeePurchaseStockInData;
+import com.zfire.mall.manager.bean.k3.KingDeePurchaseStockOutAdd;
+import com.zfire.mall.manager.bean.stock.KingDeePurchaseStockInAdd;
+import com.zfire.mall.manager.helper.ResponseHelper;
+import com.zfire.mall.manager.logic.k3.K3PurchaseStockInLogic;
+import com.zfire.mall.manager.logic.k3.K3PurchaseStockOutLogic;
+import com.zfire.mall.manager.plus.entity.KingDeePurchaseStockOut;
+import com.zfire.mall.manager.utils.excel.ExcelUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * @author CHANGE
+ */
+@Slf4j
+@RestController
+@Api(value = "采购退料单", tags ={"采购退料单"} )
+@RequestMapping(value = "/purchaseStockOut", produces = "application/json; charset=utf-8")
+public class K3PurchaseStockOutController {
+
+
+    @Autowired
+    K3PurchaseStockOutLogic k3PurchaseStockOutLogic;
+
+
+
+    @ApiOperation(value = "新增采购退料单")
+    @PostMapping("/add")
+    public ResponseHelper add(
+            @RequestBody KingDeePurchaseStockOutAdd kingDeePurchaseStockInAdd
+    ) throws Exception {
+        k3PurchaseStockOutLogic.add(kingDeePurchaseStockInAdd);
+        return ResponseHelper.success();
+    }
+
+    @ApiOperation(value = "修改采购退料单")
+    @PostMapping("/updateCustomer")
+    public ResponseHelper updateCustomer(
+            @RequestBody KingDeePurchaseStockOutAdd kingDeePurchaseStockInAdd
+    ) throws Exception {
+        k3PurchaseStockOutLogic.update(kingDeePurchaseStockInAdd);
+        return ResponseHelper.success();
+    }
+
+
+
+    @ApiOperation(value = "审批采购退料单")
+    @PostMapping("/examine")
+    public ResponseHelper examine(
+            @ApiParam(required = false, value = "单据编号") @RequestParam(required = false) String billNo,
+            @ApiParam(required = false, value = "  OK通过  WAIT待审 FAIL 不通过") @RequestParam(required = false) String cancelStatus
+    ) throws Exception {
+        k3PurchaseStockOutLogic.examine(billNo,cancelStatus);
+        return ResponseHelper.success();
+    }
+
+
+}

+ 35 - 0
src/main/java/com/zfire/mall/manager/controller/k3/K3ReceiptController.java

@@ -15,6 +15,7 @@ import com.zfire.mall.manager.logic.k3.K3ReceiptLogic;
 import com.zfire.mall.manager.plus.entity.CustomerWalletCreditRecord;
 import com.zfire.mall.manager.plus.entity.KingDeeMaterial;
 import com.zfire.mall.manager.plus.entity.KingDeeReceipt;
+import com.zfire.mall.manager.plus.entity.KingDeeWallet;
 import com.zfire.mall.manager.utils.excel.ExcelUtils;
 import com.zfire.mall.manager.zfire.bean.ZfireParamBean;
 import com.zfire.mall.manager.zfire.util.FieldUtils;
@@ -140,4 +141,38 @@ public class K3ReceiptController {
         ExcelUtils.exportExcel(request,response,"收款单数据.xlsx",export);
     }
 
+
+
+    @ApiOperation(value = "新增收款单")
+    @PostMapping("/add")
+    public ResponseHelper add(
+            @RequestBody KingDeeReceipt kingDeeWallet
+    ) throws Exception {
+        k3ReceiptLogic.add(kingDeeWallet);
+        return ResponseHelper.success();
+    }
+
+    @ApiOperation(value = "修改收款单")
+    @PostMapping("/update")
+    public ResponseHelper updateCustomer(
+            @RequestBody KingDeeReceipt kingDeeWallet
+    ) throws Exception {
+        k3ReceiptLogic.update(kingDeeWallet);
+        return ResponseHelper.success();
+    }
+
+
+
+    @ApiOperation(value = "审批收款单")
+    @PostMapping("/examine")
+    public ResponseHelper examine(
+            @ApiParam(required = false, value = "单据编号") @RequestParam(required = false) String billNo,
+            @ApiParam(required = false, value = " 状态 A=保存 B=审核中 C=已审核") @RequestParam(required = false) String cancelStatus
+    ) throws Exception {
+        k3ReceiptLogic.examine(billNo,cancelStatus);
+        return ResponseHelper.success();
+    }
+
+
+
 }

+ 49 - 0
src/main/java/com/zfire/mall/manager/controller/k3/K3SupplierController.java

@@ -4,11 +4,15 @@ package com.zfire.mall.manager.controller.k3;
 import cn.hutool.core.lang.TypeReference;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zfire.mall.manager.annotation.ZfireList;
+import com.zfire.mall.manager.bean.k3.K3CustomerBean;
 import com.zfire.mall.manager.bean.supplier.KingDeeSupplierVO;
 import com.zfire.mall.manager.exception.RemoteServiceException;
 import com.zfire.mall.manager.helper.ResponseHelper;
 import com.zfire.mall.manager.logic.k3.K3SupplierLogic;
+import com.zfire.mall.manager.plus.entity.KingDeeCustomer;
 import com.zfire.mall.manager.plus.entity.KingDeeSupplier;
+import com.zfire.mall.manager.utils.CommonUtils;
+import com.zfire.mall.manager.utils.excel.ExcelUtils;
 import com.zfire.mall.manager.zfire.bean.ZfireParamBean;
 import com.zfire.mall.manager.zfire.util.FieldUtils;
 import io.swagger.annotations.Api;
@@ -17,9 +21,12 @@ import io.swagger.annotations.ApiParam;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
 
 /**
  * @author CHANGE
@@ -97,4 +104,46 @@ public class K3SupplierController {
         //3.导出
         FieldUtils.exportData(list.getRecords(),zfireParam.getExportFields(),request,response);
     }
+
+
+
+    @ApiOperation(value = "新增供应商")
+    @PostMapping("/add")
+    public ResponseHelper add(
+            @RequestBody KingDeeSupplier kingDeeSupplier
+    ) throws Exception {
+        k3SupplierLogic.add(kingDeeSupplier);
+        return ResponseHelper.success();
+    }
+
+    @ApiOperation(value = "修改供应商")
+    @PostMapping("/update")
+    public ResponseHelper updateCustomer(
+            @RequestBody KingDeeSupplier kingDeeSupplier
+    ) throws Exception {
+        k3SupplierLogic.updateCustomer(kingDeeSupplier);
+        return ResponseHelper.success();
+    }
+
+
+    @GetMapping("/downloadCustomer")
+    @ApiOperation("下载供应商导入模板")
+    public void download(
+            HttpServletResponse response
+    ) throws IOException {
+        CommonUtils.downloadFile("供应商导入.xlsx",response);
+    }
+
+
+    @PostMapping("/importCustomer")
+    @ApiOperation("导入供应商")
+    public ResponseHelper importData(
+            @RequestPart("file") MultipartFile file
+    ) throws IOException {
+        List<Object> objects = ExcelUtils.importExcel(file);
+        k3SupplierLogic.importData(objects);
+        return ResponseHelper.success();
+    }
+
+
 }

+ 35 - 0
src/main/java/com/zfire/mall/manager/controller/k3/K3TransferController.java

@@ -4,11 +4,13 @@ package com.zfire.mall.manager.controller.k3;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zfire.mall.manager.bean.ExcelData;
 import com.zfire.mall.manager.bean.k3.KingTransfer;
+import com.zfire.mall.manager.bean.k3.KingTransferAdd;
 import com.zfire.mall.manager.bean.k3.KingTransferBean;
 import com.zfire.mall.manager.bean.pick.PickManagerBean;
 import com.zfire.mall.manager.helper.ResponseHelper;
 import com.zfire.mall.manager.logic.k3.K3SupplierLogic;
 import com.zfire.mall.manager.logic.k3.K3TransferLogic;
+import com.zfire.mall.manager.plus.entity.KingDeeReceipt;
 import com.zfire.mall.manager.plus.entity.KingDeeSupplier;
 import com.zfire.mall.manager.utils.excel.ExcelUtils;
 import io.swagger.annotations.Api;
@@ -83,4 +85,37 @@ public class K3TransferController {
         ExcelUtils.exportExcel(request,response,"调拨单.xlsx",excelData);
     }
 
+
+    @ApiOperation(value = "新增调拨单")
+    @PostMapping("/add")
+    public ResponseHelper add(
+            @RequestBody KingTransferAdd kingTransferAdd
+    ) throws Exception {
+        k3TransferLogic.add(kingTransferAdd);
+        return ResponseHelper.success();
+    }
+
+    @ApiOperation(value = "修改调拨单")
+    @PostMapping("/update")
+    public ResponseHelper updateCustomer(
+            @RequestBody KingTransferAdd kingTransferAdd
+    ) throws Exception {
+        k3TransferLogic.update(kingTransferAdd);
+        return ResponseHelper.success();
+    }
+
+
+    @ApiOperation(value = "审批调拨单")
+    @PostMapping("/examine")
+    public ResponseHelper examine(
+            @ApiParam(required = false, value = "单据编号") @RequestParam(required = false) String billNo,
+            @ApiParam(required = false, value = "  OK通过  WAIT待审 FAIL 不通过") @RequestParam(required = false) String cancelStatus
+    ) throws Exception {
+        k3TransferLogic.examine(billNo,cancelStatus);
+        return ResponseHelper.success();
+    }
+
+
+
+
 }

+ 74 - 0
src/main/java/com/zfire/mall/manager/controller/wallet/WalletNewController.java

@@ -0,0 +1,74 @@
+package com.zfire.mall.manager.controller.wallet;
+
+import cn.hutool.core.lang.TypeReference;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.zfire.mall.manager.annotation.ZfireList;
+import com.zfire.mall.manager.bean.ExcelData;
+import com.zfire.mall.manager.bean.k3.KingDeeOtherStockInAdd;
+import com.zfire.mall.manager.bean.listV2.CustomerWalletAmountVO;
+import com.zfire.mall.manager.bean.listV2.WalletRebateVO;
+import com.zfire.mall.manager.bean.listV2.WalletSaleTypeRelaVO;
+import com.zfire.mall.manager.bean.listV2.dto.CustomerAmountDTO;
+import com.zfire.mall.manager.bean.wallet.CustomerWalletBean;
+import com.zfire.mall.manager.bean.wallet.RebateWalletSaleBean;
+import com.zfire.mall.manager.bean.wallet.WalletListBean;
+import com.zfire.mall.manager.bean.wallet.WalletRebateBean;
+import com.zfire.mall.manager.constant.Constant;
+import com.zfire.mall.manager.exception.RemoteServiceException;
+import com.zfire.mall.manager.helper.ResponseHelper;
+import com.zfire.mall.manager.logic.wallet.WalletLogic;
+import com.zfire.mall.manager.plus.entity.KingDeeWallet;
+import com.zfire.mall.manager.plus.entity.WalletRebate;
+import com.zfire.mall.manager.plus.entity.WalletRebateSaleType;
+import com.zfire.mall.manager.utils.excel.ExcelUtils;
+import com.zfire.mall.manager.zfire.bean.ZfireParamBean;
+import com.zfire.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.beans.factory.annotation.Autowired;
+import org.springframework.integration.redis.util.RedisLockRegistry;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Lock;
+
+@Slf4j
+@RestController
+@Api(value = "钱包新增API", tags ={"钱包新增API"} )
+@RequestMapping(value = "/walletNew", produces = "application/json; charset=utf-8")
+public class WalletNewController {
+
+
+    @Autowired
+    WalletLogic walletLogic;
+    @Autowired
+    RedisLockRegistry redisLockRegistry;
+
+
+
+    @ApiOperation(value = "新增钱包")
+    @PostMapping("/add")
+    public ResponseHelper add(
+            @RequestBody KingDeeWallet kingDeeWallet
+    ) throws Exception {
+        walletLogic.addWallet(kingDeeWallet);
+        return ResponseHelper.success();
+    }
+
+    @ApiOperation(value = "修改其他入库单")
+    @PostMapping("/updateCustomer")
+    public ResponseHelper updateCustomer(
+            @RequestBody KingDeeWallet kingDeeWallet
+    ) throws Exception {
+        walletLogic.updateWallet(kingDeeWallet);
+        return ResponseHelper.success();
+    }
+
+
+}

+ 0 - 91
src/main/java/com/zfire/mall/manager/logic/customer/CustomerApplyLogic.java

@@ -1,91 +0,0 @@
-package com.zfire.mall.manager.logic.customer;
-
-import com.aliyuncs.utils.StringUtils;
-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.manage.customer.CustomerApplyBean;
-import com.zfire.mall.manager.exception.RemoteServiceException;
-import com.zfire.mall.manager.logic.common.CommonLogic;
-import com.zfire.mall.manager.plus.entity.CustomerApply;
-import com.zfire.mall.manager.plus.entity.CustomerApplyFollow;
-import com.zfire.mall.manager.plus.service.CustomerApplyFollowService;
-import com.zfire.mall.manager.plus.service.CustomerApplyService;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.Date;
-import java.util.List;
-
-@Service
-@Slf4j
-public class CustomerApplyLogic {
-
-    @Autowired
-    CustomerApplyService customerApplyService;
-    @Autowired
-    CustomerApplyFollowService customerApplyFollowService;
-    @Autowired
-    CommonLogic commonLogic;
-
-
-
-    public void add(CustomerApply customerApply){
-        String customerName = customerApply.getCustomerName();
-        Integer count = customerApplyService.lambdaQuery().eq(CustomerApply::getCustomerName, customerName).count();
-        if(count > 0){
-            throw new RemoteServiceException(customerName + "已申请入驻,请耐心等待消息");
-        }
-        customerApply.insert();
-    }
-
-    public IPage<CustomerApply> list(String customerName,String linkName,String linkPhone,String email,Integer pageNo,Integer pageSize){
-        IPage<CustomerApply> page = customerApplyService.lambdaQuery()
-                .like(StringUtils.isNotEmpty(customerName), CustomerApply::getCustomerName, customerName)
-                .like(StringUtils.isNotEmpty(linkName), CustomerApply::getLinkName, linkName)
-                .like(StringUtils.isNotEmpty(linkPhone), CustomerApply::getLinkPhone, linkPhone)
-                .like(StringUtils.isNotEmpty(email), CustomerApply::getEmail, email)
-                .orderByDesc(CustomerApply::getCreateTime)
-                .page(new Page<>(pageNo, pageSize));
-        return page;
-    }
-
-
-    public CustomerApplyBean detail(String id){
-        CustomerApply customerApply = customerApplyService.getById(id);
-        CustomerApplyBean customerApplyBean = new CustomerApplyBean();
-        BeanUtils.copyProperties(customerApply,customerApplyBean);
-        //跟进记录
-        List<CustomerApplyFollow> list = customerApplyFollowService.lambdaQuery()
-                .eq(CustomerApplyFollow::getCustomerApplyId, id)
-                .orderByDesc(CustomerApplyFollow::getCreateTime)
-                .list();
-        customerApplyBean.setCustomerApplyFollows(list);
-        return customerApplyBean;
-    }
-
-    @Transactional
-    public void follow(String id,Integer status,String remark){
-        CustomerApply customerApply = customerApplyService.getById(id);
-        if(customerApply.getStatus() == 2){
-            throw new RemoteServiceException("已关闭的信息不可跟进");
-        }
-        AdminUserCom adminUser = commonLogic.getAdminUser();
-        CustomerApplyFollow bean = new CustomerApplyFollow();
-        bean.setCustomerApplyId(id);
-        bean.setStatus(status);
-        bean.setRemark(remark);
-        bean.setFollowName(adminUser.getNickName());
-        bean.setFollowTime(new Date());
-        bean.insert();
-
-        customerApply.setLastFollowerName(bean.getFollowName());
-        customerApply.setLastFollowerTime(bean.getFollowTime());
-        customerApply.updateById();
-    }
-
-
-}

+ 0 - 180
src/main/java/com/zfire/mall/manager/logic/front/CustomerCodeLogic.java

@@ -1,180 +0,0 @@
-package com.zfire.mall.manager.logic.front;
-
-
-import cn.hutool.poi.excel.ExcelReader;
-import cn.hutool.poi.excel.ExcelUtil;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
-import com.baomidou.mybatisplus.core.toolkit.IdWorker;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.zfire.mall.manager.bean.admin.AdminUserCom;
-import com.zfire.mall.manager.bean.front.*;
-import com.zfire.mall.manager.bean.pick.PickManagerBeanVO;
-import com.zfire.mall.manager.commonmapper.front.CustomerFrontMapper;
-import com.zfire.mall.manager.logic.common.CommonLogic;
-import com.zfire.mall.manager.plus.entity.CustomerCode;
-import com.zfire.mall.manager.plus.entity.CustomerCodeCheck;
-import com.zfire.mall.manager.plus.entity.KingDeeCustomer;
-import com.zfire.mall.manager.plus.service.CustomerCodeCheckService;
-import com.zfire.mall.manager.plus.service.CustomerCodeService;
-import com.zfire.mall.manager.plus.service.KingDeeCustomerService;
-import com.zfire.mall.manager.zfire.bean.ZfireParamBean;
-import com.zfire.mall.manager.zfire.util.FieldUtils;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-@Service
-@Slf4j
-public class CustomerCodeLogic {
-
-    @Autowired
-    CustomerFrontMapper customerFrontMapper;
-
-    @Autowired
-    CommonLogic commonLogic;
-
-    @Autowired
-    CustomerCodeService customerCodeService;
-
-    @Autowired
-    CustomerCodeCheckService customerCodeCheckService;
-
-    @Autowired
-    KingDeeCustomerService kingDeeCustomerService;
-
-    public IPage<CustomerCodeVO> listV2(ZfireParamBean zfireParamBean) {
-        AdminUserCom adminUser = commonLogic.getAdminUser();
-        List<String> customers=new ArrayList<>();
-        if (adminUser.getIsCustomer()) {
-            KingDeeCustomer kingDeeCustomer = kingDeeCustomerService.getById(adminUser.getCustomerId());
-            customers.add(kingDeeCustomer.getName());
-            if (kingDeeCustomer.getJiaxianType().equals("KING")){
-                List<KingDeeCustomer> list = kingDeeCustomerService.lambdaQuery().eq(KingDeeCustomer::getHigherPrantNumber, adminUser.getCustomerNumber()).list();
-                if (CollectionUtils.isNotEmpty(list)){
-                    list.stream().forEach(item -> customers.add(item.getName()));
-                }
-            }
-        }
-        zfireParamBean = FieldUtils.supplyParam(zfireParamBean);
-        IPage<CustomerCodeVO> customerCodeVOIPage = customerFrontMapper.listV2(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()),
-                zfireParamBean,customers);
-        return customerCodeVOIPage;
-    }
-
-    public IPage<CustomerCodeCustomerVO> listCustomer(ZfireParamBean zfireParamBean) {
-        AdminUserCom adminUser = commonLogic.getAdminUser();
-        List<String> customers=new ArrayList<>();
-        if (adminUser.getIsCustomer()) {
-            KingDeeCustomer kingDeeCustomer = kingDeeCustomerService.getById(adminUser.getCustomerId());
-            customers.add(kingDeeCustomer.getName());
-            if (kingDeeCustomer.getJiaxianType().equals("KING")){
-                List<KingDeeCustomer> list = kingDeeCustomerService.lambdaQuery().eq(KingDeeCustomer::getHigherPrantNumber, adminUser.getCustomerNumber()).list();
-                if (CollectionUtils.isNotEmpty(list)){
-                    list.stream().forEach(item -> customers.add(item.getName()));
-                }
-            }
-        }
-        zfireParamBean = FieldUtils.supplyParam(zfireParamBean);
-        IPage<CustomerCodeCustomerVO> customerCodeVOIPage = customerFrontMapper.listCustomer(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()),
-                zfireParamBean,customers);
-        return customerCodeVOIPage;
-    }
-
-    public void importData(InputStream inputStream, HttpServletRequest request) {
-        //读取excel数据
-        Long start, end;
-        start = System.currentTimeMillis();
-        ExcelReader reader = ExcelUtil.getReader(inputStream);
-        reader.addHeaderAlias("条形码", "barCode");
-        reader.addHeaderAlias("产品名称", "specification");
-        reader.addHeaderAlias("出库采集时间(2023-04-10 14:00:00)", "consignerTime");
-        reader.addHeaderAlias("销售公司", "salesCompany");
-        reader.addHeaderAlias("收货地址", "address");
-        reader.addHeaderAlias("发货日期(2023-04-10 14:00:00)", "deliveryTime");
-        reader.addHeaderAlias("订单号", "orderNumber");
-
-        List<CustomerCode> customerCodes = reader.readAll(CustomerCode.class);
-
-        end = System.currentTimeMillis();
-        log.info("Excel导入时长" + customerCodes.size() + "条数量," + "时间" + (end - start) + "ms");
-        //保存excel数据
-        String batch = IdWorker.getIdStr();
-        AdminUserCom adminUser = commonLogic.getAdminUser();
-        Date date = new Date();
-
-        customerCodes.stream().forEach(item -> {
-            item.setType("CUSTOMER");
-            item.setSalesCompany(adminUser.getCustomerName());
-            item.setSalesCompanyCode(adminUser.getCustomerNumber());
-
-        });
-
-        customerCodeService.saveBatch(customerCodes);
-
-    }
-
-    public IPage<CustomerCodeCustomerCheckVO> listCustomerCheck(ZfireParamBean zfireParamBean) {
-        AdminUserCom adminUser = commonLogic.getAdminUser();
-        List<String> customers=new ArrayList<>();
-        if (adminUser.getIsCustomer()) {
-            KingDeeCustomer kingDeeCustomer = kingDeeCustomerService.getById(adminUser.getCustomerId());
-            customers.add(kingDeeCustomer.getName());
-            if (kingDeeCustomer.getJiaxianType().equals("KING")){
-                List<KingDeeCustomer> list = kingDeeCustomerService.lambdaQuery().eq(KingDeeCustomer::getHigherPrantNumber, adminUser.getCustomerNumber()).list();
-                if (CollectionUtils.isNotEmpty(list)){
-                    list.stream().forEach(item -> customers.add(item.getName()));
-                }
-            }
-        }
-        zfireParamBean = FieldUtils.supplyParam(zfireParamBean);
-        IPage<CustomerCodeCustomerCheckVO> customerCodeVOIPage = customerFrontMapper.listCustomerCheck(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()),
-                zfireParamBean,customers);
-        return customerCodeVOIPage;
-    }
-
-    public void importCheck(InputStream inputStream, HttpServletRequest request) {
-        ExcelReader reader = ExcelUtil.getReader(inputStream);
-        reader.addHeaderAlias("条码", "barCode");
-        String batch = IdWorker.getIdStr();
-
-        AdminUserCom adminUser = commonLogic.getAdminUser();
-
-        List<CustomerCodeCheck> customerCodes = reader.readAll(CustomerCodeCheck.class);
-        for (CustomerCodeCheck customerCode : customerCodes) {
-            customerCode.setBatch(batch);
-            customerCode.setCustomerName(adminUser.getNickName());
-            customerCode.setCustomerNumber(adminUser.getUserName());
-            customerCode.setCustomerPhone(adminUser.getLinkPhone());
-            customerCode.setSalesCompany(adminUser.getCustomerName());
-            customerCode.setVerificationStatus(2);
-        }
-        customerCodeCheckService.saveBatch(customerCodes);
-        customerFrontMapper.updateBatch(batch);
-    }
-
-    public IPage<CustomerCodeVO> listDaCang(ZfireParamBean zfireParamBean) {
-        AdminUserCom adminUser = commonLogic.getAdminUser();
-        List<String> customers=new ArrayList<>();
-        if (adminUser.getIsCustomer()) {
-            KingDeeCustomer kingDeeCustomer = kingDeeCustomerService.getById(adminUser.getCustomerId());
-            customers.add(kingDeeCustomer.getName());
-            if (kingDeeCustomer.getJiaxianType().equals("KING")){
-                List<KingDeeCustomer> list = kingDeeCustomerService.lambdaQuery().eq(KingDeeCustomer::getHigherPrantNumber, adminUser.getCustomerNumber()).list();
-                if (CollectionUtils.isNotEmpty(list)){
-                    list.stream().forEach(item -> customers.add(item.getName()));
-                }
-            }
-        }
-        zfireParamBean = FieldUtils.supplyParam(zfireParamBean);
-        IPage<CustomerCodeVO> customerCodeVOIPage = customerFrontMapper.listDaCang(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()),
-                zfireParamBean,customers);
-        return customerCodeVOIPage;
-    }
-}

+ 0 - 280
src/main/java/com/zfire/mall/manager/logic/front/EquipmentCodeLogic.java

@@ -1,280 +0,0 @@
-package com.zfire.mall.manager.logic.front;
-
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.convert.Convert;
-import cn.hutool.http.HttpRequest;
-import cn.hutool.http.HttpUtil;
-import cn.hutool.json.JSONArray;
-import cn.hutool.json.JSONUtil;
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.IdWorker;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.zfire.mall.manager.bean.ExcelData;
-import com.zfire.mall.manager.bean.admin.AdminUserCom;
-import com.zfire.mall.manager.bean.front.CustomerOrderTrackTocBean;
-import com.zfire.mall.manager.bean.front.EquipmentCodeBatchTo;
-import com.zfire.mall.manager.bean.front.EquipmentCodeBatchVO;
-import com.zfire.mall.manager.bean.front.EquipmentCodeVO;
-import com.zfire.mall.manager.constant.Constant;
-import com.zfire.mall.manager.exception.RemoteServiceException;
-import com.zfire.mall.manager.logic.common.CommonLogic;
-import com.zfire.mall.manager.utils.excel.ExcelUtils;
-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 org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.*;
-
-@Service
-@Slf4j
-public class EquipmentCodeLogic {
-
-
-    @Value("${gongdan.url}")
-    private String k3CloudURL;
-
-    @Value("${equipment.code.url}")
-    private String equipmentCodeUrl;
-
-
-    @Autowired
-    private CommonLogic commonLogic;
-
-
-    /**
-     * 条码核验列表
-     * @return
-     */
-    public IPage<EquipmentCodeVO> list(String barCode, String orderNumber, Integer pageNo, String salesCompany, String address,
-                                       String startTime, String endTime, String verificationStartTime, String verificationEndTime, String productName,
-                                       String warehouse, String websitNumber, String workerName, Integer pageSize, HttpServletRequest request) {
-        try {
-            HashMap<String, Object> paramToken = new HashMap<>();
-            paramToken.put("key", equipmentCodeUrl);
-            String bodyParam = HttpRequest.get(k3CloudURL + Constant.SUPPLY_EXTERNAL_CODE_GET_TOKEN)
-                    .form(paramToken).execute().body();
-            Map<String, Object> smsRspParam = JSON.parseObject(bodyParam);
-
-            HashMap<String, Object> paramMap = new HashMap<>();
-            paramMap.put("barCode", barCode);
-            paramMap.put("orderNumber", orderNumber);
-            paramMap.put("pageNo", pageNo);
-            paramMap.put("salesCompany", salesCompany);
-            paramMap.put("address", address);
-            paramMap.put("startTime", startTime);
-            paramMap.put("endTime", endTime);
-            paramMap.put("verificationStartTime", verificationStartTime);
-            paramMap.put("verificationEndTime", verificationEndTime);
-            paramMap.put("productName", productName);
-            paramMap.put("warehouse", warehouse);
-            paramMap.put("websitNumber", websitNumber);
-            paramMap.put("workerName", workerName);
-            paramMap.put("pageSize", pageSize);
-            paramMap.put("request", request);
-            String body = HttpRequest.get(k3CloudURL + Constant.SUPPLY_EXTERNAL_CODE)
-                    .header("token", smsRspParam.get("data").toString())
-                    .form(paramMap).execute().body();
-
-            Map<String, Object> smsRsp = JSON.parseObject(body);
-            //获取数据
-            Object object = JSON.parseObject(smsRsp.get("data").toString()).get("records");
-            JSONArray jsonArray = JSONUtil.parseArray(object);
-            List<EquipmentCodeVO> equipmentCodeVOS = JSONUtil.toList(jsonArray, EquipmentCodeVO.class);
-            IPage<EquipmentCodeVO> equipmentCodeVOIPage = new Page<>();
-            equipmentCodeVOIPage.setRecords(equipmentCodeVOS);
-            equipmentCodeVOIPage.setTotal(Convert.toLong(JSON.parseObject(smsRsp.get("data").toString()).get("total")));
-            equipmentCodeVOIPage.setPages(Convert.toLong(JSON.parseObject(smsRsp.get("data").toString()).get("pages")));
-            equipmentCodeVOIPage.setCurrent(Convert.toLong(JSON.parseObject(smsRsp.get("data").toString()).get("current")));
-            equipmentCodeVOIPage.setSize(Convert.toLong(JSON.parseObject(smsRsp.get("data").toString()).get("size")));
-            return equipmentCodeVOIPage;
-        } catch (Exception e) {
-            throw new RemoteServiceException(e.getMessage());
-        }
-    }
-
-    public String importBatch(MultipartFile file, HttpServletRequest request) {
-        try {
-
-
-            //读取excel数据
-            Long start, end;
-            String batch = IdWorker.getIdStr();
-
-            start = System.currentTimeMillis();
-
-            List<Object> list = ExcelUtils.importExcel(file);
-
-            List<EquipmentCodeBatchTo> equipmentCodeChecks = new ArrayList<>();
-
-            AdminUserCom adminUser = commonLogic.getAdminUser();
-            for (int i = 0; i < list.size(); i++) {
-                List<String> row = (List<String>) list.get(i);
-
-                if (StringUtils.isEmpty(row.get(0))) {
-                    continue;
-                }
-
-                EquipmentCodeBatchTo bean = new EquipmentCodeBatchTo();
-                bean.setBatch(batch);
-                bean.setBarCode(row.get(0));
-                bean.setVerificationStatus(2);
-                bean.setVerificationTime(new Date());
-                bean.setCreateBy("供应链账号校验:"+adminUser.getNickName());
-                bean.setCreateByNumber("供应链账号校验:"+adminUser.getNickName());
-                bean.setCreateTime(new Date());
-                bean.setUpdateTime(new Date());
-
-
-                equipmentCodeChecks.add(bean);
-            }
-
-            String s = JSONUtil.toJsonStr(equipmentCodeChecks);
-
-
-            HashMap<String, Object> paramToken = new HashMap<>();
-            paramToken.put("key", equipmentCodeUrl);
-            String bodyParam = HttpRequest.get(k3CloudURL + Constant.SUPPLY_EXTERNAL_CODE_GET_TOKEN)
-                    .form(paramToken).execute().body();
-            Map<String, Object> smsRspParam = JSON.parseObject(bodyParam);
-
-            String body = HttpRequest.post(k3CloudURL + Constant.SUPPLY_EXTERNAL_CODE_IMPORT_BATCH)
-                    .header("token", smsRspParam.get("data").toString())
-                   .body(s)
-                    .execute().body();
-
-            Map<String, Object> smsRsp = JSON.parseObject(body);
-            //获取数据
-            return smsRsp.get("data").toString();
-        } catch (Exception e) {
-            throw new RemoteServiceException(e.getMessage());
-        }
-    }
-
-    public IPage<EquipmentCodeBatchVO> listBatch(String startTimeSingle, String batch, String barCode, Integer pageNo, String startTime,
-                                                 String endTime, Integer pageSize, HttpServletRequest request) {
-        try {
-
-
-            HashMap<String, Object> paramToken = new HashMap<>();
-            paramToken.put("key", equipmentCodeUrl);
-            String bodyParam = HttpRequest.get(k3CloudURL + Constant.SUPPLY_EXTERNAL_CODE_GET_TOKEN)
-                    .form(paramToken).execute().body();
-            Map<String, Object> smsRspParam = JSON.parseObject(bodyParam);
-
-            HashMap<String, Object> paramMap = new HashMap<>();
-            paramMap.put("barCode", barCode);
-            paramMap.put("startTimeSingle", startTimeSingle);
-            paramMap.put("pageNo", pageNo);
-            paramMap.put("batch", batch);
-            paramMap.put("startTime", startTime);
-            paramMap.put("endTime", endTime);
-            paramMap.put("pageSize", pageSize);
-            paramMap.put("request", request);
-            String body = HttpRequest.get(k3CloudURL + Constant.SUPPLY_EXTERNAL_CODE_CHECK)
-                    .header("token", smsRspParam.get("data").toString())
-                    .form(paramMap).execute().body();
-
-            Map<String, Object> smsRsp = JSON.parseObject(body);
-            //获取数据
-            Object object = JSON.parseObject(smsRsp.get("data").toString()).get("records");
-            JSONArray jsonArray = JSONUtil.parseArray(object);
-            List<EquipmentCodeBatchVO> equipmentCodeVOS = JSONUtil.toList(jsonArray, EquipmentCodeBatchVO.class);
-            IPage<EquipmentCodeBatchVO> equipmentCodeVOIPage = new Page<>();
-            equipmentCodeVOIPage.setRecords(equipmentCodeVOS);
-            equipmentCodeVOIPage.setTotal(Convert.toLong(JSON.parseObject(smsRsp.get("data").toString()).get("total")));
-            equipmentCodeVOIPage.setPages(Convert.toLong(JSON.parseObject(smsRsp.get("data").toString()).get("pages")));
-            equipmentCodeVOIPage.setCurrent(Convert.toLong(JSON.parseObject(smsRsp.get("data").toString()).get("current")));
-            equipmentCodeVOIPage.setSize(Convert.toLong(JSON.parseObject(smsRsp.get("data").toString()).get("size")));
-            return equipmentCodeVOIPage;
-        } catch (Exception e) {
-            throw new RemoteServiceException(e.getMessage());
-        }
-    }
-
-    public ExcelData exportBatch(String startTimeSingle, String batch, String barCode, Integer pageNo, String startTime, String endTime, Integer pageSize, HttpServletRequest request) {
-        try {
-
-            if (startTime == null)
-                throw new RemoteServiceException("筛选时间必填");
-
-
-            HashMap<String, Object> paramToken = new HashMap<>();
-            paramToken.put("key", equipmentCodeUrl);
-            String bodyParam = HttpRequest.get(k3CloudURL + Constant.SUPPLY_EXTERNAL_CODE_GET_TOKEN)
-                    .form(paramToken).execute().body();
-            Map<String, Object> smsRspParam = JSON.parseObject(bodyParam);
-
-            HashMap<String, Object> paramMap = new HashMap<>();
-            paramMap.put("barCode", barCode);
-            paramMap.put("startTimeSingle", startTimeSingle);
-            paramMap.put("pageNo", pageNo);
-            paramMap.put("batch", batch);
-            paramMap.put("startTime", startTime);
-            paramMap.put("endTime", endTime);
-            paramMap.put("pageSize", pageSize);
-            paramMap.put("request", request);
-            String body = HttpRequest.get(k3CloudURL + Constant.SUPPLY_EXTERNAL_CODE_CHECK_EXPORT)
-                    .header("token", smsRspParam.get("data").toString())
-                    .form(paramMap).execute().body();
-
-            Map<String, Object> smsRsp = JSON.parseObject(body);
-            //获取数据
-            ExcelData data = JSONUtil.toBean(smsRsp.get("data").toString(), ExcelData.class);
-
-            return data;
-        } catch (Exception e) {
-            throw new RemoteServiceException(e.getMessage());
-        }
-    }
-
-    public ExcelData export(String orderNumber, String salesCompany, String barCode, String address, String verificationStartTime, String startTime, String endTime,
-                            String verificationEndTime, String productName, String warehouse, String websitNumber, String workerName, HttpServletRequest request) {
-        try {
-
-            if (startTime == null)
-                throw new RemoteServiceException("筛选时间必填");
-
-
-            HashMap<String, Object> paramToken = new HashMap<>();
-            paramToken.put("key", equipmentCodeUrl);
-            String bodyParam = HttpRequest.get(k3CloudURL + Constant.SUPPLY_EXTERNAL_CODE_GET_TOKEN)
-                    .form(paramToken).execute().body();
-            Map<String, Object> smsRspParam = JSON.parseObject(bodyParam);
-
-
-            HashMap<String, Object> paramMap = new HashMap<>();
-            paramMap.put("barCode", barCode);
-            paramMap.put("orderNumber", orderNumber);
-            paramMap.put("salesCompany", salesCompany);
-            paramMap.put("address", address);
-            paramMap.put("startTime", startTime);
-            paramMap.put("endTime", endTime);
-            paramMap.put("verificationStartTime", verificationStartTime);
-            paramMap.put("verificationEndTime", verificationEndTime);
-            paramMap.put("productName", productName);
-            paramMap.put("warehouse", warehouse);
-            paramMap.put("websitNumber", websitNumber);
-            paramMap.put("workerName", workerName);
-            paramMap.put("request", request);
-            String url = k3CloudURL + Constant.SUPPLY_EXTERNAL_CODE_CHECK_EXPORT_CODE;
-            String body = HttpRequest.get(url)
-                    .header("token", smsRspParam.get("data").toString())
-                    .form(paramMap).execute().body();
-
-            Map<String, Object> smsRsp = JSON.parseObject(body);
-            //获取数据
-            ExcelData data = JSONUtil.toBean(smsRsp.get("data").toString(), ExcelData.class);
-
-            return data;
-        } catch (Exception e) {
-            throw new RemoteServiceException(e.getMessage());
-        }
-    }
-}

+ 8 - 0
src/main/java/com/zfire/mall/manager/logic/k3/K3CategoryLogic.java

@@ -50,4 +50,12 @@ public class K3CategoryLogic {
                 .orderByDesc(KingDeeCategory::getCreateTime).page(new Page<>(pageNum, pageSize));
         return page;
     }
+
+    public void edit(KingDeeCategory kingDeeCategory) {
+        kingDeeCategory.updateById();
+    }
+
+    public void add(KingDeeCategory kingDeeCategory) {
+        kingDeeCategory.insert();
+    }
 }

+ 60 - 0
src/main/java/com/zfire/mall/manager/logic/k3/K3CustomerLogic.java

@@ -407,4 +407,64 @@ public class K3CustomerLogic {
         k3CustomerVOIPage.setRecords(k3);
         return k3CustomerVOIPage;
     }
+
+    public void add(KingDeeCustomer kingDeeCustomer) {
+        kingDeeCustomer.insert();
+    }
+
+    public void updateCustomer(KingDeeCustomer kingDeeCustomer) {
+        kingDeeCustomer.updateById();
+    }
+
+    public void importData(List<Object> datas) {
+
+        int index = 1;
+
+        List<KingDeeCustomer> kingDeeCustomers = new ArrayList<>();
+
+        for(Object o : datas) {
+
+            index++;
+            List<Object> row = (List<Object>) o;
+            if (org.apache.commons.lang3.StringUtils.isEmpty((String) row.get(0)))
+                continue;
+
+            KingDeeCustomer kingDeeCustomer = new KingDeeCustomer();
+            kingDeeCustomer.setNumber((String) row.get(0));
+            kingDeeCustomer.setName((String)row.get(1));
+
+            if (StringUtils.isEmpty((String) row.get(0)) || StringUtils.isEmpty((String) row.get(1)))
+                throw new RemoteServiceException("第"+index+"行,经销商名称编号有误,请检查");
+
+            kingDeeCustomer.setSaleDeptNumber((String)row.get(2));
+            kingDeeCustomer.setSaleDeptName((String)row.get(3));
+
+
+            if (StringUtils.isEmpty((String)row.get(4)))
+                throw new RemoteServiceException("第"+index+"行,状态填入有误");
+
+            kingDeeCustomer.setForbidStatus(((String)row.get(4)).equals("启用")?"A":"B");
+
+            kingDeeCustomer.setInvoiceTitle((String)row.get(5));
+            kingDeeCustomer.setTaxNo((String)row.get(6));
+            kingDeeCustomer.setBank((String)row.get(7));
+            kingDeeCustomer.setBankAccount((String)row.get(8));
+            kingDeeCustomer.setInvoicePhone((String)row.get(9));
+            kingDeeCustomer.setInvoiceAddress((String)row.get(10));
+            kingDeeCustomer.setEmail((String)row.get(11));
+
+            if (StringUtils.isEmpty((String)row.get(12)) )
+                throw new RemoteServiceException("第"+index+"行,是否为集团公司(是/否)填入有误");
+
+            kingDeeCustomer.setIsGroupCompany(((String)row.get(12)).equals("是")?true:false);
+
+            if (StringUtils.isEmpty((String)row.get(13)) )
+                throw new RemoteServiceException("第"+index+"行,是否拥有转折让钱包权限(是/否)填入有误");
+            kingDeeCustomer.setIsZr(((String)row.get(13)).equals("是")?true:false);
+
+
+        }
+
+        kingDeeCustomerService.saveBatch(kingDeeCustomers);
+    }
 }

+ 79 - 8
src/main/java/com/zfire/mall/manager/logic/k3/K3MaterialLogic.java

@@ -1,5 +1,7 @@
 package com.zfire.mall.manager.logic.k3;
 
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUtil;
 import com.aliyuncs.utils.StringUtils;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
@@ -12,12 +14,10 @@ import com.zfire.mall.manager.commonmapper.K3Mapper;
 import com.zfire.mall.manager.commonmapper.listV2.CommonCMapper;
 import com.zfire.mall.manager.commonmapper.manage.material.ProductComposeReserveMapper;
 import com.zfire.mall.manager.constant.KingDeeCons;
+import com.zfire.mall.manager.exception.RemoteServiceException;
 import com.zfire.mall.manager.logic.common.CommonLogic;
 import com.zfire.mall.manager.logic.manage.product.category.ProductCategoryLogic;
-import com.zfire.mall.manager.plus.entity.KingDeeMaterial;
-import com.zfire.mall.manager.plus.entity.KingDeeWallet;
-import com.zfire.mall.manager.plus.entity.ProductCategory;
-import com.zfire.mall.manager.plus.entity.SaleType;
+import com.zfire.mall.manager.plus.entity.*;
 import com.zfire.mall.manager.plus.service.KingDeeMaterialService;
 import com.zfire.mall.manager.plus.service.KingDeeWalletService;
 import com.zfire.mall.manager.plus.service.SaleTypeService;
@@ -168,9 +168,80 @@ public class K3MaterialLogic {
     }
 
     public void edit(KingDeeMaterialBean kingDeeMaterialBean) {
-        kingDeeMaterialService.lambdaUpdate()
-                .set(KingDeeMaterial::getIsDisplace, kingDeeMaterialBean.getIsDisplace())
-                .eq(KingDeeMaterial::getId, kingDeeMaterialBean.getId())
-                .update();
+        kingDeeMaterialBean.updateById();
+    }
+
+    public void add(KingDeeMaterial kingDeeMaterial) {
+        kingDeeMaterial.insert();
+    }
+
+    public void importData(List<Object> datas) {
+
+
+        int index = 1;
+
+        List<KingDeeMaterial> kingDeeMaterials = new ArrayList<>();
+
+        for(Object o : datas) {
+
+            index++;
+            List<Object> row = (List<Object>) o;
+            if (org.apache.commons.lang3.StringUtils.isEmpty((String) row.get(0)))
+                continue;
+
+            KingDeeMaterial kingDeeMaterial = new KingDeeMaterial();
+            kingDeeMaterial.setNumber((String) row.get(0));
+            kingDeeMaterial.setName((String)row.get(1));
+
+            if (com.aliyuncs.utils.StringUtils.isEmpty((String) row.get(0)) || com.aliyuncs.utils.StringUtils.isEmpty((String) row.get(1)))
+                throw new RemoteServiceException("第"+index+"行,物料编号名称有误,请检查");
+
+            kingDeeMaterial.setOldNumber((String)row.get(2));
+            kingDeeMaterial.setSpecification((String)row.get(3));
+            if (com.aliyuncs.utils.StringUtils.isEmpty((String)row.get(4)))
+                throw new RemoteServiceException("第"+index+"行,状态填入有误");
+
+            kingDeeMaterial.setForbidStatus(((String)row.get(4)).equals("启用")?"A":"B");
+
+            kingDeeMaterial.setUseOrgId((String)row.get(5));
+            kingDeeMaterial.setUseOrgNumber((String)row.get(6));
+            kingDeeMaterial.setUseOrgName((String)row.get(7));
+            kingDeeMaterial.setCategoryNumber((String)row.get(8));
+            kingDeeMaterial.setCategoryName((String)row.get(9));
+            kingDeeMaterial.setBaseUnitCode((String)row.get(10));
+            kingDeeMaterial.setBaseUnitId((String)row.get(11));
+            kingDeeMaterial.setStoreUnitId((String)row.get(12));
+            kingDeeMaterial.setStoreUnitCode((String)row.get(13));
+            kingDeeMaterial.setSalePriceUnitId((String)row.get(14));
+            kingDeeMaterial.setSalePriceUnitCode((String)row.get(15));
+            kingDeeMaterial.setPurchasePriceUnitId((String)row.get(16));
+            kingDeeMaterial.setPurchasePriceUnitCode((String)row.get(17));
+
+            kingDeeMaterial.setTaxRateId((BigDecimal) row.get(18));
+
+            kingDeeMaterial.setMaterialGroupNumber((String) row.get(19));
+
+            kingDeeMaterial.setMaterialGroupName((String)row.get(20));
+            kingDeeMaterial.setLength((BigDecimal) row.get(21));
+            kingDeeMaterial.setVolume((BigDecimal)row.get(22));
+            kingDeeMaterial.setWidth((BigDecimal)row.get(23));
+            kingDeeMaterial.setHeight((BigDecimal)row.get(24));
+            kingDeeMaterial.setIsDisplace((StringUtils.isNotEmpty((String)row.get(25)) && ((String)row.get(25)).equals("是"))?true:false);
+            kingDeeMaterial.setCostPrice((BigDecimal)row.get(26));
+            kingDeeMaterial.setNjdmText((String)row.get(27));
+            kingDeeMaterial.setNjxhText((String)row.get(28));
+            kingDeeMaterial.setWjdmText((String)row.get(29));
+            kingDeeMaterial.setWjxhText((String)row.get(30));
+            kingDeeMaterial.setPjdmText((String)row.get(31));
+            kingDeeMaterial.setPjxh1Text((String)row.get(32));
+            kingDeeMaterial.setPjcspdmText((String)row.get(33));
+            kingDeeMaterial.setPjxh2Text((String)row.get(34));
+
+
+
+        }
+
+        kingDeeMaterialService.saveBatch(kingDeeMaterials);
+
     }
 }

+ 57 - 0
src/main/java/com/zfire/mall/manager/logic/k3/K3OtherStockInLogic.java

@@ -0,0 +1,57 @@
+package com.zfire.mall.manager.logic.k3;
+
+
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
+import com.zfire.mall.manager.bean.k3.KingDeeOtherStockInAdd;
+import com.zfire.mall.manager.plus.entity.KingDeeOtherStockIn;
+import com.zfire.mall.manager.plus.entity.KingDeeOtherStockInItem;
+import com.zfire.mall.manager.plus.service.KingDeeOtherStockInItemService;
+import com.zfire.mall.manager.plus.service.KingDeeOtherStockInService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+@Slf4j
+public class K3OtherStockInLogic {
+
+    @Autowired
+    KingDeeOtherStockInService kingDeeOtherStockInService;
+
+    @Autowired
+    KingDeeOtherStockInItemService kingDeeOtherStockInItemService;
+
+    public void add(KingDeeOtherStockInAdd kingDeePurchaseStockInAdd) {
+        kingDeePurchaseStockInAdd.setId(IdWorker.getIdStr());
+        kingDeePurchaseStockInAdd.setBillNo(kingDeePurchaseStockInAdd.getId());
+        kingDeePurchaseStockInAdd.insert();
+
+        for (KingDeeOtherStockInItem kingDeeOtherStockIn : kingDeePurchaseStockInAdd.getKingDeeOtherStockInItems()) {
+            kingDeeOtherStockIn.setBillNo(kingDeeOtherStockIn.getId());
+        }
+
+        kingDeeOtherStockInItemService.saveBatch(kingDeePurchaseStockInAdd.getKingDeeOtherStockInItems());
+
+    }
+
+    public void update(KingDeeOtherStockInAdd kingDeePurchaseStockInAdd) {
+
+        kingDeePurchaseStockInAdd.updateById();
+
+        kingDeeOtherStockInItemService.lambdaUpdate().eq(KingDeeOtherStockInItem::getBillNo,kingDeePurchaseStockInAdd.getBillNo())
+                .remove();
+
+        for (KingDeeOtherStockInItem kingDeeOtherStockIn : kingDeePurchaseStockInAdd.getKingDeeOtherStockInItems()) {
+            kingDeeOtherStockIn.setBillNo(kingDeeOtherStockIn.getId());
+        }
+
+        kingDeeOtherStockInItemService.saveBatch(kingDeePurchaseStockInAdd.getKingDeeOtherStockInItems());
+    }
+
+    public void examine(String billNo, String cancelStatus) {
+        KingDeeOtherStockIn kingDeeOtherStockIn = kingDeeOtherStockInService.getById(billNo);
+
+        kingDeeOtherStockIn.setCancelStatus(cancelStatus);
+        kingDeeOtherStockIn.updateById();
+    }
+}

+ 60 - 0
src/main/java/com/zfire/mall/manager/logic/k3/K3OtherStockOutLogic.java

@@ -0,0 +1,60 @@
+package com.zfire.mall.manager.logic.k3;
+
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
+import com.zfire.mall.manager.bean.k3.KingDeeOtherStockInAdd;
+import com.zfire.mall.manager.bean.k3.KingDeeOtherStockOutAdd;
+import com.zfire.mall.manager.plus.entity.KingDeeOtherStockIn;
+import com.zfire.mall.manager.plus.entity.KingDeeOtherStockInItem;
+import com.zfire.mall.manager.plus.entity.KingDeeOtherStockOut;
+import com.zfire.mall.manager.plus.entity.KingDeeOtherStockOutItem;
+import com.zfire.mall.manager.plus.service.KingDeeOtherStockOutItemService;
+import com.zfire.mall.manager.plus.service.KingDeeOtherStockOutService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+@Slf4j
+public class K3OtherStockOutLogic {
+
+
+    @Autowired
+    KingDeeOtherStockOutService kingDeeOtherStockInService;
+
+    @Autowired
+    KingDeeOtherStockOutItemService kingDeeOtherStockInItemService;
+
+    public void add(KingDeeOtherStockOutAdd kingDeeOtherStockOutAdd) {
+        kingDeeOtherStockOutAdd.setId(IdWorker.getIdStr());
+        kingDeeOtherStockOutAdd.setBillNo(kingDeeOtherStockOutAdd.getId());
+        kingDeeOtherStockOutAdd.insert();
+
+        for (KingDeeOtherStockOutItem kingDeeOtherStockOutItem : kingDeeOtherStockOutAdd.getKingDeeOtherStockOutItems()) {
+            kingDeeOtherStockOutItem.setBillNo(kingDeeOtherStockOutAdd.getId());
+        }
+
+        kingDeeOtherStockInItemService.saveBatch(kingDeeOtherStockOutAdd.getKingDeeOtherStockOutItems());
+
+    }
+
+    public void update(KingDeeOtherStockOutAdd kingDeeOtherStockOutAdd) {
+
+        kingDeeOtherStockOutAdd.updateById();
+
+        kingDeeOtherStockInItemService.lambdaUpdate().eq(KingDeeOtherStockOutItem::getBillNo,kingDeeOtherStockOutAdd.getBillNo())
+                .remove();
+
+        for (KingDeeOtherStockOutItem kingDeeOtherStockOutItem : kingDeeOtherStockOutAdd.getKingDeeOtherStockOutItems()) {
+            kingDeeOtherStockOutItem.setBillNo(kingDeeOtherStockOutAdd.getId());
+        }
+
+        kingDeeOtherStockInItemService.saveBatch(kingDeeOtherStockOutAdd.getKingDeeOtherStockOutItems());
+    }
+
+    public void examine(String billNo, String cancelStatus) {
+        KingDeeOtherStockOut kingDeeOtherStockOut = kingDeeOtherStockInService.getById(billNo);
+
+        kingDeeOtherStockOut.setCancelStatus(cancelStatus);
+        kingDeeOtherStockOut.updateById();
+    }
+}

+ 34 - 0
src/main/java/com/zfire/mall/manager/logic/k3/K3PurchaseStockInLogic.java

@@ -3,10 +3,12 @@ package com.zfire.mall.manager.logic.k3;
 
 import cn.hutool.core.date.DateUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.zfire.mall.manager.bean.ExcelData;
 import com.zfire.mall.manager.bean.direct.DirectTransferList;
 import com.zfire.mall.manager.bean.k3.*;
+import com.zfire.mall.manager.bean.stock.KingDeePurchaseStockInAdd;
 import com.zfire.mall.manager.commonmapper.manage.TransferMapper;
 import com.zfire.mall.manager.constant.KingDeeCons;
 import com.zfire.mall.manager.plus.entity.KingDeePurchaseOrder;
@@ -128,4 +130,36 @@ public class K3PurchaseStockInLogic {
     }
 
 
+    public void add(KingDeePurchaseStockInAdd kingDeePurchaseStockInAdd) {
+        kingDeePurchaseStockInAdd.setId(IdWorker.getIdStr());
+        kingDeePurchaseStockInAdd.setBillNo(kingDeePurchaseStockInAdd.getId());
+        kingDeePurchaseStockInAdd.insert();
+
+        for (KingDeePurchaseStockInItem kingDeePurchaseStockInItem : kingDeePurchaseStockInAdd.getKingDeePurchaseStockInItem()) {
+            kingDeePurchaseStockInItem.setBillNo(kingDeePurchaseStockInAdd.getBillNo());
+        }
+
+        kingDeePurchaseStockInItemService.saveBatch(kingDeePurchaseStockInAdd.getKingDeePurchaseStockInItem());
+    }
+
+    public void update(KingDeePurchaseStockInAdd kingDeePurchaseStockInAdd) {
+
+        kingDeePurchaseStockInAdd.updateById();
+
+        kingDeePurchaseStockInItemService.lambdaUpdate().eq(KingDeePurchaseStockInItem::getBillNo,kingDeePurchaseStockInAdd.getId())
+                .remove();
+
+        for (KingDeePurchaseStockInItem kingDeePurchaseStockInItem : kingDeePurchaseStockInAdd.getKingDeePurchaseStockInItem()) {
+            kingDeePurchaseStockInItem.setBillNo(kingDeePurchaseStockInAdd.getBillNo());
+        }
+
+        kingDeePurchaseStockInItemService.saveBatch(kingDeePurchaseStockInAdd.getKingDeePurchaseStockInItem());
+    }
+
+    public void examine(String billNo, String cancelStatus) {
+        KingDeePurchaseStockIn kingDeePurchaseStockIn = kingDeePurchaseStockInService.getById(billNo);
+
+        kingDeePurchaseStockIn.setCancelStatus(cancelStatus);
+        kingDeePurchaseStockIn.updateById();
+    }
 }

+ 57 - 0
src/main/java/com/zfire/mall/manager/logic/k3/K3PurchaseStockOutLogic.java

@@ -0,0 +1,57 @@
+package com.zfire.mall.manager.logic.k3;
+
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
+import com.zfire.mall.manager.bean.k3.KingDeePurchaseStockOutAdd;
+import com.zfire.mall.manager.plus.entity.KingDeePurchaseStockOut;
+import com.zfire.mall.manager.plus.entity.KingDeePurchaseStockOutItem;
+import com.zfire.mall.manager.plus.service.KingDeePurchaseStockOutItemService;
+import com.zfire.mall.manager.plus.service.KingDeePurchaseStockOutService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+@Slf4j
+public class K3PurchaseStockOutLogic {
+
+    @Autowired
+    KingDeePurchaseStockOutItemService kingDeePurchaseStockOutItemService;
+
+    @Autowired
+    KingDeePurchaseStockOutService kingDeePurchaseStockOutService;
+
+    public void add(KingDeePurchaseStockOutAdd kingDeePurchaseStockInAdd) {
+        kingDeePurchaseStockInAdd.setId(IdWorker.getIdStr());
+        kingDeePurchaseStockInAdd.setBillNo(IdWorker.getIdStr());
+        kingDeePurchaseStockInAdd.insert();
+
+        for (KingDeePurchaseStockOutItem kingDeePurchaseStockOutItem : kingDeePurchaseStockInAdd.getKingDeePurchaseStockOutItems()) {
+
+            kingDeePurchaseStockOutItem.setBillNo(kingDeePurchaseStockInAdd.getBillNo());
+        }
+
+        kingDeePurchaseStockOutItemService.saveBatch(kingDeePurchaseStockInAdd.getKingDeePurchaseStockOutItems());
+    }
+
+    public void update(KingDeePurchaseStockOutAdd kingDeePurchaseStockInAdd) {
+
+        kingDeePurchaseStockInAdd.updateById();
+
+        kingDeePurchaseStockOutItemService.lambdaUpdate()
+                .eq(KingDeePurchaseStockOutItem::getBillNo,kingDeePurchaseStockInAdd.getBillNo())
+                .remove();
+
+        for (KingDeePurchaseStockOutItem kingDeePurchaseStockOutItem : kingDeePurchaseStockInAdd.getKingDeePurchaseStockOutItems()) {
+
+            kingDeePurchaseStockOutItem.setBillNo(kingDeePurchaseStockInAdd.getBillNo());
+        }
+
+        kingDeePurchaseStockOutItemService.saveBatch(kingDeePurchaseStockInAdd.getKingDeePurchaseStockOutItems());
+    }
+
+    public void examine(String billNo, String cancelStatus) {
+        KingDeePurchaseStockOut kingDeePurchaseStockOut = kingDeePurchaseStockOutService.getById(billNo);
+        kingDeePurchaseStockOut.setCancelStatus(cancelStatus);
+        kingDeePurchaseStockOut.updateById();
+    }
+}

+ 15 - 0
src/main/java/com/zfire/mall/manager/logic/k3/K3ReceiptLogic.java

@@ -23,6 +23,7 @@ import com.zfire.mall.manager.logic.k3.bill.K3ReceiptBillLogic;
 import com.zfire.mall.manager.logic.wallet.WalletLogic;
 import com.zfire.mall.manager.plus.entity.CustomerWallet;
 import com.zfire.mall.manager.plus.entity.KingDeeReceipt;
+import com.zfire.mall.manager.plus.entity.KingDeeWallet;
 import com.zfire.mall.manager.plus.entity.ReceivableOrder;
 import com.zfire.mall.manager.plus.service.KingDeeCustomerService;
 import com.zfire.mall.manager.plus.service.KingDeeReceiptService;
@@ -469,4 +470,18 @@ public class K3ReceiptLogic {
         }
     }
 
+    public void add(KingDeeReceipt kingDeeWallet) {
+        kingDeeWallet.insert();
+    }
+
+    public void update(KingDeeReceipt kingDeeWallet) {
+        kingDeeWallet.updateById();
+    }
+
+    public void examine(String billNo, String cancelStatus) {
+
+        KingDeeWallet kingDeeWallet = kingDeeWalletService.getById(billNo);
+        kingDeeWallet.setForbidStatus(cancelStatus);
+        kingDeeWallet.updateById();
+    }
 }

+ 90 - 0
src/main/java/com/zfire/mall/manager/logic/k3/K3SupplierLogic.java

@@ -1,6 +1,8 @@
 package com.zfire.mall.manager.logic.k3;
 
 
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -8,6 +10,8 @@ import com.zfire.mall.manager.bean.k3.RequestApiBean;
 import com.zfire.mall.manager.bean.supplier.KingDeeSupplierVO;
 import com.zfire.mall.manager.commonmapper.CommonCountMapper;
 import com.zfire.mall.manager.constant.KingDeeCons;
+import com.zfire.mall.manager.exception.RemoteServiceException;
+import com.zfire.mall.manager.plus.entity.KingDeeCustomer;
 import com.zfire.mall.manager.plus.entity.KingDeeSupplier;
 import com.zfire.mall.manager.plus.service.KingDeeSupplierService;
 import com.zfire.mall.manager.zfire.bean.ZfireParamBean;
@@ -17,6 +21,8 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Objects;
 
@@ -73,4 +79,88 @@ public class K3SupplierLogic {
         zfireParamBean = FieldUtils.supplyParam(zfireParamBean);
         return commonCountMapper.listV2(new Page(zfireParamBean.getPageNum(),zfireParamBean.getPageSize()),zfireParamBean);
     }
+
+    public void add(KingDeeSupplier kingDeeSupplier) {
+        kingDeeSupplier.insert();
+    }
+
+    public void updateCustomer(KingDeeSupplier kingDeeSupplier) {
+        kingDeeSupplier.updateById();
+    }
+
+    public void importData(List<Object> datas) {
+
+        int index = 1;
+
+        List<KingDeeSupplier> kingDeeSuppliers = new ArrayList<>();
+
+        for(Object o : datas) {
+
+            index++;
+            List<Object> row = (List<Object>) o;
+            if (org.apache.commons.lang3.StringUtils.isEmpty((String) row.get(0)))
+                continue;
+
+            KingDeeSupplier kingDeeSupplier = new KingDeeSupplier();
+            kingDeeSupplier.setName((String) row.get(0));
+            kingDeeSupplier.setNumber((String)row.get(1));
+
+            if (com.aliyuncs.utils.StringUtils.isEmpty((String) row.get(0)) || com.aliyuncs.utils.StringUtils.isEmpty((String) row.get(1)))
+                throw new RemoteServiceException("第"+index+"行,供应商名称编号有误,请检查");
+
+            kingDeeSupplier.setUseOrgId((String)row.get(2));
+            kingDeeSupplier.setUseOrgNumber((String)row.get(3));
+            kingDeeSupplier.setUseOrgName((String)row.get(4));
+
+
+            if (com.aliyuncs.utils.StringUtils.isEmpty((String)row.get(5)))
+                throw new RemoteServiceException("第"+index+"行,状态填入有误");
+
+            kingDeeSupplier.setForbidStatus(((String)row.get(5)).equals("启用")?"A":"B");
+
+            kingDeeSupplier.setShortName((String)row.get(6));
+            kingDeeSupplier.setGroupNumber((String)row.get(7));
+            kingDeeSupplier.setGroupName((String)row.get(8));
+            kingDeeSupplier.setRegNumber((String)row.get(9));
+            kingDeeSupplier.setCountry((String)row.get(10));
+            kingDeeSupplier.setProvincial((String)row.get(11));
+            kingDeeSupplier.setAddress((String)row.get(12));
+            kingDeeSupplier.setZip((String)row.get(13));
+            kingDeeSupplier.setLanguage((String)row.get(14));
+            kingDeeSupplier.setWebSite((String)row.get(15));
+            kingDeeSupplier.setTrade((String)row.get(16));
+
+            try {
+                if (!StringUtils.isEmpty((String) row.get(17))) {
+                    DateTime parse = DateUtil.parse((String) row.get(17));
+                    kingDeeSupplier.setFoundDate(parse);
+                }
+            }catch (Exception e){
+                throw new RemoteServiceException("第"+index+"行,创立日期填入有误");
+            }
+
+
+
+
+            kingDeeSupplier.setLegalPerson((String)row.get(18));
+
+            kingDeeSupplier.setRegisterFund((BigDecimal) row.get(19));
+
+            kingDeeSupplier.setRegisterCode((String)row.get(20));
+            kingDeeSupplier.setTendPermit((String)row.get(21));
+            kingDeeSupplier.setSocialCreCode((String)row.get(22));
+            kingDeeSupplier.setRegisterAddress((String)row.get(23));
+            kingDeeSupplier.setDeptName((String)row.get(24));
+            kingDeeSupplier.setStaffName((String)row.get(25));
+            kingDeeSupplier.setSupplierClassify((String)row.get(26));
+            kingDeeSupplier.setSupplyClassify((String)row.get(27));
+            kingDeeSupplier.setSupplierGrade((String)row.get(28));
+            kingDeeSupplier.setCompanyClassify((String)row.get(29));
+            kingDeeSupplier.setCompanyNature((String)row.get(30));
+            kingDeeSupplier.setCompanyScale((String)row.get(31));
+
+        }
+
+        kingDeeSupplierService.saveBatch(kingDeeSuppliers);
+    }
 }

+ 31 - 4
src/main/java/com/zfire/mall/manager/logic/k3/K3TransferLogic.java

@@ -3,12 +3,10 @@ package com.zfire.mall.manager.logic.k3;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.zfire.mall.manager.bean.ExcelData;
-import com.zfire.mall.manager.bean.k3.KingDeePurchaseStockInBean;
-import com.zfire.mall.manager.bean.k3.KingTransfer;
-import com.zfire.mall.manager.bean.k3.KingTransferBean;
-import com.zfire.mall.manager.bean.k3.RequestApiBean;
+import com.zfire.mall.manager.bean.k3.*;
 import com.zfire.mall.manager.bean.pick.PickManagerBean;
 import com.zfire.mall.manager.commonmapper.manage.TransferMapper;
 import com.zfire.mall.manager.constant.KingDeeCons;
@@ -134,4 +132,33 @@ public class K3TransferLogic {
         return excelData;
     }
 
+    public void add(KingTransferAdd kingTransferAdd) {
+        kingTransferAdd.setId(IdWorker.getIdStr());
+        kingTransferAdd.setBillNo(kingTransferAdd.getId());
+        kingTransferAdd.insert();
+        for (KingDeeTransferItem kingDeeTransferItem : kingTransferAdd.getKingDeeTransferItems()) {
+            kingDeeTransferItem.setBillNo(kingTransferAdd.getId());
+        }
+
+        kingDeeTransferItemService.saveBatch(kingTransferAdd.getKingDeeTransferItems());
+    }
+
+    public void update(KingTransferAdd kingTransferAdd) {
+        kingTransferAdd.updateById();
+
+        kingDeeTransferItemService.lambdaUpdate().eq(KingDeeTransferItem::getBillNo,kingTransferAdd.getId()).remove();
+        for (KingDeeTransferItem kingDeeTransferItem : kingTransferAdd.getKingDeeTransferItems()) {
+            kingDeeTransferItem.setBillNo(kingTransferAdd.getId());
+        }
+
+        kingDeeTransferItemService.saveBatch(kingTransferAdd.getKingDeeTransferItems());
+
+    }
+
+    public void examine(String billNo, String cancelStatus) {
+
+        KingDeeTransfer kingDeeTransfer = kingDeeTransferService.getById(billNo);
+        kingDeeTransfer.setCancelStatus(cancelStatus);
+        kingDeeTransfer.updateById();
+    }
 }

+ 7 - 0
src/main/java/com/zfire/mall/manager/logic/wallet/WalletLogic.java

@@ -1982,4 +1982,11 @@ public class WalletLogic {
     }
 
 
+    public void addWallet(KingDeeWallet kingDeeWallet) {
+        kingDeeWallet.insert();
+    }
+
+    public void updateWallet(KingDeeWallet kingDeeWallet) {
+        kingDeeWallet.updateById();
+    }
 }

BIN
src/main/resources/template/供应商导入.xlsx


BIN
src/main/resources/template/物料导入.xlsx


BIN
src/main/resources/template/经销商导入.xlsx