|
|
@@ -1,13 +1,14 @@
|
|
1
|
1
|
package api.controller.order;
|
|
2
|
2
|
|
|
3
|
3
|
import api.entity.database.order.WorkOrderOperateLog;
|
|
|
4
|
+import api.entity.database.system.Customer;
|
|
4
|
5
|
import api.entity.database.system.DictData;
|
|
|
6
|
+import api.entity.database.system.SysAccessories;
|
|
5
|
7
|
import api.entity.database.system.User;
|
|
6
|
8
|
import api.entity.view.order.WorkOrderBaseView;
|
|
7
|
9
|
import api.mapper.system.UserMapper;
|
|
8
|
10
|
import api.service.order.IWorkOrderOperateLogService;
|
|
9
|
|
-import api.service.system.IDictDataService;
|
|
10
|
|
-import api.service.system.IUserService;
|
|
|
11
|
+import api.service.system.*;
|
|
11
|
12
|
import api.util.annotation.Anonymous;
|
|
12
|
13
|
import com.alibaba.fastjson2.JSON;
|
|
13
|
14
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
@@ -23,11 +24,17 @@ import api.util.enums.BusinessType;
|
|
23
|
24
|
import api.util.helper.StringHelper;
|
|
24
|
25
|
import io.swagger.annotations.Api;
|
|
25
|
26
|
import io.swagger.annotations.ApiOperation;
|
|
|
27
|
+import lombok.var;
|
|
26
|
28
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
27
|
29
|
import org.springframework.web.bind.annotation.*;
|
|
28
|
30
|
|
|
|
31
|
+import java.net.InetAddress;
|
|
|
32
|
+import java.net.UnknownHostException;
|
|
29
|
33
|
import java.text.SimpleDateFormat;
|
|
|
34
|
+import java.time.LocalDate;
|
|
30
|
35
|
import java.time.LocalDateTime;
|
|
|
36
|
+import java.time.LocalTime;
|
|
|
37
|
+import java.time.format.DateTimeFormatter;
|
|
31
|
38
|
import java.util.*;
|
|
32
|
39
|
|
|
33
|
40
|
@Api(value = "wo_workorderbase",tags = "wo_workorderbase")
|
|
|
@@ -35,6 +42,10 @@ import java.util.*;
|
|
35
|
42
|
@RequestMapping("/order/workorderbase")
|
|
36
|
43
|
public class WorkOrderBaseController extends BaseController {
|
|
37
|
44
|
@Autowired
|
|
|
45
|
+ private ICustomerService customerService;
|
|
|
46
|
+ @Autowired
|
|
|
47
|
+ private IConfigService configService;
|
|
|
48
|
+ @Autowired
|
|
38
|
49
|
private IWorkOrderBaseService workorderbaseService;
|
|
39
|
50
|
@Autowired
|
|
40
|
51
|
private IDictDataService dictDataService;
|
|
|
@@ -46,8 +57,11 @@ public class WorkOrderBaseController extends BaseController {
|
|
46
|
57
|
@Autowired
|
|
47
|
58
|
private IWorkOrderOperateLogService workorderoperatelogService;
|
|
48
|
59
|
|
|
|
60
|
+ @Autowired
|
|
|
61
|
+ private ISysAccessoriesService sysaccessoriesService;
|
|
|
62
|
+
|
|
49
|
63
|
@ApiOperation("列表")
|
|
50
|
|
- @Log(title = "查询wo_workorderbase列表",businessType = BusinessType.QUERY)
|
|
|
64
|
+ @Log(title = "查询wo_workorderbase列表", businessType = BusinessType.QUERY)
|
|
51
|
65
|
@GetMapping
|
|
52
|
66
|
@Anonymous
|
|
53
|
67
|
public AjaxResult getList(WorkOrderBase input, PageInput pageInput) {
|
|
|
@@ -67,40 +81,16 @@ public class WorkOrderBaseController extends BaseController {
|
|
67
|
81
|
if (page != null) {
|
|
68
|
82
|
IPage<WorkOrderBase> iPage = workorderbaseService.getListPage(page, qw);
|
|
69
|
83
|
|
|
70
|
|
- List<WorkOrderBase> returnlist=iPage.getRecords();
|
|
71
|
|
- List<WorkOrderBaseView> orderViewList=new ArrayList<>();
|
|
|
84
|
+ List<WorkOrderBase> returnlist = iPage.getRecords();
|
|
|
85
|
+ List<WorkOrderBaseView> orderViewList = new ArrayList<>();
|
|
72
|
86
|
//处理数据
|
|
73
|
|
- if (returnlist!=null && returnlist.size()>0)
|
|
74
|
|
- {
|
|
75
|
|
- for (WorkOrderBase orderBase:returnlist) {
|
|
76
|
|
-
|
|
77
|
|
- WorkOrderBaseView ov = JSON.parseObject(JSON.toJSONString(orderBase), WorkOrderBaseView.class);
|
|
78
|
|
- if (orderBase.getProject()>0)
|
|
79
|
|
- {
|
|
80
|
|
- DictData dicdata= dictDataService.getEntity(orderBase.getProject());
|
|
81
|
|
-
|
|
82
|
|
- ov.setProjectname(dicdata.getDictValue());
|
|
83
|
|
- }
|
|
84
|
|
- if (orderBase.getWorkordercate()>0)
|
|
85
|
|
- {
|
|
86
|
|
- DictData dicdata= dictDataService.getEntity(orderBase.getWorkordercate());
|
|
87
|
|
- ov.setWorkordercatename(dicdata.getDictValue());
|
|
88
|
|
- }
|
|
89
|
|
- if (!StringHelper.isEmpty(orderBase.getDealuser()))
|
|
90
|
|
- {
|
|
91
|
|
- User user = userMapper.selectUserByUserName(orderBase.getDealuser());
|
|
92
|
|
- ov.setDealusername(user.getNickName());
|
|
93
|
|
- }
|
|
94
|
|
- if (!StringHelper.isEmpty(orderBase.getCreateuser()))
|
|
95
|
|
- {
|
|
96
|
|
- User user = userMapper.selectUserByUserName(orderBase.getCreateuser());
|
|
97
|
|
- ov.setCreateusername(user.getNickName());
|
|
98
|
|
- }
|
|
|
87
|
+ if (returnlist != null && returnlist.size() > 0) {
|
|
|
88
|
+ for (WorkOrderBase orderBase : returnlist) {
|
|
|
89
|
+
|
|
|
90
|
+ WorkOrderBaseView ov = trans(orderBase);
|
|
99
|
91
|
|
|
100
|
92
|
orderViewList.add(ov);
|
|
101
|
93
|
}
|
|
102
|
|
-
|
|
103
|
|
-
|
|
104
|
94
|
}
|
|
105
|
95
|
|
|
106
|
96
|
return Success("成功", orderViewList, iPage.getTotal());
|
|
|
@@ -110,81 +100,269 @@ public class WorkOrderBaseController extends BaseController {
|
|
110
|
100
|
}
|
|
111
|
101
|
|
|
112
|
102
|
@ApiOperation("详情")
|
|
113
|
|
- @Log(title = "查询wo_workorderbase详情",businessType = BusinessType.QUERY)
|
|
|
103
|
+ @Log(title = "查询wo_workorderbase详情", businessType = BusinessType.QUERY)
|
|
114
|
104
|
@GetMapping("/{id}")
|
|
115
|
105
|
public AjaxResult getInfo(@PathVariable long id) {
|
|
116
|
|
- return Success("成功", workorderbaseService.getEntity(id));
|
|
|
106
|
+ WorkOrderBase orderBase = workorderbaseService.getEntity(id);
|
|
|
107
|
+ WorkOrderBaseView ov = trans(orderBase);
|
|
|
108
|
+ return Success("成功", ov);
|
|
117
|
109
|
}
|
|
118
|
110
|
|
|
119
|
111
|
@ApiOperation("新增")
|
|
120
|
|
- @Log(title = "新增wo_workorderbase",businessType = BusinessType.INSERT)
|
|
|
112
|
+ @Log(title = "新增wo_workorderbase", businessType = BusinessType.INSERT)
|
|
121
|
113
|
@PostMapping
|
|
122
|
114
|
public AjaxResult add(@RequestBody WorkOrderBase input) {
|
|
123
|
115
|
Date currentDate = new Date(System.currentTimeMillis());
|
|
|
116
|
+ Random random = new Random();
|
|
|
117
|
+ int rannum = random.nextInt(900) + 100;
|
|
124
|
118
|
|
|
125
|
|
- SimpleDateFormat format=new SimpleDateFormat("yyyyMMddHHmmss");
|
|
126
|
|
- String ordercode=format.format(currentDate);
|
|
|
119
|
+ SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
|
120
|
+ String ordercode = format.format(currentDate) + rannum;
|
|
127
|
121
|
input.setWorkordercode(ordercode);
|
|
128
|
122
|
input.setIsdelete(0L);
|
|
129
|
123
|
input.setCreateuser(CurrentUser().getUserName());
|
|
130
|
124
|
input.setCreatetime(currentDate);
|
|
131
|
|
- //没结束 处理中
|
|
132
|
|
- if (input.getIsend()==0)
|
|
133
|
|
- {
|
|
|
125
|
+ //没结束 处理中
|
|
|
126
|
+ if (input.getIsend() == 0) {
|
|
134
|
127
|
input.setWorkorderstate(0L);
|
|
135
|
|
- }
|
|
136
|
|
- else
|
|
137
|
|
- {
|
|
|
128
|
+ input.setDealuser(input.getDealuser());
|
|
|
129
|
+ } else {
|
|
138
|
130
|
//结束了 已完成
|
|
139
|
131
|
input.setWorkorderstate(1L);
|
|
140
|
132
|
input.setEndtime(currentDate);
|
|
141
|
133
|
input.setDealuser(CurrentUser().getUserName());
|
|
142
|
134
|
}
|
|
143
|
|
-
|
|
144
|
|
- boolean result = workorderbaseService.insert(input);
|
|
|
135
|
+ input.setSource("来电");
|
|
|
136
|
+ boolean result = workorderbaseService.insert(input);
|
|
145
|
137
|
if (result) {
|
|
146
|
138
|
//添加操作日志
|
|
147
|
|
- WorkOrderOperateLog loginput=new WorkOrderOperateLog();
|
|
148
|
|
- loginput.setIsdelete(0L);
|
|
149
|
|
- loginput.setLogcontent("创建了工单");
|
|
150
|
|
-
|
|
151
|
|
-
|
|
152
|
|
- loginput.setOperationtime(currentDate);
|
|
|
139
|
+ boolean logresult = addlog("创建了工单", 1L, CurrentUser().getUserName(), input.getWorkordercode());
|
|
|
140
|
+ //判断手机号存在不customer,不存在就添加新用户
|
|
|
141
|
+ LambdaQueryWrapper<Customer> qw = new LambdaQueryWrapper<>();
|
|
|
142
|
+ qw.eq(Customer::getCustomerPhone, input.getCallnum());
|
|
153
|
143
|
|
|
154
|
|
- loginput.setOperationtype(1L);
|
|
155
|
|
- loginput.setOperator(CurrentUser().getUserName());
|
|
156
|
|
- loginput.setWorkordercode(input.getWorkordercode());
|
|
|
144
|
+ Customer record = customerService.getEntity(qw);
|
|
|
145
|
+ if (record == null) {
|
|
|
146
|
+ Customer customer = new Customer();
|
|
|
147
|
+ customer.setCustomerName(input.getCaller());
|
|
|
148
|
+ customer.setCustomerPhone(input.getCallnum());
|
|
|
149
|
+ customer.setType(1L);
|
|
|
150
|
+ customer.setFIsdelete(0L);
|
|
|
151
|
+ customer.setFCreatetime(currentDate);
|
|
|
152
|
+ boolean customerresult = customerService.insert(customer);
|
|
|
153
|
+ }
|
|
|
154
|
+ return Success("成功",input.getWorkorderid());
|
|
|
155
|
+ } else {
|
|
|
156
|
+ return Error("新增失败");
|
|
|
157
|
+ }
|
|
|
158
|
+ }
|
|
157
|
159
|
|
|
|
160
|
+ @ApiOperation("编辑")
|
|
|
161
|
+ @Log(title = "编辑wo_workorderbase", businessType = BusinessType.UPDATE)
|
|
|
162
|
+ @PutMapping
|
|
|
163
|
+ public AjaxResult edit(@RequestBody WorkOrderBase input) {
|
|
|
164
|
+ Date currentDate = new Date(System.currentTimeMillis());
|
|
|
165
|
+ WorkOrderBase orderBase = workorderbaseService.getEntity(input.getWorkorderid());
|
|
|
166
|
+ orderBase.setCaller(input.getCaller());
|
|
|
167
|
+ orderBase.setCallnum(input.getCallnum());
|
|
|
168
|
+ orderBase.setProject(input.getProject());
|
|
|
169
|
+ orderBase.setWorkordercate(input.getWorkordercate());
|
|
|
170
|
+ orderBase.setContent(input.getContent());
|
|
|
171
|
+ orderBase.setIsend(input.getIsend());
|
|
|
172
|
+ orderBase.setResult(input.getResult());
|
|
|
173
|
+ //没结束 处理中
|
|
|
174
|
+ if (input.getIsend() == 0) {
|
|
|
175
|
+ input.setWorkorderstate(0L);
|
|
|
176
|
+ input.setDealuser(input.getDealuser());
|
|
|
177
|
+ } else {
|
|
|
178
|
+ //结束了 已完成
|
|
|
179
|
+ input.setWorkorderstate(1L);
|
|
|
180
|
+ input.setEndtime(currentDate);
|
|
|
181
|
+ input.setDealuser(CurrentUser().getUserName());
|
|
|
182
|
+ }
|
|
158
|
183
|
|
|
159
|
|
- boolean logresult = workorderoperatelogService.insert(loginput);
|
|
|
184
|
+ boolean result = workorderbaseService.update(orderBase);
|
|
|
185
|
+ if (result) {
|
|
|
186
|
+ if (orderBase.getIsend()==0 && input.getIsend()==1)
|
|
|
187
|
+ {
|
|
|
188
|
+ boolean logresult = addlog("修改并结束了工单", 3L, CurrentUser().getUserName(), input.getWorkordercode());
|
|
|
189
|
+ }
|
|
|
190
|
+ else
|
|
|
191
|
+ {
|
|
|
192
|
+ boolean logresult = addlog("修改并完成了工单", 4L, CurrentUser().getUserName(), input.getWorkordercode());
|
|
|
193
|
+ }
|
|
160
|
194
|
return Success("成功");
|
|
161
|
195
|
} else {
|
|
162
|
|
- return Error("新增失败");
|
|
|
196
|
+ return Error("修改失败");
|
|
163
|
197
|
}
|
|
164
|
198
|
}
|
|
165
|
199
|
|
|
166
|
200
|
@ApiOperation("编辑")
|
|
167
|
|
- @Log(title = "编辑wo_workorderbase",businessType = BusinessType.UPDATE)
|
|
168
|
|
- @PutMapping
|
|
169
|
|
- public AjaxResult edit(@RequestBody WorkOrderBase input) {
|
|
|
201
|
+ @Log(title = "编辑wo_workorderbase", businessType = BusinessType.UPDATE)
|
|
|
202
|
+ @PutMapping("/editresult")
|
|
|
203
|
+ public AjaxResult editresult(@RequestBody WorkOrderBase input) {
|
|
|
204
|
+
|
|
|
205
|
+ Date currentDate = new Date(System.currentTimeMillis());
|
|
|
206
|
+ WorkOrderBase orderBase = new WorkOrderBaseView();
|
|
|
207
|
+
|
|
|
208
|
+ orderBase.setResult(input.getResult());
|
|
|
209
|
+ orderBase.setIsend(1L);
|
|
|
210
|
+ orderBase.setEndtime(currentDate);
|
|
|
211
|
+ orderBase.setFile(input.getFile());
|
|
170
|
212
|
boolean result = workorderbaseService.update(input);
|
|
171
|
213
|
if (result) {
|
|
|
214
|
+ boolean logresult = addlog("完成了工单", 2L, CurrentUser().getUserName(), input.getWorkordercode());
|
|
172
|
215
|
return Success("成功");
|
|
173
|
216
|
} else {
|
|
174
|
217
|
return Error("修改失败");
|
|
175
|
218
|
}
|
|
176
|
219
|
}
|
|
177
|
220
|
|
|
|
221
|
+
|
|
178
|
222
|
@ApiOperation("删除")
|
|
179
|
|
- @Log(title = "删除wo_workorderbase",businessType = BusinessType.DELETE)
|
|
|
223
|
+ @Log(title = "删除wo_workorderbase", businessType = BusinessType.DELETE)
|
|
180
|
224
|
@DeleteMapping("/{ids}")
|
|
181
|
|
- public AjaxResult delete(@PathVariable Long[] ids) {
|
|
182
|
|
- boolean result = workorderbaseService.delete(Arrays.asList(ids));
|
|
|
225
|
+ public AjaxResult delete(@PathVariable Long[] ids) {
|
|
|
226
|
+ StringBuilder error= new StringBuilder();
|
|
|
227
|
+ for (int i=0;i<ids .length;i++)
|
|
|
228
|
+ {
|
|
|
229
|
+ WorkOrderBase workOrderBase=workorderbaseService.getEntity(ids[i] );
|
|
|
230
|
+ if (workOrderBase!=null)
|
|
|
231
|
+ {
|
|
|
232
|
+ workOrderBase .setIsdelete(1L);
|
|
|
233
|
+ boolean result = workorderbaseService.update(workOrderBase);
|
|
|
234
|
+ if (!result)
|
|
|
235
|
+ {
|
|
|
236
|
+ error.append(workOrderBase.getWorkordercode()).append("删除失败;");
|
|
|
237
|
+ }
|
|
|
238
|
+ }
|
|
|
239
|
+ else
|
|
|
240
|
+ {
|
|
|
241
|
+ error.append("第").append(i).append("行删除失败;");
|
|
|
242
|
+ }
|
|
|
243
|
+ }
|
|
|
244
|
+ if (error.toString().equals("")) {
|
|
|
245
|
+ return Success("成功");
|
|
|
246
|
+ } else {
|
|
|
247
|
+ return Error(error.toString());
|
|
|
248
|
+ }
|
|
|
249
|
+ }
|
|
|
250
|
+
|
|
|
251
|
+
|
|
|
252
|
+ @ApiOperation("留言新增")
|
|
|
253
|
+ @Log(title = "新增wo_workorderbase", businessType = BusinessType.INSERT)
|
|
|
254
|
+ @PostMapping("/addbyly")
|
|
|
255
|
+ public AjaxResult addbyly(@RequestBody WorkOrderBase input) {
|
|
|
256
|
+ Date currentDate = new Date(System.currentTimeMillis());
|
|
|
257
|
+ try {
|
|
|
258
|
+ String ip = InetAddress.getLocalHost().getHostAddress();
|
|
|
259
|
+ input.setIp(ip);
|
|
|
260
|
+ LambdaQueryWrapper<WorkOrderBase> qw = new LambdaQueryWrapper<>();
|
|
|
261
|
+ qw.eq(WorkOrderBase::getIp, ip);
|
|
|
262
|
+ qw.eq(WorkOrderBase::getCreatetime,LocalDate.now());
|
|
|
263
|
+
|
|
|
264
|
+ List<WorkOrderBase> orderBase = workorderbaseService.getList(qw);
|
|
|
265
|
+ if (orderBase != null && orderBase.stream().count() > 9) {
|
|
|
266
|
+ return Error("添加失败");
|
|
|
267
|
+ }
|
|
|
268
|
+ } catch (UnknownHostException e) {
|
|
|
269
|
+ e.printStackTrace();
|
|
|
270
|
+ }
|
|
|
271
|
+
|
|
|
272
|
+
|
|
|
273
|
+ SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
|
274
|
+ String ordercode = format.format(currentDate);
|
|
|
275
|
+ input.setWorkordercode(ordercode);
|
|
|
276
|
+ input.setIsdelete(0L);
|
|
|
277
|
+
|
|
|
278
|
+ input.setCreatetime(currentDate);
|
|
|
279
|
+ //没结束 处理中
|
|
|
280
|
+ input.setIsend(0L);
|
|
|
281
|
+ input.setWorkorderstate(0L);
|
|
|
282
|
+
|
|
|
283
|
+ boolean result = workorderbaseService.insert(input);
|
|
183
|
284
|
if (result) {
|
|
|
285
|
+ boolean logresult = addlog("留言创建了工单", 1L, CurrentUser().getUserName(), input.getWorkordercode());
|
|
|
286
|
+ //判断手机号存在不customer,不存在就添加新用户
|
|
|
287
|
+ LambdaQueryWrapper<Customer> qw = new LambdaQueryWrapper<>();
|
|
|
288
|
+ qw.eq(Customer::getCustomerPhone, input.getCallnum());
|
|
|
289
|
+
|
|
|
290
|
+ Customer record = customerService.getEntity(qw);
|
|
|
291
|
+ if (record == null) {
|
|
|
292
|
+ Customer customer = new Customer();
|
|
|
293
|
+ customer.setType(1L);
|
|
|
294
|
+ customer.setCustomerName(input.getCaller());
|
|
|
295
|
+ customer.setCustomerPhone(input.getCallnum());
|
|
|
296
|
+ customer.setFIsdelete(0L);
|
|
|
297
|
+ customer.setFCreatetime(currentDate);
|
|
|
298
|
+
|
|
|
299
|
+
|
|
|
300
|
+ boolean customerresult = customerService.insert(customer);
|
|
|
301
|
+ }
|
|
184
|
302
|
return Success("成功");
|
|
185
|
303
|
} else {
|
|
186
|
|
- return Error("删除失败");
|
|
|
304
|
+ return Error("添加失败");
|
|
187
|
305
|
}
|
|
188
|
306
|
}
|
|
189
|
307
|
|
|
|
308
|
+ public boolean addlog(String content, Long type, String operator, String code) {
|
|
|
309
|
+ Date currentDate = new Date(System.currentTimeMillis());
|
|
|
310
|
+ //添加操作日志
|
|
|
311
|
+ WorkOrderOperateLog loginput = new WorkOrderOperateLog();
|
|
|
312
|
+ loginput.setIsdelete(0L);
|
|
|
313
|
+ loginput.setLogcontent(content);
|
|
|
314
|
+ loginput.setOperationtime(currentDate);
|
|
|
315
|
+ loginput.setOperationtype(type);
|
|
|
316
|
+ loginput.setOperator(operator);
|
|
|
317
|
+ loginput.setWorkordercode(code);
|
|
|
318
|
+ boolean logresult = workorderoperatelogService.insert(loginput);
|
|
|
319
|
+ return logresult;
|
|
|
320
|
+ }
|
|
|
321
|
+
|
|
|
322
|
+ public WorkOrderBaseView trans(WorkOrderBase orderBase) {
|
|
|
323
|
+
|
|
|
324
|
+ WorkOrderBaseView ov = JSON.parseObject(JSON.toJSONString(orderBase), WorkOrderBaseView.class);
|
|
|
325
|
+ if (orderBase.getProject() > 0) {
|
|
|
326
|
+ DictData dicdata = dictDataService.getEntity(orderBase.getProject());
|
|
|
327
|
+
|
|
|
328
|
+ ov.setProjectname(dicdata.getDictValue());
|
|
|
329
|
+ }
|
|
|
330
|
+ if (orderBase.getWorkordercate() > 0) {
|
|
|
331
|
+ DictData dicdata = dictDataService.getEntity(orderBase.getWorkordercate());
|
|
|
332
|
+ ov.setWorkordercatename(dicdata.getDictValue());
|
|
|
333
|
+ }
|
|
|
334
|
+ if (!StringHelper.isEmpty(orderBase.getDealuser())) {
|
|
|
335
|
+ User user = userMapper.selectUserByUserName(orderBase.getDealuser());
|
|
|
336
|
+ ov.setDealusername(user.getNickName());
|
|
|
337
|
+ }
|
|
|
338
|
+ if (!StringHelper.isEmpty(orderBase.getCreateuser())) {
|
|
|
339
|
+ User user = userMapper.selectUserByUserName(orderBase.getCreateuser());
|
|
|
340
|
+ ov.setCreateusername(user.getNickName());
|
|
|
341
|
+ }
|
|
|
342
|
+ if (orderBase.getWorkordercate() == 0) {
|
|
|
343
|
+ ov.setWorkorderstatename("待处理");
|
|
|
344
|
+ } else if (orderBase.getWorkordercate() == 1) {
|
|
|
345
|
+ ov.setWorkorderstatename("已完成");
|
|
|
346
|
+ } else {
|
|
|
347
|
+ ov.setWorkorderstatename("");
|
|
|
348
|
+ }
|
|
|
349
|
+ if (!StringHelper.isEmpty(orderBase.getFile()))
|
|
|
350
|
+ {
|
|
|
351
|
+ String captchaEnabled = configService.selectCaptchaEnabled("FileUrl");
|
|
|
352
|
+ LambdaQueryWrapper<SysAccessories> qw = new LambdaQueryWrapper<>();
|
|
|
353
|
+ qw.in(SysAccessories::getFileid, orderBase.getFile());
|
|
|
354
|
+ List<SysAccessories> accessoriesList= sysaccessoriesService.getList(qw);
|
|
|
355
|
+ if (accessoriesList!=null && accessoriesList.stream().count()>0)
|
|
|
356
|
+ {
|
|
|
357
|
+ List<String> strlist=new ArrayList<>();
|
|
|
358
|
+ for (SysAccessories accessories:accessoriesList
|
|
|
359
|
+ ) {
|
|
|
360
|
+ strlist.add( captchaEnabled+accessories.getFileurl()) ;
|
|
|
361
|
+ }
|
|
|
362
|
+ ov.setFileurl(strlist);
|
|
|
363
|
+ }
|
|
|
364
|
+
|
|
|
365
|
+ }
|
|
|
366
|
+ return ov;
|
|
|
367
|
+ }
|
|
190
|
368
|
}
|