|
@@ -1,6 +1,8 @@
|
|
|
package com.ruoyi.business.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.ruoyi.business.domain.ZwywTsxdCwjs;
|
|
|
+import com.ruoyi.business.domain.ZwywTsxdSnlrmx;
|
|
|
import com.ruoyi.business.service.IZwywTsxdCwjsService;
|
|
|
import com.ruoyi.common.core.exception.ServiceException;
|
|
|
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
|
@@ -11,6 +13,7 @@ import com.ruoyi.common.log.annotation.Log;
|
|
|
import com.ruoyi.common.log.enums.BusinessType;
|
|
|
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
|
|
import com.ruoyi.system.validate.group.AddGroup;
|
|
|
+import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -74,15 +77,6 @@ public class ZwywTsxdCwjsController extends BaseController
|
|
|
@PostMapping
|
|
|
public AjaxResult add(@Validated({AddGroup.class}) @RequestBody ZwywTsxdCwjs zwywTsxdCwjs)
|
|
|
{
|
|
|
- List<ZwywTsxdCwjs> list = zwywTsxdCwjsService.selectZwywTsxdCwjsList(zwywTsxdCwjs);
|
|
|
- if (list.size()>0){
|
|
|
- for (int i =0;i<list.size();i++){
|
|
|
- String sjjzrq = list.get(i).getSjjzrq();
|
|
|
- if (zwywTsxdCwjs.getSjjzrq().equals(sjjzrq)){
|
|
|
- throw new ServiceException("当前数据已填报,不能新增!");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
return toAjax(zwywTsxdCwjsService.insertZwywTsxdCwjs(zwywTsxdCwjs),zwywTsxdCwjs.getId());
|
|
|
}
|
|
|
|