gongdecai 1 jaar geleden
bovenliggende
commit
651ec9ae32

+ 2 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/FuelFillingInfoServiceImpl.java

@@ -24,6 +24,7 @@ import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.text.SimpleDateFormat;
 import java.util.*;
@@ -58,6 +59,7 @@ public class FuelFillingInfoServiceImpl extends ServiceImpl<FuelFillingInfoMappe
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String addFilling(FuelFillingInfo fuelFillingInfo) {
         if("1".equals(fuelFillingInfo.getFlag())){
             //新增主键id

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/FuelFillingInfoMapper.xml

@@ -66,6 +66,7 @@
         left join filling_detail_info fd on ff.id = fd.filling_id and fd.delete_flag = '0'
         WHERE
         ff.comp_id = #{compId}
+        and ff.common_id = #{commonId}
         and ff.delete_flag = '0'
         <if test="searchType != null and searchType != ''">
             <!--未完成-->