zhangyuewww 1 年之前
父節點
當前提交
24c5adc059
共有 22 個文件被更改,包括 520 次插入34 次删除
  1. 1 1
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/GeneratorCodeByTables.java
  2. 2 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/constant/StatusEnum.java
  3. 2 2
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CommonUserController.java
  4. 25 1
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/TradeWarehouseReceiptApplController.java
  5. 37 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/WarehouseMonitorDetailController.java
  6. 39 1
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/RepaymentManagement.java
  7. 29 2
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/TradeWarehouseReceiptAppl.java
  8. 66 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/WarehouseMonitorDetail.java
  9. 2 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/TradeWarehouseReceiptApplMapper.java
  10. 16 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/WarehouseMonitorDetailMapper.java
  11. 1 1
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICommonUserService.java
  12. 5 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ITradeWarehouseReceiptApplService.java
  13. 19 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IWarehouseMonitorDetailService.java
  14. 7 2
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonUserServiceImpl.java
  15. 39 9
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/RepaymentManagementServiceImpl.java
  16. 83 1
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TradeWarehouseReceiptApplServiceImpl.java
  17. 29 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseMonitorDetailServiceImpl.java
  18. 3 5
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/workflow/TradeServicesListener.java
  19. 65 4
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/RepaymentManagementMapper.xml
  20. 41 4
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/TradeWarehouseReceiptApplMapper.xml
  21. 4 1
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseInOutInfoMapper.xml
  22. 5 0
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseMonitorDetailMapper.xml

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/GeneratorCodeByTables.java

@@ -53,7 +53,7 @@ public class GeneratorCodeByTables {
     }
     }
 
 
     public static void main(String[] args) throws IOException {
     public static void main(String[] args) throws IOException {
-        generateByTables("Gdc", "com.yh.saas.plugin.yiliangyiyun","warehouse_patrol_inspection_info");
+        generateByTables("Gdc", "com.yh.saas.plugin.yiliangyiyun","warehouse_monitor_detail");
     }
     }
 
 
     /**
     /**

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

@@ -138,6 +138,8 @@ public enum StatusEnum {
 
 
     //贸易仓单状态
     //贸易仓单状态
     TO_BE_TRADERETURN("3", "待还款", "to_be_tradereturn"),
     TO_BE_TRADERETURN("3", "待还款", "to_be_tradereturn"),
+    TRADERETURNED("5", "已还款", "tradereturned"),
+    END("7", "已结束", "end"),
     RETURN_TRADE_WAREHOUSE_RECEIPT("0", "已驳回", "return_trade_warehouse_receipt"),
     RETURN_TRADE_WAREHOUSE_RECEIPT("0", "已驳回", "return_trade_warehouse_receipt"),
 
 
     //收购信息状态
     //收购信息状态

+ 2 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CommonUserController.java

@@ -700,8 +700,8 @@ public class CommonUserController {
      * @return
      * @return
      */
      */
     @GetMapping("/getComp")
     @GetMapping("/getComp")
-    public List<CommonCompany> getComp() {
-        return commonUserService.getComp();
+    public List<CommonCompany> getComp(String compFax) {
+        return commonUserService.getComp(compFax);
     }
     }
 
 
     /**
     /**

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

@@ -88,7 +88,31 @@ public class TradeWarehouseReceiptApplController {
     public void deleteTrageInfo(@RequestBody TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl){
     public void deleteTrageInfo(@RequestBody TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl){
          tradeWarehouseReceiptApplService.deleteTrageInfo(tradeWarehouseReceiptAppl.getId());
          tradeWarehouseReceiptApplService.deleteTrageInfo(tradeWarehouseReceiptAppl.getId());
     }
     }
-
+    /**
+     * 列表
+     * @param tradeWarehouseReceiptAppl
+     * @return
+     */
+    @GetMapping("/selectmonitorList")
+    public List<TradeWarehouseReceiptAppl> selectmonitorList(TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl){
+        return tradeWarehouseReceiptApplService.selectmonitorList(tradeWarehouseReceiptAppl);
+    }
+    /**
+     * 借款公司下拉
+     * @param tradeWarehouseReceiptAppl
+     * @return
+     */
+    @GetMapping("/selectBorrowingCompany")
+    public List<TradeWarehouseReceiptAppl> selectBorrowingCompany(TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl){
+        return tradeWarehouseReceiptApplService.selectBorrowingCompany(tradeWarehouseReceiptAppl);
+    }
+    /**
+     * 计算在押重量
+     */
+    @GetMapping("/detainedWeight")
+    public Double detainedWeight(TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl) {
+        return tradeWarehouseReceiptApplService.detainedWeight(tradeWarehouseReceiptAppl);
+    }
 
 
 }
 }
 
 

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

