Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun

ccj 3 years ago
parent
commit
3a7b5eecf2
24 changed files with 222 additions and 12 deletions
  1. 3 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/constant/StatusEnum.java
  2. 12 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CommonUserController.java
  3. 10 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/PaymentManagementController.java
  4. 9 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/QualityInspectionManagementController.java
  5. 8 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/PaymentManagement.java
  6. 4 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/QualityInspectionManagement.java
  7. 2 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/WarehouseBaseInfo.java
  8. 5 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/WeighingManagement.java
  9. 3 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICommonUserService.java
  10. 6 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IPaymentManagementService.java
  11. 5 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IQualityInspectionManagementService.java
  12. 25 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonUserServiceImpl.java
  13. 1 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/IdentityAuthenticationInfoServiceImpl.java
  14. 52 1
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PaymentManagementServiceImpl.java
  15. 9 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PurchaseOrderServiceImpl.java
  16. 18 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/QualityInspectionManagementServiceImpl.java
  17. 9 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SaleOrderServiceImpl.java
  18. 9 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseBaseInfoServiceImpl.java
  19. 16 8
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WeighingManagementServiceImpl.java
  20. 2 0
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/CommonUserMapper.xml
  21. 6 0
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/IdentityAuthenticationInfoMapper.xml
  22. 1 0
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/PaymentManagementMapper.xml
  23. 4 1
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/QualityInspectionManagementMapper.xml
  24. 3 2
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WeighingManagementMapper.xml

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

@@ -122,6 +122,9 @@ public enum StatusEnum {
     WEIGHED_GROSS_WEIGHT("3", "已称毛重", "weighedgrossweight"),
     TARED("5", "已称皮重", "tared"),
 
+    //付款管理状态
+    TO_BE_SETTLED("1", "待结算", "to_be_settled"),
+
     ;
     @Getter
     private String flag;

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

@@ -191,6 +191,18 @@ public class CommonUserController {
         return commonUserService.findHisPageNoticeTasks(noticeTask);
     }
 
+    /**
+     * 查验app 账号
+     *
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    @PostMapping("/api/checkApp")
+    public String checkApp(CommonUser commonUser) throws ServiceException {
+        return commonUserService.checkApp(commonUser);
+    }
+
 
 
 }

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

@@ -3,6 +3,7 @@ package com.yh.saas.plugin.yiliangyiyun.controller;
 
 import com.baomidou.mybatisplus.plugins.Page;
 import com.yh.saas.plugin.yiliangyiyun.entity.PaymentManagement;
+import com.yh.saas.plugin.yiliangyiyun.entity.PurchasePrice;
 import com.yh.saas.plugin.yiliangyiyun.service.IPaymentManagementService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -62,6 +63,15 @@ public class PaymentManagementController {
     public void deleteInfo(@RequestBody PaymentManagement paymentManagement){
         paymentManagementService.deleteInfo(paymentManagement.getId());
     }
+    /**
+     * 查累积量
+     * @param paymentManagement
+     * @return
+     */
+    @GetMapping("/cumulant")
+    public Float cumulant(PaymentManagement paymentManagement) {
+        return paymentManagementService.cumulant(paymentManagement);
+    }
 
 }
 

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

@@ -77,6 +77,15 @@ public class QualityInspectionManagementController {
     public List<PurchasePrice> goodsName(@RequestParam String warehouseId) {
         return qualityInspectionManagementService.goodsName(warehouseId);
     }
+    /**
+     * 出库管理添加质检管理信息
+     *  @param qualityInspectionManagement
+     * @return
+     */
+    @PostMapping("/api/addQualityInspectionOut")
+    public String addQualityInspectionOut(@RequestBody QualityInspectionManagement qualityInspectionManagement) {
+        return qualityInspectionManagementService.addQualityInspectionOut(qualityInspectionManagement);
+    }
 
 }
 

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

