Sfoglia il codice sorgente

【工装夹具分布】新增

lxb 2 anni fa
parent
commit
badc9e95c6

+ 3 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/edgeLibrary/dao/StockInfoMapper.java

@@ -7,6 +7,7 @@ import com.github.zuihou.base.mapper.SuperMapper;
 import com.github.zuihou.business.edgeLibrary.entity.StockInfo;
 
 import com.github.zuihou.database.mybatis.auth.DataScope;
+import com.github.zuihou.tenant.vo.DeviceResourceDetailVo;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
@@ -63,4 +64,6 @@ public interface StockInfoMapper extends SuperMapper<StockInfo> {
     void updateStockInfoByStorgeId(Map updateLockStatusParams);
 
     List<Map> getXbkCountByShelves(Map paramsMap);
+
+    IPage<DeviceResourceDetailVo> frockSearch(IPage page,@Param("params") Map<String, Object> params);
 }

+ 3 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/edgeLibrary/service/StockInfoService.java

@@ -12,6 +12,7 @@ import com.github.zuihou.business.productionReadyCenter.entity.MToolClamp;
 import com.github.zuihou.business.productionReadyCenter.entity.Tray;
 import com.github.zuihou.database.mybatis.auth.DataScope;
 import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
+import com.github.zuihou.tenant.vo.DeviceResourceDetailVo;
 
 import java.math.BigDecimal;
 import java.util.LinkedHashMap;
@@ -177,4 +178,6 @@ public interface StockInfoService extends SuperService<StockInfo> {
     R procedureMeterialStockIn(String uniqueCode, Long goodsId, Long storgeId);
 
     List<Map> getXbkCountByShelves(Map paramsMap);
+
+    IPage<DeviceResourceDetailVo> frockSearch(IPage page, Map<String, Object> params);
 }

+ 5 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/edgeLibrary/service/impl/StockInfoServiceImpl.java

@@ -35,6 +35,7 @@ import com.github.zuihou.database.mybatis.conditions.Wraps;
 import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
 import com.github.zuihou.injection.annonation.InjectionResult;
 import com.github.zuihou.tenant.service.CodeRuleService;
+import com.github.zuihou.tenant.vo.DeviceResourceDetailVo;
 import com.github.zuihou.utils.BeanPlusUtil;
 import com.google.common.collect.Maps;
 import lombok.extern.slf4j.Slf4j;
@@ -702,4 +703,8 @@ public class StockInfoServiceImpl extends SuperServiceImpl<StockInfoMapper, Stoc
         return baseMapper.getXbkCountByShelves(paramsMap);
     }
 
+    @Override
+    public IPage<DeviceResourceDetailVo> frockSearch(IPage page, Map<String, Object> params) {
+        return baseMapper.frockSearch(page,params);
+    }
 }

+ 30 - 0
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/edgeLibrary/StockInfoMapper.xml

@@ -232,5 +232,35 @@
         GROUP BY v.parent_id
     </select>
 
+    <select id="frockSearch" resultType="com.github.zuihou.business.edgeLibrary.vo.FrockStockInfoVo">
+        SELECT
+            izz. NAME AS zoneName,
+            iss. NAME AS storgeName,
+            mfc. NAME AS frockName,
+            CASE
+                WHEN itp.mode_specification IS NOT NULL
+                    AND itp.mode_specification != '' THEN
+                    '是'
+                ELSE
+                    '否'
+                END AS mode_specification
+        FROM
+            imcs_s_stock_info ssi
+                LEFT JOIN imcs_s_storge iss ON ssi.storge_id = iss.id
+                LEFT JOIN imcs_m_frock_clamp mfc ON ssi.goods_id = mfc.id
+                LEFT JOIN imcs_p_productionresource_position ppp ON iss.id = ppp.storge_id
+                LEFT JOIN imcs_z_zone_productionresource zzp ON ppp.resource_id = zzp.resource_id
+                LEFT JOIN imcs_z_zone izz ON zzp.zone_id = izz.id
+                LEFT JOIN imcs_tenant_productionresource itp ON itp.id = zzp.resource_id
+        <where>
+            goods_type = 2
+            <if test="params.zoneId !=null and params.zoneId !=''">
+                AND zzp.zone_id = #{params.zoneId}
+            </if>
+            <if test="params.frockName !=null and params.frockName !=''">
+                AND mfc.NAME like concat('%',#{params.frockName},'%')
+            </if>
+        </where>
 
+    </select>
 </mapper>

+ 13 - 4
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/edgeLibrary/StockInfoController.java

@@ -2,6 +2,7 @@ package com.github.zuihou.business.controller.edgeLibrary;
 
 import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.zuihou.base.R;
 import com.github.zuihou.base.controller.SuperController;
 import com.github.zuihou.base.request.PageParams;
@@ -14,16 +15,14 @@ import com.github.zuihou.business.edgeLibrary.service.StockInfoService;
 import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
 import com.github.zuihou.database.mybatis.conditions.query.QueryWrap;
 import com.github.zuihou.log.annotation.SysLog;
+import com.github.zuihou.tenant.vo.DeviceResourceDetailVo;
 import com.sun.net.httpserver.Headers;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.HashMap;
 import java.util.List;
@@ -209,4 +208,14 @@ public class StockInfoController extends SuperController<StockInfoService, Long,
         }
         return success(baseService.demoLineStock(queryMap));
     }
+
+    @ApiOperation(value = "工装夹具分布查询", notes = "工装夹具分布查询")
+    @PostMapping("/frockSearch/{page}/{limit}")
+    @SysLog("设备资源生产明细")
+    public R<IPage<DeviceResourceDetailVo>> frockSearch(@PathVariable Long page,
+                                                                 @PathVariable Long limit,
+                                                                 @RequestBody Map<String,Object> params) {
+        Page pageInfo = new Page<>(page,limit);
+        return success(baseService.frockSearch(pageInfo,params));
+    }
 }

+ 16 - 0
imcs-admin-boot/imcs-common/src/main/java/com/github/zuihou/common/constant/DictionaryKey.java

@@ -200,4 +200,20 @@ public interface DictionaryKey {
             put("capsule", Lists.newArrayList("framework","safeguard")); //舱体线 =》 框体线,保障中心
         }
     };
+
+    Map<String, String> HL_WORK_LOCATION = new HashMap<String, String>(){
+        {
+            // 恒轮机床工作台点位对应关系
+            put("1", "127"); //工作台1
+            put("2", "128"); //工作台2
+        }
+    };
+
+    //设备IP,端口
+    Map<String, Map<String, String>> RESOURCE_NET = new HashMap<String, Map<String, String>>(){
+        {
+            // 云箭配置
+            put("heller", new HashMap<String,String>(){{put("url", "192.168.11.164");put("port", "4048");}});
+        }
+    };
 }