From 633c20cb18b82819066ee7b0c88c51433a69349b Mon Sep 17 00:00:00 2001 From: wanghao Date: Tue, 30 Sep 2025 08:41:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E5=A4=96=E5=8D=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RepairOutsourcingController.java | 4 ++ .../controller/RepartBillsController.java | 41 +++++----------- .../mapper/device/RepairOutsourcingMapper.xml | 2 +- .../device/repair_outsourcing/add.html | 10 ++-- .../device/repair_outsourcing/edit.html | 34 ++++++++------ .../{add_device.html => repair_add.html} | 47 +++++-------------- .../repair_outsourcing.html | 2 +- .../record_inspection_task.html | 12 +++-- 8 files changed, 65 insertions(+), 87 deletions(-) rename ruoyi-device/src/main/resources/templates/device/repair_outsourcing/{add_device.html => repair_add.html} (63%) diff --git a/ruoyi-device/src/main/java/com/ruoyi/device/controller/RepairOutsourcingController.java b/ruoyi-device/src/main/java/com/ruoyi/device/controller/RepairOutsourcingController.java index d53fbf0..9a3e2ac 100644 --- a/ruoyi-device/src/main/java/com/ruoyi/device/controller/RepairOutsourcingController.java +++ b/ruoyi-device/src/main/java/com/ruoyi/device/controller/RepairOutsourcingController.java @@ -118,6 +118,10 @@ public class RepairOutsourcingController extends BaseController { public String edit(@PathVariable("objid") Long objid, ModelMap mmap) { RepairOutsourcing repairOutsourcing = repairOutsourcingService.selectRepairOutsourcingByObjid(objid); mmap.put("repairOutsourcing", repairOutsourcing); + if (baseManufacturerList == null || baseManufacturerList.isEmpty()) { + baseManufacturerList = baseManufacturerService.selectBaseManufacturerList(null); + } + mmap.put("baseManufacturerList", baseManufacturerList); return prefix + "/edit"; } diff --git a/ruoyi-device/src/main/java/com/ruoyi/device/controller/RepartBillsController.java b/ruoyi-device/src/main/java/com/ruoyi/device/controller/RepartBillsController.java index f4380e3..1259d87 100644 --- a/ruoyi-device/src/main/java/com/ruoyi/device/controller/RepartBillsController.java +++ b/ruoyi-device/src/main/java/com/ruoyi/device/controller/RepartBillsController.java @@ -20,14 +20,13 @@ import java.util.List; /** * 维修工单Controller - * + * * @author ruoyi * @date 2022-05-26 */ @Controller @RequestMapping("/device/repart_bills") -public class RepartBillsController extends BaseController -{ +public class RepartBillsController extends BaseController { private String prefix = "device/repart_bills"; @Autowired @@ -38,10 +37,10 @@ public class RepartBillsController extends BaseController @Autowired private IBaseManufacturerService baseManufacturerService; private List baseDeviceManufacturerList; + @RequiresPermissions("device:repart_bills:view") @GetMapping() - public String repart_bills() - { + public String repart_bills() { return prefix + "/repart_bills"; } @@ -51,8 +50,7 @@ public class RepartBillsController extends BaseController @RequiresPermissions("device:repart_bills:list") @PostMapping({"/list"}) @ResponseBody - public TableDataInfo list( DeviceRepartBills deviceRepartBills) - { + public TableDataInfo list(DeviceRepartBills deviceRepartBills) { startPage(); List list = deviceRepartBillsService.selectDeviceRepartBillsList(deviceRepartBills); @@ -66,8 +64,7 @@ public class RepartBillsController extends BaseController @Log(title = "维修工单", businessType = BusinessType.EXPORT) @PostMapping("/export") @ResponseBody - public AjaxResult export(DeviceRepartBills deviceRepartBills) - { + public AjaxResult export(DeviceRepartBills deviceRepartBills) { List list = deviceRepartBillsService.selectDeviceRepartBillsList(deviceRepartBills); ExcelUtil util = new ExcelUtil(DeviceRepartBills.class); return util.exportExcel(list, "维修工单数据"); @@ -77,8 +74,7 @@ public class RepartBillsController extends BaseController * 新增维修工单 */ @GetMapping("/add") - public String add() - { + public String add() { return prefix + "/add"; } @@ -89,8 +85,7 @@ public class RepartBillsController extends BaseController @Log(title = "维修工单", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody - public AjaxResult addSave(DeviceRepartBills deviceRepartBills) - { + public AjaxResult addSave(DeviceRepartBills deviceRepartBills) { return toAjax(deviceRepartBillsService.insertDeviceRepartBills(deviceRepartBills)); } @@ -99,22 +94,14 @@ public class RepartBillsController extends BaseController */ @RequiresPermissions("device:repart_bills:edit") @GetMapping("/edit/{objid}") - public String edit(@PathVariable("objid") Long objid, ModelMap mmap) - { + public String edit(@PathVariable("objid") Long objid, ModelMap mmap) { DeviceRepartBills deviceRepartBills = deviceRepartBillsService.selectDeviceRepartBillsByObjid(objid); mmap.put("deviceRepartBills", deviceRepartBills); -// return prefix + "/edit"; - - // if (baseScadaDeviceInfos == null || baseScadaDeviceInfos.isEmpty()) { - // baseScadaDeviceInfos = baseScadaDeviceInfoService.selectAllBaseScadaDeviceInfoList(); - // } - // mmap.put("baseScadaDeviceInfos", baseScadaDeviceInfos); if (baseDeviceManufacturerList == null || baseDeviceManufacturerList.isEmpty()) { baseDeviceManufacturerList = baseManufacturerService.selectBaseManufacturerList(null); } mmap.put("baseManufacturerList", baseDeviceManufacturerList); - - return "device/repair_outsourcing/add_device"; + return "device/repair_outsourcing/repair_add"; } /** @@ -124,8 +111,7 @@ public class RepartBillsController extends BaseController @Log(title = "维修工单", businessType = BusinessType.UPDATE) @PostMapping("/edit") @ResponseBody - public AjaxResult editSave(DeviceRepartBills deviceRepartBills) - { + public AjaxResult editSave(DeviceRepartBills deviceRepartBills) { return toAjax(deviceRepartBillsService.updateDeviceRepartBills(deviceRepartBills)); } @@ -134,10 +120,9 @@ public class RepartBillsController extends BaseController */ @RequiresPermissions("device:repart_bills:remove") @Log(title = "维修工单", businessType = BusinessType.DELETE) - @PostMapping( "/remove") + @PostMapping("/remove") @ResponseBody - public AjaxResult remove(String ids) - { + public AjaxResult remove(String ids) { return toAjax(deviceRepartBillsService.deleteDeviceRepartBillsByObjids(ids)); } diff --git a/ruoyi-device/src/main/resources/mapper/device/RepairOutsourcingMapper.xml b/ruoyi-device/src/main/resources/mapper/device/RepairOutsourcingMapper.xml index c3e5bb1..c59396d 100644 --- a/ruoyi-device/src/main/resources/mapper/device/RepairOutsourcingMapper.xml +++ b/ruoyi-device/src/main/resources/mapper/device/RepairOutsourcingMapper.xml @@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" reason, dro.create_by, dro.create_time, - bsd.obj_id, + bsd.device_code, device_name, end_day from device_repair_outsourcing dro diff --git a/ruoyi-device/src/main/resources/templates/device/repair_outsourcing/add.html b/ruoyi-device/src/main/resources/templates/device/repair_outsourcing/add.html index 5f2709d..ed7fd4a 100644 --- a/ruoyi-device/src/main/resources/templates/device/repair_outsourcing/add.html +++ b/ruoyi-device/src/main/resources/templates/device/repair_outsourcing/add.html @@ -13,9 +13,9 @@
@@ -52,7 +52,7 @@
- +
@@ -86,7 +86,7 @@ $('#manufacturerName').on('select2:select', function (e) { var name = $('#manufacturerName').select2('val'); datas.forEach(function (value, i) { - console.log('forEach遍历: 第【' + i + '】项的值为:' + value.manufacturerName); + // console.log('forEach遍历: 第【' + i + '】项的值为:' + value.manufacturerName); if (value.manufacturerName == name) { $("input[name=contacts]").val(value.contacts); diff --git a/ruoyi-device/src/main/resources/templates/device/repair_outsourcing/edit.html b/ruoyi-device/src/main/resources/templates/device/repair_outsourcing/edit.html index 7cc8a26..cd542f2 100644 --- a/ruoyi-device/src/main/resources/templates/device/repair_outsourcing/edit.html +++ b/ruoyi-device/src/main/resources/templates/device/repair_outsourcing/edit.html @@ -7,22 +7,14 @@
-
- -
- -
-
-
- -
- -
-
-
+
- +
@@ -47,6 +39,20 @@