@@ -189,6 +189,14 @@ public class PaymentManagement extends BaseModel<PaymentManagement> {
      * 仓库名称
      */
     private String warehouseName;
+    /**
+     * 结算员
+     */
+    private String settlementClerk;
+    /**
+     * 付款员
+     */
+    private String cashier;
     /**
      * 审核状态
      */

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

@@ -10,10 +10,12 @@ import com.baomidou.mybatisplus.annotations.TableName;
 import com.baomidou.mybatisplus.annotations.Version;
 
 import com.baomidou.mybatisplus.enums.IdType;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.yh.saas.common.support.entity.BaseModel;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
+import org.springframework.format.annotation.DateTimeFormat;
 
 /**
  * <p>
@@ -119,6 +121,8 @@ public class QualityInspectionManagement extends BaseModel<QualityInspectionMana
     /**
      * 质检时间
      */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
     private Date qualityDate;
     /**
      * 状态标识

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

@@ -126,6 +126,8 @@ public class WarehouseBaseInfo extends BaseModel<WarehouseBaseInfo> {
      */
     @TableField(exist = false)
     private Integer count;
+    @TableField(exist = false)
+    private List<PurchasePrice> purchasePriceList;
 
 
     @Override

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

@@ -218,6 +218,11 @@ public class WeighingManagement extends BaseModel<WeighingManagement> {
      */
     @TableField(exist = false)
     private String personPhone;
+    /**
+     * 仓库id
+     */
+    @TableField(exist = false)
+    private String warehouseId;
 
 
     @Override

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

@@ -74,4 +74,7 @@ public interface ICommonUserService extends IService<CommonUser> {
     Account login(Account user, String veriCode);
 
     Page<NoticeTaskInfo> findHisPageNoticeTasks(NoticeTaskInfo noticeTask);
+
+
+    String checkApp(CommonUser commonUser) throws ServiceException;
 }

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

@@ -41,4 +41,10 @@ public interface IPaymentManagementService extends IService<PaymentManagement> {
      * @param id
      */
     void deleteInfo(String id);
+    /**
+     * 查客户对应货名当年累积量
+     * @param paymentManagement
+     * @return
+     */
+    Float cumulant(PaymentManagement paymentManagement);
 }

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

@@ -48,4 +48,9 @@ public interface IQualityInspectionManagementService extends IService<QualityIns
      * @return
      */
     List<PurchasePrice> goodsName(String warehouseId);
+    /**
+     * 出库管理添加质检管理信息
+     * @param qualityInspectionManagement
+     */
+    String addQualityInspectionOut(QualityInspectionManagement qualityInspectionManagement);
 }

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

@@ -175,6 +175,31 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
     }
 
 
+    /**
+     * 查验app 账号
+     *
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public String checkApp(CommonUser commonUser) throws ServiceException {
+        // 查询pc账号
+        CommonStaff commonStaff = commonStaffService.selectOne(new EntityWrapper<CommonStaff>()
+                .eq("staff_mobile_phone", commonUser.getPhone()).eq("enabled", "1"));
+        //  查询app 账号
+        CommonUser user = this.selectOne(new EntityWrapper<CommonUser>().eq("phone",commonUser.getPhone()));
+        if(user != null){
+            this.deleteById(user.getId());
+            user.setId(commonStaff.getStaffId());
+            this.insert(user);
+            return "OK";
+        }
+        return "NG";
+    }
+
+
     /**
      * 重置密码
      *

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

@@ -444,6 +444,7 @@ public class IdentityAuthenticationInfoServiceImpl extends ServiceImpl<IdentityA
         Map<String, Object> pageView = new HashMap<>();
         //公司id
         pageView.put("compId", identityAuthenticationInfo.getCompId());
+        pageView.put("authenticationStatusKey", identityAuthenticationInfo.getAuthenticationStatusKey());
         List<IdentityAuthenticationInfo> dataList = this.baseMapper.getIdentityInfoByCondition(pageView);
         return dataList;
     }

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

@@ -9,8 +9,11 @@ import com.winsea.svc.base.base.entity.CommonRoleResource;
 import com.winsea.svc.base.base.service.ICommonRoleResourceService;
 import com.winsea.svc.base.security.entity.User;
 import com.winsea.svc.base.security.util.AuthSecurityUtils;
+import com.winsea.svc.base.workflow.entity.Workflow;
 import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
 import com.yh.saas.plugin.yiliangyiyun.entity.*;
+import com.yh.saas.plugin.yiliangyiyun.exception.YException;
+import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
 import com.yh.saas.plugin.yiliangyiyun.mapper.PaymentManagementMapper;
 import com.yh.saas.plugin.yiliangyiyun.service.INewWorkflowService;
 import com.yh.saas.plugin.yiliangyiyun.service.IPaymentManagementService;
@@ -60,7 +63,7 @@ public class PaymentManagementServiceImpl extends ServiceImpl<PaymentManagementM
                 * paymentManagement.getPageSize());
         List<String> businessKeys = null;
         if ("1".equals(paymentManagement.getSearchType())) {
-            businessKeys = workflowService.getTaskBusinessKeysByCode("PROCUREMENT-RECEIPT-REPORT");
+            businessKeys = workflowService.getTaskBusinessKeysByCode("PAYMENT-MANAGEMENT-APPROVE");
         }
         List<String> statusSet = new ArrayList<>();
         List<String> resourceIdList = this.getResourceIdList();
@@ -126,7 +129,31 @@ public class PaymentManagementServiceImpl extends ServiceImpl<PaymentManagementM
      */
     @Override
     public String editInfo(PaymentManagement paymentManagement) {
+        PaymentManagement paymentManagement1=this.selectById(paymentManagement.getId());
         this.updateById(paymentManagement);
+        boolean isStartWorkflow = org.apache.commons.lang3.StringUtils.isBlank(paymentManagement.getWorkflowId());
+        // 不是退回的单子
+        if (isStartWorkflow) {
+            Workflow workflow = workflowService
+                    .findLatestWorkflowByBusinessCodeByApp(paymentManagement1.getCompId(), "PAYMENT-MANAGEMENT-APPROVE");
+            // 没配置审核流程,直接结束并处理信息
+            if (workflow == null) {
+                throw new YException(YExceptionEnum.PURCHASE_ORDER_ERROR);
+            }
+            // 开启审核流
+            else {
+
+                // 设置状态 已提交审核
+                paymentManagement1.setWorkflowId(workflow.getId());
+                this.updateById(paymentManagement1);
+                workflowService.startInstance(workflow.getId(), paymentManagement1.getId());
+            }
+        }
+        // 退回的单子 再启用
+        else {
+            this.updateById(paymentManagement1);
+            workflowService.activateInstance(paymentManagement1.getWorkflowId(), paymentManagement1.getId());
+        }
         return "OK";
     }
 
