| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Api(tags = "放电计划临时表") |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "放电时间互换") |
| | | @PutMapping("exchangeDischargeTime") |
| | | @PostMapping("exchangeDischargeTime") |
| | | public Response updateExchangeDischargeTime(@RequestParam int numOriginal,@RequestParam int numReplaced){ |
| | | return service.exchangeDischargeTime(numOriginal,numReplaced); |
| | | } |
| | | |
| | | /** |
| | | * 创建到临时表中 |
| | | * 创建到临时表中,专员创建 |
| | | * @param resetCapPercent |
| | | * @param startTime |
| | | * @return |
| | | * @throws ParseException |
| | | */ |
| | | @ApiOperation("new-2023-03-15 创建放电计划") |
| | | @ApiOperation("创建放电计划审批清单-专员创建") |
| | | @GetMapping("generateDischargePlan") |
| | | public Response addGenerateDischargePlan(@RequestParam Float resetCapPercent,@RequestParam String startTime) throws ParseException { |
| | | return service.generateDischargePlan(resetCapPercent,startTime); |
| | | } |
| | | |
| | | /** |
| | | * 创建到临时表中,组长创建 |
| | | * @param resetCapPercent |
| | | * @param startTime |
| | | * @return |
| | | * @throws ParseException |
| | | */ |
| | | @ApiOperation("创建放电计划审批清单2-组长创建") |
| | | @GetMapping("generateDischargePlan2") |
| | | public Response addGenerateDischargePlan2(@RequestParam Float resetCapPercent,@RequestParam String startTime) throws ParseException { |
| | | return service.generateDischargePlan2(resetCapPercent,startTime); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | * @throws ParseException |
| | | */ |
| | | @ApiOperation("new-2023-03-15 删除放电计划") |
| | | @DeleteMapping("dischargePlanTemp") |
| | | public Response deleteDischargePlanTemp(@RequestParam String startTime) throws ParseException { |
| | | @ApiOperation("取消正在创建的放电计划审批清单|取消某一年度放电计划审批清单") |
| | | @PostMapping("cancelDischargePlanTemp") |
| | | @Deprecated |
| | | public Response deleteCancelDischargePlanTemp(@RequestParam String startTime) throws ParseException { |
| | | return service.deleteDischargePlanTemp(startTime); |
| | | } |
| | | |
| | | /** |
| | | * 更新临时表中 |
| | | * 取消尚未提交的放电计划记录-组长 |
| | | * @param startTime |
| | | * @return |
| | | * @throws ParseException |
| | | */ |
| | | @ApiOperation("new-2023-03-15 更新放电计划临时表") |
| | | @PutMapping("list") |
| | | public Response updateList(@RequestBody List<BattDischargePlanTemp> list) { |
| | | return service.updateList(list); |
| | | @ApiOperation("删除尚未提交的放电计划记录-组长") |
| | | @PostMapping("cancelDischargePlanTemp2") |
| | | public Response deleteCancelDischargePlanTemp2(@RequestParam String startTime) throws ParseException { |
| | | return service.deleteDischargePlanTemp2(startTime); |
| | | } |
| | | |
| | | /** |
| | | * 查询临时表 |
| | | * 提交放电计划临时表,更新临时表参数; |
| | | * 同时,自动提交给包含的班组的组长会签 |
| | | * @return |
| | | * @throws ParseException |
| | | */ |
| | | @ApiOperation("new-2023-03-15 查询自己生成的放电计划临时表") |
| | | @GetMapping("ownedListMapByStatus") |
| | | public Response getOwnedListMapByStatus(){ |
| | | return service.getOwnedListMapByStatus(); |
| | | @ApiOperation(value="确定|更新放电计划临时表",notes = "数组内只需要传id,dischargeStartTime") |
| | | @PostMapping("listAndSubmit") |
| | | public Response updateListAndSubmit(@RequestBody List<BattDischargePlanTemp> list,@RequestParam String taskDesc) { |
| | | return service.updateListAndSubmit(list,taskDesc); |
| | | } |
| | | |
| | | /** |
| | | * 领导层查看放电临时表 |
| | | * 提交放电计划临时表,更新临时表参数; |
| | | * 同时,提交给管理专责 |
| | | * @return |
| | | * @throws ParseException |
| | | */ |
| | | @ApiOperation("new-2023-03-15 领导层查询放电计划临时表") |
| | | @GetMapping("listMapByStatus") |
| | | public Response getListMapByStatus(){ |
| | | return service.getListMapByStatus(); |
| | | @ApiOperation(value="确定|更新放电计划临时表",notes = "数组内只需要传id,dischargeStartTime") |
| | | @PostMapping("listAndSubmit2") |
| | | public Response updateListAndSubmit2(@RequestBody List<BattDischargePlanTemp> list,@RequestParam String taskDesc) { |
| | | return service.updateListAndSubmit2(list,taskDesc); |
| | | } |
| | | |
| | | /** |
| | | * 临时表中计划经过审核后,提交到正式的放电计划表中 已被弃用,新的审核流程更严格 {@link com.whyc.controller.WorkflowMainController} |
| | | * @param tempList 临时表中的计划 |
| | | * @return |
| | | * @throws ParseException |
| | | */ |
| | | //@ApiOperation(value = "审核放电计划",notes = "approveStatus 1:审核通过,-1:审核拒绝") |
| | | //@PutMapping("approveDischargePlan") |
| | | @Deprecated |
| | | public Response updateApproveDischargePlan(@RequestParam int approveStatus,@RequestParam(required = false) String approveReason,@RequestBody List<BattDischargePlanTemp> tempList){ |
| | | return service.updateApproveDischargePlan(approveStatus,approveReason,tempList); |
| | | } |
| | | |
| | | @ApiOperation("删除当前用户之前未提交的所有记录") |
| | | @PostMapping("deleteNotSubmitted") |
| | | public Response deleteNotSubmitted(){ |
| | | return service.deleteNotSubmitted(); |
| | | } |
| | | |
| | | @ApiOperation("查询占用的时间") |
| | | @GetMapping("occupiedTime") |
| | | public Response getOccupiedTime(){ |
| | | List<Date> occupiedTime = service.getOccupiedTime(); |
| | | return new Response().set(1,occupiedTime); |
| | | } |
| | | |
| | | } |