diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseFpPlanqtyController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseFpPlanqtyController.java index 2a6f8fc..6cb86d4 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseFpPlanqtyController.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/BaseFpPlanqtyController.java @@ -87,13 +87,7 @@ public class BaseFpPlanqtyController extends BaseController public AjaxResult addSave(BaseFpPlanqty baseFpPlanqty) { - List list = baseFpPlanqtyService.selectBaseFpPlanqtyList(null); - int id=0; - System.out.println(list); - if (list!=null||!list.isEmpty()){ - id= Math.toIntExact(list.get(list.size() - 1).getId()) + 1; - } - baseFpPlanqty.setId(Long.valueOf(id)); + return toAjax(baseFpPlanqtyService.insertBaseFpPlanqty(baseFpPlanqty)); } diff --git a/ruoyi-system/src/main/resources/mapper/system/BaseFpPlanqtyMapper.xml b/ruoyi-system/src/main/resources/mapper/system/BaseFpPlanqtyMapper.xml index 8240906..5bc0485 100644 --- a/ruoyi-system/src/main/resources/mapper/system/BaseFpPlanqtyMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/BaseFpPlanqtyMapper.xml @@ -4,13 +4,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + + - select qty, id from base_fp_planqty + select qty, id,create_time from base_fp_planqty