@@ -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));
}
@@ -9,5 +9,5 @@ import java.util.List;
public interface Sfc10500Mapper extends BaseMapper<Sfc10500>
{
- Sfc10500 getLotMount(Sfc10500 sfc10500);
+
@@ -10,6 +10,5 @@ import java.util.List;
public interface ISfc10500Service extends IService<Sfc10500>
@@ -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);
- }
@@ -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>