Bläddra i källkod

1.新增资产业务我的订单列表条件查询接口
2.资产评估对象表新增字段
3.资产接口调整

GouGengquan 1 år sedan
förälder
incheckning
bd2f8ba069

+ 11 - 0
biz-base/src/main/java/com/dayou/controller/AssetsController.java

@@ -49,6 +49,17 @@ public class AssetsController extends BaseController {
     }
 
     /**
+     * 条件查询我的资产任务订单列表
+     * @param page 分页条件
+     * @param assetsSelectDTO 查询条件
+     * @return Page<AssetsVO>
+     */
+    @GetMapping("/selectMyOrderPage")
+    public RestResponse<Page<AssetsVO>> selectMyOrderPage(AssetsSelectDTO assetsSelectDTO, Page page){
+        return RestResponse.data(assetsService.selectMyOrderPage(page,assetsSelectDTO));
+    }
+
+    /**
      * 资产业务订单表详情
      */
     @GetMapping("/{id}")

+ 8 - 0
dao/src/main/java/com/dayou/mapper/AssetsMapper.java

@@ -24,4 +24,12 @@ public interface AssetsMapper extends CustomBaseMapper<Assets> {
      * @return Page<AssetsVO>
      */
     Page<AssetsVO> selectPage(@Param("page") Page page, @Param("assetsSelectDTO") AssetsSelectDTO assetsSelectDTO);
+
+    /**
+     * 条件查询我的资产任务订单列表
+     * @param page 分页条件
+     * @param assetsSelectDTO 查询条件
+     * @return Page<AssetsVO>
+     */
+    Page<AssetsVO> selectMyOrderPage(@Param("page") Page page, @Param("assetsSelectDTO") AssetsSelectDTO assetsSelectDTO);
 }

+ 81 - 1
dao/src/main/resources/mapper/AssetsMapper.xml

@@ -53,7 +53,6 @@
         order_id,
         allot_type,
         production_no,
-        production_type,
         clientele_id,
         customer.name AS customerName,
         bailor,
@@ -120,4 +119,85 @@
         ORDER BY assets.created DESC
     </select>
 
