Browse Source

处理小程序后台功能bug

oyq28 2 years ago
parent
commit
508ae5e84a

+ 5 - 5
imcs-bt-be/imcs-business-biz/src/main/resources/mapper_business/base/barrel/EquBarrelMapper.xml

@@ -25,16 +25,16 @@
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
         id,create_time,create_user,update_time,update_user,barrel_code,barrel_type,
-        equ_id, mtr_id, mtr_name, mtr_type, mtr_unit, mtr_residue, residue_warn, expr_time, expr_war_days,expr_Status, barrel_weight
+        equ_id, mtr_id, mtr_name, mtr_type, mtr_unit, mtr_residue, residue_warn, expr_time, expr_war_days, barrel_weight, org_id
     </sql>
 
     <select id="pageList" resultMap="BaseResultMap" parameterType="String">
         select
-        <include refid="Base_Column_List"/>
+        <include refid="Base_Column_List"/>, IF(<![CDATA[ interval_day < 0 ]]>,'1','0') as expr_Status, IF(<![CDATA[ interval_day <= expr_war_days ]]>,'1','0') as expr_close_status
         from (
-        select b.id, b.create_time,b.create_user,b.update_time,b.update_user,b.barrel_code,b.barrel_type,b.equ_id, b.mtr_id, b.mtr_residue, b.residue_warn, b.expr_time, b.expr_war_days,b.expr_Status, b.barrel_weight, m.mt_name as mtr_name,m.mt_type as mtr_type, m.mt_unit as mtr_unit, p.org_id from bt_equ_barrel b left join bt_material m on b.mtr_id = m.id
-        left join imcs_tenant_productionresource p on b.equ_id = p.id
-
+        select b.id, b.create_time,b.create_user,b.update_time,b.update_user,b.barrel_code,b.barrel_type,b.equ_id, b.mtr_id, b.mtr_residue, b.expr_time, b.barrel_weight, m.mt_name as mtr_name,m.mt_type as mtr_type, m.mt_rep_war as residue_warn,m.mt_due_war as expr_war_days, TIMESTAMPDIFF(
+        DAY, now(), b.expr_time) as interval_day,m.mt_unit as mtr_unit, p.org_id from bt_equ_barrel b
+        left join bt_material m on b.mtr_id = m.id and m.mt_use_sta='1' left join imcs_tenant_productionresource p on b.equ_id = p.id
         ) f ${ew.customSqlSegment}
     </select>
 

+ 2 - 0
imcs-bt-be/imcs-business-biz/src/main/resources/mapper_business/base/order/OrderMapper.xml

@@ -153,6 +153,7 @@
         <if test="id != null">
             and o.id = #{id}
         </if>
+            and o.order_status='SUCCESS'
         union
         select 0 as num1,0 as num2,count(1) as num3,0 as num4,0 as num5,0 as num6, 0 as num7 from bt_order o
         <if test="orgIds != null and orgIds != ''">
@@ -165,6 +166,7 @@
         <if test="id != null">
             and o.id = #{id}
         </if>
+            and o.order_status='SUCCESS'
         union
         select 0 as num1,0 as num2,0 as num3,sum(o.order_amount) as num4,0 as num5,0 as num6, 0 as num7 from bt_order o
         <if test="orgIds != null and orgIds != ''">

+ 11 - 0
imcs-bt-be/imcs-business-entity/src/main/java/com/github/zuihou/business/barrel/entity/EquBarrel.java

@@ -151,6 +151,17 @@ public class EquBarrel extends Entity<Long> {
     @Excel(name = "过期状态")
     private String exprStatus;
 
+
+    /**
+     * 过期状态
+     */
+    @ApiModelProperty(value = "即将过期状态")
+    @Length(max = 10, message = "即将过期状态长度不能超过10")
+    @TableField(exist = false)
+    @Excel(name = "即将过期状态")
+    private String exprCloseStatus;
+
+
     /**
      * 权重
      */