瀏覽代碼

调整代码

liyuanyuan 8 月之前
父節點
當前提交
588ba7d117

+ 0 - 95
hjzx-api/src/main/java/api/controller/ai/AIOperationController.java

@@ -1,95 +0,0 @@
1
-package api.controller.ai;
2
-
3
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4
-import com.baomidou.mybatisplus.core.metadata.IPage;
5
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
-import api.controller.BaseController;
7
-import api.entity.database.ai.AIOperation;
8
-import api.entity.input.PageInput;
9
-import api.model.AjaxResult;
10
-import api.service.ai.IAIOperationService;
11
-import api.util.annotation.Log;
12
-import api.util.enums.BusinessType;
13
-import api.util.helper.StringHelper;
14
-import io.swagger.annotations.Api;
15
-import io.swagger.annotations.ApiOperation;
16
-import org.springframework.beans.factory.annotation.Autowired;
17
-import org.springframework.web.bind.annotation.*;
18
-import java.util.Arrays;
19
-
20
-@Api(value = "ai操作日志表",tags = "ai操作日志表")
21
-@RestController
22
-@RequestMapping("/ai/aioperation")
23
-public class AIOperationController extends BaseController {
24
-    @Autowired
25
-    private IAIOperationService aioperationService;
26
-
27
-    @ApiOperation("列表")
28
-    @Log(title = "查询ai操作日志表列表",businessType = BusinessType.QUERY)
29
-    @GetMapping
30
-    public AjaxResult getList(AIOperation input, PageInput pageInput) {
31
-        LambdaQueryWrapper<AIOperation> qw = new LambdaQueryWrapper();
32
-        qw.eq(input.getLogId() != null && input.getLogId() > 0, AIOperation::getLogId, input.getLogId());
33
-        qw.like(!StringHelper.isEmpty(input.getOperateType()), AIOperation::getOperateType, input.getOperateType());
34
-        qw.like(!StringHelper.isEmpty(input.getOperatorUser()), AIOperation::getOperatorUser, input.getOperatorUser());
35
-        qw.eq(input.getOperateTime() != null , AIOperation::getOperateTime, input.getOperateTime());
36
-        qw.like(!StringHelper.isEmpty(input.getOperationContent()), AIOperation::getOperationContent, input.getOperationContent());
37
-        qw.orderByDesc(AIOperation::getLogId);
38
-        Page<AIOperation> page = GetPage(pageInput);
39
-        if (page != null) {
40
-            IPage<AIOperation> iPage = aioperationService.getListPage(page, qw);
41
-            return Success("成功", iPage.getRecords(), iPage.getTotal());
42
-        } else {
43
-            return Success("成功", aioperationService.getList(qw));
44
-        }
45
-    }
46
-
47
-    @ApiOperation("详情")
48
-    @Log(title = "查询ai操作日志表详情",businessType = BusinessType.QUERY)
49
-    @GetMapping("/{id}")
50
-    public AjaxResult getInfo(@PathVariable long id) {
51
-        return Success("成功", aioperationService.getEntity(id));
52
-    }
53
-
54
-    @ApiOperation("新增")
55
-    @Log(title = "新增ai操作日志表",businessType = BusinessType.INSERT)
56
-    @PostMapping
57
-    public AjaxResult add(@RequestBody AIOperation input) {
58
-        if (StringHelper.isEmpty(input.getOperateType()))
59
-        {
60
-            return Error("请选择类型");
61
-        }
62
-        input.setOperatorUser(CurrentUser().getCreateBy());
63
-        boolean result = aioperationService.insert(input);
64
-        if (result) {
65
-            return Success("成功");
66
-        } else {
67
-            return Error("新增失败");
68
-        }
69
-    }
70
-
71
-    @ApiOperation("编辑")
72
-    @Log(title = "编辑ai操作日志表",businessType = BusinessType.UPDATE)
73
-    @PutMapping
74
-    public AjaxResult edit(@RequestBody AIOperation input)  {
75
-        boolean result = aioperationService.update(input);
76
-        if (result) {
77
-            return Success("成功");
78
-        } else {
79
-            return Error("修改失败");
80
-        }
81
-    }
82
-
83
-    @ApiOperation("删除")
84
-    @Log(title = "删除ai操作日志表",businessType = BusinessType.DELETE)
85
-    @DeleteMapping("/{ids}")
86
-    public AjaxResult delete(@PathVariable Long[] ids)  {
87
-        boolean result = aioperationService.delete(Arrays.asList(ids));
88
-        if (result) {
89
-            return Success("成功");
90
-        } else {
91
-            return Error("删除失败");
92
-        }
93
-    }
94
-
95
-}

+ 0 - 103
hjzx-api/src/main/java/api/controller/car/CarInfoController.java