@@ -0,0 +1,37 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import com.yh.saas.plugin.yiliangyiyun.entity.WarehouseMonitorDetail;
+import com.yh.saas.plugin.yiliangyiyun.service.IWarehouseMonitorDetailService;
+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.RestController;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 仓库监控明细表 前端控制器
+ * </p>
+ *
+ * @author Gdc
+ * @since 2023-07-07
+ */
+@RestController
+@RequestMapping("/warehouseMonitorDetail")
+public class WarehouseMonitorDetailController {
+    @Autowired
+    private IWarehouseMonitorDetailService warehouseMonitorDetailService;
+    /**
+     * 查看更多监控
+     *
+     * @return
+     */
+    @GetMapping("/getMonitor")
+    public List<WarehouseMonitorDetail> getMonitor(String warehouseId){
+        return warehouseMonitorDetailService.getMonitor(warehouseId);
+    }
+}
+

+ 39 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/RepaymentManagement.java

@@ -4,6 +4,7 @@ import java.util.Date;
 import com.baomidou.mybatisplus.activerecord.Model;
 import com.baomidou.mybatisplus.activerecord.Model;
 import java.io.Serializable;
 import java.io.Serializable;
 
 
+import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.annotations.TableName;
 import com.baomidou.mybatisplus.annotations.TableName;
 import com.baomidou.mybatisplus.annotations.Version;
 import com.baomidou.mybatisplus.annotations.Version;
