ccjgmwz 3 лет назад
Родитель
Сommit
2068b4263e

+ 3 - 3
pom.xml

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

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

@@ -1,5 +1,5 @@
 server:
-  port: 8090
+  port: 9100
 
 spring:
   application:
@@ -7,7 +7,7 @@ spring:
   datasource:
     driver-class-name: com.mysql.jdbc.Driver
     password: Ccj841968545
-    url: jdbc:mysql://47.100.3.209:3306/yiliangyiyun_test?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

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

@@ -4,6 +4,7 @@ package com.yh.saas.plugin.yiliangyiyun.controller;
 
 import com.yh.saas.plugin.yiliangyiyun.entity.ContractManagementInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.WarehouseBaseInfo;
+import com.yh.saas.plugin.yiliangyiyun.entity.WarehouseInOutInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.view.WarehouseView;
 import com.yh.saas.plugin.yiliangyiyun.service.IWarehouseBaseInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -129,6 +130,15 @@ public class WarehouseBaseInfoController {
     public List<ContractManagementInfo> selectContractNoList(String compId,Integer flag) {
         return warehouseBaseInfoService.selectContractNoList(compId,flag);
     }
+    /**
+     * 获取检斤打印接口
+     * @param id
+     * @return
+     */
+    @GetMapping("/getPrintInfo")
+    public WarehouseInOutInfo getPrintInfo(String id) {
+        return warehouseBaseInfoService.getPrintInfo(id);
+    }
     /**
      * 查出库时的成本
      * @param contractNo,carNo

+ 4 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/WarehouseInOutInfo.java

@@ -258,6 +258,8 @@ public class WarehouseInOutInfo extends BaseModel<WarehouseInOutInfo> {
 
     @TableField(exist = false)
     private WarehouseInOutDetail warehouseInOutDetail;
+    @TableField(exist = false)
+    private String companyName;
 
     /**
      * 查询类型
@@ -321,6 +323,8 @@ public class WarehouseInOutInfo extends BaseModel<WarehouseInOutInfo> {
     @TableField(exist = false)
     private String phone;
 
+    @TableField(exist = false)
+    private ContractManagementInfo contractManagementInfo;
     @Override
     protected Serializable pkVal() {
         return this.id;

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

@@ -3,6 +3,7 @@ package com.yh.saas.plugin.yiliangyiyun.service;
 import com.yh.saas.plugin.yiliangyiyun.entity.ContractManagementInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.WarehouseBaseInfo;
 import com.baomidou.mybatisplus.service.IService;
+import com.yh.saas.plugin.yiliangyiyun.entity.WarehouseInOutInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.view.WarehouseView;
 
 import java.util.List;
@@ -90,6 +91,12 @@ public interface IWarehouseBaseInfoService extends IService<WarehouseBaseInfo> {
      * @return
      */
     List<WarehouseBaseInfo> selectWarehouseSelf(String compId,String personCharge);
+    /**
+     * 获取打印数据
+     * @param id
+     * @return
+     */
+    WarehouseInOutInfo getPrintInfo(String id);
     /**
      * 查出库时的成本
      *

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

@@ -3,9 +3,11 @@ package com.yh.saas.plugin.yiliangyiyun.service.impl;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.fasterxml.jackson.databind.BeanProperty;
+import com.winsea.svc.base.base.entity.CommonCompany;
 import com.winsea.svc.base.base.entity.CommonRole;
 import com.winsea.svc.base.base.entity.CommonStaff;
 import com.winsea.svc.base.base.entity.CommonStaffRole;
+import com.winsea.svc.base.base.service.ICommonCompanyService;
 import com.winsea.svc.base.base.service.ICommonRoleService;
 import com.winsea.svc.base.base.service.ICommonStaffRoleService;
 import com.winsea.svc.base.base.service.ICommonStaffService;
@@ -46,6 +48,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
     @Autowired
     private IWarehouseInOutInfoService warehouseInOutInfoService;
     @Autowired
+    private ICommonCompanyService commonCompanyService;
+    @Autowired
     private IWarehousePositionStorageInfoService warehousePositionStorageInfoService;
     @Autowired
     private IWarehouseBaseInfoService warehouseBaseInfoService;
@@ -1086,6 +1090,19 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         return warehouseBaseInfoList;
     }
 
+    @Override
+    public WarehouseInOutInfo getPrintInfo(String id) {
+        WarehouseInOutInfo warehouseInOutInfo = warehouseInOutInfoService.selectById(id);
+        ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(
+                new EntityWrapper<ContractManagementInfo>()
+                        .eq("contract_no",warehouseInOutInfo.getContractNo())
+                        .eq("delete_flag",0));
+        warehouseInOutInfo.setContractManagementInfo(contractManagementInfo);
+        CommonCompany commonCompany = commonCompanyService.selectById(contractManagementInfo.getCompId());
+        warehouseInOutInfo.setCompanyName(commonCompany.getCompName());
+        return warehouseInOutInfo;
+    }
+
     @Override
     public Float selectCost(String contractNo, String carNo) {
         Float cost=0f;

+ 38 - 34
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WeighingManagementServiceImpl.java

@@ -131,40 +131,44 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
 //            qualityInspectionManagement.setStatusFlag(StatusEnum.WEIGHED_GROSS_WEIGHT.getFlag());
             qualityInspectionManagementService.updateById(qualityInspectionManagement);
         }
-        if ("3".equals(weighingManagement.getManagementType())){
-            WeighingManagement weighingManagement1=this.selectById(weighingManagement.getId());
-            //查关联的收款信息
-            PaymentManagement paymentManagement=paymentManagementService.selectOne(new EntityWrapper<PaymentManagement>()
-                    .eq("relation_id",weighingManagement1.getRelationId()));
-            if (paymentManagement!=null){
-                paymentManagement.setNetWeight(weighingManagement.getGrossWeight());
-                paymentManagementService.updateById(paymentManagement);
-            }
-            else {
-                //生成收款信息
-                PaymentManagement paymentManagement1=new PaymentManagement();
-                paymentManagement1.setId(IdGenerator.generateUUID());
-                paymentManagement1.setRelationId(weighingManagement1.getRelationId());
-                paymentManagement1.setCompId(weighingManagement1.getCompId());
-                paymentManagement1.setCarNo(weighingManagement1.getCarNumber());
-                paymentManagement1.setGoodsName(weighingManagement1.getGoodsName());
-                paymentManagement1.setContractNo(weighingManagement1.getContractNo());
-                paymentManagement1.setGrossWeight(weighingManagement.getGrossWeight());
-                paymentManagement1.setTare(weighingManagement1.getTare());
-                paymentManagement1.setNetWeight(weighingManagement.getNetWeight());
-                //计算应收
-                paymentManagement1.setCalculationCollectable(weighingManagement1.getContractPrice()*weighingManagement.getNetWeight());
-                //实际应收
-                paymentManagement1.setActualCollectionment(paymentManagement1.getCalculationCollectable());
-                //未收
-                paymentManagement1.setAmountNotCollectable(paymentManagement1.getCalculationCollectable());
-                //已收
-                paymentManagement1.setAmountEdCollectionable(0.0f);
-                paymentManagement1.setManagementType("3");
-                paymentManagement1.setWarehouseName(weighingManagement1.getWarehouseName());
-                paymentManagementService.insert(paymentManagement1);
-            }
-        }
+//        if ("3".equals(weighingManagement.getManagementType())){
+//
+//
+//
+//            WeighingManagement weighingManagement1=this.selectById(weighingManagement.getId());
+//            //查关联的收款信息
+//            PaymentManagement paymentManagement=paymentManagementService.selectOne(new EntityWrapper<PaymentManagement>()
+//                    .eq("relation_id",weighingManagement1.getRelationId()));
+//            if (paymentManagement!=null){
+//                paymentManagement.setNetWeight(weighingManagement.getGrossWeight());
+//                paymentManagementService.updateById(paymentManagement);
+//            }
+//            else {
+//                //生成收款信息
+//                PaymentManagement paymentManagement1=new PaymentManagement();
+//                paymentManagement1.setId(IdGenerator.generateUUID());
+//                paymentManagement1.setRelationId(weighingManagement1.getRelationId());
+//                paymentManagement1.setCompId(weighingManagement1.getCompId());
+//                paymentManagement1.setCarNo(weighingManagement1.getCarNumber());
+//                paymentManagement1.setGoodsName(weighingManagement1.getGoodsName());
+//                paymentManagement1.setContractNo(weighingManagement1.getContractNo());
+//                paymentManagement1.setGrossWeight(weighingManagement.getGrossWeight());
+//                paymentManagement1.setTare(weighingManagement1.getTare());
+//                paymentManagement1.setNetWeight(weighingManagement.getNetWeight());
+//                //计算应收
+//                paymentManagement1.setCalculationCollectable(weighingManagement1.getContractPrice()*weighingManagement.getNetWeight());
+//                //实际应收
+//                paymentManagement1.setActualCollectionment(paymentManagement1.getCalculationCollectable());
+//                //未收
+//                paymentManagement1.setAmountNotCollectable(paymentManagement1.getCalculationCollectable());
+//                //已收
+//                paymentManagement1.setAmountEdCollectionable(0.0f);
+//                paymentManagement1.setManagementType("3");
+//                paymentManagement1.setWarehouseName(weighingManagement1.getWarehouseName());
+//                paymentManagementService.insert(paymentManagement1);
+//            }
+//        }
+//
         boolean one = this.updateById(weighingManagement);
         if (one) {
             return "OK";