guoyujia 1 жил өмнө
parent
commit
d66fa515a4

+ 1 - 1
src/main/java/cn/ezhizao/project/business/controller/Sfc10500Controller.java

@@ -25,7 +25,7 @@ private Sfc10500ServiceImpl sfc10500Service;
     @GetMapping(value = "/getLotAmount")
     private AjaxResult getLotAmount(Sfc10500 sfc10500) {
         //查找批次单批重量
-        return success( sfc10500Service.getLotMount(sfc10500));
+        return success( sfc10500Service.query().like("lotno",sfc10500.getLotno()).eq("lotseq",sfc10500.getLotseq()).orderByDesc("peqty").list().get(0));
     }
 
 }

+ 1 - 1
src/main/java/cn/ezhizao/project/business/mapper/Sfc10500Mapper.java

@@ -9,5 +9,5 @@ import java.util.List;
 
 public interface Sfc10500Mapper extends BaseMapper<Sfc10500>
 {
-   Sfc10500 getLotMount(Sfc10500 sfc10500);
+
 }

+ 0 - 1
src/main/java/cn/ezhizao/project/business/service/ISfc10500Service.java

@@ -10,6 +10,5 @@ import java.util.List;
 
 public interface ISfc10500Service extends IService<Sfc10500>
 {
-    Sfc10500 getLotMount(Sfc10500 sfc10500);
 
 }

+ 0 - 6
src/main/java/cn/ezhizao/project/business/service/impl/Sfc10500ServiceImpl.java

@@ -18,10 +18,4 @@ public class Sfc10500ServiceImpl extends ServiceImpl<Sfc10500Mapper, Sfc10500> i
     @Resource
     private Sfc10500Mapper sfc10500Mapper;
 
-
-    @Override
-    @DataSource(value = DataSourceType.SLAVE)
-    public Sfc10500 getLotMount(Sfc10500 sfc10500) {
-        return sfc10500Mapper.getLotMount(sfc10500);
-    }
 }

+ 0 - 3
src/main/resources/mybatis/business/Sfc10500Mapper.xml

@@ -9,7 +9,4 @@
     </resultMap>
 <!--  and lotseq =#{lotseq, jdbcType=INTEGER} -->
 
-    <select id="getLotMount" parameterType="Sfc10500" resultMap="Sfc10500Result">
-        select top 1 * from sfc10500 where lotno LIKE '%#{lotno, jdbcType=CHAR}%' order by peqty desc
-    </select>
 </mapper>