格式化代码,清理无用的引入和文件
This commit is contained in:
parent
03676fb02d
commit
53ae646213
@ -91,12 +91,6 @@
|
|||||||
<artifactId>ant</artifactId>
|
<artifactId>ant</artifactId>
|
||||||
<version>1.10.12</version>
|
<version>1.10.12</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.aliyun.oss</groupId>
|
|
||||||
<artifactId>aliyun-sdk-oss</artifactId>
|
|
||||||
<version>3.10.2</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common-log</artifactId>
|
<artifactId>ruoyi-common-log</artifactId>
|
||||||
|
|||||||
@ -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;
|
|
||||||
}
|
|
||||||
@ -54,12 +54,14 @@ public class WorkOrderController extends BaseController {
|
|||||||
return R.ok(workOrderService.selectOrderById(orderId));
|
return R.ok(workOrderService.selectOrderById(orderId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Log(title = "工单-维护工单", businessType = BusinessType.UPDATE)
|
@Log(title = "工单-维护工单", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/detail")
|
@PutMapping("/detail")
|
||||||
public R updateOrderInfo(@RequestBody XhpcWorkOrderDomain domain){
|
public R updateOrderInfo(@RequestBody XhpcWorkOrderDomain domain){
|
||||||
return R.ok(workOrderService.updateOrder(domain));
|
return R.ok(workOrderService.updateOrder(domain));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Log(title = "工单-处理工单", businessType = BusinessType.UPDATE)
|
@Log(title = "工单-处理工单", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/reply")
|
@PutMapping("/reply")
|
||||||
public R replyOrder(@RequestBody XhpcWorkOrderDomain domain){
|
public R replyOrder(@RequestBody XhpcWorkOrderDomain domain){
|
||||||
@ -67,7 +69,6 @@ public class WorkOrderController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Log(title = "工单-删除工单", businessType = BusinessType.DELETE)
|
@Log(title = "工单-删除工单", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{orderId}")
|
@DeleteMapping("/{orderId}")
|
||||||
public R deleteOrder(@PathVariable("orderId")Long orderId) throws Exception {
|
public R deleteOrder(@PathVariable("orderId")Long orderId) throws Exception {
|
||||||
|
|||||||
@ -144,6 +144,7 @@ public class WorkStationController extends BaseController {
|
|||||||
return R.ok(stationService.insertSimpleDevice(vo));
|
return R.ok(stationService.insertSimpleDevice(vo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Log(title = "场站设备-维护设备信息", businessType = BusinessType.UPDATE)
|
@Log(title = "场站设备-维护设备信息", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/detail")
|
@PutMapping("/detail")
|
||||||
public R updateDeviceInfo(@RequestBody XhpcStationDeviceDomain domain) {
|
public R updateDeviceInfo(@RequestBody XhpcStationDeviceDomain domain) {
|
||||||
|
|||||||
@ -40,6 +40,7 @@ public class WorkTypeController extends BaseController {
|
|||||||
return getDataTable(typeService.getPage(params));
|
return getDataTable(typeService.getPage(params));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/getList")
|
@GetMapping("/getList")
|
||||||
public R getList(HttpServletRequest request){
|
public R getList(HttpServletRequest request){
|
||||||
|
|
||||||
@ -51,6 +52,7 @@ public class WorkTypeController extends BaseController {
|
|||||||
return R.ok(typeService.getList(params));
|
return R.ok(typeService.getList(params));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/getTree")
|
@GetMapping("/getTree")
|
||||||
public R getTree(HttpServletRequest request){
|
public R getTree(HttpServletRequest request){
|
||||||
|
|
||||||
@ -93,7 +95,6 @@ public class WorkTypeController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@DeleteMapping("/{typeId}")
|
@DeleteMapping("/{typeId}")
|
||||||
@Log(title = "工单类型-删除工单类型", businessType = BusinessType.DELETE)
|
@Log(title = "工单类型-删除工单类型", businessType = BusinessType.DELETE)
|
||||||
public R deleteTypeInfo(@PathVariable("typeId") Integer typeId){
|
public R deleteTypeInfo(@PathVariable("typeId") Integer typeId){
|
||||||
|
|||||||
@ -13,12 +13,10 @@ public interface XhpcStationDeviceMapper {
|
|||||||
|
|
||||||
List<Map<String, Object>> selectStationGunDeviceTreeByParams(@Param("params") Map params);
|
List<Map<String, Object>> selectStationGunDeviceTreeByParams(@Param("params") Map params);
|
||||||
|
|
||||||
|
|
||||||
List<Map<String, Object>> selectListByParent(@Param("params")Map params);
|
List<Map<String, Object>> selectListByParent(@Param("params")Map params);
|
||||||
|
|
||||||
Map<String, Object> selectByDeviceId(@Param("deviceId") Long deviceId);
|
Map<String, Object> selectByDeviceId(@Param("deviceId") Long deviceId);
|
||||||
|
|
||||||
|
|
||||||
List<Map<String, Object>> selectStationGunDeviceTreeByParent(@Param("parentDeviceId") String parentDeviceId);
|
List<Map<String, Object>> selectStationGunDeviceTreeByParent(@Param("parentDeviceId") String parentDeviceId);
|
||||||
|
|
||||||
XhpcStationDeviceDomain selectStationGunDeviceBySerialNumber(@Param("serialNumber") String serialNumber);
|
XhpcStationDeviceDomain selectStationGunDeviceBySerialNumber(@Param("serialNumber") String serialNumber);
|
||||||
|
|||||||
@ -12,7 +12,6 @@ public interface XhpcWorkDeptMapper {
|
|||||||
|
|
||||||
List<Map<String, Object>> selectMapListByParams(@Param("params") Map params);
|
List<Map<String, Object>> selectMapListByParams(@Param("params") Map params);
|
||||||
|
|
||||||
|
|
||||||
int deleteByPrimaryKey(Long workDeptId);
|
int deleteByPrimaryKey(Long workDeptId);
|
||||||
|
|
||||||
int insert(XhpcWorkDeptDomain record);
|
int insert(XhpcWorkDeptDomain record);
|
||||||
|
|||||||
@ -56,6 +56,7 @@ public class WorkOrderServiceImpl implements WorkOrderService {
|
|||||||
return orderDomain;
|
return orderDomain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean updateOrder(XhpcWorkOrderDomain domain){
|
public Boolean updateOrder(XhpcWorkOrderDomain domain){
|
||||||
orderMapper.updateByPrimaryKeySelective(domain);
|
orderMapper.updateByPrimaryKeySelective(domain);
|
||||||
@ -117,6 +118,7 @@ public class WorkOrderServiceImpl implements WorkOrderService {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean insertOrder(XhpcWorkOrderDomain domain){
|
public Boolean insertOrder(XhpcWorkOrderDomain domain){
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import com.xhpc.workorder.mapper.XhpcWorkStationMapper;
|
|||||||
import com.xhpc.workorder.service.WorkStationService;
|
import com.xhpc.workorder.service.WorkStationService;
|
||||||
import com.xhpc.workorder.vo.XhpcStationDeviceVo;
|
import com.xhpc.workorder.vo.XhpcStationDeviceVo;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -19,6 +20,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@Transactional
|
||||||
public class WorkStationServiceImpl implements WorkStationService {
|
public class WorkStationServiceImpl implements WorkStationService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
@ -79,6 +81,7 @@ public class WorkStationServiceImpl implements WorkStationService {
|
|||||||
return deviceMapper.selectListByParent(params);
|
return deviceMapper.selectListByParent(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<XhpcWorkStationDomain> getStationList(Map<String, Object> params){
|
public List<XhpcWorkStationDomain> getStationList(Map<String, Object> params){
|
||||||
return stationMapper.selectListByParams(params);
|
return stationMapper.selectListByParams(params);
|
||||||
@ -95,9 +98,7 @@ public class WorkStationServiceImpl implements WorkStationService {
|
|||||||
|
|
||||||
List<Map<String, Object>> stationDomainList = stationMapper.selectMapListByParams(stationParams);
|
List<Map<String, Object>> stationDomainList = stationMapper.selectMapListByParams(stationParams);
|
||||||
for (Map<String, Object> stationMap: stationDomainList){
|
for (Map<String, Object> stationMap: stationDomainList){
|
||||||
if( params.get("stationName") != null && StringUtils.isEmpty(params.get("stationName").toString())){
|
|
||||||
params.put("stationName", stationMap.get("name"));
|
params.put("stationName", stationMap.get("name"));
|
||||||
}
|
|
||||||
List<Map<String, Object>> resultData = deviceMapper.selectStationGunDeviceTreeByParams(params);
|
List<Map<String, Object>> resultData = deviceMapper.selectStationGunDeviceTreeByParams(params);
|
||||||
for (Map<String, Object> resultMap: resultData){
|
for (Map<String, Object> resultMap: resultData){
|
||||||
List<Map<String, Object>> childData = deviceMapper.selectStationGunDeviceTreeByParent(resultMap.get("id").toString());
|
List<Map<String, Object>> childData = deviceMapper.selectStationGunDeviceTreeByParent(resultMap.get("id").toString());
|
||||||
@ -181,6 +182,7 @@ public class WorkStationServiceImpl implements WorkStationService {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean insertSimpleDevice(XhpcStationDeviceVo vo) throws Exception{
|
public Boolean insertSimpleDevice(XhpcStationDeviceVo vo) throws Exception{
|
||||||
|
|
||||||
@ -212,6 +214,7 @@ public class WorkStationServiceImpl implements WorkStationService {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean deleteDevice(Long deviceId) throws Exception {
|
public Boolean deleteDevice(Long deviceId) throws Exception {
|
||||||
XhpcStationDeviceDomain deviceDomain = deviceMapper.selectByPrimaryKey(deviceId);
|
XhpcStationDeviceDomain deviceDomain = deviceMapper.selectByPrimaryKey(deviceId);
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import com.xhpc.workorder.domain.XhpcWorkTypeDictDomain;
|
|||||||
import com.xhpc.workorder.mapper.XhpcWorkTypeDictMapper;
|
import com.xhpc.workorder.mapper.XhpcWorkTypeDictMapper;
|
||||||
import com.xhpc.workorder.service.WorkTypeService;
|
import com.xhpc.workorder.service.WorkTypeService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -14,6 +15,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@Transactional
|
||||||
public class WorkTypeServiceImpl implements WorkTypeService {
|
public class WorkTypeServiceImpl implements WorkTypeService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
@ -53,6 +55,7 @@ public class WorkTypeServiceImpl implements WorkTypeService {
|
|||||||
return typeList;
|
return typeList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public XhpcWorkTypeDictDomain getInfoByPk(Integer typeId){
|
public XhpcWorkTypeDictDomain getInfoByPk(Integer typeId){
|
||||||
return typeDictMapper.selectByPrimaryKey(typeId);
|
return typeDictMapper.selectByPrimaryKey(typeId);
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
package com.xhpc.workorder.service.impl;
|
package com.xhpc.workorder.service.impl;
|
||||||
|
|
||||||
import com.xhpc.workorder.domain.XhpcWorkDeptDomain;
|
|
||||||
import com.xhpc.workorder.domain.XhpcWorkUserDomain;
|
import com.xhpc.workorder.domain.XhpcWorkUserDomain;
|
||||||
import com.xhpc.workorder.mapper.XhpcWorkDeptMapper;
|
import com.xhpc.workorder.mapper.XhpcWorkDeptMapper;
|
||||||
import com.xhpc.workorder.mapper.XhpcWorkUserMapper;
|
import com.xhpc.workorder.mapper.XhpcWorkUserMapper;
|
||||||
import com.xhpc.workorder.service.WorkUserService;
|
import com.xhpc.workorder.service.WorkUserService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -13,6 +13,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@Transactional
|
||||||
public class WorkUserServiceImpl implements WorkUserService {
|
public class WorkUserServiceImpl implements WorkUserService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
@ -30,6 +31,7 @@ public class WorkUserServiceImpl implements WorkUserService {
|
|||||||
return workUserMapper.insert(domain) > 0;
|
return workUserMapper.insert(domain) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public XhpcWorkUserDomain insertUserReturnDomain(String userName, String phone){
|
public XhpcWorkUserDomain insertUserReturnDomain(String userName, String phone){
|
||||||
insertUser(userName, phone);
|
insertUser(userName, phone);
|
||||||
|
|||||||
@ -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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -96,7 +96,7 @@
|
|||||||
|
|
||||||
<select id="selectStationGunDeviceTreeByParams" resultType="map">
|
<select id="selectStationGunDeviceTreeByParams" resultType="map">
|
||||||
SELECT
|
SELECT
|
||||||
d1.device_id as 'id',
|
concat('D_', d1.device_id) as 'id',
|
||||||
d1.device_name as 'name',
|
d1.device_name as 'name',
|
||||||
d1.device_type as 'type',
|
d1.device_type as 'type',
|
||||||
d1.serial_number as 'serialNumber',
|
d1.serial_number as 'serialNumber',
|
||||||
@ -173,7 +173,7 @@
|
|||||||
|
|
||||||
<select id="selectStationGunDeviceTreeByParent" resultType="map">
|
<select id="selectStationGunDeviceTreeByParent" resultType="map">
|
||||||
SELECT
|
SELECT
|
||||||
d1.device_id as 'id',
|
concat('D_', d1.device_id) as 'id',
|
||||||
d1.device_name as 'name',
|
d1.device_name as 'name',
|
||||||
d1.device_type as 'type',
|
d1.device_type as 'type',
|
||||||
d1.serial_number as 'serialNumber',
|
d1.serial_number as 'serialNumber',
|
||||||
@ -182,7 +182,7 @@
|
|||||||
d1.sorted as 'sorted'
|
d1.sorted as 'sorted'
|
||||||
from xhpc_station_device d1
|
from xhpc_station_device d1
|
||||||
WHERE d1.del_flag=0
|
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
|
order by d1.device_type, d1.sorted
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
<select id="selectMapListByParams" resultType="map">
|
<select id="selectMapListByParams" resultType="map">
|
||||||
select
|
select
|
||||||
work_station_id as 'id',
|
concat('S_', work_station_id) as 'id',
|
||||||
name as 'name',
|
name as 'name',
|
||||||
type as 'type',
|
type as 'type',
|
||||||
address as 'address',
|
address as 'address',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user