|
@@ -24,6 +24,7 @@ import com.ozs.system.service.ISysDeptService;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.util.ObjectUtils;
|
|
import org.springframework.util.ObjectUtils;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -34,7 +35,9 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
+import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -59,6 +62,7 @@ public class PlanYearsController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "查询年度计划")
|
|
@ApiOperation(value = "查询年度计划")
|
|
@PostMapping("/list")
|
|
@PostMapping("/list")
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('plan:planYears:list')")
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.QUERY)
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.QUERY)
|
|
public AjaxResult list(@RequestBody PlanYearsStandardVo vo, HttpServletRequest request) {
|
|
public AjaxResult list(@RequestBody PlanYearsStandardVo vo, HttpServletRequest request) {
|
|
List<PlanYearsResponseVo> planYearsList = new ArrayList<>();
|
|
List<PlanYearsResponseVo> planYearsList = new ArrayList<>();
|
|
@@ -80,10 +84,12 @@ public class PlanYearsController extends BaseController {
|
|
lw.ge(PlanYears::getPlanDemandSubTime, vo.getBeginTime());
|
|
lw.ge(PlanYears::getPlanDemandSubTime, vo.getBeginTime());
|
|
}
|
|
}
|
|
if (!ObjectUtils.isEmpty(vo.getEndTime())) {
|
|
if (!ObjectUtils.isEmpty(vo.getEndTime())) {
|
|
- lw.le(PlanYears::getPlanDemandSubTime, vo.getEndTime());
|
|
|
|
|
|
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
+ SimpleDateFormat dateFormatT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
|
|
|
|
+ Date parse = dateFormatT.parse(dateFormat.format(vo.getEndTime()) + " 23:59:59:999");
|
|
|
|
+ lw.le(PlanYears::getPlanDemandSubTime, parse);
|
|
}
|
|
}
|
|
- lw.eq(PlanYears::getDelFlay, DataIsDelete.DataNOTDelete);
|
|
|
|
-
|
|
|
|
|
|
+ lw.eq(PlanYears::getDelFlay, DataIsDelete.DataNOTDelete.getCode());
|
|
|
|
|
|
LoginUser loginUser = tokenService.getLoginUser(request);
|
|
LoginUser loginUser = tokenService.getLoginUser(request);
|
|
// 添加数据权限
|
|
// 添加数据权限
|
|
@@ -134,9 +140,11 @@ public class PlanYearsController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "审核单位查询年度计划")
|
|
@ApiOperation(value = "审核单位查询年度计划")
|
|
@PostMapping("/examineList")
|
|
@PostMapping("/examineList")
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('plan:planYears:examineList')")
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.QUERY)
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.QUERY)
|
|
public AjaxResult examineList(@RequestBody PlanYearsStandardVo vo, HttpServletRequest request) {
|
|
public AjaxResult examineList(@RequestBody PlanYearsStandardVo vo, HttpServletRequest request) {
|
|
List<PlanYearsResponseVo> planYearsList = new ArrayList<>();
|
|
List<PlanYearsResponseVo> planYearsList = new ArrayList<>();
|
|
|
|
+
|
|
try {
|
|
try {
|
|
LambdaQueryWrapper<PlanYears> lw = new LambdaQueryWrapper<PlanYears>();
|
|
LambdaQueryWrapper<PlanYears> lw = new LambdaQueryWrapper<PlanYears>();
|
|
if (!ObjectUtils.isEmpty(vo.getProjectName())) {
|
|
if (!ObjectUtils.isEmpty(vo.getProjectName())) {
|
|
@@ -148,18 +156,17 @@ public class PlanYearsController extends BaseController {
|
|
if (!ObjectUtils.isEmpty(vo.getIsExcess())) {
|
|
if (!ObjectUtils.isEmpty(vo.getIsExcess())) {
|
|
lw.eq(PlanYears::getIsExcess, vo.getIsExcess());
|
|
lw.eq(PlanYears::getIsExcess, vo.getIsExcess());
|
|
}
|
|
}
|
|
- if (!ObjectUtils.isEmpty(vo.getProjectStatus())) {
|
|
|
|
- lw.eq(PlanYears::getProjectStatus, vo.getProjectStatus());
|
|
|
|
- } else {
|
|
|
|
- lw.in(PlanYears::getProjectStatus, "1,3");
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
if (!ObjectUtils.isEmpty(vo.getBeginTime())) {
|
|
if (!ObjectUtils.isEmpty(vo.getBeginTime())) {
|
|
lw.ge(PlanYears::getPlanDemandSubTime, vo.getBeginTime());
|
|
lw.ge(PlanYears::getPlanDemandSubTime, vo.getBeginTime());
|
|
}
|
|
}
|
|
if (!ObjectUtils.isEmpty(vo.getEndTime())) {
|
|
if (!ObjectUtils.isEmpty(vo.getEndTime())) {
|
|
- lw.le(PlanYears::getPlanDemandSubTime, vo.getEndTime());
|
|
|
|
|
|
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
+ SimpleDateFormat dateFormatT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
|
|
|
|
+ Date parse = dateFormatT.parse(dateFormat.format(vo.getEndTime()) + " 23:59:59:999");
|
|
|
|
+ lw.le(PlanYears::getPlanDemandSubTime, parse);
|
|
}
|
|
}
|
|
- lw.eq(PlanYears::getDelFlay, DataIsDelete.DataNOTDelete);
|
|
|
|
|
|
+ lw.eq(PlanYears::getDelFlay, DataIsDelete.DataNOTDelete.getCode());
|
|
|
|
|
|
|
|
|
|
LoginUser loginUser = tokenService.getLoginUser(request);
|
|
LoginUser loginUser = tokenService.getLoginUser(request);
|
|
@@ -210,6 +217,7 @@ public class PlanYearsController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "导出年度计划数据")
|
|
@ApiOperation(value = "导出年度计划数据")
|
|
@PostMapping("/exportPlan")
|
|
@PostMapping("/exportPlan")
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('plan:planYears:exportPlan')")
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.EXPORT)
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.EXPORT)
|
|
public void exportPlan(HttpServletResponse response, @RequestBody PlanYearsStandardVo yearsStandardVo) throws Exception {
|
|
public void exportPlan(HttpServletResponse response, @RequestBody PlanYearsStandardVo yearsStandardVo) throws Exception {
|
|
List<PlanYearsResponseVo> list = planYearsService.selectPlanYearsListEXP(yearsStandardVo);
|
|
List<PlanYearsResponseVo> list = planYearsService.selectPlanYearsListEXP(yearsStandardVo);
|
|
@@ -218,6 +226,7 @@ public class PlanYearsController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "导出年度计划数据(审核单位)")
|
|
@ApiOperation(value = "导出年度计划数据(审核单位)")
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('plan:planYears:exportPlanExamine')")
|
|
@PostMapping("/exportPlanExamine")
|
|
@PostMapping("/exportPlanExamine")
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.EXPORT)
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.EXPORT)
|
|
public void exportPlanExamine(HttpServletResponse response, @RequestBody PlanYearsStandardVo yearsStandardVo) throws Exception {
|
|
public void exportPlanExamine(HttpServletResponse response, @RequestBody PlanYearsStandardVo yearsStandardVo) throws Exception {
|
|
@@ -228,6 +237,7 @@ public class PlanYearsController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "创建年度计划")
|
|
@ApiOperation(value = "创建年度计划")
|
|
@PostMapping("/add")
|
|
@PostMapping("/add")
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('plan:planYears:add')")
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.INSERT)
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.INSERT)
|
|
public AjaxResult add(@RequestBody PlanYearsStandardVo yearsStandardVo, HttpServletRequest request) {
|
|
public AjaxResult add(@RequestBody PlanYearsStandardVo yearsStandardVo, HttpServletRequest request) {
|
|
//获取采购单位-
|
|
//获取采购单位-
|
|
@@ -239,6 +249,7 @@ public class PlanYearsController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "修改年度计划")
|
|
@ApiOperation(value = "修改年度计划")
|
|
@PostMapping("/update")
|
|
@PostMapping("/update")
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('plan:planYears:update')")
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.UPDATE)
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.UPDATE)
|
|
public AjaxResult update(@RequestBody PlanYearsStandardVo yearsStandardVo, HttpServletRequest request) {
|
|
public AjaxResult update(@RequestBody PlanYearsStandardVo yearsStandardVo, HttpServletRequest request) {
|
|
LoginUser loginUser = tokenService.getLoginUser(request);
|
|
LoginUser loginUser = tokenService.getLoginUser(request);
|
|
@@ -248,6 +259,7 @@ public class PlanYearsController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "提交年度计划")
|
|
@ApiOperation(value = "提交年度计划")
|
|
@PostMapping("/commit")
|
|
@PostMapping("/commit")
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('plan:planYears:commit')")
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.UPDATE)
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.UPDATE)
|
|
public AjaxResult commit(@RequestBody PlanYearsStandardVo yearsStandardVo) {
|
|
public AjaxResult commit(@RequestBody PlanYearsStandardVo yearsStandardVo) {
|
|
return planYearsService.commit(yearsStandardVo);
|
|
return planYearsService.commit(yearsStandardVo);
|
|
@@ -255,6 +267,7 @@ public class PlanYearsController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "删除年度计划")
|
|
@ApiOperation(value = "删除年度计划")
|
|
@PostMapping("/delete")
|
|
@PostMapping("/delete")
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('plan:planYears:delete')")
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.DELETE)
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.DELETE)
|
|
public AjaxResult delete(@RequestBody PlanYearsStandardVo yearsStandardVo) {
|
|
public AjaxResult delete(@RequestBody PlanYearsStandardVo yearsStandardVo) {
|
|
return planYearsService.deletePlanYearsById(yearsStandardVo.getPlanYearId());
|
|
return planYearsService.deletePlanYearsById(yearsStandardVo.getPlanYearId());
|
|
@@ -262,6 +275,7 @@ public class PlanYearsController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "根据id获取年度计划信息")
|
|
@ApiOperation(value = "根据id获取年度计划信息")
|
|
@PostMapping("/view")
|
|
@PostMapping("/view")
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('plan:planYears:view')")
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.QUERY)
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.QUERY)
|
|
public AjaxResult view(@RequestBody PlanYearsStandardVo yearsStandardVo) {
|
|
public AjaxResult view(@RequestBody PlanYearsStandardVo yearsStandardVo) {
|
|
return planYearsService.view(yearsStandardVo);
|
|
return planYearsService.view(yearsStandardVo);
|
|
@@ -270,6 +284,7 @@ public class PlanYearsController extends BaseController {
|
|
@ApiOperation(value = "审核年度计划通过")
|
|
@ApiOperation(value = "审核年度计划通过")
|
|
@PostMapping("/reviewTo")
|
|
@PostMapping("/reviewTo")
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.UPDATE)
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.UPDATE)
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('plan:planYears:reviewTo')")
|
|
public AjaxResult reviewTo(@RequestBody PlanYearsStandardVo yearsStandardVo, HttpServletRequest request) {
|
|
public AjaxResult reviewTo(@RequestBody PlanYearsStandardVo yearsStandardVo, HttpServletRequest request) {
|
|
LoginUser loginUser = tokenService.getLoginUser(request);
|
|
LoginUser loginUser = tokenService.getLoginUser(request);
|
|
yearsStandardVo.setUpdated(String.valueOf(loginUser.getUserId()));
|
|
yearsStandardVo.setUpdated(String.valueOf(loginUser.getUserId()));
|
|
@@ -278,6 +293,7 @@ public class PlanYearsController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "审核年度计划退回")
|
|
@ApiOperation(value = "审核年度计划退回")
|
|
@PostMapping("/reviewReturn")
|
|
@PostMapping("/reviewReturn")
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('plan:planYears:reviewReturn')")
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.UPDATE)
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.UPDATE)
|
|
public AjaxResult reviewReturn(@RequestBody PlanYearsStandardVo yearsStandardVo, HttpServletRequest request) {
|
|
public AjaxResult reviewReturn(@RequestBody PlanYearsStandardVo yearsStandardVo, HttpServletRequest request) {
|
|
LoginUser loginUser = tokenService.getLoginUser(request);
|
|
LoginUser loginUser = tokenService.getLoginUser(request);
|
|
@@ -287,6 +303,7 @@ public class PlanYearsController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "申请修改年度计划")
|
|
@ApiOperation(value = "申请修改年度计划")
|
|
@PostMapping("/appUpdate")
|
|
@PostMapping("/appUpdate")
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('plan:planYears:appUpdate')")
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.UPDATE)
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.UPDATE)
|
|
public AjaxResult appUpdate(@RequestBody PlanYearsStandardVo yearsStandardVo) {
|
|
public AjaxResult appUpdate(@RequestBody PlanYearsStandardVo yearsStandardVo) {
|
|
return planYearsService.appUpdate(yearsStandardVo);
|
|
return planYearsService.appUpdate(yearsStandardVo);
|
|
@@ -294,6 +311,7 @@ public class PlanYearsController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "发函催告")
|
|
@ApiOperation(value = "发函催告")
|
|
@PostMapping("/sendLetter")
|
|
@PostMapping("/sendLetter")
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('plan:planYears:sendLetter')")
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.UPDATE)
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.UPDATE)
|
|
public AjaxResult sendLetter(@RequestBody PlanYearsStandardVo yearsStandardVo) {
|
|
public AjaxResult sendLetter(@RequestBody PlanYearsStandardVo yearsStandardVo) {
|
|
return planYearsService.sendLetter(yearsStandardVo);
|
|
return planYearsService.sendLetter(yearsStandardVo);
|
|
@@ -301,6 +319,7 @@ public class PlanYearsController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "上传计划关联文件后保存文件信息")
|
|
@ApiOperation(value = "上传计划关联文件后保存文件信息")
|
|
@PostMapping("/upLoadPlanFile")
|
|
@PostMapping("/upLoadPlanFile")
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('plan:planYears:upLoadPlanFile')")
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.OTHER)
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.OTHER)
|
|
public AjaxResult upLoadPlanFile(@RequestBody PlanYearsStandardVo yearsStandardVo) {
|
|
public AjaxResult upLoadPlanFile(@RequestBody PlanYearsStandardVo yearsStandardVo) {
|
|
return planYearsService.upLoadPlanFile(yearsStandardVo);
|
|
return planYearsService.upLoadPlanFile(yearsStandardVo);
|
|
@@ -310,10 +329,10 @@ public class PlanYearsController extends BaseController {
|
|
//@PostMapping("/downLoadPlanFile")
|
|
//@PostMapping("/downLoadPlanFile")
|
|
//public AjaxResult downLoadPlanFile(@RequestBody PlanYearsStandardVo yearsStandardVo) {
|
|
//public AjaxResult downLoadPlanFile(@RequestBody PlanYearsStandardVo yearsStandardVo) {
|
|
// return planYearsService.downLoadPlanFile(yearsStandardVo);
|
|
// return planYearsService.downLoadPlanFile(yearsStandardVo);
|
|
- //}
|
|
|
|
|
|
|
|
@ApiOperation(value = "导入年度计划数据")
|
|
@ApiOperation(value = "导入年度计划数据")
|
|
@PostMapping("/importData")
|
|
@PostMapping("/importData")
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('plan:planYears:importData')")
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.INSERT)
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.INSERT)
|
|
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
|
|
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
|
|
ExcelUtil<PlanYearsStandardVo> util = new ExcelUtil<>(PlanYearsStandardVo.class);
|
|
ExcelUtil<PlanYearsStandardVo> util = new ExcelUtil<>(PlanYearsStandardVo.class);
|
|
@@ -323,9 +342,11 @@ public class PlanYearsController extends BaseController {
|
|
String message = planYearsService.importPlanYears(planYears, updateSupport, loginUser);
|
|
String message = planYearsService.importPlanYears(planYears, updateSupport, loginUser);
|
|
return success(message);
|
|
return success(message);
|
|
}
|
|
}
|
|
|
|
+ //}
|
|
|
|
|
|
@ApiOperation(value = "系统首页计划管理")
|
|
@ApiOperation(value = "系统首页计划管理")
|
|
@GetMapping("/planYearsTotal")
|
|
@GetMapping("/planYearsTotal")
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('plan:planYears:planYearsTotal')")
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.QUERY)
|
|
@Log(title = ModularConstans.planYear, businessType = BusinessType.QUERY)
|
|
public AjaxResult planYearsTotal() {
|
|
public AjaxResult planYearsTotal() {
|
|
return success(planYearsService.count());
|
|
return success(planYearsService.count());
|