liyuanyuan лет назад: 2
Родитель
Сommit
2c5552aed2

+ 17 - 16
zxkf-api/src/main/java/api/controller/order/WorkOrderBaseController.java

@@ -4,6 +4,7 @@ import api.entity.database.call.CallLog;
4 4
 import api.entity.database.call.Record;
5 5
 import api.entity.database.order.WorkOrderOperateLog;
6 6
 import api.entity.database.system.*;
7
+import api.entity.input.order.TransOrderInput;
7 8
 import api.entity.view.order.WorkOrderBaseView;
8 9
 import api.mapper.system.UserMapper;
9 10
 import api.service.call.ICallLogService;
@@ -442,7 +443,7 @@ public class WorkOrderBaseController extends BaseController {
442 443
     @ApiOperation("交办 Dealuser不是必填,Dealdept 必填")
443 444
     @Log(title = "转派wo_workorderbase", businessType = BusinessType.UPDATE)
444 445
     @PutMapping("/transfer")
445
-    public AjaxResult transfer(@RequestBody WorkOrderBase input, String reason) {
446
+    public AjaxResult transfer(@RequestBody TransOrderInput input) {
446 447
         Date currentDate = new Date(System.currentTimeMillis());
447 448
 
448 449
         WorkOrderBase orderBase = workorderbaseService.getEntity(input.getWorkorderId());
@@ -461,13 +462,13 @@ public class WorkOrderBaseController extends BaseController {
461 462
         qw.set(WorkOrderBase::getAssignusername, CurrentUser().getNickName());
462 463
         qw.set(WorkOrderBase::getDealdept, input.getDealdept());
463 464
         boolean result = workorderbaseService.updateBatch(qw);
464
-        if (!StringHelper.isEmpty(reason)) {
465
-            reason = ",备注:" + reason;
465
+        if (!StringHelper.isEmpty( input.getReason()) ){
466
+            input.setReason(",备注:" + input.getReason());  // ",备注:" + reason;
466 467
         }
467 468
 
468 469
 
469 470
         if (result) {
470
-            boolean logresult = addlog("交办了工单" + reason, "交办", CurrentUser().getUserName(), orderBase.getWorkordercode(), CurrentUser().getNickName(), "");
471
+            boolean logresult = addlog("交办了工单" + input.getReason(), "交办", CurrentUser().getUserName(), orderBase.getWorkordercode(), CurrentUser().getNickName(), "");
471 472
             return Success("交办成功");
472 473
         } else {
473 474
             return Error("交办失败");
@@ -477,8 +478,8 @@ public class WorkOrderBaseController extends BaseController {
477 478
     //待交办1  待接单(没有处理人的时候)2 待处理3 待审核 4 待回访5 已完结6
478 479
     @ApiOperation("完结")
479 480
     @Log(title = "完结wo_workorderbase", businessType = BusinessType.UPDATE)
480
-    @PutMapping("/end")
481
-    public AjaxResult end(String reason, int id) {
481
+    @PutMapping("/end/{id}")
482
+    public AjaxResult end(@RequestBody String reason,@PathVariable int id) {
482 483
         Date currentDate = new Date(System.currentTimeMillis());
483 484
 
484 485
 
@@ -503,8 +504,8 @@ public class WorkOrderBaseController extends BaseController {
503 504
 
504 505
     @ApiOperation("审核,agree 0 拒绝 ;1 同意")
505 506
     @Log(title = "审核wo_workorderbase", businessType = BusinessType.UPDATE)
506
-    @PutMapping("/audit")
507
-    public AjaxResult audit(String reason, int agree, int id) {
507
+    @PutMapping("/audit/{id}/{agree}")
508
+    public AjaxResult audit(@RequestBody String reason, @PathVariable int agree, @PathVariable  int id) {
508 509
         Date currentDate = new Date(System.currentTimeMillis());
509 510
 
510 511
 
@@ -540,8 +541,8 @@ public class WorkOrderBaseController extends BaseController {
540 541
     //重启 2、重启:只有已完结的可进行重启,重启之后,工单为重办中状态
541 542
     @ApiOperation("重启 ,参数是id,以后都用id")
542 543
     @Log(title = "重启", businessType = BusinessType.OTHER)
543
-    @PostMapping("restarts/{id}/{reason}")
544
-    public AjaxResult restarts(@PathVariable long id, @PathVariable String reason) {
544
+    @PostMapping("/restarts/{id}")
545
+    public AjaxResult restarts( @PathVariable long id, @RequestBody  String reason) {
545 546
         WorkOrderBase orderBase = workorderbaseService.getEntity(id);
546 547
         if (orderBase.getWorkorderstate() != 6) {
547 548
             return Success("只有已完结的可进行重启");
@@ -566,8 +567,8 @@ public class WorkOrderBaseController extends BaseController {
566 567
 
567 568
     @ApiOperation("处理人退回")
568 569
     @Log(title = "退回,参数是id,以后都用id", businessType = BusinessType.OTHER)
569
-    @PostMapping("back/{id}/{reason}")
570
-    public AjaxResult back(@PathVariable long id, @PathVariable String reason) {
570
+    @PostMapping("/back/{id}")
571
+    public AjaxResult back( @PathVariable long id, @RequestBody String reason) {
571 572
         WorkOrderBase orderBase = workorderbaseService.getEntity(id);
572 573
         LambdaUpdateWrapper<WorkOrderBase> qw = new LambdaUpdateWrapper<>();
573 574
         qw.eq(WorkOrderBase::getWorkorderId, id);
@@ -593,8 +594,8 @@ public class WorkOrderBaseController extends BaseController {
593 594
     //待交办1 ; 待接单(没有处理人的时候)2; 待处理3; 待审核 4 ;待回访5 ;已完结6;
594 595
     @ApiOperation("已办待回访退回到已办待审核")
595 596
     @Log(title = "退回,参数是id,以后都用id", businessType = BusinessType.OTHER)
596
-    @PostMapping("backtoaudit/{id}/{reason}")
597
-    public AjaxResult backtoaudit(@PathVariable long id, @PathVariable String reason) {
597
+    @PostMapping("/backtoaudit/{id}")
598
+    public AjaxResult backtoaudit(@PathVariable long id,  @RequestBody  String reason) {
598 599
         WorkOrderBase orderBase = workorderbaseService.getEntity(id);
599 600
         LambdaUpdateWrapper<WorkOrderBase> qw = new LambdaUpdateWrapper<>();
600 601
         qw.eq(WorkOrderBase::getWorkorderId, id);
@@ -617,8 +618,8 @@ public class WorkOrderBaseController extends BaseController {
617 618
 
618 619
     @ApiOperation("组内工单接单")
619 620
     @Log(title = "接单,参数是id,以后都用id", businessType = BusinessType.OTHER)
620
-    @PostMapping("receive/{id}/{reason}")
621
-    public AjaxResult receive(@PathVariable long id, @PathVariable String reason) {
621
+    @PostMapping("/receive/{id}")
622
+    public AjaxResult receive( @PathVariable long id, @RequestBody  String reason) {
622 623
         WorkOrderBase orderBase = workorderbaseService.getEntity(id);
623 624
         LambdaUpdateWrapper<WorkOrderBase> qw = new LambdaUpdateWrapper<>();
624 625
         qw.eq(WorkOrderBase::getWorkorderId, id);

+ 12 - 0
zxkf-entity/src/main/java/api/entity/input/order/TransOrderInput.java

@@ -0,0 +1,12 @@
1
+package api.entity.input.order;
2
+
3
+import lombok.Data;
4
+
5
+@Data
6
+public class TransOrderInput {
7
+    private String reason;
8
+    private Long workorderId;
9
+    private String dealuser;
10
+    private Long dealdept;
11
+
12
+}