Browse Source

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

ccjgmwz 3 years ago
parent
commit
d8fc8f0c8b
19 changed files with 325 additions and 25 deletions
  1. 41 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/EnabledInfoController.java
  2. 60 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/EnabledInfo.java
  3. 7 1
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/PaymentManagement.java
  4. 6 1
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/QualityInspectionManagement.java
  5. 11 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/WeighingManagement.java
  6. 16 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/EnabledInfoMapper.java
  7. 25 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IEnabledInfoService.java
  8. 5 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/AcquisitionInfoServiceImpl.java
  9. 61 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/EnabledInfoServiceImpl.java
  10. 67 10
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/IdentityAuthenticationInfoServiceImpl.java
  11. 8 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PaymentManagementServiceImpl.java
  12. 4 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/QualityInspectionManagementServiceImpl.java
  13. 2 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WeighingManagementServiceImpl.java
  14. 1 1
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/AcquisitionInfoMapper.xml
  15. 5 0
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/EnabledInfoMapper.xml
  16. 1 0
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/PaymentManagementMapper.xml
  17. 2 6
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/QualityInspectionManagementMapper.xml
  18. 1 0
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseBaseInfoMapper.xml
  19. 2 6
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WeighingManagementMapper.xml

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

@@ -0,0 +1,41 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import com.yh.saas.plugin.yiliangyiyun.entity.EnabledInfo;
+import com.yh.saas.plugin.yiliangyiyun.service.IEnabledInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * <p>
+ * 记录启用信息 前端控制器
+ * </p>
+ *
+ * @author Gdc
+ * @since 2021-12-15
+ */
+@RestController
+@RequestMapping("/enabledInfo")
+public class EnabledInfoController {
+    @Autowired
+    private IEnabledInfoService iEnabledInfoService;
+    /**
+     * 启用信息查看
+     * @param enabledInfo
+     * @return
+     */
+    @GetMapping("/getEnabledInfo")
+    public EnabledInfo getEnabledInfo(EnabledInfo enabledInfo){
+        return iEnabledInfoService.getEnabledInfo(enabledInfo);
+    }
+    /**
+     * 添加(编辑)启用信息
+     * @param enabledInfo
+     * @return
+     */
+    @PostMapping("/api/setEnabledInfo")
+    public String setEnabledInfo(@RequestBody EnabledInfo enabledInfo){
+        return iEnabledInfoService.setEnabledInfo(enabledInfo);
+    }
+}
+

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

@@ -0,0 +1,60 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import com.baomidou.mybatisplus.activerecord.Model;
+import java.io.Serializable;
+
+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-12-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("enabled_info")
+public class EnabledInfo extends BaseModel<EnabledInfo> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 职员ID
+     */
+    private String staffId;
+    /**
+     * 公司ID
+     */
+    private String compId;
+    /**
+     * 功能类型(1仓单)
+     */
+    private String functionType;
+    /**
+     * 是否启用的 0:否 1:是
+     */
+    private String enabled;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

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

