Procházet zdrojové kódy

Merge branch 'master' of http://106.14.142.95:3000/wangyuanbo/bt

wangyuanbo před 2 roky
rodič
revize
9ef19a1468

+ 12 - 1
imcs-bt-be/imcs-authority-server/src/main/java/com/github/zuihou/api/OpsAppApi.java

@@ -85,7 +85,18 @@ public class OpsAppApi {
         ProductionResource productionResource = BeanUtil.toBean(params.getModel(), ProductionResource.class);
         queryWrap.eq(ProductionResource::getStatus, "1").orderByDesc(ProductionResource::getCreateTime);
         if (StringUtils.isNotEmpty(productionResource.getOnlineStatus())) {
-            List<String> ids = productionTenantResourceService.getEquStatusIds(productionResource.getOnlineStatus());
+            List<String> ids = null;
+            //过滤处理设备状态
+            if(productionResource.getOnlineStatus().equals("2")) {
+                ids = productionTenantResourceService.getEquStatusIds(productionResource.getOnlineStatus());
+            }else if(productionResource.getOnlineStatus().equals("3")){
+                //过滤处理缺料状态
+                ids = productionTenantResourceService.getEquLackDevIds().stream().map(p->p.getId().toString()).collect(toList());
+            }
+            if (ids.size() == 0) {
+                //默认查询 确保查询数据为空
+                ids.add(0, "0");
+            }
             queryWrap.in(ProductionResource::getId, ids);
         }
         IPage<ProductionResource> list = productionTenantResourceService.pageList(page, queryWrap);

+ 2 - 0
imcs-bt-be/imcs-business-biz/src/main/java/com/github/zuihou/business/productionresource/dao/ProductionTenantResourceMapper.java

@@ -33,4 +33,6 @@ public interface ProductionTenantResourceMapper extends SuperMapper<ProductionRe
     Integer getEquLockCount(Long equId);
 
     Map getDevStatusMap(@Param("id")Long equId);
+
+    List<ProductionResource> getEquLackDevIds();
 }

+ 2 - 0
imcs-bt-be/imcs-business-biz/src/main/java/com/github/zuihou/business/productionresource/service/ProductionTenantResourceService.java

@@ -32,4 +32,6 @@ public interface ProductionTenantResourceService extends SuperService<Production
     Integer getEquLockCount(Long equId);
 
     Map getDevStatusMap(Long equId);
+
+    List<ProductionResource> getEquLackDevIds();
 }

+ 5 - 0
imcs-bt-be/imcs-business-biz/src/main/java/com/github/zuihou/business/productionresource/service/impl/ProductionTenantResourceServiceImpl.java

@@ -83,4 +83,9 @@ public class ProductionTenantResourceServiceImpl extends SuperServiceImpl<Produc
     public Map getDevStatusMap(Long equId) {
         return baseMapper.getDevStatusMap(equId);
     }
+
+    @Override
+    public List<ProductionResource> getEquLackDevIds() {
+        return baseMapper.getEquLackDevIds();
+    }
 }

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

@@ -191,7 +191,7 @@
         <if test="id != null">
             and o.order_equ_id = #{id}
         </if>
-        and o.order_status='1'
+        and o.order_status='6'
         union
         select 0,0,0,0,count(1) as num5,0, 0, 0, 0 from bt_order o
         <if test="orgIds != null and orgIds != ''">
@@ -229,7 +229,7 @@
         <if test="id != null">
             and o.order_equ_id = #{id}
         </if>
-        and o.order_status = '1'
+        and o.order_status = '6'
         union
         select 0,0,0,0,0,0, count(p.id) as num7, 0, 0 from imcs_tenant_productionresource p where p.status = '1'
         <if test="id != null">
@@ -256,7 +256,7 @@
         <if test="id != null">
             and o.order_equ_id = #{id}
         </if>
-        and o.order_status = '1'
+        and o.order_status = '6'
         union
         select 0,0,0,0,0,0, 0, 0, count(distinct p.id) from imcs_tenant_productionresource p left join bt_equ_barrel b on b.equ_id = p.id
         where p.status = '1' and b.residue_warn>=b.mtr_residue