@@ -45,6 +46,30 @@ public class RepaymentManagement extends BaseModel<RepaymentManagement> {
      * 贸易仓单id
      * 贸易仓单id
      */
      */
     private String tradeWarehouseReceiptId;
     private String tradeWarehouseReceiptId;
+    /**
+     * 银行id
+     */
+    private String bankId;
+    /**
+     * 付息标识(0还款1付息2放粮)
+     */
+    private String interestFlag;
+    /**
+     * 借款公司
+     */
+    private String borrowingCompany;
+    /**
+     * 借款仓库
+     */
+    private String borrowingWarehouse;
+    /**
+     * 货名
+     */
+    private String goodsName;
+    /**
+     * 备注
+     */
+    private String remark;
     /**
     /**
      * 合同编号
      * 合同编号
      */
      */
@@ -71,7 +96,20 @@ public class RepaymentManagement extends BaseModel<RepaymentManagement> {
      * 操作人
      * 操作人
      */
      */
     private String operator;
     private String operator;
-
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @TableField(exist = false)
+    private Date startDate;
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @TableField(exist = false)
+    private Date endDate;
 
 
     @Override
     @Override
     protected Serializable pkVal() {
     protected Serializable pkVal() {

+ 29 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/TradeWarehouseReceiptAppl.java

@@ -269,9 +269,31 @@ public class TradeWarehouseReceiptAppl extends BaseModel<TradeWarehouseReceiptAp
 
 
     @TableField(exist = false)
     @TableField(exist = false)
     private String warehousePositioning;
     private String warehousePositioning;
-
+    /**
+     *1开关锁2结束
+     */
     @TableField(exist = false)
     @TableField(exist = false)
     private String editFlag;
     private String editFlag;
+    /**
+     *主监控图
+     */
+    @TableField(exist = false)
+    private String monitorUrl1;
+    /**
+     *公司名
+     */
+    @TableField(exist = false)
+    private String compName;
+    /**
+     *仓单数量
+     */
+    @TableField(exist = false)
+    private String num;
+    /**
+     *执行中任务数
+     */
+    @TableField(exist = false)
+    private String taskNum;
 
 
     /**
     /**
      * 电子锁标识
      * 电子锁标识
@@ -283,7 +305,12 @@ public class TradeWarehouseReceiptAppl extends BaseModel<TradeWarehouseReceiptAp
     private List<TradeWarehouseReceiptAppl> tradeWarehouseReceiptAppls;
     private List<TradeWarehouseReceiptAppl> tradeWarehouseReceiptAppls;
     @TableField(exist = false)
     @TableField(exist = false)
     private List<WarehouseInOutInfo> warehouseInOutInfoList;
     private List<WarehouseInOutInfo> warehouseInOutInfoList;
-
+    @TableField(exist = false)
+    private List<WarehouseMonitorDetail> warehouseMonitorDetailList;
+    @TableField(exist = false)
+    private List<TradeWarehouseReceiptAppl> warehouseNameList;
+    @TableField(exist = false)
+    private List<TradeWarehouseReceiptAppl> goodsNameList;
     @Override
     @Override
     protected Serializable pkVal() {
     protected Serializable pkVal() {
         return this.id;
         return this.id;

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

@@ -0,0 +1,66 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+
+import com.baomidou.mybatisplus.enums.IdType;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 仓库监控明细表
+ * </p>
+ *
+ * @author Gdc
+ * @since 2023-07-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("warehouse_monitor_detail")
+public class WarehouseMonitorDetail extends BaseModel<WarehouseMonitorDetail> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 仓库id
+     */
+    private String warehouseId;
+    /**
+     * 仓库名称
+     */
+    private String warehouseName;
+    /**
+     * 备注
+     */
+    private String remark;
+    /**
+     * 附件地址
+     */
+    private String addressUrl;
+    /**
+     * 状态标识
+     */
+    private String statusFlag;
+    /**
+     * 状态
+     */
+    private String status;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

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

@@ -34,4 +34,6 @@ public interface TradeWarehouseReceiptApplMapper extends BaseMapper<TradeWarehou
      * @return
      * @return
      */
      */
     List<TradeWarehouseReceiptAppl> getListByCondition(Map<String, Object> pageView);
     List<TradeWarehouseReceiptAppl> getListByCondition(Map<String, Object> pageView);
+
+    List<TradeWarehouseReceiptAppl> getMonitorListByCondition(Map<String, Object> pageView);
 }
 }

+ 16 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/WarehouseMonitorDetailMapper.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.WarehouseMonitorDetail;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 仓库监控明细表 Mapper 接口
+ * </p>
+ *
+ * @author Gdc
+ * @since 2023-07-07
+ */
+public interface WarehouseMonitorDetailMapper extends BaseMapper<WarehouseMonitorDetail> {
+
+}

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

@@ -108,7 +108,7 @@ public interface ICommonUserService extends IService<CommonUser> {
 
 
     String saveRole(CommonStaffRole commonStaffRole);
     String saveRole(CommonStaffRole commonStaffRole);
 
 
-    List<CommonCompany> getComp();
+    List<CommonCompany> getComp(String compFax);
 
 
     List<CommonCompany> getCompOwn(String phone);
     List<CommonCompany> getCompOwn(String phone);
 
 

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

@@ -70,4 +70,9 @@ public interface ITradeWarehouseReceiptApplService extends IService<TradeWarehou
     void deleteTrageInfo(String id);
     void deleteTrageInfo(String id);
 
 
 
 
+    List<TradeWarehouseReceiptAppl> selectmonitorList(TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl);
+
+    List<TradeWarehouseReceiptAppl> selectBorrowingCompany(TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl);
+
+    Double detainedWeight(TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl);
 }
 }

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

@@ -0,0 +1,19 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.WarehouseMonitorDetail;
+import com.baomidou.mybatisplus.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 仓库监控明细表 服务类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2023-07-07
+ */
+public interface IWarehouseMonitorDetailService extends IService<WarehouseMonitorDetail> {
+
+    List<WarehouseMonitorDetail> getMonitor(String warehouseId);
+}

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

@@ -315,8 +315,13 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
      * @return
      * @return
      */
      */
     @Override
     @Override
-    public List<CommonCompany> getComp() {
-        List<CommonCompany> commonCompanyList =commonCompanyService.selectList(new EntityWrapper<CommonCompany>().eq("delete_flag", "0"));
+    public List<CommonCompany> getComp(String compFax) {
+        Wrapper<CommonCompany> commonCompanyWrapper = new EntityWrapper<>();
+        commonCompanyWrapper.eq("delete_flag", "0");
+        if (!StringUtils.isEmpty(compFax)) {
+            commonCompanyWrapper.eq("comp_fax", compFax);
+        }
+        List<CommonCompany> commonCompanyList =commonCompanyService.selectList(commonCompanyWrapper);
         List<CommonCompany> temp = new ArrayList<>();
         List<CommonCompany> temp = new ArrayList<>();
         if (CollectionUtils.isNotEmpty(commonCompanyList)){
         if (CollectionUtils.isNotEmpty(commonCompanyList)){
             for (CommonCompany commonCompany:commonCompanyList){
             for (CommonCompany commonCompany:commonCompanyList){

+ 39 - 9
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/RepaymentManagementServiceImpl.java

@@ -11,6 +11,7 @@ import com.winsea.svc.base.base.service.ICommonStaffService;
 import com.winsea.svc.base.security.entity.User;
 import com.winsea.svc.base.security.entity.User;
 import com.winsea.svc.base.security.util.AuthSecurityUtils;
 import com.winsea.svc.base.security.util.AuthSecurityUtils;
 import com.yh.saas.common.support.util.IdGenerator;
 import com.yh.saas.common.support.util.IdGenerator;
+import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
 import com.yh.saas.plugin.yiliangyiyun.entity.*;
 import com.yh.saas.plugin.yiliangyiyun.entity.*;
 import com.yh.saas.plugin.yiliangyiyun.mapper.RepaymentManagementMapper;
 import com.yh.saas.plugin.yiliangyiyun.mapper.RepaymentManagementMapper;
 import com.yh.saas.plugin.yiliangyiyun.service.IRepaymentManagementService;
 import com.yh.saas.plugin.yiliangyiyun.service.IRepaymentManagementService;
@@ -19,6 +20,7 @@ import com.yh.saas.plugin.yiliangyiyun.service.ITradeWarehouseReceiptApplService
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
+import java.math.BigDecimal;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
@@ -52,6 +54,12 @@ public class RepaymentManagementServiceImpl extends ServiceImpl<RepaymentManagem
                 * repaymentManagement.getPageSize());
                 * repaymentManagement.getPageSize());
         //公司id
         //公司id
         pageView.put("compId", repaymentManagement.getCompId());
         pageView.put("compId", repaymentManagement.getCompId());
+        pageView.put("bankId", repaymentManagement.getBankId());
+        pageView.put("interestFlag", repaymentManagement.getInterestFlag());
+        pageView.put("borrowingCompany", repaymentManagement.getBorrowingCompany());
+        pageView.put("borrowingWarehouse", repaymentManagement.getBorrowingWarehouse());
+        pageView.put("startDate", repaymentManagement.getStartDate());
+        pageView.put("endDate", repaymentManagement.getEndDate());
         pageView.put("tradeWarehouseReceiptId", repaymentManagement.getTradeWarehouseReceiptId());
         pageView.put("tradeWarehouseReceiptId", repaymentManagement.getTradeWarehouseReceiptId());
         pageView.put("contractNo", repaymentManagement.getContractNo());
         pageView.put("contractNo", repaymentManagement.getContractNo());
         pageView.put("pageSize", repaymentManagement.getPageSize());
         pageView.put("pageSize", repaymentManagement.getPageSize());
@@ -76,15 +84,37 @@ public class RepaymentManagementServiceImpl extends ServiceImpl<RepaymentManagem
     public String repaymentMoney(RepaymentManagement repaymentManagement){
     public String repaymentMoney(RepaymentManagement repaymentManagement){
         //新增主键id
         //新增主键id
         repaymentManagement.setId(IdGenerator.generateUUID());
         repaymentManagement.setId(IdGenerator.generateUUID());
-        //查询贸易仓单信息
-        TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl = tradeWarehouseReceiptApplService.selectOne(new EntityWrapper<TradeWarehouseReceiptAppl>()
-                .eq("id",repaymentManagement.getTradeWarehouseReceiptId()));
-        tradeWarehouseReceiptAppl.setAmountToRepaid(tradeWarehouseReceiptAppl.getAmountToRepaid() - repaymentManagement.getRepaymentEdAmount());
-        repaymentManagement.setRepaymentIngAmount(tradeWarehouseReceiptAppl.getAmountToRepaid());
-        tradeWarehouseReceiptAppl.setAmountRepaid(tradeWarehouseReceiptAppl.getAmountDue() - tradeWarehouseReceiptAppl.getAmountToRepaid());
-        // 操作主表数据
-        this.insert(repaymentManagement);
-        tradeWarehouseReceiptApplService.updateById(tradeWarehouseReceiptAppl);
+         //付息
+        if ("1".equals(repaymentManagement.getInterestFlag())){
+            //查询贸易仓单信息
+            TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl = tradeWarehouseReceiptApplService.selectById(repaymentManagement.getTradeWarehouseReceiptId());
+            //累加主表利息
+            tradeWarehouseReceiptAppl.setApplicationAmount(tradeWarehouseReceiptAppl.getApplicationAmount()+repaymentManagement.getRepaymentEdAmount());
+            // 操作主表数据
+            this.insert(repaymentManagement);
+            tradeWarehouseReceiptApplService.updateById(tradeWarehouseReceiptAppl);
+        }
+        //放款
+        else if ("2".equals(repaymentManagement.getInterestFlag())){
+            this.insert(repaymentManagement);
+        }
+        //还款
+        else{
+            //查询贸易仓单信息
+            TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl = tradeWarehouseReceiptApplService.selectById(repaymentManagement.getTradeWarehouseReceiptId());
+            BigDecimal bigDecimal1 = BigDecimal.valueOf(tradeWarehouseReceiptAppl.getAmountToRepaid());
+            BigDecimal bigDecimal2 = BigDecimal.valueOf(repaymentManagement.getRepaymentEdAmount());
+            if (bigDecimal1.compareTo(bigDecimal2)==0){
+                tradeWarehouseReceiptAppl.setStatusFlag(StatusEnum.TRADERETURNED.getFlag());
+                tradeWarehouseReceiptAppl.setStatus(StatusEnum.TRADERETURNED.getName());
+            }
+            tradeWarehouseReceiptAppl.setAmountToRepaid(tradeWarehouseReceiptAppl.getAmountToRepaid() - repaymentManagement.getRepaymentEdAmount());
+            repaymentManagement.setRepaymentIngAmount(tradeWarehouseReceiptAppl.getAmountToRepaid());
+            tradeWarehouseReceiptAppl.setAmountRepaid(tradeWarehouseReceiptAppl.getAmountDue() - tradeWarehouseReceiptAppl.getAmountToRepaid());
+            // 操作主表数据
+            this.insert(repaymentManagement);
+            tradeWarehouseReceiptApplService.updateById(tradeWarehouseReceiptAppl);
+        }
         return "OK";
         return "OK";
     }
     }
 
 

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

@@ -50,6 +50,8 @@ public class TradeWarehouseReceiptApplServiceImpl extends ServiceImpl<TradeWareh
     private IWarehouseInOutInfoService warehouseInOutInfoService;
     private IWarehouseInOutInfoService warehouseInOutInfoService;
     @SofaReference
     @SofaReference
     private ICommonRoleResourceService roleResourceService;
     private ICommonRoleResourceService roleResourceService;
+    @Autowired
+    private IRepaymentManagementService repaymentManagementService;
 
 
     /**
     /**
      * 列表
      * 列表
@@ -219,7 +221,24 @@ public class TradeWarehouseReceiptApplServiceImpl extends ServiceImpl<TradeWareh
                 tradeWarehouseReceiptAppl.setLockedStatus("未锁仓");
                 tradeWarehouseReceiptAppl.setLockedStatus("未锁仓");
             }
             }
             this.updateById(tradeWarehouseReceiptAppl);
             this.updateById(tradeWarehouseReceiptAppl);
-        } else {
+        }
+        //结束
+        else if ("2".equals(tradeWarehouseReceiptAppl.getEditFlag())) {
+                List<WarehouseInOutInfo> warehouseInOutInfoList=warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
+                        .eq("warehouse_receipt",tradeWarehouseReceiptAppl.getBillNo())
+                        .eq("binded","1"));
+                //银行结束仓单,解绑货源的所属仓单
+                if (!CollectionUtils.isEmpty(warehouseInOutInfoList)){
+                    for (WarehouseInOutInfo warehouseInOutInfo:warehouseInOutInfoList){
+                        warehouseInOutInfo.setWarehouseReceipt("");
+                        warehouseInOutInfo.setBinded("0");
+                        warehouseInOutInfoService.updateById(warehouseInOutInfo);
+                    }
+                }
+                tradeWarehouseReceiptAppl.setStatusFlag(StatusEnum.END.getFlag());
+                tradeWarehouseReceiptAppl.setStatus(StatusEnum.END.getName());
+                this.updateById(tradeWarehouseReceiptAppl);
+            } else {
             this.updateById(tradeWarehouseReceiptAppl);
             this.updateById(tradeWarehouseReceiptAppl);
             if (!CollectionUtils.isEmpty(tradeWarehouseReceiptAppl.getWarehouseInOutInfoList())){
             if (!CollectionUtils.isEmpty(tradeWarehouseReceiptAppl.getWarehouseInOutInfoList())){
                 List<WarehouseInOutInfo> warehouseInOutInfoList=warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
                 List<WarehouseInOutInfo> warehouseInOutInfoList=warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
@@ -320,8 +339,71 @@ public class TradeWarehouseReceiptApplServiceImpl extends ServiceImpl<TradeWareh
         this.deleteById(tradeWarehouseReceiptAppl.getId());
         this.deleteById(tradeWarehouseReceiptAppl.getId());
     }
     }
 
 
+    @Override
+    public List<TradeWarehouseReceiptAppl> selectmonitorList(TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl) {
+        Map<String, Object> pageView = new HashMap<>();
+        pageView.put("bankId", tradeWarehouseReceiptAppl.getBankId());
+        pageView.put("threeId", tradeWarehouseReceiptAppl.getThreeId());
+        List<TradeWarehouseReceiptAppl> dataList = baseMapper.getMonitorListByCondition(pageView);
+        return dataList;
+    }
 
 
+    @Override
+    public List<TradeWarehouseReceiptAppl> selectBorrowingCompany(TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl) {
+        List<TradeWarehouseReceiptAppl> tradeWarehouseReceiptApplList=this.selectList(new EntityWrapper<TradeWarehouseReceiptAppl>()
+                .eq("bank_id",tradeWarehouseReceiptAppl.getBankId())
+                .groupBy("comp_id"));
+        if (!CollectionUtils.isEmpty(tradeWarehouseReceiptApplList)){
+            for (TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl1:tradeWarehouseReceiptApplList){
+                List<TradeWarehouseReceiptAppl> tradeWarehouseReceiptApplList1=this.selectList(new EntityWrapper<TradeWarehouseReceiptAppl>()
+                        .eq("bank_id",tradeWarehouseReceiptAppl1.getBankId())
+                        .eq("comp_id",tradeWarehouseReceiptAppl1.getCompId())
+                        .groupBy("warehouse_id"));
+                if (!CollectionUtils.isEmpty(tradeWarehouseReceiptApplList1)){
+                    for (TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl2:tradeWarehouseReceiptApplList1){
+                        List<TradeWarehouseReceiptAppl> tradeWarehouseReceiptApplList2=this.selectList(new EntityWrapper<TradeWarehouseReceiptAppl>()
+                                .eq("bank_id",tradeWarehouseReceiptAppl2.getBankId())
+                                .eq("comp_id",tradeWarehouseReceiptAppl2.getCompId())
+                                .eq("warehouse_id",tradeWarehouseReceiptAppl2.getWarehouseId())
+                                .groupBy("goods_name"));
+                        if (!CollectionUtils.isEmpty(tradeWarehouseReceiptApplList2)){
+                            tradeWarehouseReceiptAppl2.setGoodsNameList(tradeWarehouseReceiptApplList2);
+                        }
+                    }
+                    tradeWarehouseReceiptAppl1.setWarehouseNameList(tradeWarehouseReceiptApplList1);
+                }
+            }
+        }
+        return tradeWarehouseReceiptApplList;
+    }
 
 
+    @Override
+    public Double detainedWeight(TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl) {
+        //查询审核通过后的仓单重量和
+        List<TradeWarehouseReceiptAppl> tradeWarehouseReceiptApplList=this.selectList(new EntityWrapper<TradeWarehouseReceiptAppl>()
+                .eq("bank_id",tradeWarehouseReceiptAppl.getBankId())
+                .eq("comp_id",tradeWarehouseReceiptAppl.getCompId())
+                .eq("warehouse_id",tradeWarehouseReceiptAppl.getWarehouseId())
+                .ge("status_flag","2")
+                .eq("goods_name",tradeWarehouseReceiptAppl.getGoodsName()));
+        //总申请重量
+        Double weight=0d;
+        //总放粮重量
+        Double grainWeight=0d;
+        if (!CollectionUtils.isEmpty(tradeWarehouseReceiptApplList)){
+            weight=tradeWarehouseReceiptApplList.stream().mapToDouble(TradeWarehouseReceiptAppl::getDryOutWeight).sum();
+        }
+        List<RepaymentManagement> repaymentManagementList=repaymentManagementService.selectList(new EntityWrapper<RepaymentManagement>()
+                .eq("bank_id",tradeWarehouseReceiptAppl.getBankId())
+                .eq("comp_id",tradeWarehouseReceiptAppl.getCompId())
+                .eq("borrowing_warehouse",tradeWarehouseReceiptAppl.getWarehouseName())
+                .eq("goods_name",tradeWarehouseReceiptAppl.getGoodsName()));
+        if (!CollectionUtils.isEmpty(repaymentManagementList)){
+            weight=repaymentManagementList.stream().mapToDouble(RepaymentManagement::getRepaymentEdAmount).sum();
+        }
+        Double detainedWeight=weight-grainWeight;
+        return detainedWeight;
+    }
 
 
 
 
     /**
     /**

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

@@ -0,0 +1,29 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.yh.saas.plugin.yiliangyiyun.entity.WarehouseMonitorDetail;
+import com.yh.saas.plugin.yiliangyiyun.mapper.WarehouseMonitorDetailMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.IWarehouseMonitorDetailService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 仓库监控明细表 服务实现类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2023-07-07
+ */
+@Service
+public class WarehouseMonitorDetailServiceImpl extends ServiceImpl<WarehouseMonitorDetailMapper, WarehouseMonitorDetail> implements IWarehouseMonitorDetailService {
+
+    @Override
+    public List<WarehouseMonitorDetail> getMonitor(String warehouseId) {
+        List<WarehouseMonitorDetail> warehouseMonitorDetailList=this.selectList(new EntityWrapper<WarehouseMonitorDetail>()
+        .eq("warehouse_id",warehouseId));
+        return warehouseMonitorDetailList;
+}
+}

+ 3 - 5
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/workflow/TradeServicesListener.java

@@ -1,8 +1,5 @@
 package com.yh.saas.plugin.yiliangyiyun.workflow;
 package com.yh.saas.plugin.yiliangyiyun.workflow;
 
 
-import com.baomidou.mybatisplus.mapper.EntityWrapper;
-import com.winsea.svc.base.base.entity.AuditHistory;
-import com.winsea.svc.base.base.service.IAuditHistoryService;
 import com.yh.saas.common.support.workflow.AbstractWorkflowTaskListener;
 import com.yh.saas.common.support.workflow.AbstractWorkflowTaskListener;
 import com.yh.saas.common.support.workflow.annotation.WorkflowTaskListener;
 import com.yh.saas.common.support.workflow.annotation.WorkflowTaskListener;
 import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
 import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
@@ -18,8 +15,6 @@ public class TradeServicesListener extends AbstractWorkflowTaskListener {
 
 
     private static final long serialVersionUID = 4103656734835351132L;
     private static final long serialVersionUID = 4103656734835351132L;
     @Autowired
     @Autowired
-    private CommonUserMapper commonUserMapper;
-    @Autowired
     private ITradeWarehouseReceiptApplService tradeWarehouseReceiptApplService;
     private ITradeWarehouseReceiptApplService tradeWarehouseReceiptApplService;
     @Autowired
     @Autowired
     private StatusRecordMapper statusRecordMapper;
     private StatusRecordMapper statusRecordMapper;
@@ -35,6 +30,9 @@ public class TradeServicesListener extends AbstractWorkflowTaskListener {
         if (processIsEnd) {
         if (processIsEnd) {
             tradeWarehouseReceiptAppl.setStatusFlag(StatusEnum.TO_BE_TRADERETURN.getFlag());
             tradeWarehouseReceiptAppl.setStatusFlag(StatusEnum.TO_BE_TRADERETURN.getFlag());
             tradeWarehouseReceiptAppl.setStatus(StatusEnum.TO_BE_TRADERETURN.getName());
             tradeWarehouseReceiptAppl.setStatus(StatusEnum.TO_BE_TRADERETURN.getName());
+            tradeWarehouseReceiptAppl.setPaymentAmount(tradeWarehouseReceiptAppl.getInterest());
+            tradeWarehouseReceiptAppl.setAmountDue(tradeWarehouseReceiptAppl.getInterest());
+            tradeWarehouseReceiptAppl.setAmountToRepaid(tradeWarehouseReceiptAppl.getInterest());
             tradeWarehouseReceiptAppl.setWorkflowId(null);
             tradeWarehouseReceiptAppl.setWorkflowId(null);
             tradeWarehouseReceiptAppl.setApproveStatus(null);
             tradeWarehouseReceiptAppl.setApproveStatus(null);
 
 

+ 65 - 4
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/RepaymentManagementMapper.xml

@@ -7,11 +7,39 @@
         COUNT(id)
         COUNT(id)
         FROM repayment_management
         FROM repayment_management
         WHERE
         WHERE
-        comp_id = #{compId}
-        and delete_flag = '0'
+        delete_flag = '0'
         <if test="contractNo != null and contractNo != ''">
         <if test="contractNo != null and contractNo != ''">
             AND contract_no = #{contractNo}
             AND contract_no = #{contractNo}
         </if>
         </if>
+        <if test="compId != null and compId != ''">
+            AND comp_id = #{compId}
+        </if>
+        <if test="bankId != null and bankId != ''">
+            AND bank_id = #{bankId}
+        </if>
+        <if test="tradeWarehouseReceiptId != null and tradeWarehouseReceiptId != ''">
+            AND trade_warehouse_receipt_id = #{tradeWarehouseReceiptId}
+        </if>
+        <if test="borrowingCompany != null and borrowingCompany != ''">
+            AND borrowing_company = #{borrowingCompany}
+        </if>
+        <if test="borrowingWarehouse != null and borrowingWarehouse != ''">
+            AND borrowing_warehouse = #{borrowingWarehouse}
+        </if>
+        <if test="startDate != null">
+            AND (DATE_FORMAT(create_date,"%Y%m%d%H%i%s") &gt;=
+            DATE_FORMAT(#{startDate},"%Y%m%d%H%i%s"))
+        </if>
+        <if test="endDate != null">
+            AND (DATE_FORMAT(create_date,"%Y%m%d%H%i%s") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d%H%i%s"))
+        </if>
+        <if test="interestFlag != null and interestFlag != ''">
+            AND interest_flag = #{interestFlag}
+        </if>
+        <if test="interestFlag == null or interestFlag == ''">
+            AND interest_flag = '0'
+        </if>
     </select>
     </select>
     <!-- 获得还款管理列表 -->
     <!-- 获得还款管理列表 -->
     <select id="getListByCondition" parameterType="Map"
     <select id="getListByCondition" parameterType="Map"
@@ -19,6 +47,11 @@
         SELECT
         SELECT
         id,
         id,
         comp_id as compId,
         comp_id as compId,
+        bank_id as bankId,
+        borrowing_company as borrowingCompany,
+        borrowing_warehouse as borrowingWarehouse,
+        goods_name as goodsName,
+        remark,
         contract_no as contractNo,
         contract_no as contractNo,
         repayment_ing_amount as repaymentIngAmount,
         repayment_ing_amount as repaymentIngAmount,
         repayment_ed_amount as repaymentEdAmount,
         repayment_ed_amount as repaymentEdAmount,
@@ -28,11 +61,39 @@
         create_date as createDate
         create_date as createDate
         FROM repayment_management
         FROM repayment_management
         WHERE
         WHERE
-        comp_id = #{compId}
-        and delete_flag = '0'
+        delete_flag = '0'
         <if test="contractNo != null and contractNo != ''">
         <if test="contractNo != null and contractNo != ''">
             AND contract_no = #{contractNo}
             AND contract_no = #{contractNo}
         </if>
         </if>
+        <if test="compId != null and compId != ''">
+            AND comp_id = #{compId}
+        </if>
+        <if test="bankId != null and bankId != ''">
+            AND bank_id = #{bankId}
+        </if>
+        <if test="tradeWarehouseReceiptId != null and tradeWarehouseReceiptId != ''">
+            AND trade_warehouse_receipt_id = #{tradeWarehouseReceiptId}
+        </if>
+        <if test="borrowingCompany != null and borrowingCompany != ''">
+            AND borrowing_company = #{borrowingCompany}
+        </if>
+        <if test="borrowingWarehouse != null and borrowingWarehouse != ''">
+            AND borrowing_warehouse = #{borrowingWarehouse}
+        </if>
+        <if test="startDate != null">
+            AND (DATE_FORMAT(create_date,"%Y%m%d%H%i%s") &gt;=
+            DATE_FORMAT(#{startDate},"%Y%m%d%H%i%s"))
+        </if>
+        <if test="endDate != null">
+            AND (DATE_FORMAT(create_date,"%Y%m%d%H%i%s") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d%H%i%s"))
+        </if>
+        <if test="interestFlag != null and interestFlag != ''">
+            AND interest_flag = #{interestFlag}
+        </if>
+        <if test="interestFlag == null or interestFlag == ''">
+            AND interest_flag = '0'
+        </if>
         ORDER BY create_date DESC
         ORDER BY create_date DESC
         <if test="currentPage != null and currentPage != ''">
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}
             LIMIT ${startRecord}, ${pageSize}

+ 41 - 4
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/TradeWarehouseReceiptApplMapper.xml

@@ -9,8 +9,7 @@
         COUNT(id)
         COUNT(id)
         FROM trade_warehouse_receipt_appl
         FROM trade_warehouse_receipt_appl
         WHERE
         WHERE
-        comp_id = #{compId}
-        and delete_flag = '0'
+        delete_flag = '0'
         <if test="searchType != null and searchType != ''">
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
             <if test="searchType == 1">
                 AND (lower(approve_status) like lower(CONCAT('%','审核','%')))
                 AND (lower(approve_status) like lower(CONCAT('%','审核','%')))
@@ -25,6 +24,9 @@
                 AND status_flag='5'
                 AND status_flag='5'
             </if>
             </if>
         </if>
         </if>
+        <if test="compId != null and compId != ''">
+            AND ( bank_id = #{compId} or comp_id = #{compId})
+        </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(bill_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
             AND (lower(bill_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
@@ -76,11 +78,11 @@
         locked_status_flag as lockedStatusFlag,
         locked_status_flag as lockedStatusFlag,
         locked_status as lockedStatus,
         locked_status as lockedStatus,
         warehouse_no_id as warehouseNoId,
         warehouse_no_id as warehouseNoId,
+        application_amount as applicationAmount,
         workflow_id as workflowId
         workflow_id as workflowId
         FROM trade_warehouse_receipt_appl
         FROM trade_warehouse_receipt_appl
         WHERE
         WHERE
-        comp_id = #{compId}
-        and delete_flag = '0'
+        delete_flag = '0'
         <if test="searchType != null and searchType != ''">
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
             <if test="searchType == 1">
                 AND (lower(approve_status) like lower(CONCAT('%','审核','%')))
                 AND (lower(approve_status) like lower(CONCAT('%','审核','%')))
@@ -95,6 +97,9 @@
                 AND status_flag='5'
                 AND status_flag='5'
             </if>
             </if>
         </if>
         </if>
+        <if test="compId != null and compId != ''">
+            AND ( bank_id = #{compId} or comp_id = #{compId})
+        </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(bill_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
             AND (lower(bill_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
@@ -122,5 +127,37 @@
             LIMIT ${startRecord}, ${pageSize}
             LIMIT ${startRecord}, ${pageSize}
         </if>
         </if>
     </select>
     </select>
+    <select id="getMonitorListByCondition" parameterType="Map"
+            resultType="com.yh.saas.plugin.yiliangyiyun.entity.TradeWarehouseReceiptAppl">
+        SELECT
+            twra.id as id,
+            twra.comp_id as compId,
+            twra.bank_id as bankId,
+            twra.three_id as threeId,
+            twra.warehouse_id as warehouseId,
+            twra.warehouse_name as warehouseName,
+            wbi.monitor_url1 as monitorUrl1,
+            cc.comp_name as compName,
+            COUNT(twra.id) as num,
+            IFNULL(COUNT(iowt.id),0) as taskNum,
+            SUM(twra.payment_amount) as paymentAmount,
+            SUM(twra.amount_repaid)as amountRepaid,
+            SUM(twra.amount_to_repaid)as amountToRepaid,
+            SUM(twra.dry_out_weight) as dryOutWeight,
+            twra.goods_name as goodsName
+        FROM trade_warehouse_receipt_appl twra
+                 LEFT JOIN warehouse_base_info wbi on wbi.id=twra.warehouse_id and wbi.delete_flag=0
+                 LEFT JOIN common_company cc on cc.comp_id=twra.comp_id
+        LEFT JOIN in_out_warehouse_task iowt on iowt.comp_id=twra.comp_id and iowt.warehouse_name=twra.warehouse_name and iowt.task_status='执行中'
+        WHERE
+            twra.status_flag='0'
+        <if test="bankId != null and bankId != ''">
+            AND twra.bank_id = #{bankId}
+        </if>
+        <if test="threeId != null and threeId != ''">
+            AND twra.three_id = #{threeId}
+        </if>
+        GROUP BY twra.warehouse_id,twra.bank_id,twra.comp_id,twra.three_id
+    </select>
 
 
 </mapper>
 </mapper>

+ 4 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseInOutInfoMapper.xml

@@ -9,7 +9,10 @@
         COUNT(w.id)
         COUNT(w.id)
         FROM warehouse_in_out_info w
         FROM warehouse_in_out_info w
         left join warehouse_in_out_detail d on w.id=d.info_id
         left join warehouse_in_out_detail d on w.id=d.info_id
-        left join warehouse_base_info wbi on wbi.warehouse_name = w.warehouse_name
+        left join warehouse_base_info wbi on wbi.id = w.base_id
+        left join common_company c on c.comp_id = wbi.comp_id and c.delete_flag = 0
+        left join quality_inspection_management q on q.warehouse_in_out_id = w.id and q.comp_id = wbi.comp_id and q.delete_flag
+        = 0
         WHERE
         WHERE
         w.delete_flag = '0'
         w.delete_flag = '0'
         <if test="searchType != null and searchType != ''">
         <if test="searchType != null and searchType != ''">

+ 5 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseMonitorDetailMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.WarehouseMonitorDetailMapper">
+
+</mapper>