@@ -1,103 +0,0 @@
1
-package api.controller.car;
2
-
3
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4
-import com.baomidou.mybatisplus.core.metadata.IPage;
5
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
-import api.controller.BaseController;
7
-import api.entity.database.car.CarInfo;
8
-import api.entity.input.PageInput;
9
-import api.model.AjaxResult;
10
-import api.service.car.ICarInfoService;
11
-import api.util.annotation.Log;
12
-import api.util.enums.BusinessType;
13
-import api.util.helper.StringHelper;
14
-import io.swagger.annotations.Api;
15
-import io.swagger.annotations.ApiOperation;
16
-import org.springframework.beans.factory.annotation.Autowired;
17
-import org.springframework.web.bind.annotation.*;
18
-import java.util.Arrays;
19
-import java.util.Date;
20
-import java.util.List;
21
-
22
-@Api(value = "car_info",tags = "car_info")
23
-@RestController
24
-@RequestMapping("/car/carinfo")
25
-public class CarInfoController extends BaseController {
26
-    @Autowired
27
-    private ICarInfoService carinfoService;
28
-
29
-    @ApiOperation("列表")
30
-    @Log(title = "查询car_info列表",businessType = BusinessType.QUERY)
31
-    @GetMapping
32
-    public AjaxResult getList(CarInfo input, PageInput pageInput) {
33
-        LambdaQueryWrapper<CarInfo> qw = new LambdaQueryWrapper();
34
-        qw.like(!StringHelper.isEmpty(input.getCarNumber()), CarInfo::getCarNumber, input.getCarNumber());
35
-        qw.eq(input.getCarType() != null && input.getCarType() > 0, CarInfo::getCarType, input.getCarType());
36
-        qw.like(!StringHelper.isEmpty(input.getCarTypename()), CarInfo::getCarTypename, input.getCarTypename());
37
-        qw.like(!StringHelper.isEmpty(input.getCarEquip()), CarInfo::getCarEquip, input.getCarEquip());
38
-        qw.eq(input.getCarId() != null && input.getCarId() > 0, CarInfo::getCarId, input.getCarId());
39
-        Page<CarInfo> page = GetPage(pageInput);
40
-        if (page != null) {
41
-            IPage<CarInfo> iPage = carinfoService.getListPage(page, qw);
42
-            return Success("成功", iPage.getRecords(), iPage.getTotal());
43
-        } else {
44
-            return Success("成功", carinfoService.getList(qw));
45
-        }
46
-    }
47
-
48
-    @ApiOperation("详情")
49
-    @Log(title = "查询car_info详情",businessType = BusinessType.QUERY)
50
-    @GetMapping("/{id}")
51
-    public AjaxResult getInfo(@PathVariable long id) {
52
-        return Success("成功", carinfoService.getEntity(id));
53
-    }
54
-
55
-    @ApiOperation("新增")
56
-    @Log(title = "新增car_info",businessType = BusinessType.INSERT)
57
-    @PostMapping
58
-    public AjaxResult add(@RequestBody CarInfo input) {
59
-        LambdaQueryWrapper<CarInfo> lp =new LambdaQueryWrapper<>();
60
-        lp.eq(CarInfo::getCarNumber,input.getCarNumber());
61
-
62
-        if(carinfoService.exists(lp)) {
63
-            return Error("新增失败,车牌号已存在");
64
-        }
65
-
66
-        Date currentDate = new Date(System.currentTimeMillis());
67
-        input.setCreateTime(currentDate);
68
-        input.setCreateUserName(CurrentUser().getNickName());
69
-        input.setCreateUser(CurrentUser().getUserName());
70
-        input.setIsDelete(0L);
71
-        boolean result = carinfoService.insert(input);
72
-        if (result) {
73
-            return Success("成功");
74
-        } else {
75
-            return Error("新增失败");
76
-        }
77
-    }
78
-
79
-    @ApiOperation("编辑")
80
-    @Log(title = "编辑car_info",businessType = BusinessType.UPDATE)
81
-    @PutMapping
82
-    public AjaxResult edit(@RequestBody CarInfo input)  {
83
-        boolean result = carinfoService.update(input);
84
-        if (result) {
85
-            return Success("成功");
86
-        } else {
87
-            return Error("修改失败");
88
-        }
89
-    }
90
-
91
-    @ApiOperation("删除")
92
-    @Log(title = "删除car_info",businessType = BusinessType.DELETE)
93
-    @DeleteMapping("/{ids}")
94
-    public AjaxResult delete(@PathVariable Long[] ids)  {
95
-        boolean result = carinfoService.delete(Arrays.asList(ids));
96
-        if (result) {
97
-            return Success("成功");
98
-        } else {
99
-            return Error("删除失败");
100
-        }
101
-    }
102
-
103
-}

+ 0 - 539
hjzx-api/src/main/java/api/controller/order/CarWorkOrderController.java

