gongdecai 3 vuotta sitten
vanhempi
commit
b087a525c4

+ 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 {
-        generateByTables("Gdc", "com.yh.saas.plugin.yiliangyiyun","cost_management_info");
+        generateByTables("Gdc", "com.yh.saas.plugin.yiliangyiyun","trade_warehouse_receipt_appl");
     }
 
     /**

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

@@ -0,0 +1,59 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import com.baomidou.mybatisplus.plugins.Page;
+import com.yh.saas.plugin.yiliangyiyun.entity.PurchaseReceiptReport;
+import com.yh.saas.plugin.yiliangyiyun.entity.TradeWarehouseReceiptAppl;
+import com.yh.saas.plugin.yiliangyiyun.service.IPurchaseReceiptReportService;
+import com.yh.saas.plugin.yiliangyiyun.service.ITradeWarehouseReceiptApplService;
+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 2021-11-06
+ */
+@RestController
+@RequestMapping("/tradeWarehouseReceiptAppl")
+public class TradeWarehouseReceiptApplController {
+    @Autowired
+    private ITradeWarehouseReceiptApplService tradeWarehouseReceiptApplService;
+    /**
+     * 列表
+     * @param tradeWarehouseReceiptAppl
+     * @return
+     */
+    @GetMapping("/selectTradeWarehouseReceiptAppl")
+    public Page<TradeWarehouseReceiptAppl> selectTradeWarehouseReceiptAppl(TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl){
+        return tradeWarehouseReceiptApplService.selectTradeWarehouseReceiptAppl(tradeWarehouseReceiptAppl);
+    }
+
+    /**
+     * 编号
+     * @return
+     */
+    @GetMapping("/getBillNo")
+    public String getBillNo(){
+        return tradeWarehouseReceiptApplService.getBillNo();
+    }
+    /**
+     * 地图信息
+     *
+     * @return
+     */
+    @GetMapping("/getMapInfo")
+    public List<TradeWarehouseReceiptAppl> getMapInfo(){
+        return tradeWarehouseReceiptApplService.getMapInfo();
+    }
+
+}
+

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

@@ -0,0 +1,245 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import com.baomidou.mybatisplus.activerecord.Model;
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.annotations.Version;
+
+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 2021-11-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("trade_warehouse_receipt_appl")
+public class TradeWarehouseReceiptAppl extends BaseModel<TradeWarehouseReceiptAppl> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 公司id
+     */
+    private String compId;
+    /**
+     * 合同编号
+     */
+    private String contractNo;
+    /**
+     * 业务编号
+     */
+    private String billNo;
+    /**
+     * 仓库id
+     */
+    private String warehouseId;
+    /**
+     * 仓库名
+     */
+    private String warehouseName;
+    /**
+     * 名头id
+     */
+    private String renownId;
+    /**
+     * 名头
+     */
+    private String renown;
+    /**
+     * 银行id
+     */
+    private String bankId;
+    /**
+     * 银行
+     */
+    private String bank;
+    /**
+     * 第三方id
+     */
+    private String threeId;
+    /**
+     * 第三方
+     */
+    private String three;
+    /**
+     * 仓位号id
+     */
+    private String warehouseNoId;
+    /**
+     * 仓位号
+     */
+    private String warehouseNo;
+    /**
+     * 货名key
+     */
+    private String goodsNameKey;
+    /**
+     * 货名
+     */
+    private String goodsName;
+    /**
+     * 粮食类型key
+     */
+    private String grainTypeKey;
+    /**
+     * 粮食类型
+     */
+    private String grainType;
+    /**
+     * 品级key
+     */
+    private String gradeKey;
+    /**
+     * 品级
+     */
+    private String grade;
+    /**
+     * 本单重量
+     */
+    private Float weight;
+    /**
+     * 单价(元/吨)
+     */
+    private Float unitPrice;
+    /**
+     * 总价值
+     */
+    private Float totalValue;
+    /**
+     * 发放金额
+     */
+    private Float paymentAmount;
+    /**
+     * 应还金额
+     */
+    private Float amountDue;
+    /**
+     * 已还金额
+     */
+    private Float amountRepaid;
+    /**
+     * 待还金额
+     */
+    private Float amountToRepaid;
+    /**
+     * 申请比例
+     */
+    private String applicationProportion;
+    /**
+     * 申请金额
+     */
+    private Float interest;
+    /**
+     * 利息
+     */
+    private Float applicationAmount;
+    /**
+     * 监管费
+     */
+    private Float supervisionFee;
+    /**
+     * 保险费
+     */
+    private Float insurancePremium;
+    /**
+     * 其他费
+     */
+    private Float otherFee;
+    /**
+     * 利息显示隐藏
+     */
+    private String applicationAmountFlag;
+    /**
+     * 监管费显示隐藏
+     */
+    private String supervisionFeeFlag;
+    /**
+     * 其他费显示隐藏
+     */
+    private String otherFeeFlag;
+    /**
+     * 保险费显示隐藏
+     */
+    private String insurancePremiumFlag;
+    /**
+     * 附件
+     */
+    private String appendix;
+    /**
+     * 磅单
+     */
+    private String bdappendix;
+    /**
+     * 锁定状态标识
+     */
+    private String lockedStatusFlag;
+    /**
+     * 锁定状态
+     */
+    private String lockedStatus;
+    /**
+     * 状态标识
+     */
+    private String statusFlag;
+    /**
+     * 状态
+     */
+    private String status;
+    /**
+     * 状态英文
+     */
+    private String statusEn;
+    /**
+     * 审核状态
+     */
+    private String approveStatus;
+    /**
+     * 审核流id
+     */
+    private String workflowId;
+    /**
+     * 备注
+     */
+    private String remark;
+    /**
+     * 模糊查询
+     */
+    @TableField(exist = false)
+    private String searchKeyWord;
+
+    /**
+     *查询类型
+     */
+    @TableField(exist = false)
+    private String searchType;
+
+    @TableField(exist = false)
+    private String taskId;
+
+    @TableField(exist = false)
+    private String warehousePositioning;
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

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