@@ -278,7 +278,8 @@ public class PaymentManagement extends BaseModel<PaymentManagement> {
      */
     @TableField(exist = false)
     private String searchKeyWord;
-
+    @TableField(exist = false)
+    private String codeUrl;
     /**
      *查询类型
      */
@@ -387,6 +388,11 @@ public class PaymentManagement extends BaseModel<PaymentManagement> {
      */
     @TableField(exist = false)
     private String appFlag;
+    /**
+     * 实收卸车过磅费
+     */
+    @TableField(exist = false)
+    private Double actualWeighingFee;
     /**
      * 银行信息
      */

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

@@ -83,6 +83,10 @@ public class QualityInspectionManagement extends BaseModel<QualityInspectionMana
      * 车牌号
      */
     private String carNumber;
+    /**
+     * 车型
+     */
+    private String carModel;
     /**
      * 箱号
      */
@@ -275,7 +279,8 @@ public class QualityInspectionManagement extends BaseModel<QualityInspectionMana
      */
     @TableField(exist = false)
     private WeighingManagement weighingManagement;
-
+    @TableField(exist = false)
+    private String codeUrl;
     @Override
     protected Serializable pkVal() {
         return this.id;

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

@@ -220,6 +220,14 @@ public class WeighingManagement extends BaseModel<WeighingManagement> {
      * 仓库名称
      */
     private String warehouseName;
+    /**
+     * 应收卸车过磅费
+     */
+    private Double receivableWeighingFee;
+    /**
+     * 实收卸车过磅费
+     */
+    private Double actualWeighingFee;
     /**
      * 已称皮重状态(1是)
      */
@@ -239,6 +247,9 @@ public class WeighingManagement extends BaseModel<WeighingManagement> {
      */
     @TableField(exist = false)
     private String searchType;
+    @TableField(exist = false)
+    private String codeUrl;
+
     /**
      * 公司名
      */

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

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.EnabledInfo;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 记录启用信息 Mapper 接口
+ * </p>
+ *
+ * @author Gdc
+ * @since 2021-12-15
+ */
+public interface EnabledInfoMapper extends BaseMapper<EnabledInfo> {
+
+}

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

@@ -0,0 +1,25 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.EnabledInfo;
+import com.baomidou.mybatisplus.service.IService;
+
+/**
+ * <p>
+ * 记录启用信息 服务类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2021-12-15
+ */
+public interface IEnabledInfoService extends IService<EnabledInfo> {
+    /**
+     * 添加(编辑)启用信息
+     * @param  enabledInfo
+     */
+    String setEnabledInfo(EnabledInfo enabledInfo);
+    /**
+     * 查看启用信息
+     * @param  enabledInfo
+     */
+    EnabledInfo getEnabledInfo(EnabledInfo enabledInfo);
+}

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

@@ -166,6 +166,11 @@ public class AcquisitionInfoServiceImpl extends ServiceImpl<AcquisitionInfoMappe
     @Override
     public AcquisitionInfo getInfo(AcquisitionInfo acquisitionInfo) {
         //根据用户id查看收购信息
+        if(acquisitionInfo.getWarehouseName() == null){
+            AcquisitionInfo acquisitionInfo1 = this.selectOne(new EntityWrapper<AcquisitionInfo>()
+                    .eq("common_id",acquisitionInfo.getCommonId()));
+            return acquisitionInfo1;
+        }
         AcquisitionInfo acquisitionInfo1 = this.selectOne(new EntityWrapper<AcquisitionInfo>()
                 .eq("common_id",acquisitionInfo.getCommonId())
                 .eq("warehouse_name",acquisitionInfo.getWarehouseName()));

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

@@ -0,0 +1,61 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.winsea.svc.base.security.util.AuthSecurityUtils;
+import com.yh.saas.common.support.util.IdGenerator;
+import com.yh.saas.plugin.yiliangyiyun.entity.EnabledInfo;
+import com.yh.saas.plugin.yiliangyiyun.mapper.EnabledInfoMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.IEnabledInfoService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * <p>
+ * 记录启用信息 服务实现类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2021-12-15
+ */
+@Service
+public class EnabledInfoServiceImpl extends ServiceImpl<EnabledInfoMapper, EnabledInfo> implements IEnabledInfoService {
+    /**
+     * 添加(编辑)启用信息
+     * @param  enabledInfo
+     * @return
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public String setEnabledInfo(EnabledInfo enabledInfo){
+        //判断id是否为空,空是新增
+        if(StringUtils.isEmpty(enabledInfo.getId())){
+            //新增主键id
+            enabledInfo.setId(IdGenerator.generateUUID());
+            enabledInfo.setCompId(AuthSecurityUtils.getCurrentUserInfo().getCompId());
+            enabledInfo.setStaffId(AuthSecurityUtils.getCurrentUserInfo().getUserId());
+            //操作主表数据
+            this.insert(enabledInfo);
+        }else{
+            //有id是修改
+            this.updateById(enabledInfo);
+        }
+        return enabledInfo.getId();
+    }
+    /**
+     * 启用信息查看
+     *
+     * @param enabledInfo
+     * @return
+     */
+    @Override
+    public EnabledInfo getEnabledInfo(EnabledInfo enabledInfo) {
+        //根据当前登录用户id查看启用信息
+        EnabledInfo enabledInfo1 = this.selectOne(new EntityWrapper<EnabledInfo>()
+                .eq("staff_id",AuthSecurityUtils.getCurrentUserInfo().getUserId())
+                .eq("comp_id",AuthSecurityUtils.getCurrentUserInfo().getCompId())
+                .eq("function_type",enabledInfo.getFunctionType()));
+        return enabledInfo1;
+    }
+}

+ 67 - 10
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/IdentityAuthenticationInfoServiceImpl.java

@@ -6,18 +6,16 @@ import com.baomidou.mybatisplus.plugins.Page;
 import com.google.common.collect.Lists;
 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.base.service.ICommonBillOperateHisService;
 import com.yh.saas.plugin.yiliangyiyun.constant.NumberConstant;
 import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
 import com.yh.saas.plugin.yiliangyiyun.entity.*;
 import com.yh.saas.plugin.yiliangyiyun.exception.*;
-import com.yh.saas.plugin.yiliangyiyun.mapper.CommonCompanyIdentityMapper;
-import com.yh.saas.plugin.yiliangyiyun.mapper.CommonUserMapper;
 import com.yh.saas.plugin.yiliangyiyun.mapper.IdentityAuthenticationInfoMapper;
 import com.yh.saas.plugin.yiliangyiyun.service.*;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -48,6 +46,8 @@ public class IdentityAuthenticationInfoServiceImpl extends ServiceImpl<IdentityA
     private IPurchasePriceService purchasePriceService;
     @Autowired
     private IPaymentManagementService paymentManagementService;
+    @Autowired
+    private IShippingInformationService shippingInformationService;
 
     /**
      * 粮商认证列表
@@ -474,16 +474,73 @@ public class IdentityAuthenticationInfoServiceImpl extends ServiceImpl<IdentityA
      */
     @Override
     public List<IdentityAuthenticationInfo> identityAuthenticationInfoCustomer(IdentityAuthenticationInfo identityAuthenticationInfo) {
-        Map<String, Object> pageView = new HashMap<>();
+//        Map<String, Object> pageView = new HashMap<>();
+//        if(identityAuthenticationInfo.getCompId() == null || identityAuthenticationInfo.getCompId().isEmpty()){
+//            identityAuthenticationInfo.setCompId(AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getCompId());
+//        }
+//        //公司id
+//        pageView.put("compId", identityAuthenticationInfo.getCompId());
+//        pageView.put("authenticationStatusKey", identityAuthenticationInfo.getAuthenticationStatusKey());
+//        pageView.put("searchKeyWord", identityAuthenticationInfo.getSearchKeyWord());
+//        List<IdentityAuthenticationInfo> dataList = this.baseMapper.getIdentityInfoByCondition(pageView);
+//        return dataList;
         if(identityAuthenticationInfo.getCompId() == null || identityAuthenticationInfo.getCompId().isEmpty()){
             identityAuthenticationInfo.setCompId(AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getCompId());
         }
-        //公司id
-        pageView.put("compId", identityAuthenticationInfo.getCompId());
-        pageView.put("authenticationStatusKey", identityAuthenticationInfo.getAuthenticationStatusKey());
-        pageView.put("searchKeyWord", identityAuthenticationInfo.getSearchKeyWord());
-        List<IdentityAuthenticationInfo> dataList = this.baseMapper.getIdentityInfoByCondition(pageView);
-        return dataList;
+        Wrapper<IdentityAuthenticationInfo> identityAuthenticationInfoWrapper = new EntityWrapper<>();
+        identityAuthenticationInfoWrapper.eq("comp_id",identityAuthenticationInfo.getCompId())
+                .eq("cover","0")
+                .eq("authentication_status_key","7");
+        if (!StringUtils.isEmpty(identityAuthenticationInfo.getSearchKeyWord())) {
+            identityAuthenticationInfoWrapper.andNew("replace(" + "customer_name" + ",' ','')like {0} or "
+                    + "customer_phone" + " like {0} or "
+                    + "supplier" + " like {0}", "%" + identityAuthenticationInfo.getSearchKeyWord() + "%");
+        }
+        List<IdentityAuthenticationInfo> identityAuthenticationInfoList = this.selectList(identityAuthenticationInfoWrapper);
+        PurchasePrice purchasePrice=purchasePriceService.selectOne(new EntityWrapper<PurchasePrice>()
+                .eq("warehouse_id",identityAuthenticationInfo.getWarehouseId())
+                .eq("goods_name",identityAuthenticationInfo.getGoodsName())
+                .eq("status","已通过"));
+        List<IdentityAuthenticationInfo> identityAuthenticationInfoListNew=new ArrayList<>();
+        if (CollectionUtils.isNotEmpty(identityAuthenticationInfoList)){
+            for (IdentityAuthenticationInfo identityAuthenticationInfo1:identityAuthenticationInfoList) {
+                Float cumulant = 0.0f;
+                //本年第一天零点
+                SimpleDateFormat now = new SimpleDateFormat("yyyy-01-01 00:00:00");
+                Calendar c = Calendar.getInstance();
+                c.setTime(new java.util.Date());
+                c.add(Calendar.YEAR, 0);
+                Date y = c.getTime();
+                String year = now.format(y);
+                if (identityAuthenticationInfo.getGoodsName().contains("玉米")) {
+                    identityAuthenticationInfo.setGoodsName("玉米");
+                }
+                List<PaymentManagement> paymentManagementList = paymentManagementService.selectList(new EntityWrapper<PaymentManagement>()
+                        .like("goods_name", "%" + identityAuthenticationInfo.getGoodsName() + "%")
+                        .eq("customer_number_card", identityAuthenticationInfo1.getCustomerNumberCard())
+                        .eq("comp_id", purchasePrice.getCompId())
+                        .ge("create_date", year));
+                if (!CollectionUtils.isEmpty(paymentManagementList)) {
+                    Float netWeight = 0f;
+                    for (PaymentManagement paymentManagement1 : paymentManagementList) {
+                        //干粮净重
+                        if ("干粮".equals(paymentManagement1.getType())) {
+                            netWeight = netWeight + (paymentManagement1.getNetWeight() != null ? paymentManagement1.getNetWeight() : 0f);
+                        }
+                        //潮粮纯重
+                        else if ("潮粮".equals(paymentManagement1.getType())) {
+                            netWeight = netWeight + (paymentManagement1.getPureWeight() != null ? paymentManagement1.getPureWeight() : 0f);
+                        }
+                    }
+                    cumulant = cumulant + netWeight;
+                }
+                if (cumulant > (purchasePrice.getSaleLimit() - 50)*1000) {
+                    identityAuthenticationInfoListNew.add(identityAuthenticationInfo1);
+                }
+            }
+            identityAuthenticationInfoList.removeAll(identityAuthenticationInfoListNew);
+        }
+        return identityAuthenticationInfoList;
     }
 
     /**

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

@@ -24,6 +24,7 @@ import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
 import com.yh.saas.plugin.yiliangyiyun.mapper.PaymentManagementMapper;
 import com.yh.saas.plugin.yiliangyiyun.service.*;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import com.yh.saas.plugin.yiliangyiyun.util.QRCodeUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.httpclient.util.DateUtil;
 import org.apache.commons.lang3.StringUtils;
@@ -99,6 +100,8 @@ public class PaymentManagementServiceImpl extends ServiceImpl<PaymentManagementM
     private IPurchasePriceService purchasePriceService;
     @Value("${file-root-path}")
     private String localPath;
+    @Autowired
+    private QRCodeUtil qrCodeUtil ;
     /**
      * 付款管理列表
      *
@@ -208,6 +211,11 @@ public class PaymentManagementServiceImpl extends ServiceImpl<PaymentManagementM
                 .eq("comp_id", paymentManagement.getCompId()));
         CommonCompany commonCompany = commonCompanyService.selectOne(new EntityWrapper<CommonCompany>()
                 .eq("comp_id", paymentManagement.getCompId()));
+
+        WarehouseBaseInfo warehouseBaseInfo=warehouseBaseInfoService.selectOne(new EntityWrapper<WarehouseBaseInfo>()
+                .eq("comp_id",qualityInspectionManagement.getCompId())
+                .eq("warehouse_name",qualityInspectionManagement.getWarehouseName()));
+        qualityInspectionManagement.setCodeUrl(qrCodeUtil.generateQRCodeImage(qualityInspectionManagement.getCompId()+"&"+qualityInspectionManagement.getQualityNo()+"&"+warehouseBaseInfo.getId(),800,800,"company",qualityInspectionManagement.getCompId()));
         //公司名
         if (commonCompany != null) {
             paymentManagement.setCompName(commonCompany.getCompName());

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

@@ -14,6 +14,7 @@ import com.yh.saas.plugin.yiliangyiyun.entity.*;
 import com.yh.saas.plugin.yiliangyiyun.mapper.QualityInspectionManagementMapper;
 import com.yh.saas.plugin.yiliangyiyun.service.*;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import com.yh.saas.plugin.yiliangyiyun.util.QRCodeUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -42,6 +43,8 @@ public class QualityInspectionManagementServiceImpl extends ServiceImpl<QualityI
     private IPaymentManagementService paymentManagementService;
     @Autowired
     private ICommonStaffService staffService;
+    @Autowired
+    private QRCodeUtil qrCodeUtil ;
     /**
      * 质检管理列表
      * @param qualityInspectionManagement
@@ -133,6 +136,7 @@ public class QualityInspectionManagementServiceImpl extends ServiceImpl<QualityI
             if (weighingManagement!=null) {
                 qualityInspectionManagement.setWeighingManagement(weighingManagement);
             }
+            qualityInspectionManagement.setCodeUrl(qrCodeUtil.generateQRCodeImage(qualityInspectionManagement.getCompId()+"&"+qualityInspectionManagement.getQualityNo()+"&"+warehouseBaseInfo.getId(),800,800,"company",qualityInspectionManagement.getCompId()));
         }
         return qualityInspectionManagement;
     }

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

@@ -325,6 +325,8 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
             if (qualityInspectionManagement!=null) {
                 weighingManagement.setQualityInspectionManagement(qualityInspectionManagement);
             }
+            weighingManagement.setCodeUrl(qrCodeUtil.generateQRCodeImage(qualityInspectionManagement.getCompId()+"&"+qualityInspectionManagement.getQualityNo()+"&"+warehouseBaseInfo.getId(),800,800,"company",qualityInspectionManagement.getCompId()));
+
         }
         return weighingManagement;
     }

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

@@ -35,6 +35,6 @@
             AND lower(w.warehouse_city) like lower(CONCAT('%',#{city},'%'))
         </if>
         GROUP BY a.id
-        ORDER BY a.check_flag DESC
+        ORDER BY FIELD(follow,'已关注','未关注') ASC,a.update_date DESC,a.check_flag DESC
     </select>
 </mapper>

+ 5 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/EnabledInfoMapper.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.EnabledInfoMapper">
+
+</mapper>

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/PaymentManagementMapper.xml

@@ -146,6 +146,7 @@
         q.water_content as waterContent,
         q.mildew_grain as mildewGrain,
         a.grain_money as grainMoney,
+        w.actual_weighing_fee as actualWeighingFee,
         a.actual_payment as actualPayment
         FROM payment_management a
         left join quality_inspection_management q on q.relation_id = a.relation_id and q.comp_id = a.comp_id and q.delete_flag = 0

+ 2 - 6
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/QualityInspectionManagementMapper.xml

@@ -8,6 +8,7 @@
         FROM quality_inspection_management q
         WHERE q.comp_id = #{compId}
         and q.delete_flag = '0'
+        AND q.warehouse_name= #{warehouseName}
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(q.quality_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(q.customer_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
@@ -17,9 +18,6 @@
         <if test="managementType != null and managementType != ''">
             AND q.management_type = #{managementType}
         </if>
-        <if test="warehouseName != null and warehouseName != ''">
-            AND q.warehouse_name= #{warehouseName}
-        </if>
     </select>
     <!-- 获得质检管理列表 -->
     <select id="getListByCondition" parameterType="Map"
@@ -63,15 +61,13 @@
         FROM quality_inspection_management q
         WHERE q.comp_id = #{compId}
         and q.delete_flag = '0'
+        AND q.warehouse_name= #{warehouseName}
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(q.quality_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(q.customer_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(q.contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(q.car_number) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
-        <if test="warehouseName != null and warehouseName != ''">
-            AND q.warehouse_name= #{warehouseName}
-        </if>
         <if test="managementType != null and managementType != ''">
             AND q.management_type = #{managementType}
         </if>

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseBaseInfoMapper.xml

@@ -183,6 +183,7 @@
         AND m.comp_id = #{compId}
         and w.in_out_flag = 1
         and w.in_out_type='移库出库'
+        and w.status_flag=3
         <if test="warehouseName != null and warehouseName != ''">
             AND w.warehouse_name= #{warehouseName}
         </if>

+ 2 - 6
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WeighingManagementMapper.xml

@@ -8,6 +8,7 @@
         FROM weighing_management
         WHERE  comp_id = #{compId}
         and delete_flag = '0'
+        AND warehouse_name= #{warehouseName}
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(number) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(customer) like lower(CONCAT('%',#{searchKeyWord},'%'))
@@ -23,9 +24,6 @@
             AND (DATE_FORMAT(gross_date,"%Y%m%d") &lt;=
             DATE_FORMAT(#{endDate},"%Y%m%d"))
         </if>
-        <if test="warehouseName != null and warehouseName != ''">
-            AND warehouse_name= #{warehouseName}
-        </if>
         <if test="managementType != null and managementType != ''">
             AND management_type = #{managementType}
         </if>
@@ -65,6 +63,7 @@
         left join payment_management p on p.relation_id = a.relation_id and p.comp_id = a.comp_id and p.delete_flag = 0
         WHERE a.comp_id = #{compId}
         and a.delete_flag = '0'
+        AND a.warehouse_name= #{warehouseName}
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(a.number) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(a.customer) like lower(CONCAT('%',#{searchKeyWord},'%'))
@@ -80,9 +79,6 @@
             AND (DATE_FORMAT(a.gross_date,"%Y%m%d") &lt;=
             DATE_FORMAT(#{endDate},"%Y%m%d"))
         </if>
-        <if test="warehouseName != null and warehouseName != ''">
-            AND a.warehouse_name= #{warehouseName}
-        </if>
         <if test="managementType != null and managementType != ''">
             AND a.management_type = #{managementType}
         </if>