@@ -194,6 +221,30 @@ public class PaymentManagementServiceImpl extends ServiceImpl<PaymentManagementM
         }
     }
 
+    @Override
+    public Float cumulant(PaymentManagement paymentManagement) {
+        Float cumulant=0.0f;
+        List<PaymentManagement> paymentManagementList = this.selectList(new EntityWrapper<PaymentManagement>()
+        .eq("goods_name",paymentManagement.getGoodsName())
+        .eq("customer_name",paymentManagement.getCustomerName())
+        .eq("comp_id",paymentManagement.getCompId()));
+        if (!CollectionUtils.isEmpty(paymentManagementList)){
+            Float netWeight = 0f;
+            for (PaymentManagement paymentManagement1:paymentManagementList){
+                //干粮净重
+                if ("干粮".equals(paymentManagement1.getType())){
+                    netWeight=paymentManagement1.getNetWeight();
+                }
+                //潮粮纯重
+                else {
+                    netWeight=paymentManagement1.getPureWeight();
+                }
+            }
+            cumulant=cumulant+netWeight;
+        }
+        return cumulant;
+    }
+
 
     private List<String> getResourceIdList() {
         User currentUser = AuthSecurityUtils.getCurrentUserInfo();

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

@@ -625,6 +625,15 @@ public class PurchaseOrderServiceImpl extends ServiceImpl<PurchaseOrderMapper, P
         ProcurementPlanInfo procurementPlanInfo = procurementPlanInfoService.selectById(purchaseOrder.getPlanId());
         if (procurementPlanInfo != null) {
             purchaseOrder.setProcurementPlanType(procurementPlanInfo.getProcurementPlanType());
+            //查询客户信息
+            Wrapper<CustomerInfo> customerInfoWrapper = new EntityWrapper<>();
+            customerInfoWrapper.andNew().eq("comp_name", purchaseOrder.getCustomer()).or()
+                    .eq("customer_name", purchaseOrder.getCustomer());
+            customerInfoWrapper.eq("delete_flag", "0");
+            CustomerInfo customerInfo = customerInfoService.selectOne(customerInfoWrapper);
+            if (customerInfo != null) {
+                purchaseOrder.setCustomerInfo(customerInfo);
+            }
         }
         String taskId = "";
         // 只有待审核状态才有taskId

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

@@ -178,4 +178,22 @@ public class QualityInspectionManagementServiceImpl extends ServiceImpl<QualityI
             return "NG";
         }
     }