+    <!--条件查询我的资产任务订单列表-->
+    <select id="selectMyOrderPage" resultType="com.dayou.vo.AssetsVO">
+        SELECT assets.id,
+        assets.name,
+        assets.order_id,
+        allot_type,
+        production.production_no,
+        clientele_id,
+        customer.name AS customerName,
+        bailor,
+        bailor_contact_name,
+        bailor_contact_tel,
+        assets.created,
+        target.estimated_value,
+        fund.should_amount,
+        fund.real_amount,
+        fund.discount,
+        pFund.standard_amount,
+        invoice.real_amount AS invoiceRealAmount,
+        #查询客户经理
+        (SELECT name FROM user WHERE id = assets.client_manager_id) AS clientManagerName,
+        #查询项目负责人
+        (SELECT name FROM user WHERE id = assets.principal_id) AS principalName,
+        #查询业务来源(即子级客户)
+        (SELECT customer_company.name
+        FROM customer_company
+        WHERE customer_company.parent_id = clientele_id) AS customerSubName
+        FROM assets,
+        assets_production AS production,
+        user,
+        customer_company AS customer,
+        assets_evaluation_target AS target,
+        order_fund AS fund,
+        production_fund AS pFund,
+        finance_invoice AS invoice,
+        #查询当前进行的节点信息
+        (SELECT nodeInstance.id AS currentNodeId,
+        user.name AS handlerName,
+        node.name AS currentNodeName,
+        node.code AS currentNodeCode,
+        nodeInstance.business_id AS businessId
+        FROM work_flow_node_instance AS nodeInstance,
+        work_task_record AS record,
+        user,
+        work_node AS node
+        WHERE state = 'PENDING'
+        AND nodeInstance.node_id = node.id
+        AND record.handler_id = user.id
+        AND nodeInstance.deleted = 0
+        AND record.instance_id = nodeInstance.id
+        ) AS nodeInfo
+        WHERE assets.deleted = 0
+        AND nodeInfo.businessId = assets.id
+        AND production.business_id = assets.id
+        AND user.id = assets.principal_id
+        AND customer.id = assets.clientele_id
+        AND target.assets_id = assets.id
+        AND fund.business_id = assets.id
+        AND pFund.business_id = assets.id
+        AND pFund.order_fund_id = fund.id
+        AND invoice.order_fund_id = fund.id
+        #送达状态查询
+        <if test="assetsSelectDTO != null and assetsSelectDTO.delivery != null">
+            AND production.delivery = #{assetsSelectDTO.delivery}
+        </if>
+        #项目负责人查询
+        <if test="assetsSelectDTO != null and assetsSelectDTO.principalId != null">
+            AND assets.principal_id = #{assetsSelectDTO.principalId}
+        </if>
+        #关键字模糊查询
+        <if test="assetsSelectDTO != null and assetsSelectDTO.keyWord != null and assetsSelectDTO.keyWord != '' ">
+            AND (
+            assets.order_id LIKE CONCAT('%',#{assetsSelectDTO.keyWord},'%') OR
+            assets.name LIKE CONCAT('%',#{assetsSelectDTO.keyWord},'%') OR
+            production.production_no LIKE CONCAT('%',#{assetsSelectDTO.keyWord},'%') OR
+            customer.name LIKE CONCAT('%',#{assetsSelectDTO.keyWord},'%')
+            )
+        </if>
+        ORDER BY assets.created DESC
+    </select>
+
 </mapper>

+ 5 - 0
domain/src/main/java/com/dayou/dto/AssetsSelectDTO.java

@@ -34,4 +34,9 @@ public class AssetsSelectDTO {
      */
     private String assetsBusinessGener;
 
+    /**
+     * 送达状态
+     */
+    private Boolean delivery;
+
 }

+ 31 - 5
domain/src/main/java/com/dayou/vo/AssetsVO.java

@@ -12,11 +12,6 @@ public class AssetsVO extends Assets {
     private String productionNo;
 
     /**
-     * 产品类型(意见书,报告)
-     */
-    private String productionType;
-
-    /**
      *  当前实例节点id
      */
     private Long currentNodeId;
@@ -57,4 +52,35 @@ public class AssetsVO extends Assets {
      */
     private String customerSubName;
 
+    /**
+     * 评估结论对应的评估值(万)
+     */
+    private Double estimatedValue;
+
+    /**
+     * 订单应收款(元)
+     */
+    private Double shouldAmount;
+
+    /**
+     * 订单实收款(元)
+     */
+    private Double realAmount;
+
+    /**
+     * 标准收费(元)
+     */
+    private Double standardAmount;
+
+    /**
+     * 折扣比例
+     */
+    private Double discount;
+
+    /**
+     * 实际开票金额
+     */
+    private Double invoiceRealAmount;
+
+
 }

+ 8 - 0
service/src/main/java/com/dayou/service/IAssetsService.java

@@ -26,6 +26,14 @@ public interface IAssetsService extends IService<Assets> {
          */
         Page<AssetsVO> selectPage(Page page, AssetsSelectDTO assetsSelectDTO);
 
+        /**
+         * 条件查询我的资产任务订单列表
+         * @param page 分页条件
+         * @param assetsSelectDTO 查询条件
+         * @return Page<AssetsVO>
+         */
+        Page<AssetsVO> selectMyOrderPage(Page page, AssetsSelectDTO assetsSelectDTO);
+
         Assets detail(Long id);
 
         /**

+ 11 - 0
service/src/main/java/com/dayou/service/impl/AssetsServiceImpl.java

@@ -62,6 +62,17 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
         return assetsMapper.selectPage(page, assetsSelectDTO);
     }
 
+    /**
+     * 条件查询我的资产任务订单列表
+     * @param page 分页条件
+     * @param assetsSelectDTO 查询条件
+     * @return Page<AssetsVO>
+     */
+    @Override
+    public Page<AssetsVO> selectMyOrderPage(Page page, AssetsSelectDTO assetsSelectDTO) {
+        return assetsMapper.selectMyOrderPage(page, assetsSelectDTO);
+    }
+
 
     @Override
     public Assets detail(Long id){

+ 6 - 0
sql/update_sql.sql

@@ -200,4 +200,10 @@ CREATE TABLE `assets_production`
 
 SET FOREIGN_KEY_CHECKS = 1;
 
+/**
+  日期:2024-03-29
+ */
+ # 新增字段
+ALTER TABLE `assets_evaluation_target` ADD assets_id BIGINT(20)  NOT NULL COMMENT '资产业务id';
+