zhangyuewww 3 năm trước cách đây
mục cha
commit
4dbf05861e

+ 25 - 3
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/OpenServiceInfoController.java

@@ -1,9 +1,11 @@
 package com.yh.saas.plugin.yiliangyiyun.controller;
 
 
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RestController;
+import com.baomidou.mybatisplus.plugins.Page;
+import com.yh.saas.plugin.yiliangyiyun.entity.OpenServiceInfo;
+import com.yh.saas.plugin.yiliangyiyun.service.IOpenServiceInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * <p>
@@ -16,6 +18,26 @@ import org.springframework.web.bind.annotation.RestController;
 @RestController
 @RequestMapping("/openServiceInfo")
 public class OpenServiceInfoController {
+    @Autowired
+    private IOpenServiceInfoService iOpenServiceInfoService;
+    /**
+     * 开通业务列表
+     * @param openServiceInfo
+     * @return
+     */
+    @GetMapping("/selectOpenServiceInfo")
+    public Page<OpenServiceInfo> selectOpenServiceInfo(OpenServiceInfo openServiceInfo) {
+        return iOpenServiceInfoService.selectOpenServiceInfo(openServiceInfo);
+    }
+    /**
+     * 添加
+     * @param openServiceInfo
+     * @return
+     */
+    @PostMapping("/api/addInfo")
+    public String addInfo(@RequestBody OpenServiceInfo openServiceInfo) {
+        return iOpenServiceInfoService.addInfo(openServiceInfo);
+    }
 
 }
 

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

@@ -223,6 +223,34 @@ public class WarehouseInOutInfo extends BaseModel<WarehouseInOutInfo> {
      * 扣款项
      */
     private String deductionItems;
+    /**
+     * 类型 潮粮/干粮
+     */
+    private String type;
+    /**
+     * 扣重比
+     */
+    private Float buckleWeightRatio;
+    /**
+     * 潮粮水分
+     */
+    private String tidalGrainWater;
+    /**
+     * 干粮水分
+     */
+    private String solidGrainWater;
+    /**
+     * 纯重(吨)
+     */
+    private Float pureWeight;
+    /**
+     * 成本
+     */
+    private Float cost;
+    /**
+     * 运费
+     */
+    private Float freight;
 
     @TableField(exist = false)
     private WarehouseInOutDetail warehouseInOutDetail;

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

@@ -1,5 +1,6 @@
 package com.yh.saas.plugin.yiliangyiyun.service;
 
+import com.baomidou.mybatisplus.plugins.Page;
 import com.yh.saas.plugin.yiliangyiyun.entity.OpenServiceInfo;
 import com.baomidou.mybatisplus.service.IService;
 
@@ -12,5 +13,16 @@ import com.baomidou.mybatisplus.service.IService;
  * @since 2021-10-08
  */
 public interface IOpenServiceInfoService extends IService<OpenServiceInfo> {
+    /**
+     *
+     * 开通业务列表
+     * @param openServiceInfo
+     */
+    Page<OpenServiceInfo> selectOpenServiceInfo(OpenServiceInfo openServiceInfo);
+    /**
+     * 添加
+     * @param openServiceInfo
+     */
+    String addInfo(OpenServiceInfo openServiceInfo);
 
 }

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

@@ -1,11 +1,16 @@
 package com.yh.saas.plugin.yiliangyiyun.service.impl;
 
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.plugins.Page;
+import com.yh.saas.common.support.util.IdGenerator;
 import com.yh.saas.plugin.yiliangyiyun.entity.OpenServiceInfo;
 import com.yh.saas.plugin.yiliangyiyun.mapper.OpenServiceInfoMapper;
 import com.yh.saas.plugin.yiliangyiyun.service.IOpenServiceInfoService;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  * 开通业务表 服务实现类
@@ -17,4 +22,33 @@ import org.springframework.stereotype.Service;
 @Service
 public class OpenServiceInfoServiceImpl extends ServiceImpl<OpenServiceInfoMapper, OpenServiceInfo> implements IOpenServiceInfoService {
 
+    /**
+     * 开通业务列表
+     * @param openServiceInfo
+     * @return
+     */
+    @Override
+    public Page<OpenServiceInfo> selectOpenServiceInfo(OpenServiceInfo openServiceInfo) {
+        Page<OpenServiceInfo> openServiceInfoPage = this.selectPage(openServiceInfo.getQueryPage(), new EntityWrapper<OpenServiceInfo>()
+                .orderBy("update_date", false));
+        List<OpenServiceInfo> openServiceInfoList = openServiceInfoPage.getRecords();
+        openServiceInfoPage.setRecords(openServiceInfoList);
+        return openServiceInfoPage;
+    }
+    /**
+     * 添加
+     * @param openServiceInfo
+     * @return
+     */
+    @Override
+    public String addInfo(OpenServiceInfo openServiceInfo) {
+        // 新增主键id
+        openServiceInfo.setId(IdGenerator.generateUUID());
+        boolean one = this.insert(openServiceInfo);
+        if (one){
+           return "OK";
+        } else {
+            return "NG";
+        }
+    }
 }

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

@@ -618,6 +618,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         if (flag == null) {
             List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
                     .eq("comp_id", compId)
+                    .eq("status_flag", "1")
                     .eq("delete_flag", "0")
                     .orderBy("update_date", false));
 
@@ -631,6 +632,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
                     .eq("comp_id", compId)
                     .eq("contract_type", "2")
+                    .eq("status_flag", "1")
                     .eq("delete_flag", "0")
                     .orderBy("update_date", false));
             for (ContractManagementInfo contractManagementInfo : contractManagementInfoList) {
@@ -643,6 +645,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
                     .eq("comp_id", compId)
                     .eq("contract_type", "1")
+                    .eq("status_flag", "1")
                     .eq("delete_flag", "0")
                     .orderBy("update_date", false));
 