+    /**
+     * 编辑质检管理信息
+     * @param qualityInspectionManagement
+     * @return
+     */
+    @Override
+    public String addQualityInspectionOut(QualityInspectionManagement qualityInspectionManagement) {
+        //状态改为已质检
+        qualityInspectionManagement.setStatus(StatusEnum.INSPECTED.getName());
+        qualityInspectionManagement.setStatusFlag(StatusEnum.INSPECTED.getFlag());
+        boolean one=this.updateById(qualityInspectionManagement);
+        //成功返回ok
+        if (one ) {
+            return "OK";
+        } else {
+            return "NG";
+        }
+    }
 }

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

@@ -664,6 +664,15 @@ public class SaleOrderServiceImpl extends ServiceImpl<SaleOrderMapper, SaleOrder
         SalePlanInfo salePlanInfo = salePlanInfoService.selectById(saleOrder.getPlanId());
         if (salePlanInfo != null) {
             saleOrder.setSalePlanType(salePlanInfo.getSalePlanType());
+            //查询客户信息
+            Wrapper<CustomerInfo> customerInfoWrapper = new EntityWrapper<>();
+            customerInfoWrapper.andNew().eq("comp_name", saleOrder.getCustomer()).or()
+                    .eq("customer_name", saleOrder.getCustomer());
+            customerInfoWrapper.eq("delete_flag", "0");
+            CustomerInfo customerInfo = customerInfoService.selectOne(customerInfoWrapper);
+            if (customerInfo != null) {
+                saleOrder.setCustomerInfo(customerInfo);
+            }
         }
         String taskId = "";
         // 只有待审核状态才有taskId

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

@@ -50,6 +50,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
     private IPurchaseOrderService purchaseOrderService;
     @Autowired
     private ISaleOrderService saleOrderService;
