|
|
@@ -182,6 +182,27 @@ public class WorkOrderBaseController extends BaseController {
|
|
182
|
182
|
return Success("成功", ov);
|
|
183
|
183
|
}
|
|
184
|
184
|
|
|
|
185
|
+
|
|
|
186
|
+ @ApiOperation("详情")
|
|
|
187
|
+ @Log(title = "查询wo_workorderbase详情", businessType = BusinessType.QUERY)
|
|
|
188
|
+ @GetMapping("getInfoByCode/{code}")
|
|
|
189
|
+ public AjaxResult getInfoByCode(@PathVariable String code) {
|
|
|
190
|
+ LambdaQueryWrapper<WorkOrderBase> qw = new LambdaQueryWrapper();
|
|
|
191
|
+ qw.eq(WorkOrderBase::getWorkordercode, code);
|
|
|
192
|
+ qw.eq(WorkOrderBase::getIsdelete, 0);
|
|
|
193
|
+
|
|
|
194
|
+ List<WorkOrderBase> base= workorderbaseService.getList(qw);
|
|
|
195
|
+ if(base!=null && base.stream().count()>0){
|
|
|
196
|
+ WorkOrderBaseView ov=trans(base.get(0));
|
|
|
197
|
+
|
|
|
198
|
+ return Success("成功", ov);
|
|
|
199
|
+
|
|
|
200
|
+ }
|
|
|
201
|
+
|
|
|
202
|
+ return Success("成功");
|
|
|
203
|
+ }
|
|
|
204
|
+
|
|
|
205
|
+
|
|
185
|
206
|
@ApiOperation("新增")
|
|
186
|
207
|
@Log(title = "新增wo_workorderbase", businessType = BusinessType.INSERT)
|
|
187
|
208
|
@PostMapping
|
|
|
@@ -579,7 +600,7 @@ public class WorkOrderBaseController extends BaseController {
|
|
579
|
600
|
@ApiOperation("完结")
|
|
580
|
601
|
@Log(title = "完结wo_workorderbase", businessType = BusinessType.UPDATE)
|
|
581
|
602
|
@PutMapping("/end/{id}")
|
|
582
|
|
- public AjaxResult end(@RequestBody String reason,@PathVariable int id) {
|
|
|
603
|
+ public AjaxResult end(@RequestBody HashMap<String,String> map,@PathVariable int id) {
|
|
583
|
604
|
Date currentDate = new Date(System.currentTimeMillis());
|
|
584
|
605
|
|
|
585
|
606
|
|
|
|
@@ -596,13 +617,16 @@ public class WorkOrderBaseController extends BaseController {
|
|
596
|
617
|
qw.set(WorkOrderBase::getDealdept, CurrentUser().getDeptId());
|
|
597
|
618
|
qw.set(WorkOrderBase::getDealusername, CurrentUser().getNickName());
|
|
598
|
619
|
|
|
|
620
|
+ qw.set(WorkOrderBase::getFile, map.get("file"));
|
|
|
621
|
+ qw.set(WorkOrderBase::getResult, map.get("result"));
|
|
599
|
622
|
|
|
|
623
|
+ String reason="";
|
|
600
|
624
|
boolean result = workorderbaseService.updateBatch(qw);
|
|
601
|
|
- if (!StringHelper.isEmpty(reason)) {
|
|
602
|
|
- reason = ",备注:" + reason;
|
|
|
625
|
+ if (!StringHelper.isEmpty(map.get("result"))) {
|
|
|
626
|
+ reason = ",回复内容:" + map.get("result");
|
|
603
|
627
|
}
|
|
604
|
628
|
if (result) {
|
|
605
|
|
- boolean logresult = addlog("完结了工单" + reason, "完结", CurrentUser().getUserName(), orderBase.getWorkordercode(), CurrentUser().getNickName(), "");
|
|
|
629
|
+ boolean logresult = addlog("完结了工单" + reason, "完结", CurrentUser().getUserName(), orderBase.getWorkordercode(), CurrentUser().getNickName(), map.get("file"));
|
|
606
|
630
|
return Success("完结成功");
|
|
607
|
631
|
} else {
|
|
608
|
632
|
return Error("完结失败");
|