@@ -656,6 +659,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
                     .eq("comp_id", compId)
                     .eq("contract_type", "2")
+                    .eq("status_flag", "1")
                     .eq("delete_flag", "0")
                     .orderBy("update_date", false));
             if (!CollectionUtils.isEmpty(contractManagementInfoList)) {
@@ -681,6 +685,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
                     .eq("comp_id", compId)
                     .eq("contract_type", "1")
+                    .eq("status_flag", "1")
                     .eq("delete_flag", "0")
                     .orderBy("update_date", false));
             if (!CollectionUtils.isEmpty(contractManagementInfoList)) {
@@ -706,6 +711,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
                     .eq("comp_id", compId)
                     .eq("delete_flag", "0")
+                    .eq("status_flag", "1")
                     .eq("contract_type", "1")
                     .orderBy("update_date", false));
             for (ContractManagementInfo contractManagementInfo : contractManagementInfoList) {
@@ -731,10 +737,84 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             }
             return temp;
         }
+        //查采购合同编号(不包含自运),以及移库任务编号
+        else if(flag == 6){
+            List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
+                    .eq("comp_id", compId)
+                    .eq("delete_flag", "0")
+                    .eq("contract_type", "2")
+                    .eq("status_flag", "1")
+                    .eq("deliver_type", "2")
+                    .orderBy("update_date", false));
+            for (ContractManagementInfo contractManagementInfo : contractManagementInfoList) {
+                ContractGoodsInfo contractGoodsInfo=contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
+                        .eq("contract_id",contractManagementInfo.getId()));
+                contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
+                //期货取点价,现货取单价
+                contractManagementInfo.setContractPrice(contractManagementInfo.getPointPrice()!=null?contractManagementInfo.getPointPrice():Float.valueOf(String.valueOf(contractManagementInfo.getUnitContractPrice())));
+                temp.add(contractManagementInfo);
+            }
+            List<InOutWarehouseTask> inOutWarehouseTaskList = iInOutWarehouseTaskService.selectList(new EntityWrapper<InOutWarehouseTask>()
+                    .eq("comp_id", compId)
+                    .eq("delete_flag", "0")
+                    .eq("task_type_key", "3")
+                    .eq("in_out_flag", "1")
+                    .orderBy("update_date", false));
+            for (InOutWarehouseTask inOutWarehouseTask : inOutWarehouseTaskList) {
+                ContractManagementInfo contractManagementInfo = new ContractManagementInfo();
+                BeanUtils.copyProperties(inOutWarehouseTask, contractManagementInfo);
+                contractManagementInfo.setContractNo(inOutWarehouseTask.getMoveTaskNo());
+                contractManagementInfo.setContractPrice(inOutWarehouseTask.getUnitPrice());
+                temp.add(contractManagementInfo);
+            }
+            return temp;
+        }
+        //查采购合同编号(不包含自运),以及移库任务编号,销售合同
+        else if(flag == 7){
+            List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
+                    .eq("comp_id", compId)
+                    .eq("delete_flag", "0")
+                    .eq("contract_type", "2")
+                    .eq("status_flag", "1")
+                    .eq("deliver_type", "2")
+                    .orderBy("update_date", false));
+            for (ContractManagementInfo contractManagementInfo : contractManagementInfoList) {
+                ContractGoodsInfo contractGoodsInfo=contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
+                        .eq("contract_id",contractManagementInfo.getId()));
+                contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
+                //期货取点价,现货取单价
+                contractManagementInfo.setContractPrice(contractManagementInfo.getPointPrice()!=null?contractManagementInfo.getPointPrice():Float.valueOf(String.valueOf(contractManagementInfo.getUnitContractPrice())));
+                temp.add(contractManagementInfo);
+            }
+            List<ContractManagementInfo> contractManagementInfoList1 = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
+                    .eq("comp_id", compId)
+                    .eq("status_flag", "1")
+                    .eq("contract_type", "1")
+                    .eq("delete_flag", "0")
+                    .orderBy("update_date", false));
+            for (ContractManagementInfo contractManagementInfo1 : contractManagementInfoList1) {
+                temp.add(contractManagementInfo1);
+            }
+            List<InOutWarehouseTask> inOutWarehouseTaskList = iInOutWarehouseTaskService.selectList(new EntityWrapper<InOutWarehouseTask>()
+                    .eq("comp_id", compId)
+                    .eq("delete_flag", "0")
+                    .eq("task_type_key", "3")
+                    .eq("in_out_flag", "1")
+                    .orderBy("update_date", false));
+            for (InOutWarehouseTask inOutWarehouseTask : inOutWarehouseTaskList) {
+                ContractManagementInfo contractManagementInfo = new ContractManagementInfo();
+                BeanUtils.copyProperties(inOutWarehouseTask, contractManagementInfo);
+                contractManagementInfo.setContractNo(inOutWarehouseTask.getMoveTaskNo());
+                contractManagementInfo.setContractPrice(inOutWarehouseTask.getUnitPrice());
+                temp.add(contractManagementInfo);
+            }
+            return temp;
+        }
         //查采购、销售合同编号,以及移库任务编号
         else{
             List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
                     .eq("comp_id", compId)
+                    .eq("status_flag", "1")
                     .eq("delete_flag", "0")
                     .orderBy("update_date", false));
             for (ContractManagementInfo contractManagementInfo : contractManagementInfoList) {