shenyijian
2024-06-25 d6b704980cd4a841eb8b58b924adfc99122c80eb
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sg/controller/SgProjectInfoController.java
@@ -3,16 +3,22 @@
import cn.gistack.sm.sg.DO.SgProjectInfoDO;
import cn.gistack.sm.sg.DTO.ProjectSearchDTO;
import cn.gistack.sm.sg.VO.SgProjectInfoVO;
import cn.gistack.sm.sg.excel.ProjectExcel;
import cn.gistack.sm.sg.excel.ProjectImport;
import cn.gistack.sm.sg.service.SgProjectInfoService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiOperation;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import java.util.Map;
@@ -66,4 +72,14 @@
      Map<String,Long> map = sgProjectInfoService.projectCount(searchDTO);
      return R.data(map);
   }
   /**
    * 导入用户
    */
   @PostMapping("import_project")
   public R importUser(MultipartFile file, Integer isCovered) {
      ProjectImport projectImport = new ProjectImport(sgProjectInfoService, isCovered == 1);
      ExcelUtil.save(file, projectImport, ProjectExcel.class);
      return R.success("操作成功");
   }
}