|
|
|
@ -6,12 +6,16 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
|
|
import com.hnac.hzims.common.logs.annotation.OperationAnnotation; |
|
|
|
|
import com.hnac.hzims.common.logs.enums.BusinessType; |
|
|
|
|
import com.hnac.hzims.common.logs.enums.OperatorType; |
|
|
|
|
import com.hnac.hzims.operational.OperationalConstants; |
|
|
|
|
import com.hnac.hzims.operational.access.dto.OperAccessTaskDTO; |
|
|
|
|
import com.hnac.hzims.operational.access.dto.OperAccessTaskFlowDTO; |
|
|
|
|
import com.hnac.hzims.operational.access.service.IOperAccessTaskService; |
|
|
|
|
import com.hnac.hzims.operational.access.vo.OperAccessTaskVO; |
|
|
|
|
import com.hnac.hzims.operational.access.vo.RepairBillVO; |
|
|
|
|
import com.hnac.hzims.vo.VoteChartVo; |
|
|
|
|
import com.hnac.hzinfo.log.annotation.Business; |
|
|
|
|
import com.hnac.hzinfo.log.annotation.Operate; |
|
|
|
|
import com.hnac.hzinfo.log.contants.Risk; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
@ -42,6 +46,7 @@ import java.util.List;
|
|
|
|
|
@AllArgsConstructor |
|
|
|
|
@RequestMapping("/access/task") |
|
|
|
|
@Api(tags = "检修任务") |
|
|
|
|
@Business(module = OperationalConstants.APP_NAME,value = "检修任务",ignore = false) |
|
|
|
|
public class OperAccessTaskController extends BladeController { |
|
|
|
|
|
|
|
|
|
private final IOperAccessTaskService service; |
|
|
|
@ -52,6 +57,7 @@ public class OperAccessTaskController extends BladeController {
|
|
|
|
|
@PostMapping("/remove") |
|
|
|
|
@ApiOperationSupport(order = 10) |
|
|
|
|
@ApiOperation(value = "逻辑删除") |
|
|
|
|
@Operate(label = "检修任务删除",type = com.hnac.hzinfo.log.contants.BusinessType.DELETE,risk = Risk.MEDIUM,ignore = false) |
|
|
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
|
return R.status(service.deleteLogic(Func.toLongList(ids))); |
|
|
|
|
} |
|
|
|
@ -62,6 +68,7 @@ public class OperAccessTaskController extends BladeController {
|
|
|
|
|
@PostMapping("/save") |
|
|
|
|
@ApiOperationSupport(order = 20) |
|
|
|
|
@ApiOperation(value = "新增") |
|
|
|
|
@Operate(label = "检修任务删除",type = com.hnac.hzinfo.log.contants.BusinessType.INSERT,risk = Risk.LOW,ignore = false) |
|
|
|
|
public R save(@Valid @RequestBody OperAccessTaskDTO req) { |
|
|
|
|
return service.doSave(req); |
|
|
|
|
} |
|
|
|
@ -72,6 +79,7 @@ public class OperAccessTaskController extends BladeController {
|
|
|
|
|
@PostMapping("/update") |
|
|
|
|
@ApiOperationSupport(order = 30) |
|
|
|
|
@ApiOperation(value = "修改") |
|
|
|
|
@Operate(label = "检修任务修改",type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE,risk = Risk.LOW,ignore = false) |
|
|
|
|
public R update(@Valid @RequestBody OperAccessTaskFlowDTO dto) { |
|
|
|
|
return service.doUpdateById(dto.getOperAccessTaskDTO(), dto.getComleteTask(),null); |
|
|
|
|
} |
|
|
|
@ -83,6 +91,7 @@ public class OperAccessTaskController extends BladeController {
|
|
|
|
|
@GetMapping("/detail") |
|
|
|
|
@ApiOperationSupport(order = 40) |
|
|
|
|
@ApiOperation(value = "详情") |
|
|
|
|
@Operate(label = "检修任务详情",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) |
|
|
|
|
public R<OperAccessTaskVO> detail(@RequestParam Long id) { |
|
|
|
|
return service.detail(id); |
|
|
|
|
} |
|
|
|
@ -98,6 +107,7 @@ public class OperAccessTaskController extends BladeController {
|
|
|
|
|
BusinessType.GENCODE, |
|
|
|
|
action = "分页查询我的检修任务列表") |
|
|
|
|
@ApiOperation(value = "分页 查询参数:name,code,handler,status,planId,planCode") |
|
|
|
|
@Operate(label = "检修任务分页查询",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) |
|
|
|
|
public R<IPage<OperAccessTaskVO>> list(OperAccessTaskDTO req, Query query) { |
|
|
|
|
return service.list(req, query); |
|
|
|
|
} |
|
|
|
@ -112,6 +122,7 @@ public class OperAccessTaskController extends BladeController {
|
|
|
|
|
BusinessType.GENCODE, |
|
|
|
|
action = "分页查询我的检修任务列表") |
|
|
|
|
@ApiOperation(value = "分页 查询参数:name,code,handler,status,planId,planCode") |
|
|
|
|
@Operate(label = "检修任务列表分页查询",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) |
|
|
|
|
public R<IPage<OperAccessTaskVO>> list(@RequestBody OperAccessTaskDTO req) { |
|
|
|
|
Query query=new Query(); |
|
|
|
|
query.setCurrent(req.getCurrent()); |
|
|
|
@ -126,6 +137,7 @@ public class OperAccessTaskController extends BladeController {
|
|
|
|
|
@GetMapping("/getRepairBill") |
|
|
|
|
@ApiOperationSupport(order = 60) |
|
|
|
|
@ApiOperation(value = "获取检修台账") |
|
|
|
|
@Operate(label = "获取检修台账",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) |
|
|
|
|
public R<List<RepairBillVO>> getAccessTaskByEmCode(String emCode, String startTime, String endTime) { |
|
|
|
|
return R.data(service.getRepairBill(emCode, startTime, endTime)); |
|
|
|
|
} |
|
|
|
@ -135,6 +147,7 @@ public class OperAccessTaskController extends BladeController {
|
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/getAccessListStatistics") |
|
|
|
|
@ApiOperation(value = "检修计划统计", notes = "传入时间") |
|
|
|
|
@Operate(label = "检修计划统计",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) |
|
|
|
|
public R<List<VoteChartVo>> getAccessListStatistics(String startTime, String endTime,Long deptId) { |
|
|
|
|
if(ObjectUtil.isEmpty(AuthUtil.getUser())||ObjectUtil.isEmpty(AuthUtil.getUser().getUserId())){ |
|
|
|
|
return R.fail("暂无权限查看,请稍后重试"); |
|
|
|
@ -148,6 +161,7 @@ public class OperAccessTaskController extends BladeController {
|
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/importAccessListStatistics") |
|
|
|
|
@ApiOperation(value = "导出", notes = "传入时间") |
|
|
|
|
@Operate(label = "检修计划导出",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) |
|
|
|
|
public void importAccessListStatistics(HttpServletResponse response, String startTime, String endTime,Long deptId) { |
|
|
|
|
if(ObjectUtil.isEmpty(AuthUtil.getUser())||ObjectUtil.isEmpty(AuthUtil.getUser().getUserId())){ |
|
|
|
|
throw new ServiceException("暂无权限查看,请稍后重试"); |
|
|
|
|