فهرست منبع

修改序列号新增

HUJIANGUO 3 سال پیش
والد
کامیت
bcf4101d88

+ 3 - 2
src/main/java/com/steerinfo/dil/mapper/AmsContractBreachMapper.java

@@ -8,6 +8,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
 
 @Mapper
 public interface AmsContractBreachMapper extends IBaseMapper<AmsContractBreach, BigDecimal> {
@@ -45,6 +46,6 @@ public interface AmsContractBreachMapper extends IBaseMapper<AmsContractBreach,
      */
     int updateByPrimaryKeySelective(AmsContractBreach amsContractBreach);
 
-
-
+    @Select("select seq_AMS_BREACH.nextval from dual")
+    BigDecimal selectBreachId();
 }

+ 4 - 0
src/main/java/com/steerinfo/dil/mapper/AmsContractOtherPriceMapper.java

@@ -7,6 +7,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
 
 @Mapper
 public interface AmsContractOtherPriceMapper extends IBaseMapper<AmsContractOtherPrice, BigDecimal> {
@@ -44,4 +45,7 @@ public interface AmsContractOtherPriceMapper extends IBaseMapper<AmsContractOthe
      * @return
      */
     BigDecimal selectMaxId();
+
+    @Select("select seq_AMS_OTHER.nextval from dual")
+    BigDecimal selectOtherId();
 }

+ 3 - 1
src/main/java/com/steerinfo/dil/mapper/AmsContractTrainPriceMapper.java

@@ -8,6 +8,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
 
 @Mapper
 public interface AmsContractTrainPriceMapper extends IBaseMapper<AmsContractTrainPrice, Short> {
@@ -59,5 +60,6 @@ public interface AmsContractTrainPriceMapper extends IBaseMapper<AmsContractTrai
      */
     List<Map<String,Object>> selectTrainPriceToUpdate(BigDecimal priceId);
 
-
+    @Select("select seq_AMS_TRAIN.nextval from dual")
+    BigDecimal selectTrainId();
 }

+ 4 - 0
src/main/java/com/steerinfo/dil/mapper/AmsContractTransportPriceMapper.java

@@ -7,6 +7,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
 
 @Mapper
 public interface AmsContractTransportPriceMapper extends IBaseMapper<AmsContractTransportPrice, BigDecimal> {
@@ -99,4 +100,7 @@ public interface AmsContractTransportPriceMapper extends IBaseMapper<AmsContract
     List<Map<String, Object>> getPriceValueAndPriceTonKilometer();
 //    //通过主键修改吨公里数
 //    int updatePriceTonKilometer(BigDecimal priceId);
+
+    @Select("select seq_AMS_TRANSPORT.nextval from dual")
+    BigDecimal selectTransportId();
 }

+ 4 - 0
src/main/java/com/steerinfo/dil/mapper/AmsPurchaseOrderMapper.java

@@ -7,6 +7,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
 
 @Mapper
 public interface AmsPurchaseOrderMapper extends IBaseMapper<AmsPurchaseOrder, BigDecimal> {
@@ -23,4 +24,7 @@ public interface AmsPurchaseOrderMapper extends IBaseMapper<AmsPurchaseOrder, Bi
      * @return
      */
     BigDecimal selectMaxId();
+
+    @Select("select seq_AMS_PURCHASE.nextval from dual")
+    BigDecimal selectPurchaseId();
 }

+ 1 - 1
src/main/java/com/steerinfo/dil/service/impl/AmsContractBreachServiceImpl.java

@@ -29,7 +29,7 @@ public class AmsContractBreachServiceImpl implements IAmsContractBreachService {
      */
     @Override
     public BigDecimal selectMaxId() {
-        return amsContractBreachMapper.selectMaxId();
+        return amsContractBreachMapper.selectBreachId();
     }
 
     /**

+ 2 - 2
src/main/java/com/steerinfo/dil/service/impl/AmsContractOtherPriceServiceImpl.java

@@ -90,7 +90,7 @@ public class AmsContractOtherPriceServiceImpl implements IAmsContractOtherPriceS
      */
     @Override
     public BigDecimal selectMaxId() {
-        BigDecimal priceId = amsContractOtherPriceMapper.selectMaxId();
-        return priceId == null ? new BigDecimal(0) : new BigDecimal(priceId.intValue() + 1);
+
+        return amsContractOtherPriceMapper.selectOtherId();
     }
 }

+ 1 - 1
src/main/java/com/steerinfo/dil/service/impl/AmsContractTrainPriceServiceImpl.java

@@ -29,7 +29,7 @@ public class AmsContractTrainPriceServiceImpl implements IAmsContractTrainPriceS
      */
     @Override
     public BigDecimal selectMaxId() {
-        return amsContractTrainPriceMapper.selectMaxId();
+        return amsContractTrainPriceMapper.selectTrainId();
     }
 
     /**

+ 1 - 1
src/main/java/com/steerinfo/dil/service/impl/AmsContractTransportPriceServiceImpl.java

@@ -28,7 +28,7 @@ public class AmsContractTransportPriceServiceImpl implements IAmsContractTranspo
      */
     @Override
     public BigDecimal selectMaxId() {
-        return amsContractTransportPriceMapper.selectMaxId();
+        return amsContractTransportPriceMapper.selectTransportId();
     }
 
     /**

+ 1 - 1
src/main/java/com/steerinfo/dil/service/impl/AmsPurchaseOrderServiceImpl.java

@@ -37,6 +37,6 @@ public class AmsPurchaseOrderServiceImpl implements IAmsPurchaseOrderService {
      */
     @Override
     public BigDecimal selectMaxId() {
-        return amsPurchaseOrderMapper.selectMaxId();
+        return amsPurchaseOrderMapper.selectPurchaseId();
     }
 }