+    @Autowired
+    private IPurchasePriceService purchasePriceService;
 
     /**
      * 仓库管理页面列表
@@ -716,6 +718,13 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 .eq("delete_flag", "0"));
         if (!CollectionUtils.isEmpty(warehouseBaseInfoList)){
             for (WarehouseBaseInfo warehouseBaseInfo:warehouseBaseInfoList) {
+                //查潮粮单价已审核的数据
+                List<PurchasePrice> purchasePriceList=purchasePriceService.selectList(new EntityWrapper<PurchasePrice>()
+                        .eq("warehouse_id",warehouseBaseInfo.getId())
+                        .eq("status_flag","3"));
+                if (!CollectionUtils.isEmpty(purchasePriceList)){
+                    warehouseBaseInfo.setPurchasePriceList(purchasePriceList);
+                }
                 Map<String, Object> pageView = new HashMap<>();
                 pageView.put("warehouseName", warehouseBaseInfo.getWarehouseName());
                 pageView.put("compId", warehouseBaseInfo.getCompId());

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

@@ -7,15 +7,9 @@ import com.winsea.svc.base.base.entity.CommonCompany;
 import com.winsea.svc.base.base.service.ICommonCompanyService;
 import com.yh.saas.common.support.util.IdGenerator;
 import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
-import com.yh.saas.plugin.yiliangyiyun.entity.PaymentManagement;
-import com.yh.saas.plugin.yiliangyiyun.entity.QualityInspectionManagement;
-import com.yh.saas.plugin.yiliangyiyun.entity.WarehouseBaseInfo;
-import com.yh.saas.plugin.yiliangyiyun.entity.WeighingManagement;
+import com.yh.saas.plugin.yiliangyiyun.entity.*;
 import com.yh.saas.plugin.yiliangyiyun.mapper.WeighingManagementMapper;
-import com.yh.saas.plugin.yiliangyiyun.service.IPaymentManagementService;
-import com.yh.saas.plugin.yiliangyiyun.service.IQualityInspectionManagementService;
-import com.yh.saas.plugin.yiliangyiyun.service.IWarehouseBaseInfoService;
-import com.yh.saas.plugin.yiliangyiyun.service.IWeighingManagementService;
+import com.yh.saas.plugin.yiliangyiyun.service.*;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -45,6 +39,8 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
     private ICommonCompanyService commonCompanyService;
     @Autowired
     private IWarehouseBaseInfoService warehouseBaseInfoService;
+    @Autowired
+    private IPurchasePriceService purchasePriceService;
     /**
      * 检斤管理列表
      * @param weighingManagement
@@ -127,6 +123,8 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
     @Transactional(rollbackFor = Exception.class)
     public String editTare(WeighingManagement weighingManagement) {
         WeighingManagement weighingManagement1=this.selectById(weighingManagement.getId());
+        //司称员(毛检,皮检)
+        weighingManagement.setSecretaryWeigher(weighingManagement1.getSecretaryWeigher()+','+weighingManagement.getSecretaryWeigher());
         //状态改为已称皮重
         weighingManagement.setStatus(StatusEnum.TARED.getName());
         weighingManagement.setStatusFlag(StatusEnum.TARED.getFlag());
@@ -157,6 +155,16 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
             paymentManagement1.setCarNo(weighingManagement1.getCarNumber());
             paymentManagement1.setType(weighingManagement1.getType());
             paymentManagement1.setGoodsName(weighingManagement1.getGoodsName());
+            if ("潮粮".equals(weighingManagement1.getType())){
+                //查收购设置数据
+                PurchasePrice purchasePrice=purchasePriceService.selectOne(new EntityWrapper<PurchasePrice>()
+                        .eq("warehouse_id",weighingManagement.getWarehouseId())
+                .eq("goods_name",weighingManagement.getGoodsName()));
+                Float pureWeight=weighingManagement1.getNetWeight()* (100-(Float.valueOf(qualityInspectionManagement1.getWaterContent())-purchasePrice.getWaterMin())*purchasePrice.getDeductWeight())/100;
+                paymentManagement1.setPureWeight(pureWeight);
+            }
+            paymentManagement1.setStatus(StatusEnum.TO_BE_SETTLED.getName());
+            paymentManagement1.setStatusFlag(StatusEnum.TO_BE_SETTLED.getFlag());
             paymentManagement1.setNetWeight(weighingManagement1.getNetWeight());
             paymentManagement1.setWarehouseName(weighingManagement1.getWarehouseName());
             //质检信息

+ 2 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/CommonUserMapper.xml

@@ -14,6 +14,8 @@
             common_user
         WHERE
             phone = #{phone} AND `password` = #{cryptPassword}
+            and
+            delete_flag ='0'
     </select>
 
 

+ 6 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/IdentityAuthenticationInfoMapper.xml

@@ -33,6 +33,9 @@
             AND (lower(a.customer_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(a.customer_phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
+        <if test="authenticationStatusKey != null and authenticationStatusKey != ''">
+            a.authentication_status_key=#{authenticationStatusKey}
+        </if>
         ORDER BY a.update_date DESC
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}
@@ -56,5 +59,8 @@
             AND (lower(a.customer_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(a.customer_phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
+        <if test="authenticationStatusKey != null and authenticationStatusKey != ''">
+            a.authentication_status_key=#{authenticationStatusKey}
+        </if>
     </select>
 </mapper>

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

@@ -50,6 +50,7 @@
         payment_no as paymentNo,
         goods_name as goodsName,
         car_no as carNo,
+        type,
         net_weight as netWeight,
         pure_weight as pureWeight,
         tidal_grain_price as tidalGrainPrice,

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

@@ -23,6 +23,7 @@
             resultType="com.yh.saas.plugin.yiliangyiyun.entity.QualityInspectionManagement">
         SELECT
         q.id,
+        q.type,
         q.quality_no as qualityNo,
         q.contract_no as contractNo,
         q.customer_name as customerName,
@@ -32,8 +33,10 @@
         q.tidal_grain_price as tidalGrainPrice,
         q.water_content as waterContent,
         q.bin_number as binNumber,
+        q.bulk_density as bulkDensity,
         q.storage_tag_no as storageTagNo,
         q.status,
+        q.update_date as updateDate,
         q.quality_date as qualityDate
         FROM quality_inspection_management q
         WHERE
@@ -47,7 +50,7 @@
         <if test="warehouseName != null and warehouseName != ''">
             AND q.warehouse_name= #{warehouseName}
         </if>
-        ORDER BY q.quality_date DESC
+        ORDER BY q.update_date DESC
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}
         </if>

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

@@ -11,7 +11,7 @@
             AND (lower(number) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(customer) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(car_number) like lower(CONCAT('%',#{searchKeyWord},'%'))
-            OR lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
         <if test="warehouseName != null and warehouseName != ''">
             AND warehouse_name= #{warehouseName}
@@ -24,6 +24,7 @@
         id,
         number,
         customer,
+        type,
         contract_no as contractNo,
         car_number as carNumber,
         relation_id as relationId,
@@ -44,7 +45,7 @@
             AND (lower(number) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(customer) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(car_number) like lower(CONCAT('%',#{searchKeyWord},'%'))
-            OR lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
         <if test="warehouseName != null and warehouseName != ''">
             AND warehouse_name= #{warehouseName}