浏览代码

我的合同列表

zhangyuewww 3 年之前
父节点
当前提交
e48246a9c6

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

@@ -127,6 +127,15 @@ public class IdentityAuthenticationInfoController {
     public Page<IdentityAuthenticationInfo> selectIdentityAuthenticationInfoPc(IdentityAuthenticationInfo identityAuthenticationInfo) {
         return iIdentityAuthenticationInfoService.selectIdentityAuthenticationInfoPc(identityAuthenticationInfo);
     }
+    /**
+     * 查粮农身份
+     * @param identityAuthenticationInfo
+     * @return
+     */
+    @GetMapping("/selectCount")
+    public Integer selectCount(IdentityAuthenticationInfo identityAuthenticationInfo) {
+        return iIdentityAuthenticationInfoService.selectCount(identityAuthenticationInfo);
+    }
 
 }
 

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

@@ -32,4 +32,11 @@ public interface PurchaseOrderMapper extends BaseMapper<PurchaseOrder> {
      * @return
      */
     List<PurchaseOrder> getListByCondition(Map<String, Object> pageView);
+    /**
+     * 根据条件查询我的合同列表
+     *
+     * @param pageView
+     * @return
+     */
+    List<PurchaseOrder> getListByConditionApp(Map<String, Object> pageView);
 }

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

@@ -1,7 +1,6 @@
 package com.yh.saas.plugin.yiliangyiyun.service;
 
 import com.baomidou.mybatisplus.plugins.Page;
-import com.yh.saas.plugin.yiliangyiyun.entity.ContractManagementInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.IdentityAuthenticationInfo;
 import com.baomidou.mybatisplus.service.IService;
 import com.yh.saas.plugin.yiliangyiyun.exception.ServiceException;
@@ -72,5 +71,11 @@ public interface IIdentityAuthenticationInfoService extends IService<IdentityAut
      * @param identityAuthenticationInfo
      */
     Page<IdentityAuthenticationInfo> selectIdentityAuthenticationInfoPc(IdentityAuthenticationInfo identityAuthenticationInfo);
+    /**
+     *
+     * 查粮农身份
+     * @param identityAuthenticationInfo
+     */
+    Integer selectCount(IdentityAuthenticationInfo identityAuthenticationInfo);
 
 }

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

@@ -1,21 +1,17 @@
 package com.yh.saas.plugin.yiliangyiyun.service.impl;
 
-import cn.hutool.core.lang.UUID;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.baomidou.mybatisplus.plugins.Page;
 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.IdentityAuthenticationInfo;
-import com.yh.saas.plugin.yiliangyiyun.entity.ProcurementPlanInfo;
 import com.yh.saas.plugin.yiliangyiyun.exception.*;
 import com.yh.saas.plugin.yiliangyiyun.mapper.IdentityAuthenticationInfoMapper;
 import com.yh.saas.plugin.yiliangyiyun.service.*;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
-import com.yh.saas.plugin.yiliangyiyun.util.MD5Util;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -94,8 +90,15 @@ public class IdentityAuthenticationInfoServiceImpl extends ServiceImpl<IdentityA
         // 根据传参手机号判断手机号是否存在
         //  空是新增
         identityAuthenticationInfo.setId(IdGenerator.generateUUID());
-        identityAuthenticationInfo.setAuthenticationStatus(StatusEnum.IDENTITY_REVIEWED.getName());
-        identityAuthenticationInfo.setAuthenticationStatusKey(StatusEnum.IDENTITY_REVIEWED.getFlag());
+        //粮农身份不需审核
+        if ("3".equals(identityAuthenticationInfo.getCustomerTypeFlag())){
+            identityAuthenticationInfo.setAuthenticationStatus(StatusEnum.IDENTITY_COMPLETED.getName());
+            identityAuthenticationInfo.setAuthenticationStatusKey(StatusEnum.IDENTITY_COMPLETED.getFlag());
+        }
+        else{
+            identityAuthenticationInfo.setAuthenticationStatus(StatusEnum.IDENTITY_REVIEWED.getName());
+            identityAuthenticationInfo.setAuthenticationStatusKey(StatusEnum.IDENTITY_REVIEWED.getFlag());
+        }
         //判断手机号是否唯一
         List<IdentityAuthenticationInfo> identityAuthenticationInfoList =
                 this.selectList(new EntityWrapper<IdentityAuthenticationInfo>()
@@ -283,6 +286,19 @@ public class IdentityAuthenticationInfoServiceImpl extends ServiceImpl<IdentityA
         return recommendedIdentityAuthenticationInfoPage;
     }
 
