|
|
@ -1,17 +1,12 @@ |
|
|
|
package com.hnac.hzinfo.inspect.plan.controller; |
|
|
|
package com.hnac.hzinfo.inspect.plan.controller; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.hnac.hzims.common.logs.annotation.OperationAnnotation; |
|
|
|
import com.hnac.hzims.common.logs.annotation.OperationAnnotation; |
|
|
|
import com.hnac.hzims.common.logs.enums.BusinessType; |
|
|
|
import com.hnac.hzims.common.logs.enums.BusinessType; |
|
|
|
import com.hnac.hzims.common.logs.enums.OperatorType; |
|
|
|
import com.hnac.hzims.common.logs.enums.OperatorType; |
|
|
|
import com.hnac.hzinfo.inspect.Constants; |
|
|
|
|
|
|
|
import com.hnac.hzinfo.inspect.invalid.DictInvalid; |
|
|
|
|
|
|
|
import com.hnac.hzinfo.inspect.obj.utils.CodeUtils; |
|
|
|
import com.hnac.hzinfo.inspect.obj.utils.CodeUtils; |
|
|
|
import com.hnac.hzinfo.inspect.plan.PlanContants; |
|
|
|
|
|
|
|
import com.hnac.hzinfo.inspect.plan.entity.PlanEntity; |
|
|
|
import com.hnac.hzinfo.inspect.plan.entity.PlanEntity; |
|
|
|
import com.hnac.hzinfo.inspect.plan.service.IPlanObjectTemplateService; |
|
|
|
import com.hnac.hzinfo.inspect.plan.service.IPlanObjectTemplateService; |
|
|
|
import com.hnac.hzinfo.inspect.plan.service.IPlanService; |
|
|
|
import com.hnac.hzinfo.inspect.plan.service.IPlanService; |
|
|
@ -24,7 +19,6 @@ import org.springblade.core.boot.ctrl.BladeController; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.constant.BladeConstant; |
|
|
|
import org.springblade.core.tool.constant.BladeConstant; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
@ -32,11 +26,7 @@ import org.springframework.validation.annotation.Validated; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
import javax.validation.Valid; |
|
|
|
import javax.validation.Valid; |
|
|
|
import javax.validation.constraints.Max; |
|
|
|
|
|
|
|
import javax.validation.constraints.Min; |
|
|
|
|
|
|
|
import javax.validation.constraints.Size; |
|
|
|
|
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -83,9 +73,9 @@ public class PlanController extends BladeController { |
|
|
|
if(plan.getEndTime()!=null){ |
|
|
|
if(plan.getEndTime()!=null){ |
|
|
|
queryWrapper.le(PlanEntity::getEndTime,plan.getEndTime()); |
|
|
|
queryWrapper.le(PlanEntity::getEndTime,plan.getEndTime()); |
|
|
|
} |
|
|
|
} |
|
|
|
if(plan.getStatus()==null){ |
|
|
|
// if(plan.getStatus()==null){
|
|
|
|
queryWrapper.ne(PlanEntity::getStatus, PlanContants.PlanStatusEnum.PLAN_AUTH.getStatus()); |
|
|
|
// queryWrapper.ne(PlanEntity::getStatus, PlanContants.PlanStatusEnum.PLAN_AUTH.getStatus());
|
|
|
|
} |
|
|
|
// }
|
|
|
|
if(plan.getCreateDept()!=null){ |
|
|
|
if(plan.getCreateDept()!=null){ |
|
|
|
queryWrapper.eq(PlanEntity::getCreateDept,plan.getCreateDept()); |
|
|
|
queryWrapper.eq(PlanEntity::getCreateDept,plan.getCreateDept()); |
|
|
|
} |
|
|
|
} |
|
|
@ -113,7 +103,15 @@ public class PlanController extends BladeController { |
|
|
|
public R<List<Long>> addAndChecked(@Valid @RequestBody PlanVO plan) { |
|
|
|
public R<List<Long>> addAndChecked(@Valid @RequestBody PlanVO plan) { |
|
|
|
return R.data(planService.addAndChecked(plan)); |
|
|
|
return R.data(planService.addAndChecked(plan)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 撤销 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@GetMapping("/revoke") |
|
|
|
|
|
|
|
@ApiOperationSupport(order = 6) |
|
|
|
|
|
|
|
@ApiOperation(value = "撤销", notes = "传入plan") |
|
|
|
|
|
|
|
public R<Boolean> revoke(@RequestParam Long planId) { |
|
|
|
|
|
|
|
return R.data(planService.revoke(planId)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 删除 |
|
|
|
* 删除 |
|
|
|