@@ -1,539 +0,0 @@
1
-package api.controller.order;
2
-
3
-import api.entity.database.system.User;
4
-import api.entity.database.system.WorkOrderType;
5
-import api.entity.input.order.CarOrderInput;
6
-import api.entity.input.order.CarOrderListInput;
7
-import api.entity.view.order.CarWorkOrderView;
8
-import api.entity.view.system.WorkOrderTypeView;
9
-import api.mapper.system.UserMapper;
10
-import api.service.order.IWorkOrderOperateLogService;
11
-import api.service.system.IWorkOrderTypeService;
12
-import api.util.enums.EnumOrderStatus;
13
-import com.alibaba.fastjson2.JSON;
14
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
15
-import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
16
-import com.baomidou.mybatisplus.core.metadata.IPage;
17
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
18
-import api.controller.BaseController;
19
-import api.entity.database.order.CarWorkOrder;
20
-import api.entity.input.PageInput;
21
-import api.model.AjaxResult;
22
-import api.service.order.ICarWorkOrderService;
23
-import api.util.annotation.Log;
24
-import api.util.enums.BusinessType;
25
-import api.util.helper.StringHelper;
26
-import io.swagger.annotations.Api;
27
-import io.swagger.annotations.ApiOperation;
28
-import org.springframework.beans.factory.annotation.Autowired;
29
-import org.springframework.web.bind.annotation.*;
30
-
31
-import java.text.SimpleDateFormat;
32
-import java.util.*;
33
-
34
-@Api(value = "wo_carworkorder 八院这个controller没用",tags = "wo_carworkorder")
35
-@RestController
36
-@RequestMapping("/order/carworkorder")
37
-public class CarWorkOrderController extends BaseController {
38
-    @Autowired
39
-    private ICarWorkOrderService carworkorderService;
40
-    @Autowired
41
-    private IWorkOrderOperateLogService workorderoperatelogService;
42
-    @Autowired
43
-    private UserMapper userMapper;
44
-    @ApiOperation("列表")
45
-    @Log(title = "查询wo_carworkorder列表",businessType = BusinessType.QUERY)
46
-    @GetMapping
47
-    public AjaxResult getList(CarOrderListInput input, PageInput pageInput) {
48
-        LambdaQueryWrapper<CarWorkOrder> qw = new LambdaQueryWrapper();
49
-        qw.eq(!StringHelper.isEmpty(input.getWorkordercode()), CarWorkOrder::getWorkordercode, input.getWorkordercode());
50
-        qw.eq(CarWorkOrder::getIsdelete, 0);
51
-        Date currentDate = new Date(System.currentTimeMillis());
52
-
53
-
54
-        qw.gt(  CarWorkOrder::getCreatetime, input.getSTime() );
55
-        qw.lt(  CarWorkOrder::getCreatetime,  input.getETime());
56
-        qw.orderByDesc(CarWorkOrder::getCreatetime);
57
-        Page<CarWorkOrder> page = GetPage(pageInput);
58
-        if (page != null) {
59
-            IPage<CarWorkOrder> iPage = carworkorderService.getListPage(page, qw);
60
-            return Success("成功", iPage.getRecords(), iPage.getTotal());
61
-        } else {
62
-            return Success("成功", carworkorderService.getList(qw));
63
-        }
64
-    }
65
-    @Autowired
66
-    private IWorkOrderTypeService workrodertypeService;
67
-    @ApiOperation("详情")
68
-    @Log(title = "查询wo_carworkorder详情",businessType = BusinessType.QUERY)
69
-    @GetMapping("/{code}")
70
-    public AjaxResult getInfo(@PathVariable String code) {
71
-
72
-        LambdaQueryWrapper<CarWorkOrder> qw = new LambdaQueryWrapper();
73
-        if(!StringHelper.isEmpty(code))
74
-        {
75
-            qw.eq(CarWorkOrder::getWorkordercode, code);
76
-
77
-
78
-            CarWorkOrderView cv=trans(carworkorderService.getEntity(qw));
79
-            return Success("成功",cv );
80
-        }
81
-    else{
82
-            return Success("成功", null);
83
-        }
84
-
85
-
86
-
87
-    }
88
-
89
-
90
-    public CarWorkOrderView trans(CarWorkOrder orderBase) {
91
-
92
-        CarWorkOrderView ov = JSON.parseObject(JSON.toJSONString(orderBase), CarWorkOrderView.class);
93
-
94
-        if (orderBase.getWorkordercate() !=null && orderBase.getWorkordercate() >0) {
95
-            WorkOrderTypeView ordertype = workrodertypeService.selectWorkroderTypeById(orderBase.getWorkordercate() );
96
-            if(ordertype!=null){
97
-                ov.setWorkordercatename(ordertype.getAncestorsName());
98
-            }
99
-
100
-        }
101
-
102
-        //待交办1 ; 待接单(没有处理人的时候)2; 待处理3; 待审核 4 ;待回访5 ;已完结6;
103
-
104
-        switch(orderBase.getWorkorderstate().toString()){
105
-            case "1000":
106
-                ov.setWorkorderstatename("待交办");
107
-                break;
108
-            case "2000":
109
-                ov.setWorkorderstatename("待接单");
110
-                break;
111
-            case "3000":
112
-                ov.setWorkorderstatename("待处理");
113
-                break;
114
-
115
-            case "3100":
116
-                ov.setWorkorderstatename("待发车");
117
-                break;
118
-            case "3200":
119
-                ov.setWorkorderstatename("已发车");
120
-                break;
121
-            case "4000":
122
-                ov.setWorkorderstatename("待审核");
123
-                break;
124
-            case "5000":
125
-                ov.setWorkorderstatename("待回访");
126
-                break;
127
-            case "5100":
128
-                ov.setWorkorderstatename("待评价");
129
-                break;
130
-            case "6000":
131
-                ov.setWorkorderstatename("已完结");
132
-                break;
133
-            default:
134
-
135
-                ov.setWorkorderstatename("");
136
-                break;
137
-        }
138
-
139
-
140
-        if(orderBase.getMyd()!=null)
141
-        {
142
-            if (orderBase.getMyd()==0)
143
-            {
144
-                ov.setMydname("不满意");
145
-            }
146
-            else  if (orderBase.getMyd()==1)
147
-            {
148
-                ov.setMydname("满意");
149
-            }
150
-            else  if (orderBase.getMyd()==2)
151
-            {
152
-                ov.setMydname("非常满意");
153
-            }
154
-
155
-        }
156
-        Boolean isexist=false;
157
-
158
-        return ov;
159
-    }
160
-
161
-
162
-
163
-
164
-
165
-
166
-    @ApiOperation("新增")
167
-    @Log(title = "新增wo_carworkorder",businessType = BusinessType.INSERT)
168
-    @PostMapping
169
-    public AjaxResult add(@RequestBody CarWorkOrder input) {
170
-        Date currentDate = new Date(System.currentTimeMillis());
171
-        Random random = new Random();
172
-        int rannum = random.nextInt(900) + 100;
173
-        SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
174
-        String ordercode = format.format(currentDate) + rannum;
175
-        input.setWorkordercode(ordercode);
176
-        input.setIsdelete(0L);
177
-        input.setCreatetime(currentDate);
178
-        input.setCreateuser(CurrentUser().getUserName());
179
-        input.setCreateusername(CurrentUser().getNickName());
180
-        //指派、接单、发车、到达、撤回、退回、评价等
181
-        if (input.getIsend() == 0) {
182
-        // 新工单
183
-            input.setWorkorderstate(EnumOrderStatus.xgd.getValue());
184
-        } else {
185
-            //结束了 直接完成
186
-            input.setWorkorderstate(EnumOrderStatus.end.getValue());
187
-            input.setEndtime(currentDate);
188
-            input.setDealuser(CurrentUser().getUserName());
189
-            input.setDealdept(CurrentUser().getDeptId());
190
-            input.setDealusername(CurrentUser().getNickName());
191
-        }
192
-
193
-        WorkOrderType typemodel=   workrodertypeService.getEntity(  input.getWorkordercate());
194
-        input.setAncestor(","+typemodel.getAncestors()+","+input.getWorkordercate()+",");
195
-
196
-        boolean result = carworkorderService.insert(input);
197
-        if (result) {
198
-            if (input.getIsend() == 0) {
199
-                boolean logresult = workorderoperatelogService. addlog("创建了工单", "创建", CurrentUser().getUserName(), input.getWorkordercode(), CurrentUser().getNickName(), "");
200
-            } else {
201
-                //结束了 已完成
202
-                boolean logresult =workorderoperatelogService. addlog("创建并结束了工单", "创建并结束", CurrentUser().getUserName(), input.getWorkordercode(), CurrentUser().getNickName(), "");
203
-            }
204
-
205
-            return Success("成功");
206
-        } else {
207
-            return Error("新增失败");
208
-        }
209
-    }
210
-
211
-    @ApiOperation("编辑")
212
-    @Log(title = "编辑wo_carworkorder",businessType = BusinessType.UPDATE)
213
-    @PutMapping
214
-    public AjaxResult edit(@RequestBody CarWorkOrder input)  {
215
-
216
-        if(  input.getWorkordercate()>0){
217
-            WorkOrderType typemodel=   workrodertypeService.getEntity(  input.getWorkordercate());
218
-            input.setAncestor(","+typemodel.getAncestors()+","+input.getWorkordercate()+",");
219
-        }
220
-
221
-
222
-        boolean result = carworkorderService.update(input);
223
-        if (result) {
224
-            boolean logresult = workorderoperatelogService.addlog("编辑了工单", "编辑", CurrentUser().getUserName(), input.getWorkordercode(), CurrentUser().getNickName(), "");
225
-            return Success("成功");
226
-        } else {
227
-            return Error("修改失败");
228
-        }
229
-
230
-      // CarWorkOrder orderBase = carworkorderService.getEntity(input.getCarworkorderId());
231
-       // boolean noend = orderBase.getIsend() == 0 ? true : false;
232
-//        LambdaUpdateWrapper<CarWorkOrder> lq=new LambdaUpdateWrapper<>();
233
-//        lq.eq(CarWorkOrder::getWorkordercode,input.getWorkordercode());
234
-//
235
-//        lq.set(CarWorkOrder::getCaller,input.getCaller());
236
-//
237
-//        lq.set(CarWorkOrder::getCallnum,input.getCallnum());
238
-//        lq.set(CarWorkOrder::getCallcode,input.getCallcode());
239
-//        lq.set(CarWorkOrder::getPatientnum,input.getPatientnum());
240
-//        lq.set(CarWorkOrder::getDoctornum,input.getDoctornum());
241
-//        lq.set(CarWorkOrder::getCaresnum,input.getCaresnum());
242
-//        lq.set(CarWorkOrder::getNeedtime,input.getNeedtime());
243
-//        lq.set(CarWorkOrder::getDestination,input.getDestination());
244
-//        lq.set(CarWorkOrder::getRemark,input.getRemark());
245
-//        lq.set(CarWorkOrder::getCartype,input.getCartype());
246
-//        lq.set(CarWorkOrder::getCartypename,input.getCartypename());
247
-//        boolean result = carworkorderService.updateBatch(lq);
248
-//        if (result) {
249
-//
250
-//            boolean logresult = workorderoperatelogService.addlog("编辑了工单", "编辑", CurrentUser().getUserName(), input.getWorkordercode(), CurrentUser().getNickName(), "");
251
-//            return Success("成功");
252
-//        } else {
253
-//            return Error("修改失败");
254
-//        }
255
-
256
-
257
-
258
-
259
-
260
-    }
261
-
262
-
263
-
264
-    @ApiOperation("指派")
265
-    @Log(title = "指派 ",businessType = BusinessType.UPDATE)
266
-    @PutMapping("/assign")
267
-    public AjaxResult assign(@RequestBody HashMap<String,Object> map)  {
268
-        Date currentDate = new Date(System.currentTimeMillis());
269
-        String code=  map.get("code").toString();
270
-        String dealdept=  map.get("dealdept").toString();
271
-        String dealuser=  map.get("dealuser").toString();
272
-
273
-
274
-
275
-        LambdaUpdateWrapper<CarWorkOrder> lq=new LambdaUpdateWrapper<>();
276
-        lq.eq(CarWorkOrder::getWorkordercode,code);
277
-        lq.set(CarWorkOrder::getAssigntime,currentDate);
278
-        lq.set(CarWorkOrder::getAssignuser,CurrentUser().getUserName());
279
-        lq.set(CarWorkOrder::getAssignusername,CurrentUser().getNickName());
280
-
281
-        lq.set(CarWorkOrder::getWorkorderstate,       EnumOrderStatus.dfc.getValue());
282
-
283
-        lq.set(CarWorkOrder::getDealuser,dealuser);
284
-
285
-        User user = userMapper.selectUserByUserName(dealuser);
286
-        lq.set(CarWorkOrder::getDealusername, user == null ? "" : user.getNickName());
287
-        lq.set(CarWorkOrder::getDealdept, user == null ? 0L : user.getDeptId());
288
-
289
-        String dealname=user == null ? "" : user.getNickName();
290
-
291
-        boolean result = carworkorderService.updateBatch(lq);
292
-        if (result) {
293
-
294
-            boolean logresult = workorderoperatelogService.addlog("指派给"+dealname, "指派", CurrentUser().getUserName(),code, CurrentUser().getNickName(), "");
295
-            return Success("指派成功");
296
-        } else {
297
-            return Error("指派失败");
298
-        }
299
-    }
300
-
301
-
302
-
303
-
304
-    @ApiOperation("调度撤回 参数是工单号 code")
305
-    @Log(title = "撤回  参数是工单号 code",businessType = BusinessType.UPDATE)
306
-    @PutMapping("/withdraw")
307
-    public AjaxResult withdraw(@RequestBody HashMap<String,Object> map)  {
308
-
309
-        Date currentDate = new Date(System.currentTimeMillis());
310
-
311
-        String code=  map.get("code").toString();
312
-        LambdaUpdateWrapper<CarWorkOrder> lq = new LambdaUpdateWrapper<>();
313
-        lq.eq(CarWorkOrder::getWorkordercode, code);
314
-
315
-        lq.set(CarWorkOrder::getAssigntime,null);
316
-        lq.set(CarWorkOrder::getAssignuser,null);
317
-        lq.set(CarWorkOrder::getAssignusername,null);
318
-
319
-        lq.set(CarWorkOrder::getWorkorderstate,       EnumOrderStatus.xgd.getValue());
320
-
321
-        lq.set(CarWorkOrder::getDealusername,null);
322
-
323
-
324
-        lq.set(CarWorkOrder::getDealuser,   null  );
325
-        lq.set(CarWorkOrder::getDealdept,   null  );
326
-
327
-
328
-
329
-        boolean result = carworkorderService.updateBatch(lq);
330
-        if (result) {
331
-
332
-            boolean logresult = workorderoperatelogService.addlog("撤回工单", "调度撤回", CurrentUser().getUserName(),code, CurrentUser().getNickName(), "");
333
-            return Success("撤回成功");
334
-        } else {
335
-            return Error("撤回失败");
336
-        }
337
-    }
338
-
339
-
340
-
341
-
342
-
343
-
344
-
345
-    //1 待交办 2 待接单 3 已接单 4 已发车  6 已完结
346
-    //待交办1  待接单(没有处理人的时候)2 ;待处理3 待审核 4 待回访5 已完结6
347
-    @ApiOperation("接单,参数是工单号 code")
348
-    @Log(title = "接单_workorderbase", businessType = BusinessType.UPDATE)
349
-    @PutMapping("/accept")
350
-    public AjaxResult accept(@RequestBody HashMap<String,Object> map){
351
-
352
-
353
-
354
-        Date currentDate = new Date(System.currentTimeMillis());
355
-        String code=  map.get("code").toString();
356
-        LambdaUpdateWrapper<CarWorkOrder> qw = new LambdaUpdateWrapper<>();
357
-        qw.eq(CarWorkOrder::getWorkordercode, code);
358
-        qw.set(CarWorkOrder::getWorkorderstate,       EnumOrderStatus.dfc.getValue());
359
-        qw.set(CarWorkOrder::getAccepttime, currentDate);
360
-
361
-        qw.set(CarWorkOrder::getDealusername, CurrentUser().getNickName());
362
-        qw.set(CarWorkOrder::getDealuser, CurrentUser().getUserName());
363
-        qw.set(CarWorkOrder::getDealdept, CurrentUser().getDeptId());
364
-
365
-
366
-        boolean result = carworkorderService.updateBatch(qw);
367
-        if (result) {
368
-            boolean logresult = workorderoperatelogService.addlog("接单" , "接单", CurrentUser().getUserName(),
369
-                    code, CurrentUser().getNickName(), "");
370
-            return Success("接单成功");
371
-        } else {
372
-            return Error("接单失败");
373
-        }
374
-    }
375
-
376
-
377
-    @ApiOperation("处理人退回,参数是工单号 code,reason")
378
-    @Log(title = "处理人退回_workorderbase", businessType = BusinessType.UPDATE)
379
-    @PutMapping("/back")
380
-    public AjaxResult back(@RequestBody HashMap<String,Object> map){
381
-
382
-        String reason = map.get("reason").toString();
383
-        if (StringHelper.isNotEmpty(reason)) {
384
-            reason = ",原因:" + reason;
385
-
386
-        }
387
-
388
-
389
-        String code=  map.get("code").toString();
390
-        LambdaUpdateWrapper<CarWorkOrder> qw = new LambdaUpdateWrapper<>();
391
-        qw.eq(CarWorkOrder::getWorkordercode, code);
392
-        qw.set(CarWorkOrder::getWorkorderstate,       EnumOrderStatus.xgd.getValue());
393
-
394
-        qw.set(CarWorkOrder::getDealdept, null);
395
-        qw.set(CarWorkOrder::getDealusername, null);
396
-        qw.set(CarWorkOrder::getDealuser, null);
397
-
398
-
399
-        qw.set(CarWorkOrder::getAssigntime,null);
400
-        qw.set(CarWorkOrder::getAssignuser,null);
401
-        qw.set(CarWorkOrder::getAssignusername,null);
402
-
403
-
404
-
405
-        boolean result = carworkorderService.updateBatch(qw);
406
-        if (result) {
407
-            boolean logresult = workorderoperatelogService.addlog("退回了工单"+reason , "处理人退回", CurrentUser().getUserName(),code, CurrentUser().getNickName(), "");
408
-            return Success("退回成功");
409
-        } else {
410
-            return Error("退回失败");
411
-        }
412
-    }
413
-
414
-    @ApiOperation("发车,参数是工单号 code")
415
-    @Log(title = "发车_workorderbase", businessType = BusinessType.UPDATE)
416
-    @PutMapping("/go")
417
-    public AjaxResult go(@RequestBody HashMap<String,Object> map){
418
-
419
-
420
-
421
-
422
-        Date currentDate = new Date(System.currentTimeMillis());
423
-
424
-
425
-        String code=  map.get("code").toString();
426
-        LambdaUpdateWrapper<CarWorkOrder> qw = new LambdaUpdateWrapper<>();
427
-        qw.eq(CarWorkOrder::getWorkordercode, code);
428
-        qw.set(CarWorkOrder::getWorkorderstate,       EnumOrderStatus.yfc.getValue());
429
-        qw.set(CarWorkOrder::getStarttime, currentDate);
430
-        boolean result = carworkorderService.updateBatch(qw);
431
-        if (result) {
432
-            boolean logresult = workorderoperatelogService.addlog("发车" , "发车", CurrentUser().getUserName(),code, CurrentUser().getNickName(), "");
433
-            return Success("发车成功");
434
-        } else {
435
-            return Error("发车失败");
436
-        }
437
-    }
438
-
439
-
440
-    @ApiOperation("到达,参数是工单号 code ")
441
-    @Log(title = "到达_workorderbase", businessType = BusinessType.UPDATE)
442
-    @PutMapping("/arrive")
443
-    public AjaxResult arrive(@RequestBody HashMap<String,Object> map){
444
-
445
-
446
-
447
-
448
-        Date currentDate = new Date(System.currentTimeMillis());
449
-        String code=  map.get("code").toString();
450
-
451
-
452
-
453
-        LambdaUpdateWrapper<CarWorkOrder> qw = new LambdaUpdateWrapper<>();
454
-        qw.eq(CarWorkOrder::getWorkordercode, code);
455
-        qw.set(CarWorkOrder::getWorkorderstate,       EnumOrderStatus.dpj.getValue());
456
-        qw.set(CarWorkOrder::getArrivaltime, currentDate);
457
-
458
-        boolean result = carworkorderService.updateBatch(qw);
459
-        if (result) {
460
-            boolean logresult = workorderoperatelogService.addlog("到达" , "到达", CurrentUser().getUserName(), code, CurrentUser().getNickName(), "");
461
-            return Success("成功");
462
-        } else {
463
-            return Error("失败");
464
-        }
465
-    }
466
-
467
-
468
-
469
-    @ApiOperation("评价,参数是主键code,myd,reason ")
470
-    @Log(title = "评价_workorderbase", businessType = BusinessType.UPDATE)
471
-    @PutMapping("/evaluate")
472
-    public AjaxResult evaluate(@RequestBody HashMap<String,Object> map){
473
-
474
-        String reason=  map.get("reason").toString();
475
-        String myd=  map.get("myd").toString();
476
-
477
-        String code=  map.get("code").toString();
478
-
479
-        Date currentDate = new Date(System.currentTimeMillis());
480
-
481
-        LambdaUpdateWrapper<CarWorkOrder> qw = new LambdaUpdateWrapper<>();
482
-        qw.eq(CarWorkOrder::getWorkordercode, code);
483
-        qw.set(CarWorkOrder::getWorkorderstate,       EnumOrderStatus.end.getValue());
484
-        qw.set(CarWorkOrder::getEndtime, currentDate);
485
-        qw.set(CarWorkOrder::getVisittime, currentDate);
486
-        qw.set(CarWorkOrder::getMyd, myd);
487
-        qw.set(CarWorkOrder::getIsend, 1);
488
-
489
-        if (StringHelper.isNotEmpty(reason))
490
-        {
491
-            qw.set(CarWorkOrder::getDiscontent, reason);
492
-        }
493
-        boolean result = carworkorderService.updateBatch(qw);
494
-        if (result) {
495
-            boolean logresult = workorderoperatelogService.addlog("评价了工单" , "评价", CurrentUser().getUserName(),code, CurrentUser().getNickName(), "");
496
-            return Success("成功");
497
-        } else {
498
-            return Error("失败");
499
-        }
500
-    }
501
-
502
-
503
-
504
-    @ApiOperation("删除,参数用工单号")
505
-    @Log(title = "删除wo_carworkorder",businessType = BusinessType.DELETE)
506
-    @DeleteMapping
507
-    public AjaxResult delete(@RequestBody CarOrderInput input )
508
-    {
509
-        List<String> carordercodes = new ArrayList<>();
510
-
511
-        if (input.getCarOrderCodes() != null && input.getCarOrderCodes().stream().count() > 0) {
512
-            carordercodes = input.getCarOrderCodes();
513
-        }
514
-        LambdaUpdateWrapper<CarWorkOrder> lp = new LambdaUpdateWrapper<>();
515
-        lp.in(CarWorkOrder::getWorkordercode, carordercodes);
516
-        lp.set(CarWorkOrder::getIsdelete, 1);
517
-        boolean result = carworkorderService.updateBatch(lp);
518
-        if (result) {
519
-            //删除标签 存log记录
520
-//            LambdaQueryWrapper<CarWorkOrder> qw1 = new LambdaQueryWrapper<>();
521
-//            qw1.in(CarWorkOrder::getWorkordercode, carordercodes).select(CarWorkOrder::getWorkordercode, CarWorkOrder::getCarworkorderId);
522
-//            List<Map<String, Object>> carorderlist = carworkorderService.getMaps(qw1);
523
-
524
-            for (String pt : carordercodes) {
525
-                workorderoperatelogService.addlog("删除了工单" , "删除", CurrentUser().getUserName(), pt, CurrentUser().getNickName(), "");
526
-
527
-            }
528
-            return Success("成功");
529
-        } else {
530
-            return Error("删除失败");
531
-        }
532
-
533
-
534
-
535
-
536
-
537
-    }
538
-
539
-}