@@ -246,6 +246,10 @@ public class WeighingManagement extends BaseModel<WeighingManagement> {
     @TableField(exist = false)
     private String warehouseId;
 
+
+    @TableField(exist = false)
+    private String viewFlag;
+
     /**
      *质检对象
      */

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

@@ -0,0 +1,37 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.PurchaseReceiptReport;
+import com.yh.saas.plugin.yiliangyiyun.entity.TradeWarehouseReceiptAppl;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 贸易仓单申请信息 Mapper 接口
+ * </p>
+ *
+ * @author Gdc
+ * @since 2021-11-06
+ */
+public interface TradeWarehouseReceiptApplMapper extends BaseMapper<TradeWarehouseReceiptAppl> {
+
+
+
+    /**
+     * 根据条件查询采购入库他统计总数
+     *
+     * @param pageView
+     * @return
+     */
+    Integer getCountByCondition(Map<String, Object> pageView);
+
+    /**
+     * 根据条件查询采购入库统计列表
+     *
+     * @param pageView
+     * @return
+     */
+    List<TradeWarehouseReceiptAppl> getListByCondition(Map<String, Object> pageView);
+}

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

@@ -0,0 +1,38 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.baomidou.mybatisplus.plugins.Page;
+import com.yh.saas.plugin.yiliangyiyun.entity.TradeWarehouseReceiptAppl;
+import com.baomidou.mybatisplus.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 贸易仓单申请信息 服务类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2021-11-06
+ */
+public interface ITradeWarehouseReceiptApplService extends IService<TradeWarehouseReceiptAppl> {
+
+    /**
+     * 列表
+     *
+     * @param tradeWarehouseReceiptAppl
+     * @return
+     */
+    Page<TradeWarehouseReceiptAppl> selectTradeWarehouseReceiptAppl(TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl);
+    /**
+     * 单号
+     *
+     * @return
+     */
+    String getBillNo();
+    /**
+     * 地图信息
+     *
+     * @return
+     */
+    List<TradeWarehouseReceiptAppl> getMapInfo();
+}

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

@@ -0,0 +1,154 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.alipay.sofa.runtime.api.annotation.SofaReference;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.plugins.Page;
+import com.google.common.collect.Lists;
+import com.winsea.svc.base.base.entity.CommonRoleResource;
+import com.winsea.svc.base.base.service.ICommonRoleResourceService;
+import com.winsea.svc.base.base.util.DateUtils;
+import com.winsea.svc.base.security.entity.User;
+import com.winsea.svc.base.security.util.AuthSecurityUtils;
+import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
+import com.yh.saas.plugin.yiliangyiyun.entity.PurchaseReceiptReport;
+import com.yh.saas.plugin.yiliangyiyun.entity.TradeWarehouseReceiptAppl;
+import com.yh.saas.plugin.yiliangyiyun.entity.WarehouseBaseInfo;
+import com.yh.saas.plugin.yiliangyiyun.mapper.TradeWarehouseReceiptApplMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.INewWorkflowService;
+import com.yh.saas.plugin.yiliangyiyun.service.ITradeWarehouseReceiptApplService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import com.yh.saas.plugin.yiliangyiyun.service.IWarehouseBaseInfoService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * <p>
+ * 贸易仓单申请信息 服务实现类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2021-11-06
+ */
+@Service
+public class TradeWarehouseReceiptApplServiceImpl extends ServiceImpl<TradeWarehouseReceiptApplMapper, TradeWarehouseReceiptAppl> implements ITradeWarehouseReceiptApplService {
+
+    @Autowired
+    private INewWorkflowService workflowService;
+    @Autowired
+    private IWarehouseBaseInfoService warehouseBaseInfoService;
+    @SofaReference
+    private ICommonRoleResourceService roleResourceService;
+
+    /**
+     * 列表
+     *
+     * @param tradeWarehouseReceiptAppl
+     * @return
+     */
+    @Override
+    public Page<TradeWarehouseReceiptAppl> selectTradeWarehouseReceiptAppl(TradeWarehouseReceiptAppl tradeWarehouseReceiptAppl) {
+        Map<String, Object> pageView = new HashMap<>();
+        pageView.put("startRecord", (tradeWarehouseReceiptAppl.getCurrentPage() - 1)
+                * tradeWarehouseReceiptAppl.getPageSize());
+        List<String> businessKeys = null;
+        if ("1".equals(tradeWarehouseReceiptAppl.getSearchType())) {
+            businessKeys = workflowService.getTaskBusinessKeysByCode("TRADE-WAREHOUSE-REPORT");
+        }
+        List<String> statusSet = new ArrayList<>();
+        List<String> resourceIdList = this.getResourceIdList();
+        if (resourceIdList.contains("receiptAppl-Edit")) { // 填写,提交    权限做完以后替换
+            List<String> statusList = Lists.newArrayList(StatusEnum.PUR_RETURN.getFlag());
+            statusSet.addAll(statusList);
+        }
+        //公司id
+        pageView.put("compId", tradeWarehouseReceiptAppl.getCompId());
+        pageView.put("searchKeyWord", tradeWarehouseReceiptAppl.getSearchKeyWord());
+        pageView.put("searchType", tradeWarehouseReceiptAppl.getSearchType());
+        pageView.put("pageSize", tradeWarehouseReceiptAppl.getPageSize());
+        pageView.put("currentPage", tradeWarehouseReceiptAppl.getCurrentPage());
+        pageView.put("statusFlag", tradeWarehouseReceiptAppl.getStatusFlag());
+        pageView.put("businessKeys", businessKeys);
+        pageView.put("statusSet", statusSet);
+        // 查询采购入库总数
+        Integer dataCount = baseMapper.getCountByCondition(pageView);
+        List<TradeWarehouseReceiptAppl> dataList = baseMapper.getListByCondition(pageView);
+        if (!CollectionUtils.isEmpty(dataList)) {
+            dataList.forEach(tradeWarehouseReceiptAppl1 -> {
+
+                String taskId = "";
+                // 只有待审核状态才有taskId
+                if (StringUtils.isNotBlank(tradeWarehouseReceiptAppl1.getWorkflowId())) {
+                    JSONObject jsonObject = workflowService.getActiveTask(Lists.newArrayList(tradeWarehouseReceiptAppl1.getWorkflowId()), tradeWarehouseReceiptAppl1.getId());
+                    taskId = jsonObject.getString("taskId");
+                    tradeWarehouseReceiptAppl1.setTaskId(taskId);
+                }
+            });
+
+        }
+        Page<TradeWarehouseReceiptAppl> page = new Page<>();
+        page.setRecords(dataList == null ? Lists.newArrayList() : dataList);
+        page.setTotal(dataCount == null ? 0 : dataCount);
+        page.setCurrent(tradeWarehouseReceiptAppl.getCurrentPage());
+        page.setSize(tradeWarehouseReceiptAppl.getPageSize());
+        return page;
+    }
+
+    /**
+     * 地图信息
+     *
+     * @return
+     */
+    @Override
+    public List<TradeWarehouseReceiptAppl> getMapInfo() {
+        List<TradeWarehouseReceiptAppl> tradeWarehouseReceiptAppls = this.selectList(new EntityWrapper<TradeWarehouseReceiptAppl>()
+                .eq("comp_id", AuthSecurityUtils.getCurrentUserInfo().getCompId())
+                .notIn("").groupBy("warehouse_no_id").groupBy("warehouse_id"));
+        List<TradeWarehouseReceiptAppl> warehouseReceiptAppls = new ArrayList<>();
+        if (!CollectionUtils.isEmpty(tradeWarehouseReceiptAppls)) {
+            for (int i = 0; i < tradeWarehouseReceiptAppls.size(); i++) {
+                WarehouseBaseInfo warehouseBaseInfo = warehouseBaseInfoService.selectById(tradeWarehouseReceiptAppls.get(i).getWarehouseId());
+                List<TradeWarehouseReceiptAppl> tradeWarehouseReceiptApplList = this.selectList(new EntityWrapper<TradeWarehouseReceiptAppl>()
+                        .eq("warehouse_id", tradeWarehouseReceiptAppls.get(i).getWarehouseId()));
+                for (int j = 0; j < tradeWarehouseReceiptApplList.size(); j++) {
+                    if (j == 7) {
+                        break;
+                    } else {
+                        tradeWarehouseReceiptApplList.get(j).setWarehousePositioning(warehouseBaseInfo.getWarehousePositioning());
+                        warehouseReceiptAppls.add(tradeWarehouseReceiptApplList.get(j));
+                    }
+                }
+            }
+        }
+        return warehouseReceiptAppls;
+    }
+
+    /**
+     * 单号
+     *
+     * @return
+     */
+    @Override
+    public String getBillNo() {
+        String billNo = "";
+        String year = new SimpleDateFormat("yy", Locale.CHINESE).format(new Date());
+        String month = new SimpleDateFormat("MM", Locale.CHINESE).format(new Date());
+        int count = this.selectCount(new EntityWrapper<TradeWarehouseReceiptAppl>()
+                .eq("comp_id", AuthSecurityUtils.getCurrentUserInfo().getCompId()).and("date(create_date) = curdate()"));
+        return year + month + (count + 1);
+    }
+
+
+    private List<String> getResourceIdList() {
+        User currentUser = AuthSecurityUtils.getCurrentUserInfo();
+        // 当前登录人主要角色
+        return roleResourceService.getBindResourcesByUserId(currentUser.getUserId()).stream()
+                .map(CommonRoleResource::getResourceId).collect(Collectors.toList());
+    }
+}

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

@@ -9,6 +9,7 @@ import com.winsea.svc.base.base.service.ICommonCompanyService;
 import com.winsea.svc.base.base.service.ICommonStaffService;
 import com.winsea.svc.base.security.util.AuthSecurityUtils;
 import com.yh.saas.common.support.util.IdGenerator;
+import com.yh.saas.common.support.util.StringUtils;
 import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
 import com.yh.saas.plugin.yiliangyiyun.entity.*;
 import com.yh.saas.plugin.yiliangyiyun.mapper.WeighingManagementMapper;
@@ -60,48 +61,50 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
         pageView.put("startRecord", (weighingManagement.getCurrentPage() - 1)
                 * weighingManagement.getPageSize());
         //公司id
-        if(weighingManagement.getCompId() == null || weighingManagement.getCompId().isEmpty()){
+        if (weighingManagement.getCompId() == null || weighingManagement.getCompId().isEmpty()) {
             weighingManagement.setCompId(AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getCompId());
         }
-        pageView.put("compId",weighingManagement.getCompId());
-        pageView.put("searchKeyWord",weighingManagement.getSearchKeyWord());
-        pageView.put("pageSize",weighingManagement.getPageSize());
-        pageView.put("currentPage",weighingManagement.getCurrentPage());
-        pageView.put("managementType",weighingManagement.getManagementType());
-        pageView.put("warehouseName",weighingManagement.getWarehouseName());
+        pageView.put("compId", weighingManagement.getCompId());
+        pageView.put("searchKeyWord", weighingManagement.getSearchKeyWord());
+        pageView.put("pageSize", weighingManagement.getPageSize());
+        pageView.put("currentPage", weighingManagement.getCurrentPage());
+        pageView.put("managementType", weighingManagement.getManagementType());
+        pageView.put("warehouseName", weighingManagement.getWarehouseName());
         // 查询销售订单总数
         Integer dataCount = baseMapper.getCountByCondition(pageView);
         List<WeighingManagement> dataList = baseMapper.getListByCondition(pageView);
-        if (CollectionUtils.isNotEmpty(dataList)){
-            for (WeighingManagement weighingManagement1:dataList){
-                CommonCompany commonCompany=commonCompanyService.selectOne(new EntityWrapper<CommonCompany>()
-                        .eq("comp_id",weighingManagement1.getCompId()));
+        if(StringUtils.isEmpty(weighingManagement.getViewFlag())){
+        if (CollectionUtils.isNotEmpty(dataList)) {
+            for (WeighingManagement weighingManagement1 : dataList) {
+                CommonCompany commonCompany = commonCompanyService.selectOne(new EntityWrapper<CommonCompany>()
+                        .eq("comp_id", weighingManagement1.getCompId()));
                 //公司名
-                if (commonCompany!=null){
+                if (commonCompany != null) {
                     weighingManagement1.setCompName(commonCompany.getCompName());
                 }
-                PaymentManagement paymentManagement=paymentManagementService.selectOne(new EntityWrapper<PaymentManagement>()
-                        .eq("relation_id",weighingManagement1.getRelationId())
+                PaymentManagement paymentManagement = paymentManagementService.selectOne(new EntityWrapper<PaymentManagement>()
+                        .eq("relation_id", weighingManagement1.getRelationId())
                         .eq("comp_id", weighingManagement1.getCompId()));
-                if(paymentManagement!=null){
+                if (paymentManagement != null) {
                     weighingManagement1.setPaymentManagement(paymentManagement);
                 }
-                QualityInspectionManagement qualityInspectionManagement=qualityInspectionManagementService.selectOne(new EntityWrapper<QualityInspectionManagement>()
-                        .eq("relation_id",weighingManagement1.getRelationId())
+                QualityInspectionManagement qualityInspectionManagement = qualityInspectionManagementService.selectOne(new EntityWrapper<QualityInspectionManagement>()
+                        .eq("relation_id", weighingManagement1.getRelationId())
                         .eq("comp_id", weighingManagement1.getCompId()));
-                if(qualityInspectionManagement!=null){
+                if (qualityInspectionManagement != null) {
                     weighingManagement1.setQualityInspectionManagement(qualityInspectionManagement);
                 }
-                WarehouseBaseInfo warehouseBaseInfo=warehouseBaseInfoService.selectOne(new EntityWrapper<WarehouseBaseInfo>()
-                        .eq("comp_id",weighingManagement1.getCompId())
-                        .eq("warehouse_name",weighingManagement1.getWarehouseName()));
-                if (warehouseBaseInfo!=null){
+                WarehouseBaseInfo warehouseBaseInfo = warehouseBaseInfoService.selectOne(new EntityWrapper<WarehouseBaseInfo>()
+                        .eq("comp_id", weighingManagement1.getCompId())
+                        .eq("warehouse_name", weighingManagement1.getWarehouseName()));
+                if (warehouseBaseInfo != null) {
                     //仓库负责人,电话
                     weighingManagement1.setPerson(warehouseBaseInfo.getPersonCharge());
                     weighingManagement1.setPersonPhone(warehouseBaseInfo.getPersonPhone());
                 }
             }
         }
+    }
         Page<WeighingManagement> page = new Page<>();
         page.setRecords(dataList == null ? Lists.newArrayList() : dataList);
         page.setTotal(dataCount == null ? 0 : dataCount);

+ 122 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/TradeWarehouseReceiptApplMapper.xml

@@ -0,0 +1,122 @@
+<?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.TradeWarehouseReceiptApplMapper">
+
+
+    <!-- 获得采购入库统计总数 -->
+    <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
+        SELECT
+        COUNT(id)
+        FROM trade_warehouse_receipt_appl
+        WHERE
+        comp_id = #{compId}
+        and delete_flag = '0'
+        <if test="searchType != null and searchType != ''">
+            <if test="searchType == 1">
+                AND (lower(approve_status) like lower(CONCAT('%','审核','%')))
+            </if>
+            <if test="searchType == 2">
+                AND (lower(approve_status) like lower(CONCAT('%','审批','%')))
+            </if>
+            <if test="searchType == 3">
+                AND status_flag='3'
+            </if>
+            <if test="searchType == 4">
+                AND status_flag='5'
+            </if>
+        </if>
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND (lower(bill_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(warehouse_name) like lower(CONCAT('%',#{searchKeyWord},'%')))
+        </if>
+        <if test="businessKeys != null and businessKeys.size > 0">
+            and(
+            <foreach collection="businessKeys" item="businessValue" open="(" close=")" separator="or">
+                id = #{businessValue}
+            </foreach>
+            )
+        </if>
+        <if test="statusSet != null and statusSet.size > 0">
+            or (
+            <foreach collection="statusSet" item="statusId" separator="or" open="(" close=")">
+                status_flag =
+                <if test="statusId != null">
+                    #{statusId}
+                </if>
+            </foreach>
+            )
+        </if>
+    </select>
+    <!-- 获得采购入库统计列表 -->
+    <select id="getListByCondition" parameterType="Map"
+            resultType="com.yh.saas.plugin.yiliangyiyun.entity.PurchaseReceiptReport">
+        SELECT
+        id,
+        comp_id as compId,
+        contract_no as contractNo,
+        goods_name as goodsName,
+        bill_no as billNo,
+        warehouse_no as warehouseNo,
+        weight,
+        unit_price as unitPrice,
+        total_value as totalValue,
+        payment_amount as paymentAmount,
+        amount_due as amountDue,
+        warehouse_name  as warehouseName,
+        amount_repaid AS amountRepaid,
+        amount_to_repaid as amountToRepaid,
+        status,
+        approve_status as approveStatus,
+        status_flag as statusFlag,
+        approve_status as approveStatus,
+        locked_status_flag as lockedStatusFlag,
+        locked_status as lockedStatus,
+        workflow_id as workflowId
+        FROM trade_warehouse_receipt_appl
+        WHERE
+        comp_id = #{compId}
+        and delete_flag = '0'
+        <if test="searchType != null and searchType != ''">
+            <if test="searchType == 1">
+                AND (lower(approve_status) like lower(CONCAT('%','审核','%')))
+            </if>
+            <if test="searchType == 2">
+                AND (lower(approve_status) like lower(CONCAT('%','审批','%')))
+            </if>
+            <if test="searchType == 3">
+                AND status_flag='3'
+            </if>
+            <if test="searchType == 4">
+                AND status_flag='5'
+            </if>
+        </if>
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND (lower(bill_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(warehouse_name) like lower(CONCAT('%',#{searchKeyWord},'%')))
+        </if>
+        <if test="businessKeys != null and businessKeys.size > 0">
+            and(
+            <foreach collection="businessKeys" item="businessValue" open="(" close=")" separator="or">
+                id = #{businessValue}
+            </foreach>
+            )
+        </if>
+        <if test="statusSet != null and statusSet.size > 0">
+            or (
+            <foreach collection="statusSet" item="statusId" separator="or" open="(" close=")">
+                status_flag =
+                <if test="statusId != null">
+                    #{statusId}
+                </if>
+            </foreach>
+            )
+        </if>
+        ORDER BY update_date DESC
+        <if test="currentPage != null and currentPage != ''">
+            LIMIT ${startRecord}, ${pageSize}
+        </if>
+    </select>
+
+</mapper>