Browse Source

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun

# Conflicts:
#	winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IWarehouseInOutInfoService.java
ccjgmwz 3 years ago
parent
commit
77f503e11d
14 changed files with 77 additions and 29 deletions
  1. 4 4
      pom.xml
  2. 1 1
      winsea-haixin-platform-backend/src/main/resources/application-prod.yml
  3. 8 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/WarehouseInOutInfoController.java
  4. 10 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/INewWorkflowService.java
  5. 2 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IWarehouseInOutInfoService.java
  6. 8 1
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/FreightReceivingDispatchingServiceImpl.java
  7. 5 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/NewWorkflowServiceImpl.java
  8. 3 2
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PurchaseClosingReportServiceImpl.java
  9. 2 2
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PurchaseOrderServiceImpl.java
  10. 3 6
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PurchaseReceiptReportServiceImpl.java
  11. 3 3
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SaleOrderServiceImpl.java
  12. 3 2
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SalesClosingReportServiceImpl.java
  13. 3 6
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SalesDeliveryReportServiceImpl.java
  14. 22 2
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseInOutInfoServiceImpl.java

+ 4 - 4
pom.xml

@@ -184,9 +184,7 @@
             <properties>
                 <env>local</env>
             </properties>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
+
         </profile>
         <profile>
             <id>dev</id>
@@ -205,7 +203,9 @@
             <properties>
                 <env>prod</env>
             </properties>
-
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
 
         </profile>
     </profiles>

+ 1 - 1
winsea-haixin-platform-backend/src/main/resources/application-prod.yml

@@ -7,7 +7,7 @@ spring:
   datasource:
     driver-class-name: com.mysql.jdbc.Driver
     password: Ccj841968545
-    url: jdbc:mysql://47.100.3.209:3306/yilaingyiyun?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://47.100.3.209:3306/ylyy?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
     username: root
   redis:
     database: 0

+ 8 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/WarehouseInOutInfoController.java

@@ -153,5 +153,13 @@ public class WarehouseInOutInfoController {
         return warehouseInOutInfoService.selectDistributeCar(contractNo);
     }
 
+
+    /**
+     *查循公司id
+     */
+    @GetMapping("/selectCompId")
+    public String selectCompId(String contractNo){
+        return warehouseInOutInfoService.selectCompId(contractNo);
+    }
 }
 

+ 10 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/INewWorkflowService.java

@@ -58,6 +58,16 @@ public interface INewWorkflowService {
      */
     Workflow findLatestWorkflowByBusinessCode(String businessCode);
 
+
+    /**
+     * 通过业务编码查询最新工作流<br/>
+     * 根据用户和角色查询
+     *
+     * @param businessCode 业务编码
+     * @return 最新关联工作流
+     */
+    Workflow findLatestWorkflowByBusinessCodeByApp(String compId ,String businessCode);
+
     /**
      * 通过业务编码和公司ID获取最新工作流
      *

+ 2 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IWarehouseInOutInfoService.java

@@ -99,4 +99,6 @@ public interface IWarehouseInOutInfoService extends IService<WarehouseInOutInfo>
      */
     List<WarehouseInOutInfo> selectDistributeCar(String contractNo);
     Integer selectCountByPhone(String phone);
+
+    String selectCompId(String contractNo);
 }

+ 8 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/FreightReceivingDispatchingServiceImpl.java

@@ -289,10 +289,17 @@ public class FreightReceivingDispatchingServiceImpl extends ServiceImpl<FreightR
         FreightReceivingDispatching freightReceivingDispatching = this.selectById(id);
         // 查看详情
         List<FreightReceivingDispatchingCar> freightReceivingDispatchingCars = freightReceivingDispatchingCarService.selectList(new EntityWrapper<FreightReceivingDispatchingCar>()
-                .eq("batch", freightReceivingDispatching.getBatch()));
+                .eq("batch", freightReceivingDispatching.getBatch())
+                .eq("delete_flag","0"));
         if (!CollectionUtils.isEmpty(freightReceivingDispatchingCars)){
             freightReceivingDispatching.setFreightReceivingDispatchingCars(freightReceivingDispatchingCars);
         }
+        List<ReceivingUser> receivingUsers=receivingUserService.selectList(new EntityWrapper<ReceivingUser>()
+                .eq("info_id", id)
+                .eq("delete_flag","0"));
+        if (!CollectionUtils.isEmpty(receivingUsers)){
+            freightReceivingDispatching.setReceivingUsers(receivingUsers);
+        }
         return freightReceivingDispatching;
     }
 }

+ 5 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/NewWorkflowServiceImpl.java