+ 1 - 1
hjzx-api/src/main/java/api/controller/patient/HisPatientController.java

@@ -28,7 +28,7 @@ import java.util.*;
28 28
 
29 29
 @Api(value = "his_patient",tags = "his_patient")
30 30
 @RestController
31
-@RequestMapping("/patient/hispatient")
31
+@RequestMapping("/todelete/patienttodelete/hispatient")
32 32
 public class HisPatientController extends BaseController {
33 33
     @Autowired
34 34
     private IHisPatientService hispatientService;

+ 1 - 1
hjzx-api/src/main/java/api/controller/patient/HospitalRecordController.java

@@ -19,7 +19,7 @@ import java.util.Arrays;
19 19
 
20 20
 @Api(value = "p_hospital_record",tags = "p_hospital_record")
21 21
 @RestController
22
-@RequestMapping("/patient/hospitalrecord")
22
+@RequestMapping("/todelete/patienttodelete/hospitalrecord")
23 23
 public class HospitalRecordController extends BaseController {
24 24
     @Autowired
25 25
     private IHospitalRecordService hospitalrecordService;

+ 1 - 1
hjzx-api/src/main/java/api/controller/patient/LabelController.java

@@ -19,7 +19,7 @@ import java.util.Arrays;
19 19
 
20 20
 @Api(value = "p_label",tags = "p_label")
21 21
 @RestController
22
-@RequestMapping("/patient/label")
22
+@RequestMapping("/todelete/patient/label")
23 23
 public class LabelController extends BaseController {
24 24
     @Autowired
25 25
     private ILabelService labelService;

+ 2 - 69
hjzx-api/src/main/java/api/controller/patient/PatientLabelController.java

@@ -24,7 +24,7 @@ import java.util.stream.Collectors;
24 24
 
25 25
 @Api(value = "患者标签",tags = "患者标签")
26 26
 @RestController
27
-@RequestMapping("/patient/patientlabel")
27
+@RequestMapping("/todelete/patient/patientlabel")
28 28
 public class PatientLabelController extends BaseController {
29 29
     @Autowired
30 30
     private IPatientLabelService patientlabelService;
@@ -161,74 +161,7 @@ public class PatientLabelController extends BaseController {
161 161
     }
162 162
 
163 163
 
164
-//    @ApiOperation("批量打标签")
165
-//    @Log(title = "新增p_patientlabel",businessType = BusinessType.INSERT)
166
-//    @PostMapping("/batchadd")
167
-//
168
-//    public AjaxResult batchadd(@RequestBody LabelInput inputlabel) {
169
-//        Label labelmodel=new Label();
170
-//
171
-//        Long labelid;
172
-//        //判断标签是否存在
173
-//        LambdaQueryWrapper<Label> lqw=new LambdaQueryWrapper<>();
174
-//        lqw.eq(Label::getLabelName,inputlabel.getLabelName());
175
-//        List<Label> labelList=labelService.getList(lqw);
176
-//        if(labelList.size()>0){
177
-//            labelmodel=labelList.get(0);
178
-//            labelid=labelmodel.getLabelId();
179
-//
180
-//            labelmodel.setPatientCount(inputlabel.getPatientids().stream().count()+labelmodel.getPatientCount());
181
-//            labelService.update(labelmodel);
182
-//
183
-//        }
184
-//        else{
185
-//            //先添加标签
186
-//            labelmodel.setLabelName(inputlabel.getLabelName());
187
-//            labelmodel.setPatientCount(inputlabel.getPatientids().stream().count());
188
-//            labelmodel.setCreateUser(CurrentUser().getUserName());
189
-//             labelService.insert(labelmodel);
190
-//            labelid=labelmodel.getLabelId();
191
-//        }
192
-//
193
-//        Date currentDate = new Date(System.currentTimeMillis());
194
-//        List<String> patientids= inputlabel.getPatientids();
195
-//        LambdaQueryWrapper<Patient> lp=new LambdaQueryWrapper<>();
196
-//        lp.in(Patient::getPatientId,inputlabel.getPatientids());
197
-//       List<Patient> patientList= patientService.getList(lp);
198
-//
199
-//      // Long labelid=inputlabel.getLabelId()==null?labelmodel.getLabelId():inputlabel.getLabelId();
200
-//
201
-//        StringBuilder error = new StringBuilder();
202
-//        for (int i = 0; i < patientids.stream().count(); i++) {
203
-//            PatientLabel input=new PatientLabel();
204
-//            String      String_id = patientids.get(i);
205
-//            input.setCreateTime(currentDate);
206
-//            input.setCreateUserName(CurrentUser().getNickName());
207
-//            input.setCreateUser(CurrentUser().getUserName());
208
-//            input.setIsDelete(0L);
209
-//            input.setLabelId(labelid);
210
-//            input.setPatientId(String_id);
211
-//            var patient=  patientList.stream().filter(x->x.getPatientId().equals(String_id)).collect(Collectors.toList()).stream().findFirst();
212
-//            input.setLabelName(inputlabel.getLabelName());
213
-//            input.setPatientName(patient.get().getName() );
214
-//            input.setPhoneNumber(patient.get().getPhoneNumber());
215
-//            boolean result = patientlabelService.insert(input);
216
-//            if (result)  {
217
-//                //添加标签 存log记录
218
-//            var ppp=  patientList.stream().filter(x->x.getPatientId().equals(String_id)).findFirst().get();
219
-//               ppp.setUpdateTime(currentDate);
220
-//                patientService.update(ppp);
221
-//                patientlogService.addOperate(String_id,patient.get().getName(),"添加标签","添加标签-"+input.getLabelName(),
222
-//                        CurrentUser().getUserName(),CurrentUser().getNickName());
223
-//            }
224
-//        }
225
-//
226
-//        if (error.toString().equals("")) {
227
-//            return Success("成功");
228
-//        } else {
229
-//            return Error(error.toString());
230
-//        }
231
-//    }
164
+
232 165
 @ApiOperation("批量打标签,现在要传LabelId和patientids")
233 166
 @Log(title = "新增p_patientlabel",businessType = BusinessType.INSERT)
234 167
 @PostMapping("/batchadd")

+ 1 - 1
hjzx-api/src/main/resources/application-dev.yml

@@ -74,4 +74,4 @@ spring:
74 74
     password:
75 75
 
76 76
   isNote: 1
77
-  pushUrl: http://1.194.161.64:8150/Home/receiveCall
77
+  pushUrl: 192.168.1.15:8320/Home/receiveCall

+ 8 - 42
hjzx-api/src/main/resources/application-production.yml

@@ -1,59 +1,25 @@
1 1
 server:
2
-  port: 8120
3
-swagger: false
2
+  port: 8320
3
+swagger: true
4 4
 
5 5
 spring:
6 6
   datasource:
7 7
     type: com.alibaba.druid.pool.DruidDataSource
8 8
     driver-class-name: com.mysql.cj.jdbc.Driver
9
-    url: jdbc:mysql://127.0.0.1:3306/xlrx?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
9
+    url: jdbc:mysql://192.168.1.8:3306/hjzx_xy?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
10 10
     username: root
11
-    password: Mb@DH1i{Y[cmH6[PW4TMziL}Y~f1+2(i
11
+    password: 800100
12 12
 
13
-  #  shardingsphere:
14
-  #    datasource:
15
-  #      names: master,slave0,slave1
16
-  #      master:
17
-  #        type: com.alibaba.druid.pool.DruidDataSource
18
-  #        driver-class-name: com.mysql.cj.jdbc.Driver
19
-  #        url: jdbc:mysql://192.168.1.200:3306/kfyy?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
20
-  #        username: root
21
-  #        password: 800100
22
-  #      slave0:
23
-  #        type: com.alibaba.druid.pool.DruidDataSource
24
-  #        driver-class-name: com.mysql.cj.jdbc.Driver
25
-  #        url: jdbc:mysql://192.168.1.200:3306/kfyy?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
26
-  #        username: root
27
-  #        password: 800100
28
-  #      slave1:
29
-  #        type: com.alibaba.druid.pool.DruidDataSource
30
-  #        driver-class-name: com.mysql.cj.jdbc.Driver
31
-  #        url: jdbc:mysql://192.168.1.200:3306/kfyy?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
32
-  #        username: root
33
-  #        password: 800100
34
-  #    rules:
35
-  #      readwrite-splitting:
36
-  #        data-sources:
37
-  #          mds:
38
-  #            type: static
39
-  #            props:
40
-  #              write-data-source-name: master
41
-  #              read-data-source-names: slave0,slave1
42
-  #            load-balancer-name: read-random
43
-  #        load-balancers:
44
-  #          read-random:
45
-  #            type: round_robin
46
-  #    enabled: true
47 13
 
48 14
   redis:
49 15
     # 地址
50
-    host: 127.0.0.1
16
+    host: 192.168.1.200
51 17
     # 端口,默认为6379
52 18
     port: 6379
53 19
     # 数据库索引
54
-    database: 5
20
+    database: 9
55 21
     # 密码
56
-    password: DZFs0EFzMORZfpNx5tb1lpEwGZjSWjB1
22
+    password:
57 23
     # 连接超时时间
58 24
     timeout: 10s
59 25
 
@@ -74,4 +40,4 @@ spring:
74 40
     password:
75 41
 
76 42
   isNote: 1
77
-  pushUrl: http://10.0.0.3:8150/Home/receiveCall
43
+  pushUrl: 192.168.1.15:8320/Home/receiveCall

+ 2 - 2
hjzx-api/src/main/resources/application.yml

@@ -3,8 +3,8 @@ spring:
3 3
     date-format: yyyy-MM-dd HH:mm:ss
4 4
     time-zone: GMT+8
5 5
   profiles:
6
-    active: production
7
-    #active: dev
6
+    #active: production
7
+    active: dev
8 8
   servlet:
9 9
     multipart:
10 10
       max-file-size: 20MB #单个文件最大为20M

+ 0 - 32
hjzx-entity/src/main/java/api/entity/database/ai/AIOperation.java

@@ -1,32 +0,0 @@
1
-package api.entity.database.ai;
2
-
3
-import com.baomidou.mybatisplus.annotation.IdType;
4
-import com.baomidou.mybatisplus.annotation.TableId;
5
-import com.baomidou.mybatisplus.annotation.TableName;
6
-import io.swagger.annotations.ApiModel;
7
-import io.swagger.annotations.ApiModelProperty;
8
-import lombok.Data;
9
-import java.util.Date;
10
-
11
-/** ai操作日志表 */
12
-@ApiModel(value = "AIOperation", description = "ai操作日志表实体")
13
-@Data
14
-@TableName("ai_operation")
15
-public class AIOperation {
16
-    /** 主键ID */
17
-    @ApiModelProperty("主键ID")
18
-    @TableId(type = IdType.AUTO)
19
-    private Long logId;
20
-    /** 操作类型,Enum('DeepSeek','ASR') */
21
-    @ApiModelProperty("操作类型,Enum('DeepSeek','ASR')")
22
-    private String operateType;
23
-    /** 操作用户 */
24
-    @ApiModelProperty("操作用户")
25
-    private String operatorUser;
26
-    /** 操作时间 */
27
-    @ApiModelProperty("操作时间")
28
-    private Date operateTime;
29
-    /** 操作内容 */
30
-    @ApiModelProperty("操作内容")
31
-    private String operationContent;
32
-}

+ 1 - 3
hjzx-entity/src/main/java/api/entity/database/patient/Patient.java

@@ -196,7 +196,5 @@ public class Patient {
196 196
     @ApiModelProperty("转归情况")
197 197
     private String zgqk;
198 198
 
199
-    /** 就诊科室ID */
200
-    @ApiModelProperty("就诊科室ID")
201
-    private Long jzksId;
199
+
202 200
 }

+ 0 - 9
hjzx-mapper/src/main/java/api/mapper/ai/AIOperationMapper.java

@@ -1,9 +0,0 @@
1
-package api.mapper.ai;
2
-
3
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
-import api.entity.database.ai.AIOperation;
5
-import org.apache.ibatis.annotations.Mapper;
6
-
7
-@Mapper
8
-public interface AIOperationMapper extends BaseMapper<AIOperation> {
9
-}

+ 0 - 7
hjzx-service/src/main/java/api/service/ai/IAIOperationService.java

@@ -1,7 +0,0 @@
1
-package api.service.ai;
2
-
3
-import api.entity.database.ai.AIOperation;
4
-import api.service.IBaseService;
5
-
6
-public interface IAIOperationService extends IBaseService<AIOperation> {
7
-}

+ 0 - 14
hjzx-service/src/main/java/api/service/ai/impl/AIOperationServiceImpl.java

@@ -1,14 +0,0 @@
1
-package api.service.ai.impl;
2
-
3
-import api.entity.database.ai.AIOperation;
4
-import api.mapper.ai.AIOperationMapper;
5
-import api.service.ai.IAIOperationService;
6
-import api.service.BaseServiceImpl;
7
-import org.springframework.stereotype.Service;
8
-import org.springframework.transaction.annotation.Transactional;
9
-
10
-@Transactional
11
-@Service
12
-public class AIOperationServiceImpl extends BaseServiceImpl<AIOperationMapper, AIOperation> implements IAIOperationService{
13
-    public AIOperationServiceImpl(){ super(false); }
14
-}