From 53ae6462130de15bff7fd7d4111732c20559afce Mon Sep 17 00:00:00 2001 From: panshuling321 Date: Thu, 10 Mar 2022 14:12:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E6=B8=85=E7=90=86=E6=97=A0=E7=94=A8=E7=9A=84=E5=BC=95?= =?UTF-8?q?=E5=85=A5=E5=92=8C=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xhpc-modules/xhpc-workorder/pom.xml | 6 ----- .../workorder/config/AliOSSProperties.java | 24 ------------------- .../controller/WorkOrderController.java | 3 ++- .../controller/WorkStationController.java | 1 + .../controller/WorkTypeController.java | 3 ++- .../mapper/XhpcStationDeviceMapper.java | 2 -- .../workorder/mapper/XhpcWorkDeptMapper.java | 1 - .../service/impl/WorkOrderServiceImpl.java | 2 ++ .../service/impl/WorkStationServiceImpl.java | 7 ++++-- .../service/impl/WorkTypeServiceImpl.java | 3 +++ .../service/impl/WorkUserServiceImpl.java | 4 +++- .../xhpc/workorder/utils/DownloadUtil.java | 18 -------------- .../mapper/XhpcStationDeviceMapper.xml | 6 ++--- .../mapper/XhpcWorkStationMapper.xml | 2 +- 14 files changed, 22 insertions(+), 60 deletions(-) delete mode 100644 xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/config/AliOSSProperties.java delete mode 100644 xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/utils/DownloadUtil.java diff --git a/xhpc-modules/xhpc-workorder/pom.xml b/xhpc-modules/xhpc-workorder/pom.xml index 73b7b23a..c91fa33e 100644 --- a/xhpc-modules/xhpc-workorder/pom.xml +++ b/xhpc-modules/xhpc-workorder/pom.xml @@ -91,12 +91,6 @@ ant 1.10.12 - - com.aliyun.oss - aliyun-sdk-oss - 3.10.2 - compile - com.ruoyi ruoyi-common-log diff --git a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/config/AliOSSProperties.java b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/config/AliOSSProperties.java deleted file mode 100644 index 3226d4b7..00000000 --- a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/config/AliOSSProperties.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.xhpc.workorder.config; - - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; - - -/** - * 支付宝支付配置类 - */ -@Data -@ConfigurationProperties(prefix = "oss") -public class AliOSSProperties { - - private boolean enabled; - private String name; - private boolean tenantMode; - private String endpoint; - private String accessKey; - private String secretKey; - private String bucketName; - private String region; - private String domain; -} diff --git a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/controller/WorkOrderController.java b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/controller/WorkOrderController.java index b1925dce..444aae51 100644 --- a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/controller/WorkOrderController.java +++ b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/controller/WorkOrderController.java @@ -54,12 +54,14 @@ public class WorkOrderController extends BaseController { return R.ok(workOrderService.selectOrderById(orderId)); } + @Log(title = "工单-维护工单", businessType = BusinessType.UPDATE) @PutMapping("/detail") public R updateOrderInfo(@RequestBody XhpcWorkOrderDomain domain){ return R.ok(workOrderService.updateOrder(domain)); } + @Log(title = "工单-处理工单", businessType = BusinessType.UPDATE) @PutMapping("/reply") public R replyOrder(@RequestBody XhpcWorkOrderDomain domain){ @@ -67,7 +69,6 @@ public class WorkOrderController extends BaseController { } - @Log(title = "工单-删除工单", businessType = BusinessType.DELETE) @DeleteMapping("/{orderId}") public R deleteOrder(@PathVariable("orderId")Long orderId) throws Exception { diff --git a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/controller/WorkStationController.java b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/controller/WorkStationController.java index c533aeb9..fac3a426 100644 --- a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/controller/WorkStationController.java +++ b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/controller/WorkStationController.java @@ -144,6 +144,7 @@ public class WorkStationController extends BaseController { return R.ok(stationService.insertSimpleDevice(vo)); } + @Log(title = "场站设备-维护设备信息", businessType = BusinessType.UPDATE) @PutMapping("/detail") public R updateDeviceInfo(@RequestBody XhpcStationDeviceDomain domain) { diff --git a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/controller/WorkTypeController.java b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/controller/WorkTypeController.java index f509e332..2ed67005 100644 --- a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/controller/WorkTypeController.java +++ b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/controller/WorkTypeController.java @@ -40,6 +40,7 @@ public class WorkTypeController extends BaseController { return getDataTable(typeService.getPage(params)); } + @GetMapping("/getList") public R getList(HttpServletRequest request){ @@ -51,6 +52,7 @@ public class WorkTypeController extends BaseController { return R.ok(typeService.getList(params)); } + @GetMapping("/getTree") public R getTree(HttpServletRequest request){ @@ -93,7 +95,6 @@ public class WorkTypeController extends BaseController { } - @DeleteMapping("/{typeId}") @Log(title = "工单类型-删除工单类型", businessType = BusinessType.DELETE) public R deleteTypeInfo(@PathVariable("typeId") Integer typeId){ diff --git a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/mapper/XhpcStationDeviceMapper.java b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/mapper/XhpcStationDeviceMapper.java index 2a93ad24..4e551c08 100644 --- a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/mapper/XhpcStationDeviceMapper.java +++ b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/mapper/XhpcStationDeviceMapper.java @@ -13,12 +13,10 @@ public interface XhpcStationDeviceMapper { List> selectStationGunDeviceTreeByParams(@Param("params") Map params); - List> selectListByParent(@Param("params")Map params); Map selectByDeviceId(@Param("deviceId") Long deviceId); - List> selectStationGunDeviceTreeByParent(@Param("parentDeviceId") String parentDeviceId); XhpcStationDeviceDomain selectStationGunDeviceBySerialNumber(@Param("serialNumber") String serialNumber); diff --git a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/mapper/XhpcWorkDeptMapper.java b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/mapper/XhpcWorkDeptMapper.java index b62833ec..3c65ca71 100644 --- a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/mapper/XhpcWorkDeptMapper.java +++ b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/mapper/XhpcWorkDeptMapper.java @@ -12,7 +12,6 @@ public interface XhpcWorkDeptMapper { List> selectMapListByParams(@Param("params") Map params); - int deleteByPrimaryKey(Long workDeptId); int insert(XhpcWorkDeptDomain record); diff --git a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/service/impl/WorkOrderServiceImpl.java b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/service/impl/WorkOrderServiceImpl.java index 8bd576e2..1f71c516 100644 --- a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/service/impl/WorkOrderServiceImpl.java +++ b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/service/impl/WorkOrderServiceImpl.java @@ -56,6 +56,7 @@ public class WorkOrderServiceImpl implements WorkOrderService { return orderDomain; } + @Override public Boolean updateOrder(XhpcWorkOrderDomain domain){ orderMapper.updateByPrimaryKeySelective(domain); @@ -117,6 +118,7 @@ public class WorkOrderServiceImpl implements WorkOrderService { return true; } + @Override public Boolean insertOrder(XhpcWorkOrderDomain domain){ diff --git a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/service/impl/WorkStationServiceImpl.java b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/service/impl/WorkStationServiceImpl.java index a6137581..075625a2 100644 --- a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/service/impl/WorkStationServiceImpl.java +++ b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/service/impl/WorkStationServiceImpl.java @@ -11,6 +11,7 @@ import com.xhpc.workorder.mapper.XhpcWorkStationMapper; import com.xhpc.workorder.service.WorkStationService; import com.xhpc.workorder.vo.XhpcStationDeviceVo; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.HashMap; @@ -19,6 +20,7 @@ import java.util.Map; @Service +@Transactional public class WorkStationServiceImpl implements WorkStationService { @Resource @@ -79,6 +81,7 @@ public class WorkStationServiceImpl implements WorkStationService { return deviceMapper.selectListByParent(params); } + @Override public List getStationList(Map params){ return stationMapper.selectListByParams(params); @@ -95,9 +98,7 @@ public class WorkStationServiceImpl implements WorkStationService { List> stationDomainList = stationMapper.selectMapListByParams(stationParams); for (Map stationMap: stationDomainList){ - if( params.get("stationName") != null && StringUtils.isEmpty(params.get("stationName").toString())){ params.put("stationName", stationMap.get("name")); - } List> resultData = deviceMapper.selectStationGunDeviceTreeByParams(params); for (Map resultMap: resultData){ List> childData = deviceMapper.selectStationGunDeviceTreeByParent(resultMap.get("id").toString()); @@ -181,6 +182,7 @@ public class WorkStationServiceImpl implements WorkStationService { return true; } + @Override public Boolean insertSimpleDevice(XhpcStationDeviceVo vo) throws Exception{ @@ -212,6 +214,7 @@ public class WorkStationServiceImpl implements WorkStationService { return true; } + @Override public Boolean deleteDevice(Long deviceId) throws Exception { XhpcStationDeviceDomain deviceDomain = deviceMapper.selectByPrimaryKey(deviceId); diff --git a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/service/impl/WorkTypeServiceImpl.java b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/service/impl/WorkTypeServiceImpl.java index f5e19bae..c48c6b74 100644 --- a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/service/impl/WorkTypeServiceImpl.java +++ b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/service/impl/WorkTypeServiceImpl.java @@ -6,6 +6,7 @@ import com.xhpc.workorder.domain.XhpcWorkTypeDictDomain; import com.xhpc.workorder.mapper.XhpcWorkTypeDictMapper; import com.xhpc.workorder.service.WorkTypeService; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.HashMap; @@ -14,6 +15,7 @@ import java.util.Map; @Service +@Transactional public class WorkTypeServiceImpl implements WorkTypeService { @Resource @@ -53,6 +55,7 @@ public class WorkTypeServiceImpl implements WorkTypeService { return typeList; } + @Override public XhpcWorkTypeDictDomain getInfoByPk(Integer typeId){ return typeDictMapper.selectByPrimaryKey(typeId); diff --git a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/service/impl/WorkUserServiceImpl.java b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/service/impl/WorkUserServiceImpl.java index cb1a0b88..cb90efcc 100644 --- a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/service/impl/WorkUserServiceImpl.java +++ b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/service/impl/WorkUserServiceImpl.java @@ -1,11 +1,11 @@ package com.xhpc.workorder.service.impl; -import com.xhpc.workorder.domain.XhpcWorkDeptDomain; import com.xhpc.workorder.domain.XhpcWorkUserDomain; import com.xhpc.workorder.mapper.XhpcWorkDeptMapper; import com.xhpc.workorder.mapper.XhpcWorkUserMapper; import com.xhpc.workorder.service.WorkUserService; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.List; @@ -13,6 +13,7 @@ import java.util.Map; @Service +@Transactional public class WorkUserServiceImpl implements WorkUserService { @Resource @@ -30,6 +31,7 @@ public class WorkUserServiceImpl implements WorkUserService { return workUserMapper.insert(domain) > 0; } + @Override public XhpcWorkUserDomain insertUserReturnDomain(String userName, String phone){ insertUser(userName, phone); diff --git a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/utils/DownloadUtil.java b/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/utils/DownloadUtil.java deleted file mode 100644 index 562c17eb..00000000 --- a/xhpc-modules/xhpc-workorder/src/main/java/com/xhpc/workorder/utils/DownloadUtil.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xhpc.workorder.utils; - -import cn.hutool.http.HttpUtil; -import com.xhpc.common.core.utils.StringUtils; - -import java.io.File; - -public class DownloadUtil { - - public static File downloadFile(String fileUrl) throws Exception { - - if (StringUtils.isEmpty(fileUrl)) { - throw new Exception("文件地址为空"); - } - String suffix = fileUrl.substring(fileUrl.lastIndexOf(".")); - return HttpUtil.downloadFileFromUrl(fileUrl, File.createTempFile("temp_", suffix)); - } -} diff --git a/xhpc-modules/xhpc-workorder/src/main/resources/mapper/XhpcStationDeviceMapper.xml b/xhpc-modules/xhpc-workorder/src/main/resources/mapper/XhpcStationDeviceMapper.xml index e4e881e7..45bf4e9c 100644 --- a/xhpc-modules/xhpc-workorder/src/main/resources/mapper/XhpcStationDeviceMapper.xml +++ b/xhpc-modules/xhpc-workorder/src/main/resources/mapper/XhpcStationDeviceMapper.xml @@ -96,7 +96,7 @@ SELECT - d1.device_id as 'id', + concat('D_', d1.device_id) as 'id', d1.device_name as 'name', d1.device_type as 'type', d1.serial_number as 'serialNumber', @@ -182,7 +182,7 @@ d1.sorted as 'sorted' from xhpc_station_device d1 WHERE d1.del_flag=0 - and d1.parent_device_id=#{parentDeviceId} + and concat('D_', d1.parent_device_id)=#{parentDeviceId} order by d1.device_type, d1.sorted diff --git a/xhpc-modules/xhpc-workorder/src/main/resources/mapper/XhpcWorkStationMapper.xml b/xhpc-modules/xhpc-workorder/src/main/resources/mapper/XhpcWorkStationMapper.xml index b27b8026..485c54b4 100644 --- a/xhpc-modules/xhpc-workorder/src/main/resources/mapper/XhpcWorkStationMapper.xml +++ b/xhpc-modules/xhpc-workorder/src/main/resources/mapper/XhpcWorkStationMapper.xml @@ -62,7 +62,7 @@