@@ -217,6 +217,11 @@ public class NewWorkflowServiceImpl implements INewWorkflowService {
         return workflowConfigService.findLatestWorkflowByBusinessCode(businessCode, getCurrentCompId(), getCurrentUserRoles());
     }
 
+    @Override
+    public Workflow findLatestWorkflowByBusinessCodeByApp(String compId ,String businessCode) {
+        return workflowConfigService.findLatestWorkflowByBusinessCode(businessCode, compId, getCurrentUserRoles());
+    }
+
     @Override
     public Workflow getLatestWorkflowByBusinessCodeAndCompId(String businessCode, String compId) {
         return workflowConfigService.getLatestWorkflowByBusinessCodeAndCompId(businessCode, compId);

+ 3 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PurchaseClosingReportServiceImpl.java

@@ -17,6 +17,7 @@ import com.yh.saas.plugin.yiliangyiyun.exception.YException;
 import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
 import com.yh.saas.plugin.yiliangyiyun.mapper.PurchaseClosingReportMapper;
 import com.yh.saas.plugin.yiliangyiyun.service.IContractManagementInfoService;
+import com.yh.saas.plugin.yiliangyiyun.service.INewWorkflowService;
 import com.yh.saas.plugin.yiliangyiyun.service.IPurchaseClosingReportService;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import com.yh.saas.toolkit.workflow.service.IWorkflowService;
@@ -43,7 +44,7 @@ import java.util.stream.Collectors;
 public class PurchaseClosingReportServiceImpl extends ServiceImpl<PurchaseClosingReportMapper, PurchaseClosingReport> implements IPurchaseClosingReportService {
 
     @Autowired
-    private IWorkflowService workflowService;
+    private INewWorkflowService workflowService;
 
     @SofaReference
     private ICommonRoleResourceService roleResourceService;
@@ -210,7 +211,7 @@ public class PurchaseClosingReportServiceImpl extends ServiceImpl<PurchaseClosin
             // 不是退回的单子
             if (isStartWorkflow) {
                 Workflow workflow = workflowService
-                        .findLatestWorkflowByBusinessCode("PROCUREMENT-CLOSE-REPORT");
+                        .findLatestWorkflowByBusinessCodeByApp(purchaseClosingReport.getCompId(),"PROCUREMENT-CLOSE-REPORT");
                 // 没配置审核流程,直接结束并处理信息
                 if (workflow == null) {
                     throw new YException(YExceptionEnum.PURCHASE_ORDER_ERROR);

+ 2 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PurchaseOrderServiceImpl.java

@@ -168,7 +168,7 @@ public class PurchaseOrderServiceImpl extends ServiceImpl<PurchaseOrderMapper, P
         // 不是退回的单子
         if (isStartWorkflow) {
             Workflow workflow = workflowService
-                    .findLatestWorkflowByBusinessCode("PROCUREMENT-CLOSE-REPORT");
+                    .findLatestWorkflowByBusinessCodeByApp(purchaseClosingReport.getCompId(),"PROCUREMENT-CLOSE-REPORT");
             // 没配置审核流程,直接结束并处理信息
             if (workflow == null) {
                 throw new YException(YExceptionEnum.PURCHASE_ORDER_ERROR);
@@ -574,7 +574,7 @@ public class PurchaseOrderServiceImpl extends ServiceImpl<PurchaseOrderMapper, P
         // 不是退回的单子
         if (isStartWorkflow) {
             Workflow workflow = workflowService
-                    .findLatestWorkflowByBusinessCode("PROCUREMENT-ORDER-APPROVE");
+                    .findLatestWorkflowByBusinessCodeByApp(purchaseOrder.getCompId(),"PROCUREMENT-ORDER-APPROVE");
             // 没配置审核流程,直接结束并处理信息
             if (workflow == null) {
                 throw new YException(YExceptionEnum.PURCHASE_ORDER_ERROR);

+ 3 - 6
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PurchaseReceiptReportServiceImpl.java

@@ -16,11 +16,8 @@ import com.yh.saas.plugin.yiliangyiyun.entity.*;
 import com.yh.saas.plugin.yiliangyiyun.exception.YException;
 import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
 import com.yh.saas.plugin.yiliangyiyun.mapper.PurchaseReceiptReportMapper;
-import com.yh.saas.plugin.yiliangyiyun.service.IContractManagementInfoService;
-import com.yh.saas.plugin.yiliangyiyun.service.IPurchaseOrderService;
-import com.yh.saas.plugin.yiliangyiyun.service.IPurchaseReceiptReportService;
+import com.yh.saas.plugin.yiliangyiyun.service.*;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
-import com.yh.saas.plugin.yiliangyiyun.service.IWarehouseInOutInfoService;
 import com.yh.saas.toolkit.workflow.service.IWorkflowService;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -45,7 +42,7 @@ import java.util.stream.Collectors;
 public class PurchaseReceiptReportServiceImpl extends ServiceImpl<PurchaseReceiptReportMapper, PurchaseReceiptReport> implements IPurchaseReceiptReportService {
 
     @Autowired
-    private IWorkflowService workflowService;
+    private INewWorkflowService workflowService;
 
     @SofaReference
     private ICommonRoleResourceService roleResourceService;
@@ -122,7 +119,7 @@ public class PurchaseReceiptReportServiceImpl extends ServiceImpl<PurchaseReceip
             // 不是退回的单子
             if (isStartWorkflow) {
                 Workflow workflow = workflowService
-                        .findLatestWorkflowByBusinessCode("PROCUREMENT-RECEIPT-REPORT");
+                        .findLatestWorkflowByBusinessCodeByApp(purchaseReceiptReport.getCompId(),"PROCUREMENT-RECEIPT-REPORT");
                 // 没配置审核流程,直接结束并处理信息
                 if (workflow == null) {
                     throw new YException(YExceptionEnum.PURCHASE_ORDER_ERROR);

+ 3 - 3
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SaleOrderServiceImpl.java

@@ -53,7 +53,7 @@ public class SaleOrderServiceImpl extends ServiceImpl<SaleOrderMapper, SaleOrder
     @Autowired
     private ISalesDeliveryReportService salesDeliveryReportService;
     @Autowired
-    private IWorkflowService workflowService;
+    private INewWorkflowService workflowService;
     @Autowired
     private GeTuiUtils geTuiUtils;
     @Autowired
@@ -221,7 +221,7 @@ public class SaleOrderServiceImpl extends ServiceImpl<SaleOrderMapper, SaleOrder
         // 不是退回的单子
         if (isStartWorkflow) {
             Workflow workflow = workflowService
-                    .findLatestWorkflowByBusinessCode("SALE-CLOSE-REPORT");
+                    .findLatestWorkflowByBusinessCodeByApp(salesClosingReport.getCompId(),"SALE-CLOSE-REPORT");
             // 没配置审核流程,直接结束并处理信息
             if (workflow == null) {
                 throw new YException(YExceptionEnum.PURCHASE_ORDER_ERROR);
@@ -469,7 +469,7 @@ public class SaleOrderServiceImpl extends ServiceImpl<SaleOrderMapper, SaleOrder
 //         不是退回的单子
         if (isStartWorkflow) {
             Workflow workflow = workflowService
-                    .findLatestWorkflowByBusinessCode("SALE-ORDER-APPROVE");
+                    .findLatestWorkflowByBusinessCodeByApp(saleOrder.getCompId(),"SALE-ORDER-APPROVE");
             // 没配置审核流程,直接结束并处理信息
             if (workflow == null) {
                 throw new YException(YExceptionEnum.PURCHASE_ORDER_ERROR);

+ 3 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SalesClosingReportServiceImpl.java

@@ -18,6 +18,7 @@ import com.yh.saas.plugin.yiliangyiyun.exception.YException;
 import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
 import com.yh.saas.plugin.yiliangyiyun.mapper.SalesClosingReportMapper;
 import com.yh.saas.plugin.yiliangyiyun.service.IContractManagementInfoService;
+import com.yh.saas.plugin.yiliangyiyun.service.INewWorkflowService;
 import com.yh.saas.plugin.yiliangyiyun.service.ISalesClosingReportService;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import com.yh.saas.toolkit.workflow.service.IWorkflowService;
@@ -44,7 +45,7 @@ import java.util.stream.Collectors;
 public class SalesClosingReportServiceImpl extends ServiceImpl<SalesClosingReportMapper, SalesClosingReport> implements ISalesClosingReportService {
 
     @Autowired
-    private IWorkflowService workflowService;
+    private INewWorkflowService workflowService;
     @Autowired
     private IContractManagementInfoService contractManagementInfoService;
 
@@ -120,7 +121,7 @@ public class SalesClosingReportServiceImpl extends ServiceImpl<SalesClosingRepor
             // 不是退回的单子
             if (isStartWorkflow) {
                 Workflow workflow = workflowService
-                        .findLatestWorkflowByBusinessCode("SALE-CLOSE-REPORT");
+                        .findLatestWorkflowByBusinessCodeByApp(salesClosingReport.getCompId(),"SALE-CLOSE-REPORT");
                 // 没配置审核流程,直接结束并处理信息
                 if (workflow == null) {
                     throw new YException(YExceptionEnum.PURCHASE_ORDER_ERROR);

+ 3 - 6
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SalesDeliveryReportServiceImpl.java

@@ -15,11 +15,8 @@ import com.yh.saas.plugin.yiliangyiyun.entity.*;
 import com.yh.saas.plugin.yiliangyiyun.exception.YException;
 import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
 import com.yh.saas.plugin.yiliangyiyun.mapper.SalesDeliveryReportMapper;
-import com.yh.saas.plugin.yiliangyiyun.service.IContractManagementInfoService;
-import com.yh.saas.plugin.yiliangyiyun.service.ISaleOrderService;
-import com.yh.saas.plugin.yiliangyiyun.service.ISalesDeliveryReportService;
+import com.yh.saas.plugin.yiliangyiyun.service.*;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
-import com.yh.saas.plugin.yiliangyiyun.service.IWarehouseInOutInfoService;
 import com.yh.saas.toolkit.workflow.service.IWorkflowService;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -43,7 +40,7 @@ import java.util.stream.Collectors;
 @Service
 public class SalesDeliveryReportServiceImpl extends ServiceImpl<SalesDeliveryReportMapper, SalesDeliveryReport> implements ISalesDeliveryReportService {
     @Autowired
-    private IWorkflowService workflowService;
+    private INewWorkflowService workflowService;
     @SofaReference
     private ICommonRoleResourceService roleResourceService;
     @Autowired
@@ -197,7 +194,7 @@ public class SalesDeliveryReportServiceImpl extends ServiceImpl<SalesDeliveryRep
             // 不是退回的单子
             if (isStartWorkflow) {
                 Workflow workflow = workflowService
-                        .findLatestWorkflowByBusinessCode("SALE-RECEIPT-REPORT");
+                        .findLatestWorkflowByBusinessCodeByApp(salesDeliveryReport.getCompId(),"SALE-RECEIPT-REPORT");
                 // 没配置审核流程,直接结束并处理信息
                 if (workflow == null) {
                     throw new YException(YExceptionEnum.PURCHASE_ORDER_ERROR);

+ 22 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseInOutInfoServiceImpl.java

@@ -66,6 +66,8 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
 
     @Autowired
     private INewWorkflowService workflowService;
+    @Autowired
+    private IContractManagementInfoService contractManagementInfoService;
 
     /**
      * 待完成页面列表
@@ -369,7 +371,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                     // 采购入库统计
                     PurchaseReceiptReport purchaseReceiptReport = new PurchaseReceiptReport();
                     purchaseReceiptReport.setId(IdGenerator.generateUUID());
-                    purchaseReceiptReport.setCompId(AuthSecurityUtils.getCurrentUserInfo().getCompId());
+                    purchaseReceiptReport.setCompId(warehouseBaseInfo.getCompId());
                     purchaseReceiptReport.setContractNo(warehouseInOutInfo.getContractNo());
                     purchaseReceiptReport.setGoodsName(warehouseInOutInfo.getGoodsName());
                     purchaseReceiptReport.setGoodsNameKey(warehouseInOutInfo.getGoodsNameKey());
@@ -486,7 +488,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                     // 销售出库统计
                     SalesDeliveryReport salesDeliveryReport = new SalesDeliveryReport();
                     salesDeliveryReport.setId(IdGenerator.generateUUID());
-                    salesDeliveryReport.setCompId(AuthSecurityUtils.getCurrentUserInfo().getCompId());
+                    salesDeliveryReport.setCompId(warehouseBaseInfo.getCompId());
                     salesDeliveryReport.setContractNo(warehouseInOutInfo.getContractNo());
                     salesDeliveryReport.setGoodsName(warehouseInOutInfo.getGoodsName());
                     salesDeliveryReport.setGoodsNameKey(warehouseInOutInfo.getGoodsNameKey());
@@ -614,6 +616,24 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
         List<WarehouseInOutInfo> dataList = baseMapper.selectInfoByKeyWord(pageView);
         return dataList;
     }
+
+    /**
+     * 根据合同号查询公司id
+     *
+     * @param contractNo
+     * @return
+     */
+    @Override
+    public String selectCompId(String contractNo) {
+        ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
+       .eq("contract_no",contractNo));
+        if(contractManagementInfo != null){
+            return contractManagementInfo.getCompId();
+        }
+       return "0" ;
+    }
+
+
     /**
      * 流转记录查询(临时仓库)
      *