+ 5 - 0
imcs-bt-be/imcs-business-biz/src/main/resources/mapper_business/base/productionresource/ProductionresourceMapper.xml

@@ -118,6 +118,11 @@
         </if>
     </select>
 
+    <select id="getEquLackDevIds" resultType="com.github.zuihou.business.productionresource.entity.ProductionResource">
+        select distinct p.id from imcs_tenant_productionresource p left join bt_equ_barrel b on b.equ_id = p.id
+        where p.status = '1' and b.residue_warn>=b.mtr_residue
+    </select>
+
     <select id="getDevStatusMap" parameterType="hashMap" resultType="java.util.Map">
         select sum(num1) as barrelLackNum,
                sum(num2) as barrelExprNum,

+ 9 - 10
imcs-bt-fe/imcs-bt-fe/uni-mall/pages/device/device.vue

@@ -3,9 +3,9 @@
 		<view class="device-list">
 			<navigator :url="'../device/deviceDetail?id='+item.id" class="item" v-for="(item, index) in deviceList"
 				:key="index">
-				<view class="img-bg">
-					<image :src="item.imgUrl" background-size="cover" v-if="item.imgUrl"></image>
-					<image :src="item.pic" background-size="cover" v-if="item.pic"></image>
+				<view>
+					<image class="img-bg" :src="item.imgUrl" background-size="cover" v-if="item.imgUrl"></image>
+					<image class="img-bg" :src="item.pic" background-size="cover" v-if="item.pic"></image>
 				</view>
 				<view class="txt-box">
 					<view class="line">
@@ -99,8 +99,7 @@
 	}
 	.device-list .item {
 		display: block;
-		width: 750rpx;
-		height: 416rpx;
+		height: 456rpx;
 		position: relative;
 		margin-bottom: 4rpx;
 	}
@@ -110,8 +109,8 @@
 		left: 0;
 		top: 0;
 		z-index: 0;
-		width: 750rpx;
-		height: 417rpx;
+		width: 100%;
+		height: 380rpx;
 		overflow: hidden;
 	}
 
@@ -126,7 +125,7 @@
 		top: 0;
 		display: table;
 		z-index: 0;
-		width: 750rpx;
+		width: 100%;
 		height: 417rpx;
 	}
 
@@ -151,7 +150,7 @@
 	}
 	.device-list .status {
 		position: absolute;
-		right: 10%;
+		right: 8%;
 		top: 40%;
 		vertical-align: middle;
 		text-align: center;		
@@ -176,7 +175,7 @@
 	   color: #000;
 	   font-size: 30rpx;
 	   position: absolute;
-	   left: 40%;
+	   left: 45%;
 	   bottom: 0; 
 	}
 </style>

+ 1 - 1
imcs-bt-fe/imcs-bt-fe/uni-mall/pages/ucenter/index/index.vue

@@ -56,7 +56,7 @@
 					<text class="txt">帮助中心</text>
 				</navigator>
 			</view>
-			<view class="item item-bottom">
+			<view class="item item-bottom" v-show="false">
 				<navigator url="/pages/ucenter/feedback/feedback" class="a">
 					<text class="icon feedback"></text>
 					<text class="txt">意见反馈</text>

+ 1 - 1
imcs-bt-fe/imcs-bt-fe/uni-mall/pages/ucenter/order/order.vue

@@ -105,7 +105,7 @@
 				array: [{
 					id: "",
 					name: '全部'
-				},{id:"0", name: '未支付'},{id:"1", name: '已支付'},{id:"2", name:'已取消'},{id:"3", name:'生产完成'},{id:"4", name: '异常'},{id:"5", name: '转入退款'},{id:"6", name: '其它'}],
+				},{id:"0", name: '未支付'},{id:"1", name: '已支付'},{id:"2", name:'已取消'},{id:"3", name:'生产完成'},{id:"4", name: '异常'},{id:"5", name: '转入退款'},{id:"6", name: '取杯完成'}],
 				orderList: [
 					/*{
 					name: '美式咖啡',