+    /**
+     *
+     * 查粮农身份
+     * @param identityAuthenticationInfo
+     */
+    @Override
+    public Integer selectCount(IdentityAuthenticationInfo identityAuthenticationInfo) {
+        Integer count=this.selectCount(new EntityWrapper<IdentityAuthenticationInfo>()
+                .eq("customer_type_flag","3")
+                .eq(IdentityAuthenticationInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0));
+        return count;
+    }
+
     public void DBConnection(){
         try{
             //加载驱动程序

+ 84 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/PurchaseOrderMapper.xml

@@ -41,6 +41,7 @@
         p.id,
         p.contract_no as contractNo,
         p.procurement_plan as procurementPlan,
+        p.order_type as orderType,
         p.goods_name as goodsName,
         p.customer,
         p.unit_price as unitPrice,
@@ -57,8 +58,10 @@
         p.seller_phone as sellerPhone,
         p.transactions_number as transactionsNumber,
         p.packing_type as packingType,
+        p.packing_type_key as packingTypeKey,
         p.bagging_notes as baggingNotes,
         p.type,
+        p.type_key as typeKey,
         p.status,
         p.update_date as updateDate,
         p.create_date as createDate,
@@ -96,4 +99,85 @@
             LIMIT ${startRecord}, ${pageSize}
         </if>
     </select>
+    <!-- 获得APP我的合同列表 -->
+    <select id="getListByConditionApp" parameterType="Map"
+            resultType="com.yh.saas.plugin.yiliangyiyun.entity.PurchaseOrder">
+        SELECT * FROM (
+        SELECT
+        p.id,
+        p.contract_no as contractNo,
+        p.procurement_plan as procurementPlan,
+        p.order_type as orderType,
+        '' as salePlan,
+        p.goods_name as goodsName,
+        p.customer,
+        p.unit_price as unitPrice,
+        p.basis,
+        p.freezing_deposit as freezingDeposit,
+        p.default_deposit as defaultDeposit,
+        p.unloading_charge as unloadingCharge,
+        p.invoice_fee as invoiceFee,
+        p.open_position as openPosition,
+        p.closed_position as closedPosition,
+        p.cumulative_turnover as cumulativeTurnover,
+        p.trading_target as tradingTarget,
+        p.seller,
+        p.seller_phone as sellerPhone,
+        '' as buyer,
+        '' as buyerPhone,
+        p.transactions_number as transactionsNumber,
+        p.packing_type as packingType,
+        p.packing_type_key as packingTypeKey,
+        p.bagging_notes as baggingNotes,
+        p.type,
+        p.type_key as typeKey,
+        p.status,
+        p.update_date as updateDate,
+        p.create_date as createDate
+        FROM purchase_order p
+        WHERE
+        p.delete_flag = '0'
+        AND p.common_id = #{commonId}
+        UNION ALL
+        SELECT
+        s.id,
+        s.contract_no as contractNo,
+        s.sale_plan as salePlan,
+        s.order_type as orderType,
+        '' as procurementPlan,
+        s.goods_name as goodsName,
+        s.customer,
+        s.unit_price as unitPrice,
+        s.basis,
+        s.freezing_deposit as freezingDeposit,
+        s.default_deposit as defaultDeposit,
+        s.unloading_charge as unloadingCharge,
+        s.invoice_fee as invoiceFee,
+        s.open_position as openPosition,
+        s.closed_position as closedPosition,
+        s.cumulative_turnover as cumulativeTurnover,
+        s.trading_target as tradingTarget,
+        s.buyer,
+        s.buyer_phone as buyerPhone,
+        '' as seller,
+        '' as sellerPhone,
+        s.transactions_number as transactionsNumber,
+        s.packing_type as packingType,
+        s.packing_type_key as packingTypeKey,
+        s.bagging_notes as baggingNotes,
+        s.type,
+        s.type_key as typeKey,
+        s.status,
+        s.update_date as updateDate,
+        s.create_date as createDate
+        FROM sale_order s
+        AND s.common_id = #{commonId}
+        WHERE
+        s.delete_flag = '0'
+        ) a
+        ORDER BY updateDate DESC
+        <if test="currentPage != null and currentPage != ''">
+            LIMIT ${startRecord}, ${pageSize}
+        </if>
+    </select>
 </mapper>

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

@@ -40,7 +40,8 @@
         SELECT
         s.id,
         s.contract_no as contractNo,
-        s.procurement_plan as procurementPlan,
+        s.sale_plan as salePlan,
+        s.order_type as orderType,
         s.goods_name as goodsName,
         s.customer,
         s.unit_price as unitPrice,
@@ -55,9 +56,12 @@
         s.buyer,
         s.buyer_phone as buyerPhone,
         s.transactions_number as transactionsNumber,
+        s.trading_target as tradingTarget,
         s.packing_type as packingType,
+        s.packing_type_key as packingTypeKey,
         s.bagging_notes as baggingNotes,
         s.type,
+        s.type_key as typeKey,
         s.status,
         s.update_date as updateDate,
         s.create_date as createDate,