|
@@ -1,42 +1,27 @@
|
|
|
package com.zksy.web.controller.basicData;
|
|
package com.zksy.web.controller.basicData;
|
|
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.zksy.common.annotation.Log;
|
|
import com.zksy.common.annotation.Log;
|
|
|
import com.zksy.common.core.controller.BaseController;
|
|
import com.zksy.common.core.controller.BaseController;
|
|
|
|
|
+import com.zksy.common.core.controller.BaseControllerInterface;
|
|
|
import com.zksy.common.core.domain.AjaxResult;
|
|
import com.zksy.common.core.domain.AjaxResult;
|
|
|
import com.zksy.common.enums.BusinessType;
|
|
import com.zksy.common.enums.BusinessType;
|
|
|
import com.zksy.common.utils.file.ExcelUtils;
|
|
import com.zksy.common.utils.file.ExcelUtils;
|
|
|
import com.zksy.system.basicData.domain.CrmAdministrativeLicense;
|
|
import com.zksy.system.basicData.domain.CrmAdministrativeLicense;
|
|
|
import com.zksy.system.basicData.service.CrmAdministrativeLicenseService;
|
|
import com.zksy.system.basicData.service.CrmAdministrativeLicenseService;
|
|
|
|
|
+import com.zksy.system.basicData.service.HandleRequestLicenseService;
|
|
|
import com.zksy.utils.DowntemplateUtil;
|
|
import com.zksy.utils.DowntemplateUtil;
|
|
|
import com.zksy.utils.SearchUtil;
|
|
import com.zksy.utils.SearchUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
-import org.apache.poi.ss.usermodel.DateUtil;
|
|
|
|
|
-import org.aspectj.util.FileUtil;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.core.io.ClassPathResource;
|
|
|
|
|
-import org.springframework.core.io.InputStreamResource;
|
|
|
|
|
-import org.springframework.core.io.Resource;
|
|
|
|
|
-import org.springframework.http.HttpHeaders;
|
|
|
|
|
-import org.springframework.http.MediaType;
|
|
|
|
|
-import org.springframework.http.ResponseEntity;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
-import javax.servlet.ServletOutputStream;
|
|
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
-import java.io.File;
|
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
-import java.io.InputStream;
|
|
|
|
|
-import java.text.ParseException;
|
|
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
|
|
-import java.time.LocalDate;
|
|
|
|
|
-import java.time.format.DateTimeFormatter;
|
|
|
|
|
-import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
-import java.util.Locale;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @author Administrator
|
|
* @author Administrator
|
|
@@ -48,9 +33,11 @@ import java.util.Locale;
|
|
|
@Api(value = "行政许可", tags = "行政许可")
|
|
@Api(value = "行政许可", tags = "行政许可")
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("/crmAdministrativeLicense")
|
|
@RequestMapping("/crmAdministrativeLicense")
|
|
|
-public class CrmAdministrativeLicenseController extends BaseController {
|
|
|
|
|
|
|
+public class CrmAdministrativeLicenseController extends BaseController implements BaseControllerInterface {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private CrmAdministrativeLicenseService service;
|
|
private CrmAdministrativeLicenseService service;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private HandleRequestLicenseService handleRequestLicenseService;
|
|
|
|
|
|
|
|
@GetMapping("/findByPage")
|
|
@GetMapping("/findByPage")
|
|
|
@ApiOperation(value = "行政许可分页查询")
|
|
@ApiOperation(value = "行政许可分页查询")
|
|
@@ -64,10 +51,7 @@ public class CrmAdministrativeLicenseController extends BaseController {
|
|
|
return AjaxResult.success(service.list(SearchUtil.parseWhereSql(conditionJson)));
|
|
return AjaxResult.success(service.list(SearchUtil.parseWhereSql(conditionJson)));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @ApiOperation("行政许可数据导入")
|
|
|
|
|
- @Log(title = "行政许可", businessType = BusinessType.IMPORT)
|
|
|
|
|
- //@PreAuthorize("@ss.hasPermi('system:user:import')")
|
|
|
|
|
- @PostMapping("/importData")
|
|
|
|
|
|
|
+ @Override
|
|
|
public AjaxResult importData(MultipartFile file)
|
|
public AjaxResult importData(MultipartFile file)
|
|
|
{
|
|
{
|
|
|
try {
|
|
try {
|
|
@@ -87,6 +71,14 @@ public class CrmAdministrativeLicenseController extends BaseController {
|
|
|
return AjaxResult.error("导入数据失败");
|
|
return AjaxResult.error("导入数据失败");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ @ApiOperation("行政许可数据导入")
|
|
|
|
|
+ @Log(title = "行政许可", businessType = BusinessType.IMPORT)
|
|
|
|
|
+ //@PreAuthorize("@ss.hasPermi('system:user:import')")
|
|
|
|
|
+ @PostMapping("/importData")
|
|
|
|
|
+ public AjaxResult importDataRequest(MultipartFile file) throws Exception {
|
|
|
|
|
+ handleRequestLicenseService.requestImportData("crmAdministrativeLicenseController","行政许可",file,getUsername());
|
|
|
|
|
+ return AjaxResult.success("成功发送导入请求,待负责人审核");
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@ApiOperation("行政许可数据导出")
|
|
@ApiOperation("行政许可数据导出")
|
|
|
@Log(title = "行政许可", businessType = BusinessType.EXPORT)
|
|
@Log(title = "行政许可", businessType = BusinessType.EXPORT)
|
|
@@ -95,17 +87,36 @@ public class CrmAdministrativeLicenseController extends BaseController {
|
|
|
List<CrmAdministrativeLicense> wrapperList = service.list(SearchUtil.parseWhereSql(conditionJson));
|
|
List<CrmAdministrativeLicense> wrapperList = service.list(SearchUtil.parseWhereSql(conditionJson));
|
|
|
ExcelUtils.export(response,"行政许可",wrapperList,CrmAdministrativeLicense.class);
|
|
ExcelUtils.export(response,"行政许可",wrapperList,CrmAdministrativeLicense.class);
|
|
|
}
|
|
}
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public AjaxResult delete(@RequestBody List<String> ids)
|
|
|
|
|
+ {
|
|
|
|
|
+ return toAjax(service.removeByIds(ids));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public AjaxResult getListByIds(List<String> ids) {
|
|
|
|
|
+ LambdaQueryWrapper<CrmAdministrativeLicense> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
+ wrapper.in(CrmAdministrativeLicense::getId,ids);
|
|
|
|
|
+ List<CrmAdministrativeLicense> list = service.list(wrapper);
|
|
|
|
|
+ return AjaxResult.success(list);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@Log(title = "行政许可", businessType = BusinessType.DELETE)
|
|
@Log(title = "行政许可", businessType = BusinessType.DELETE)
|
|
|
@PostMapping("/delete")
|
|
@PostMapping("/delete")
|
|
|
@ApiOperation(value = "删除行政许可", notes = "删除行政许可")
|
|
@ApiOperation(value = "删除行政许可", notes = "删除行政许可")
|
|
|
- public AjaxResult delete(@RequestBody List<String> ids)
|
|
|
|
|
|
|
+ public AjaxResult deleteRequest(@RequestBody List<String> ids)
|
|
|
{
|
|
{
|
|
|
- return toAjax(service.removeByIds(ids));
|
|
|
|
|
|
|
+ handleRequestLicenseService.requestDelete("crmAdministrativeLicenseController","行政许可",ids,getUsername());
|
|
|
|
|
+ return AjaxResult.success("成功发送删除请求,待负责人审核");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
@DeleteMapping("/deleteAll")
|
|
@DeleteMapping("/deleteAll")
|
|
|
@ApiOperation(value = "清除数据", notes = "清除数据")
|
|
@ApiOperation(value = "清除数据", notes = "清除数据")
|
|
|
|
|
+ public AjaxResult deleteAllRequest(){
|
|
|
|
|
+ handleRequestLicenseService.requestDeleteAll("crmAdministrativeLicenseController","行政许可",getUsername());
|
|
|
|
|
+ return AjaxResult.success("成功发送删除全表请求,待负责人审核");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
public AjaxResult deleteAll(){
|
|
public AjaxResult deleteAll(){
|
|
|
return service.deleteAll();
|
|
return service.deleteAll();
|
|
|
}
|
|
}
|