Browse Source

根据条码查样品库存信息

LLL 1 year ago
parent
commit
0c7160e797

+ 5 - 3
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/inventory/mapper/ItdmSampleInventoryMapper.java

@@ -1,10 +1,9 @@
 package org.jeecg.modules.inventory.mapper;
 
-import java.util.List;
-
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
 import org.jeecg.modules.inventory.entity.ItdmSampleInventory;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
 /**
  * @Description: 样品库存
@@ -14,4 +13,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface ItdmSampleInventoryMapper extends BaseMapper<ItdmSampleInventory> {
 
+    @Select("select * from itdm_sample_inventory where id = " +
+            "(select inventory_id from itdm_inventory_barcode where bar_code = #{barCode})")
+    public ItdmSampleInventory getByBarCode(@Param("barCode") String barCode);
 }

+ 10 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/inventory/service/impl/ItdmSampleInventoryServiceImpl.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.inventory.service.impl;
 import org.jeecg.modules.inventory.entity.ItdmSampleInventory;
 import org.jeecg.modules.inventory.mapper.ItdmSampleInventoryMapper;
 import org.jeecg.modules.inventory.service.IItdmSampleInventoryService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -16,4 +17,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 @Service
 public class ItdmSampleInventoryServiceImpl extends ServiceImpl<ItdmSampleInventoryMapper, ItdmSampleInventory> implements IItdmSampleInventoryService {
 
+    @Autowired
+    @SuppressWarnings("all")
+    private ItdmSampleInventoryMapper itdmSampleInventoryMapper;
+
+
+    public ItdmSampleInventory getByBarCode(String barCode){
+        return itdmSampleInventoryMapper.getByBarCode(barCode);
+    }
+
 }

+ 12 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/service/impl/ItdmGongdanMasterServiceImpl.java

@@ -3,10 +3,13 @@ package org.jeecg.modules.itdmGongDan.service.impl;
 import org.jeecg.modules.itdmGongDan.entity.ItdmGongdanMaster;
 import org.jeecg.modules.itdmGongDan.mapper.ItdmGongdanMasterMapper;
 import org.jeecg.modules.itdmGongDan.service.IItdmGongdanMasterService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
+import java.util.List;
+
 /**
  * @Description: 工单master
  * @Author: jeecg-boot
@@ -15,5 +18,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  */
 @Service
 public class ItdmGongdanMasterServiceImpl extends ServiceImpl<ItdmGongdanMasterMapper, ItdmGongdanMaster> implements IItdmGongdanMasterService {
+    @Autowired
+    @SuppressWarnings("all")
+    private ItdmGongdanMasterMapper masterMapper;
 
+    /**
+     * 根据委托id查工单master
+     */
+    public List<ItdmGongdanMaster> listByWeituoId(String weituoId){
+        return masterMapper.listByWeituoId(weituoId);
+    }
 }