Explorar el Código

判断补贴统计、生产规模、产业产值重复日期 养殖分布重复类型

Newspaper hace 2 años
padre
commit
c93ed34769

+ 0 - 4
huimv-cattle/src/main/java/com/huimv/cattle/service/impl/ProductionCapacityServiceImpl.java

@@ -62,7 +62,6 @@ public class ProductionCapacityServiceImpl extends ServiceImpl<ProductionCapacit
     }
 
     @Override
-    //目前没有判断重复年份
     public Result saveProductionCapacity(HttpServletRequest request, Map<String, String> paramsMap) {
         String farmCode = paramsMap.get("farmCode");
         if (StringUtils.isBlank(farmCode)){
@@ -82,9 +81,6 @@ public class ProductionCapacityServiceImpl extends ServiceImpl<ProductionCapacit
             Integer year = jsonObject.getInteger("year");
             ProductionCapacity productionCapacity = new ProductionCapacity();
             productionCapacity.setYear(year);
-//            if (ObjectUtil.isNotEmpty(productionCapacityMapper.selectOne(new QueryWrapper<ProductionCapacity>().eq("year",year)))){
-//                return new Result(10001,"存在重复年份",false);
-//            }
             productionCapacity.setProductionCount(jsonObject.getInteger("productionCount"));
             productionCapacity.setFarmCode(farmCode);
             productionCapacityMapper.insert(productionCapacity);

+ 0 - 4
huimv-cattle/src/main/java/com/huimv/cattle/service/impl/SubsidyCountServiceImpl.java

@@ -62,7 +62,6 @@ public class SubsidyCountServiceImpl extends ServiceImpl<SubsidyCountMapper, Sub
     }
 
     @Override
-    //目前没有判断重复年份
     public Result saveSubsidyCount(HttpServletRequest request, Map<String, String> paramsMap) {
         String farmCode = paramsMap.get("farmCode");
         if (StringUtils.isBlank(farmCode)){
@@ -81,9 +80,6 @@ public class SubsidyCountServiceImpl extends ServiceImpl<SubsidyCountMapper, Sub
             Integer year = jsonObject.getInteger("year");
             SubsidyCount subsidyCount = new SubsidyCount();
             subsidyCount.setYear(year);
-//            if (ObjectUtil.isNotEmpty(subsidyCountMapper.selectOne(new QueryWrapper<SubsidyCount>().eq("year",year)))){
-//                return new Result(10001,"存在重复年份",false);
-//            }
             subsidyCount.setSubsidyCount(jsonObject.getBigDecimal("subsidyCount"));
             subsidyCount.setFarmCode(farmCode);
             subsidyCountMapper.insert(subsidyCount);