Commit 5560ae62 authored by tianbo's avatar tianbo

bug修改

parent 7759df1c
...@@ -19,6 +19,7 @@ public class ExcelDto { ...@@ -19,6 +19,7 @@ public class ExcelDto {
private String type; private String type;
public ExcelDto(String fileName, String sheetName, String classUrl, String type) { public ExcelDto(String fileName, String sheetName, String classUrl, String type) {
super();
this.fileName = fileName; this.fileName = fileName;
this.sheetName = sheetName; this.sheetName = sheetName;
this.classUrl = classUrl; this.classUrl = classUrl;
...@@ -31,6 +32,10 @@ public class ExcelDto { ...@@ -31,6 +32,10 @@ public class ExcelDto {
this.type = type; this.type = type;
} }
public ExcelDto() {
}
public String getFileName() { public String getFileName() {
return StringUtils.isEmpty(fileName) ? DateUtils.convertDateToString(new Date(), "yyyyMMddHHmmss") : fileName; return StringUtils.isEmpty(fileName) ? DateUtils.convertDateToString(new Date(), "yyyyMMddHHmmss") : fileName;
} }
......
...@@ -122,4 +122,12 @@ public interface EquipFeignClient { ...@@ -122,4 +122,12 @@ public interface EquipFeignClient {
**/ **/
@RequestMapping(value = "/car/getCarDetailById/{id}", method = RequestMethod.GET) @RequestMapping(value = "/car/getCarDetailById/{id}", method = RequestMethod.GET)
ResponseModel<Map<String, Object>> getCarDetailById(@PathVariable Long id); ResponseModel<Map<String, Object>> getCarDetailById(@PathVariable Long id);
/**
* 获取消防建筑树
*
* @return
*/
@RequestMapping(value = "/building/BuildingtreeAndEquip", method = RequestMethod.GET)
ResponseModel<Object> getBuildingTreeAndEquip();
} }
package com.yeejoin.amos.boot.module.tzs.api.service; //package com.yeejoin.amos.boot.module.tzs.api.service;
//
import org.springframework.cloud.openfeign.FeignClient; //import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping; //import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; //import org.springframework.web.bind.annotation.RequestMethod;
import org.typroject.tyboot.core.restful.utils.ResponseModel; //import org.typroject.tyboot.core.restful.utils.ResponseModel;
//
//
/** ///**
* 装备服务feign // * 装备服务feign
* // *
* @author Dell // * @author Dell
*/ // */
@FeignClient(name = "AMOS-EQUIPMANAGE", path = "equip") //@FeignClient(name = "AMOS-EQUIPMANAGE", path = "equip")
//@FeignClient(name = "AMOS-AUTOSYS", url = "http://172.16.10.66:8085", path = "fireAutoSys") ////@FeignClient(name = "AMOS-AUTOSYS", url = "http://172.16.10.66:8085", path = "fireAutoSys")
public interface EquipFeignService { //public interface EquipFeignService {
//
/** // /**
* 获取消防建筑树 // * 获取消防建筑树
* // *
* @return // * @return
*/ // */
@RequestMapping(value = "/building/BuildingtreeAndEquip", method = RequestMethod.GET) // @RequestMapping(value = "/building/BuildingtreeAndEquip", method = RequestMethod.GET)
ResponseModel<Object> getBuildingTreeAndEquip(); // ResponseModel<Object> getBuildingTreeAndEquip();
} //}
...@@ -97,6 +97,21 @@ public class ExcelController extends BaseController { ...@@ -97,6 +97,21 @@ public class ExcelController extends BaseController {
} }
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "上传文件数据-2")
@PostMapping("/upload2")
public void upload2(@RequestPart("file") MultipartFile multipartFile,
@RequestParam(required = false) String fileName,
@RequestParam(required = false) String sheetName,
@RequestParam String type) {
try {
excelService.commonUpload(multipartFile, new ExcelDto(fileName, sheetName, type));
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("系统异常!");
}
}
/** /**
* 导出值班模板 * 导出值班模板
* *
......
...@@ -6,8 +6,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -6,8 +6,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.feign.AmosFeignService; import com.yeejoin.amos.boot.biz.common.feign.AmosFeignService;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils; import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient;
import com.yeejoin.amos.boot.module.tzs.api.entity.UseUnit; import com.yeejoin.amos.boot.module.tzs.api.entity.UseUnit;
import com.yeejoin.amos.boot.module.tzs.api.service.EquipFeignService; //import com.yeejoin.amos.boot.module.tzs.api.service.EquipFeignService;
import com.yeejoin.amos.boot.module.tzs.api.service.IUseUnitService; import com.yeejoin.amos.boot.module.tzs.api.service.IUseUnitService;
import com.yeejoin.amos.boot.module.tzs.api.vo.UseUnitVo; import com.yeejoin.amos.boot.module.tzs.api.vo.UseUnitVo;
import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils; import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils;
...@@ -42,7 +43,7 @@ public class UseUnitController extends BaseController { ...@@ -42,7 +43,7 @@ public class UseUnitController extends BaseController {
IUseUnitService iUseUnitService; IUseUnitService iUseUnitService;
@Autowired @Autowired
EquipFeignService equipFeignService; EquipFeignClient equipFeignClient;
@Autowired @Autowired
AmosFeignService amosFeignService; AmosFeignService amosFeignService;
...@@ -98,7 +99,7 @@ public class UseUnitController extends BaseController { ...@@ -98,7 +99,7 @@ public class UseUnitController extends BaseController {
@RequestMapping(value = "/buildingTree", method = RequestMethod.GET) @RequestMapping(value = "/buildingTree", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取消防建筑树", notes = "获取消防建筑树") @ApiOperation(httpMethod = "GET", value = "获取消防建筑树", notes = "获取消防建筑树")
public ResponseModel<Object> getBuildingTreeAndEquip() { public ResponseModel<Object> getBuildingTreeAndEquip() {
return equipFeignService.getBuildingTreeAndEquip(); return equipFeignClient.getBuildingTreeAndEquip();
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment