@@ -91,7 +91,7 @@ public class TauvInspectDriverController { | |||
* @return | |||
*/ | |||
@PostMapping("/list") | |||
// @RequiresPermissions(controllerName + ":list") | |||
@RequiresPermissions(controllerName + ":list") | |||
public Response taskList(@RequestBody(required = false) Map<String, Object> map) { | |||
if (map == null) { | |||
map = new HashMap<>(); |
@@ -17,7 +17,6 @@ import org.springframework.web.bind.annotation.RestController; | |||
import com.taauav.admin.entity.TauvInspectPhoto; | |||
import com.taauav.admin.service.ITauvInspectPhotoService; | |||
/** | |||
* 巡检正摄图Controller | |||
* |
@@ -6,14 +6,7 @@ import com.taauav.common.bean.Response; | |||
import org.apache.shiro.authz.annotation.RequiresPermissions; | |||
import com.taauav.common.core.mps.BaseQuery; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.PutMapping; | |||
import org.springframework.web.bind.annotation.DeleteMapping; | |||
import org.springframework.web.bind.annotation.PathVariable; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
import org.springframework.web.bind.annotation.*; | |||
import com.taauav.admin.entity.TauvInspectQuestion; | |||
import com.taauav.admin.service.ITauvInspectQuestionService; | |||
@@ -36,7 +29,7 @@ public class TauvInspectQuestionController extends BaseController | |||
/** | |||
* 查询问题管理列表 | |||
*/ | |||
// @RequiresPermissions("admin:question:list") | |||
@RequiresPermissions("admin:question:list") | |||
@GetMapping("/list") | |||
public Response list(TauvInspectQuestionDTO inspectQuestionDTO, BaseQuery query) | |||
{ | |||
@@ -46,9 +39,9 @@ public class TauvInspectQuestionController extends BaseController | |||
/** | |||
* 获取问题管理详细信息 | |||
*/ | |||
// @RequiresPermissions("admin:question:query") | |||
@GetMapping(value = "/{id}") | |||
public Response getInfo(@PathVariable("id") Integer id) | |||
@RequiresPermissions("admin:question:query") | |||
@GetMapping("/detail") | |||
public Response getInfo(@RequestParam("id") Integer id) | |||
{ | |||
return tauvInspectQuestionService.getQuestionData(id); | |||
} |
@@ -6,6 +6,7 @@ import com.taauav.admin.service.ITauvWaterAlarmService; | |||
import com.taauav.admin.vo.TauvWaterAlarmVo; | |||
import com.taauav.common.bean.Response; | |||
import com.taauav.common.constant.PermissionConstants; | |||
import com.taauav.common.util.DateUtil; | |||
import org.apache.shiro.authz.annotation.RequiresPermissions; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
@@ -23,7 +24,7 @@ import javax.annotation.Resource; | |||
*/ | |||
@RestController | |||
@RequestMapping("/admin/waterAlarm") | |||
public class TauvWaterAlarmController extends BaseController{ | |||
public class TauvWaterAlarmController extends BaseController { | |||
private static final String controllerName = "admin:waterAlarm"; | |||
@Autowired | |||
private ITauvWaterAlarmService waterAlarmService; | |||
@@ -32,6 +33,7 @@ public class TauvWaterAlarmController extends BaseController{ | |||
/** | |||
* 水质超标报警列表 | |||
* | |||
* @param waterAlarmQuery | |||
* @return | |||
*/ | |||
@@ -43,6 +45,7 @@ public class TauvWaterAlarmController extends BaseController{ | |||
/** | |||
* 报警详情 | |||
* | |||
* @param id | |||
* @return | |||
*/ | |||
@@ -58,12 +61,16 @@ public class TauvWaterAlarmController extends BaseController{ | |||
/** | |||
* 修改报警状态 | |||
* | |||
* @param waterAlarm | |||
* @return | |||
*/ | |||
@PostMapping("/edit") | |||
@RequiresPermissions(controllerName + ":" + PermissionConstants.EDIT_PERMISSION) | |||
public Response changeStatus(TauvWaterAlarm waterAlarm) { | |||
if (waterAlarm.getStatus() == 2) { | |||
waterAlarm.setAlarmTime(DateUtil.now()); | |||
} | |||
Boolean res = waterAlarmService.editData(waterAlarm); | |||
if (!res) { | |||
return response.failure("操作失败"); |
@@ -59,7 +59,7 @@ public class TauvWaterDataController extends BaseController { | |||
* @return | |||
*/ | |||
@PostMapping("/import") | |||
// @RequiresPermissions(controllerName + ":" + PermissionConstants.IMPORT_PERMISSION) | |||
@RequiresPermissions(controllerName + ":" + PermissionConstants.IMPORT_PERMISSION) | |||
public Response importData(@RequestParam("file") MultipartFile file) { | |||
return waterDataService.importData(file); | |||
} |
@@ -6,14 +6,7 @@ import com.taauav.common.bean.Response; | |||
import org.apache.shiro.authz.annotation.RequiresPermissions; | |||
import com.taauav.common.core.mps.BaseQuery; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.PutMapping; | |||
import org.springframework.web.bind.annotation.DeleteMapping; | |||
import org.springframework.web.bind.annotation.PathVariable; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
import org.springframework.web.bind.annotation.*; | |||
import com.taauav.admin.entity.TauvWaterSpectrum; | |||
import com.taauav.admin.service.ITauvWaterSpectrumService; | |||
import org.springframework.web.multipart.MultipartFile; | |||
@@ -43,13 +36,12 @@ public class TauvWaterSpectrumController extends BaseController { | |||
return tauvWaterSpectrumService.selectSpectrumPage(waterSpectrumDTO, query); | |||
} | |||
/** | |||
* 获取多光谱图详细信息 | |||
*/ | |||
@RequiresPermissions("admin:spectrum:query") | |||
@GetMapping(value = "/{id}") | |||
public Response getInfo(@PathVariable("id") Integer id) { | |||
@GetMapping("/detail") | |||
public Response getInfo(@RequestParam("id") Integer id) { | |||
return response.success(tauvWaterSpectrumService.getInfo(id)); | |||
} | |||
@@ -75,13 +67,14 @@ public class TauvWaterSpectrumController extends BaseController { | |||
* 删除多光谱图 | |||
*/ | |||
@RequiresPermissions("admin:spectrum:remove") | |||
@DeleteMapping("/{ids}") | |||
public Response remove(@PathVariable Integer[] ids) { | |||
return response.success(tauvWaterSpectrumService.deleteByIds(ids, new TauvWaterSpectrum())); | |||
@PostMapping("/remove") | |||
public Response remove(String ids) { | |||
return tauvWaterSpectrumService.dropSpectrum(ids); | |||
} | |||
/** | |||
* 上传附件 | |||
* | |||
* @param file | |||
* @return | |||
*/ |
@@ -19,13 +19,13 @@ import javax.validation.Valid; | |||
* @since 2020-05-13 | |||
*/ | |||
@RestController | |||
@RequestMapping("/admin/waterStandard") | |||
@RequestMapping("/admin/standard") | |||
public class TauvWaterStandardController { | |||
@Autowired | |||
private ITauvWaterStandardService waterStandardService; | |||
@Autowired | |||
private Response response; | |||
private static final String controllerName = "admin:waterStandard"; | |||
private static final String controllerName = "admin:standard"; | |||
/** | |||
* 标准列表 | |||
@@ -72,12 +72,12 @@ public class TauvWaterStandardController { | |||
/** | |||
* 删除 | |||
* @param waterStandard | |||
* @param id | |||
* @return | |||
*/ | |||
@PostMapping("/drop") | |||
@RequiresPermissions(controllerName + ":" + PermissionConstants.REMOVE_PERMISSION) | |||
public Response drop(TauvWaterStandard waterStandard) { | |||
return waterStandardService.dropStandard(waterStandard); | |||
public Response drop(Integer id) { | |||
return waterStandardService.dropStandard(id); | |||
} | |||
} |
@@ -1,7 +1,10 @@ | |||
package com.taauav.admin.controller; | |||
import com.taauav.admin.controller.BaseController; | |||
import com.taauav.admin.dto.TauvWaterTrendDTO; | |||
import com.taauav.common.bean.Response; | |||
import com.taauav.common.util.DateUtil; | |||
import com.taauav.common.util.ShiroUtils; | |||
import org.apache.shiro.authz.annotation.RequiresPermissions; | |||
import com.taauav.common.core.mps.BaseQuery; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
@@ -10,7 +13,6 @@ import com.taauav.admin.entity.TauvWaterTrend; | |||
import com.taauav.admin.service.ITauvWaterTrendService; | |||
import org.springframework.web.multipart.MultipartFile; | |||
/** | |||
* 水环境趋势模拟Controller | |||
* | |||
@@ -19,32 +21,28 @@ import org.springframework.web.multipart.MultipartFile; | |||
*/ | |||
@RestController | |||
@RequestMapping("/admin/trend") | |||
public class TauvWaterTrendController extends BaseController | |||
{ | |||
public class TauvWaterTrendController extends BaseController { | |||
@Autowired | |||
private ITauvWaterTrendService tauvWaterTrendService; | |||
@Autowired | |||
private Response response; | |||
/** | |||
* 查询水环境趋势模拟列表 | |||
*/ | |||
@RequiresPermissions("admin:trend:list") | |||
// @RequiresPermissions("admin:trend:list") | |||
@GetMapping("/list") | |||
public Response list(TauvWaterTrend tauvWaterTrend, BaseQuery query) | |||
{ | |||
return tauvWaterTrendService.pageData(query,tauvWaterTrend); | |||
public Response list(TauvWaterTrendDTO tauvWaterTrendDTO, BaseQuery query) { | |||
return tauvWaterTrendService.selectTrendPage(query, tauvWaterTrendDTO); | |||
} | |||
/** | |||
* 获取水环境趋势模拟详细信息 | |||
*/ | |||
@RequiresPermissions("admin:trend:query") | |||
@GetMapping(value = "/{id}") | |||
public Response getInfo(@PathVariable("id") Integer id) | |||
{ | |||
@GetMapping("/detail") | |||
public Response getInfo(@RequestParam("id") Integer id) { | |||
return tauvWaterTrendService.getTrendList(id); | |||
} | |||
@@ -53,8 +51,7 @@ public class TauvWaterTrendController extends BaseController | |||
*/ | |||
@RequiresPermissions("admin:trend:add") | |||
@PostMapping | |||
public Response add(@RequestBody TauvWaterTrend tauvWaterTrend) | |||
{ | |||
public Response add(@RequestBody TauvWaterTrend tauvWaterTrend) { | |||
return response.success(tauvWaterTrendService.save(tauvWaterTrend)); | |||
} | |||
@@ -62,9 +59,10 @@ public class TauvWaterTrendController extends BaseController | |||
* 修改水环境趋势模拟 | |||
*/ | |||
@RequiresPermissions("admin:trend:edit") | |||
@PutMapping | |||
public Response edit(@RequestBody TauvWaterTrend tauvWaterTrend) | |||
{ | |||
@PostMapping("/edit") | |||
public Response edit(@RequestBody TauvWaterTrend tauvWaterTrend) { | |||
tauvWaterTrend.setUpdateTime(DateUtil.now()); | |||
tauvWaterTrend.setUpdateUser(ShiroUtils.getAdminId()); | |||
return response.success(tauvWaterTrendService.updateById(tauvWaterTrend)); | |||
} | |||
@@ -73,13 +71,13 @@ public class TauvWaterTrendController extends BaseController | |||
*/ | |||
@RequiresPermissions("admin:trend:remove") | |||
@DeleteMapping("/{ids}") | |||
public Response remove(@PathVariable Integer[] ids) | |||
{ | |||
public Response remove(@PathVariable Integer[] ids) { | |||
return response.success(tauvWaterTrendService.deleteByIds(ids, new TauvWaterTrend())); | |||
} | |||
/** | |||
* 导入趋势数据 | |||
* | |||
* @param file | |||
* @return | |||
*/ | |||
@@ -90,6 +88,7 @@ public class TauvWaterTrendController extends BaseController | |||
/** | |||
* 下载导入模板 | |||
* | |||
* @return | |||
*/ | |||
@GetMapping("/template") |
@@ -1,6 +1,7 @@ | |||
package com.taauav.admin.controller; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.google.common.base.Joiner; | |||
import com.taauav.admin.controller.BaseController; | |||
import com.taauav.common.bean.Response; | |||
import com.taauav.common.util.DateUtil; | |||
@@ -12,6 +13,9 @@ import org.springframework.web.bind.annotation.*; | |||
import com.taauav.admin.entity.TauvWaterWarn; | |||
import com.taauav.admin.service.ITauvWaterWarnService; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
/** | |||
* 水质预警Controller | |||
@@ -49,9 +53,16 @@ public class TauvWaterWarnController extends BaseController { | |||
* 获取水质预警详细信息 | |||
*/ | |||
@RequiresPermissions("admin:warn:query") | |||
@GetMapping(value = "/{id}") | |||
public Response getInfo(@PathVariable("id") Integer id) { | |||
return response.success(tauvWaterWarnService.getInfo(id)); | |||
@GetMapping("detail") | |||
public Response getInfo(@RequestParam("id") Integer id) { | |||
TauvWaterWarn waterWarn = tauvWaterWarnService.getInfo(id); | |||
if (waterWarn == null) { | |||
return response.failure("数据不存在"); | |||
} | |||
waterWarn.setWarnTypeText(FunctionUtils.getArrayText(waterWarn.getWarnType().toString(), waterWarn.typeList())); | |||
waterWarn.setWarnLevelText(FunctionUtils.getArrayText(waterWarn.getWarnLevel().toString(), waterWarn.levelList())); | |||
waterWarn.setStatusText(FunctionUtils.getArrayText(waterWarn.getStatus().toString(), waterWarn.statusList())); | |||
return response.success(waterWarn); | |||
} | |||
/** | |||
@@ -70,6 +81,7 @@ public class TauvWaterWarnController extends BaseController { | |||
@PostMapping("/edit") | |||
public Response edit(@RequestBody TauvWaterWarn tauvWaterWarn) { | |||
tauvWaterWarn.setWarnTime(DateUtil.now()); | |||
tauvWaterWarn.setStatus(2); | |||
return response.success(tauvWaterWarnService.updateById(tauvWaterWarn)); | |||
} | |||
@@ -77,19 +89,20 @@ public class TauvWaterWarnController extends BaseController { | |||
* 删除水质预警 | |||
*/ | |||
@RequiresPermissions("admin:warn:remove") | |||
@DeleteMapping("/{ids}") | |||
public Response remove(@PathVariable Integer[] ids) { | |||
return response.success(tauvWaterWarnService.deleteByIds(ids, new TauvWaterWarn())); | |||
@PostMapping("/remove") | |||
public Response remove(String ids) { | |||
return tauvWaterWarnService.dropWarn(ids); | |||
} | |||
/** | |||
* 取消预警 | |||
* | |||
* @param ids | |||
* @return | |||
*/ | |||
@PostMapping("/cancel") | |||
@RequiresPermissions("admin:warn:cancel") | |||
public Response cancelWarn(@RequestBody Integer[] ids) { | |||
public Response cancelWarn(String ids) { | |||
return tauvWaterWarnService.cancelWarn(ids); | |||
} | |||
} |
@@ -39,7 +39,7 @@ public class BaseReportDTO { | |||
* 巡检时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inspectTime; | |||
private String formatInspectTime; | |||
@@ -35,7 +35,7 @@ public class TauvInspectDriverAssignTaskDTO { | |||
* 执行时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date executionTime; | |||
} |
@@ -51,7 +51,7 @@ public class TauvInspectDriverDTO extends BaseInspectDriverDTO { | |||
* 添加时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
private String formatCreateTime; | |||
/** | |||
@@ -75,7 +75,7 @@ public class TauvInspectDriverDTO extends BaseInspectDriverDTO { | |||
* 期望巡检时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inspectTime; | |||
private String formatInspectTime; | |||
@@ -103,7 +103,7 @@ public class TauvInspectDriverDTO extends BaseInspectDriverDTO { | |||
* 执行时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date executionTime; | |||
private String formatExecutionTime; | |||
@@ -51,7 +51,7 @@ public class TauvInspectDriverPicDTO extends BaseInspectDriverDTO { | |||
* 复核时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date reviewTime; | |||
private String formatReviewTime; | |||
/** | |||
@@ -64,7 +64,7 @@ public class TauvInspectDriverPicDTO extends BaseInspectDriverDTO { | |||
* 巡检开始时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date executionTime; | |||
private String formatExecutionTime; | |||
/** |
@@ -35,13 +35,13 @@ public class TauvInspectPhotoDTO { | |||
* 巡检时间(开始) | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date startTime; | |||
/** | |||
* 巡检时间(结束) | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date endTime; | |||
} |
@@ -53,7 +53,7 @@ public class TauvReportDTO extends BaseReportDTO { | |||
* 生成报告时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inputTime; | |||
/** |
@@ -29,7 +29,7 @@ public class TauvReportDriverDTO extends BaseReportDTO { | |||
* 巡检时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inspectTime; | |||
/** |
@@ -23,7 +23,7 @@ public class TauvReportInputDTO extends BaseReportDTO { | |||
private String formatInputUser; | |||
private Integer num; | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inputTime; | |||
private String formatInputTime; | |||
} |
@@ -35,13 +35,13 @@ public class TauvWaterSpectrumDTO { | |||
* 巡检时间(开始) | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date startTime; | |||
/** | |||
* 巡检时间(结束) | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date endTime; | |||
} |
@@ -0,0 +1,42 @@ | |||
package com.taauav.admin.dto; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import java.math.BigInteger; | |||
import java.util.Date; | |||
/** | |||
* 水环境趋势列表请求实体类 | |||
* | |||
* @author daixiantong | |||
* @date 2020-05-18 | |||
*/ | |||
@Data | |||
public class TauvWaterTrendDTO { | |||
/** | |||
* 趋势编号 | |||
*/ | |||
private String trendCode; | |||
/** | |||
* 区属id | |||
*/ | |||
private BigInteger driverArea; | |||
/** | |||
* 河湖名称 | |||
*/ | |||
private String driverName; | |||
/** | |||
* 预测日期(开始) | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date startTime; | |||
/** | |||
* 预测日期(结束) | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date endTime; | |||
} |
@@ -175,7 +175,7 @@ public class SysAdmin extends Entity { | |||
*/ | |||
@TableField("create_time") | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
@@ -183,7 +183,7 @@ public class SysAdmin extends Entity { | |||
*/ | |||
@TableField("update_time") | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
/** |
@@ -106,7 +106,7 @@ public class SysCity implements Serializable { | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
@@ -118,7 +118,7 @@ public class SysCity implements Serializable { | |||
* 更新时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
/** |
@@ -84,7 +84,7 @@ public class TauvEquipment extends Entity { | |||
* 注册时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date registerTime; | |||
/** |
@@ -48,14 +48,14 @@ public class TauvInspect extends Entity { | |||
* 巡检时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inspectTime; | |||
/** | |||
* 实际执行时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date executionTime; | |||
/** |
@@ -131,7 +131,7 @@ public class TauvInspectDriver extends Entity { | |||
* 执行时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date executionTime; | |||
/** | |||
@@ -177,7 +177,7 @@ public class TauvInspectDriver extends Entity { | |||
* 复核时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date reviewTime; | |||
} |
@@ -37,7 +37,7 @@ public class TauvInspectPhoto extends Entity { | |||
/** | |||
* 上传时间 | |||
*/ | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
private Date uploadTime; | |||
} |
@@ -95,7 +95,7 @@ public class TauvReport extends Entity { | |||
* 巡检时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inspectTime; | |||
@TableField(exist = false) | |||
private String formatInspectTime; | |||
@@ -104,7 +104,7 @@ public class TauvReport extends Entity { | |||
* 巡检时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date executionTime; | |||
/** | |||
@@ -175,7 +175,7 @@ public class TauvReport extends Entity { | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inputTime; | |||
/** |
@@ -49,7 +49,7 @@ public class TauvWaterAlarm extends Entity { | |||
* 巡检日期 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inspectTime; | |||
/** | |||
@@ -66,7 +66,7 @@ public class TauvWaterAlarm extends Entity { | |||
* 报警时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date alarmTime; | |||
/** |
@@ -51,7 +51,7 @@ public class TauvWaterSpectrum extends Entity { | |||
* 巡检时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inspectTime; | |||
/** | |||
* 化学需氧量多光谱路径 |
@@ -46,7 +46,7 @@ public class TauvWaterTrend extends Entity { | |||
/** | |||
* 预测日期 | |||
*/ | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8") | |||
private Date forecastTime; | |||
/** | |||
* 化学需氧量 |
@@ -70,7 +70,7 @@ public class TauvWaterWarn extends Entity { | |||
* 预警日期 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date warnTime; | |||
@TableField(exist = false) |
@@ -41,13 +41,13 @@ public class TauvWaterAlarmQuery extends BaseQuery { | |||
* 报警时间(开始) | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date startTime; | |||
/** | |||
* 报警时间(结束) | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date endTime; | |||
} |
@@ -36,13 +36,13 @@ public class TauvWaterDataQuery extends BaseQuery { | |||
* 巡检开始时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date startTime; | |||
/** | |||
* 巡检结束时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date endTime; | |||
} |
@@ -36,4 +36,11 @@ public interface ITauvWaterSpectrumService extends IBaseService<TauvWaterSpectru | |||
* @return | |||
*/ | |||
Response uploadSpectrum(MultipartFile file); | |||
/** | |||
* 删除多光谱图 | |||
* @param ids | |||
* @return | |||
*/ | |||
Response dropSpectrum(String ids); | |||
} |
@@ -29,8 +29,8 @@ public interface ITauvWaterStandardService extends IBaseService<TauvWaterStandar | |||
/** | |||
* 删除 | |||
* @param waterStandard | |||
* @param id | |||
* @return | |||
*/ | |||
Response dropStandard(TauvWaterStandard waterStandard); | |||
Response dropStandard(Integer id); | |||
} |
@@ -1,7 +1,9 @@ | |||
package com.taauav.admin.service; | |||
import com.taauav.admin.dto.TauvWaterTrendDTO; | |||
import com.taauav.admin.entity.TauvWaterTrend; | |||
import com.taauav.common.bean.Response; | |||
import com.taauav.common.core.mps.BaseQuery; | |||
import com.taauav.common.service.IBaseService; | |||
import org.springframework.web.multipart.MultipartFile; | |||
@@ -13,6 +15,14 @@ import org.springframework.web.multipart.MultipartFile; | |||
*/ | |||
public interface ITauvWaterTrendService extends IBaseService<TauvWaterTrend> | |||
{ | |||
/** | |||
* 自定义分页 | |||
* @param query | |||
* @param waterTrendDTO | |||
* @return | |||
*/ | |||
Response selectTrendPage(BaseQuery query, TauvWaterTrendDTO waterTrendDTO); | |||
/** | |||
* 导入Excel数据 | |||
* @param file |
@@ -13,16 +13,16 @@ import com.taauav.common.service.IBaseService; | |||
public interface ITauvWaterWarnService extends IBaseService<TauvWaterWarn> | |||
{ | |||
/** | |||
* 添加编辑预警数据 | |||
* @param waterWarn | |||
* 取消预警 | |||
* @param ids | |||
* @return | |||
*/ | |||
Response editWarn(TauvWaterWarn waterWarn); | |||
Response cancelWarn(String ids); | |||
/** | |||
* 取消预警 | |||
* 删除预警数据 | |||
* @param ids | |||
* @return | |||
*/ | |||
Response cancelWarn(Integer[] ids); | |||
Response dropWarn(String ids); | |||
} |
@@ -372,6 +372,6 @@ public class TauvWaterDataServiceImpl extends BaseServiceImpl<TauvWaterDataMappe | |||
filedir.mkdirs(); | |||
} | |||
String path = uploadFolder + "/" + filename; | |||
return response.success(path.replace(uploadFolder, uploadUrl + "/upload/")); | |||
return response.success("操作成功", path.replace(uploadFolder, uploadUrl + "upload")); | |||
} | |||
} |
@@ -2,6 +2,7 @@ package com.taauav.admin.service.impl; | |||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.taauav.admin.dto.TauvWaterSpectrumDTO; | |||
@@ -141,4 +142,14 @@ public class TauvWaterSpectrumServiceImpl extends BaseServiceImpl<TauvWaterSpect | |||
} | |||
return response.success("操作成功"); | |||
} | |||
@Override | |||
public Response dropSpectrum(String ids) { | |||
UpdateWrapper wrapper = new UpdateWrapper(); | |||
wrapper.in("id", ids); | |||
wrapper.eq("mark", 1); | |||
wrapper.set("mark", 0); | |||
update(wrapper); | |||
return response.success("删除成功"); | |||
} | |||
} |
@@ -62,16 +62,16 @@ public class TauvWaterStandardServiceImpl extends BaseServiceImpl<TauvWaterStand | |||
/** | |||
* 删除 | |||
* @param waterStandard | |||
* @param id | |||
* @return | |||
*/ | |||
@Override | |||
public Response dropStandard(TauvWaterStandard waterStandard) { | |||
if (StringUtils.isEmpty(waterStandard.getId().toString()) || waterStandard.getId() <= 0) { | |||
public Response dropStandard(Integer id) { | |||
if (StringUtils.isNull(id) || id <= 0) { | |||
return response.failure("质量标准id不能为空"); | |||
} | |||
UpdateWrapper wrapper = new UpdateWrapper(); | |||
wrapper.eq("id", waterStandard.getId()); | |||
wrapper.eq("id", id); | |||
wrapper.set("mark", 0); | |||
update(wrapper); | |||
return response.success("操作成功"); |
@@ -2,12 +2,17 @@ package com.taauav.admin.service.impl; | |||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.extension.exceptions.ApiException; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.taauav.admin.dto.TauvWaterTrendDTO; | |||
import com.taauav.admin.entity.SysCity; | |||
import com.taauav.admin.entity.TauvDriver; | |||
import com.taauav.admin.mapper.SysCityMapper; | |||
import com.taauav.admin.mapper.TauvDriverMapper; | |||
import com.taauav.common.bean.Response; | |||
import com.taauav.common.core.mps.BaseQuery; | |||
import com.taauav.common.core.mps.Condition; | |||
import com.taauav.common.service.impl.BaseServiceImpl; | |||
import com.taauav.common.util.*; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
@@ -21,7 +26,9 @@ import org.springframework.web.multipart.MultipartFile; | |||
import java.io.File; | |||
import java.math.BigDecimal; | |||
import java.math.BigInteger; | |||
import java.util.Calendar; | |||
import java.util.Date; | |||
import java.util.List; | |||
/** | |||
@@ -43,6 +50,39 @@ public class TauvWaterTrendServiceImpl extends BaseServiceImpl<TauvWaterTrendMap | |||
@Value("${server.UPLOAD_URL}") | |||
private String uploadUrl; | |||
/** | |||
* 自定义分页 | |||
* | |||
* @param query | |||
* @param waterTrendDTO | |||
* @return | |||
*/ | |||
@Override | |||
public Response selectTrendPage(BaseQuery query, TauvWaterTrendDTO waterTrendDTO) { | |||
IPage page = new Page(query.getPage(), query.getPageSize()); | |||
QueryWrapper wrapper = new QueryWrapper(); | |||
wrapper.eq("mark", 1); | |||
if (StringUtils.isNotEmpty(waterTrendDTO.getTrendCode())) { | |||
wrapper.like("trend_code", waterTrendDTO.getTrendCode()); | |||
} | |||
if (StringUtils.isNotNull(waterTrendDTO.getDriverArea()) && waterTrendDTO.getDriverArea().compareTo(BigInteger.ZERO) > 0) { | |||
wrapper.eq("driver_area", waterTrendDTO.getDriverArea()); | |||
} | |||
if (StringUtils.isNotEmpty(waterTrendDTO.getDriverName())) { | |||
wrapper.like("driver_name", waterTrendDTO.getDriverName()); | |||
} | |||
if (waterTrendDTO.getStartTime() != null && waterTrendDTO.getEndTime() != null) { | |||
String startTime = FunctionUtils.dateToString(waterTrendDTO.getStartTime(), "yyyy-MM-dd"); | |||
String endTime = FunctionUtils.dateToString(waterTrendDTO.getEndTime(), "yyyy-MM-dd"); | |||
if (StringUtils.isNotEmpty(startTime) && StringUtils.isNotEmpty(endTime)) { | |||
wrapper.between("forecast_time", startTime + " 00:00:00", endTime + " 23:59:59"); | |||
} | |||
} | |||
wrapper.orderByDesc("id"); | |||
IPage<TauvWaterTrend> list = baseMapper.selectPage(page, wrapper); | |||
return response.success(list); | |||
} | |||
/** | |||
* 导入Excel数据 | |||
* | |||
@@ -73,7 +113,7 @@ public class TauvWaterTrendServiceImpl extends BaseServiceImpl<TauvWaterTrendMap | |||
for (List<Object> data : objectList) { | |||
String areaName = data.get(0).toString().trim(); | |||
String driverName = data.get(1).toString().trim(); | |||
String trendTime = data.get(2).toString().trim(); | |||
String forecastTime = data.get(2).toString().trim(); | |||
String waterCod = data.get(3).toString().trim(); | |||
String waterNh3n = data.get(4).toString().trim(); | |||
String waterTp = data.get(5).toString().trim(); | |||
@@ -86,7 +126,7 @@ public class TauvWaterTrendServiceImpl extends BaseServiceImpl<TauvWaterTrendMap | |||
if (StringUtils.isEmpty(driverName)) { | |||
throw new ApiException("第" + m + "行河湖名称不能为空"); | |||
} | |||
if (StringUtils.isEmpty(trendTime)) { | |||
if (StringUtils.isEmpty(forecastTime)) { | |||
throw new ApiException("第" + m + "行预测时间不能为空"); | |||
} | |||
if (StringUtils.isEmpty(waterCod) && StringUtils.isEmpty(waterNh3n) && StringUtils.isEmpty(waterTp) && | |||
@@ -116,7 +156,7 @@ public class TauvWaterTrendServiceImpl extends BaseServiceImpl<TauvWaterTrendMap | |||
QueryWrapper wrapper = new QueryWrapper(); | |||
wrapper.eq("driver_area", city.getId()); | |||
wrapper.eq("driver_id", driver.getId()); | |||
wrapper.eq("trend_time", trendTime); | |||
wrapper.eq("forecast_time", forecastTime + "-01"); | |||
wrapper.last("limit 1"); | |||
TauvWaterTrend waterTrend = getOne(wrapper); | |||
if (waterTrend == null) { | |||
@@ -132,7 +172,8 @@ public class TauvWaterTrendServiceImpl extends BaseServiceImpl<TauvWaterTrendMap | |||
waterTrend.setAreaName(city.getName()); | |||
waterTrend.setDriverId(driver.getId()); | |||
waterTrend.setDriverName(driverName); | |||
waterTrend.setForecastTime(FunctionUtils.strToDate(trendTime, "yyyy-MM-dd")); | |||
Date time = FunctionUtils.strToDate(forecastTime + "-01", "yyyy-MM"); | |||
waterTrend.setForecastTime(time); | |||
if (StringUtils.isNotEmpty(waterCod)) { | |||
waterTrend.setWaterCod(new BigDecimal(waterCod)); | |||
} | |||
@@ -175,6 +216,7 @@ public class TauvWaterTrendServiceImpl extends BaseServiceImpl<TauvWaterTrendMap | |||
/** | |||
* 获取趋势图数据 | |||
* | |||
* @param id | |||
* @return | |||
*/ | |||
@@ -188,6 +230,7 @@ public class TauvWaterTrendServiceImpl extends BaseServiceImpl<TauvWaterTrendMap | |||
wrapper.eq("driver_area", waterTrend.getDriverArea()); | |||
wrapper.eq("driver_id", waterTrend.getDriverId()); | |||
wrapper.eq("mark", 1); | |||
wrapper.orderByAsc("forecast_time"); | |||
List<TauvWaterTrend> list = baseMapper.selectList(wrapper); | |||
return response.success(list); | |||
} |
@@ -4,6 +4,8 @@ package com.taauav.admin.service.impl; | |||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; | |||
import com.taauav.common.bean.Response; | |||
import com.taauav.common.service.impl.BaseServiceImpl; | |||
import com.taauav.common.util.DateUtil; | |||
import com.taauav.common.util.ShiroUtils; | |||
import org.springframework.stereotype.Service; | |||
import com.taauav.admin.mapper.TauvWaterWarnMapper; | |||
import com.taauav.admin.entity.TauvWaterWarn; | |||
@@ -24,24 +26,39 @@ public class TauvWaterWarnServiceImpl extends BaseServiceImpl<TauvWaterWarnMappe | |||
private Response response; | |||
/** | |||
* 添加编辑预警数据 | |||
* @param waterWarn | |||
* 取消预警 | |||
* @param ids | |||
* @return | |||
*/ | |||
@Override | |||
public Response editWarn(TauvWaterWarn waterWarn) { | |||
return null; | |||
} | |||
@Override | |||
public Response cancelWarn(Integer[] ids) { | |||
public Response cancelWarn(String ids) { | |||
UpdateWrapper updateWrapper = new UpdateWrapper(); | |||
updateWrapper.in("id", ids); | |||
updateWrapper.eq("mark", 1); | |||
updateWrapper.set("status", 3); | |||
updateWrapper.set("update_user", ShiroUtils.getAdminId()); | |||
updateWrapper.set("update_time", DateUtil.now()); | |||
Boolean res = update(updateWrapper); | |||
if (!res) { | |||
return response.failure("操作失败"); | |||
} | |||
return response.success("操作成功"); | |||
} | |||
/** | |||
* 删除预警数据 | |||
* @param ids | |||
* @return | |||
*/ | |||
@Override | |||
public Response dropWarn(String ids) { | |||
UpdateWrapper updateWrapper = new UpdateWrapper(); | |||
updateWrapper.in("id", ids); | |||
updateWrapper.set("mark", 0); | |||
Boolean result = update(updateWrapper); | |||
if (!result) { | |||
return response.failure("删除失败"); | |||
} | |||
return response.success("删除成功"); | |||
} | |||
} |
@@ -24,7 +24,7 @@ public class ExecuteTask { | |||
* 执行时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date executionTime; | |||
/** |
@@ -77,7 +77,7 @@ public class TauvEquipmentListVo { | |||
* 注册时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date registerTime; | |||
/** | |||
@@ -104,14 +104,14 @@ public class TauvEquipmentListVo { | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
* 更新时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
/** |
@@ -23,7 +23,7 @@ public class TauvInspectFileDataVo { | |||
private String driverAreaName; | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date executionTime; | |||
private String categoryText; |
@@ -39,7 +39,7 @@ public class TauvInspectPhotoVo extends TauvInspectPhoto { | |||
/** | |||
* 巡检时间 | |||
*/ | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inspectTime; | |||
/** |
@@ -43,7 +43,7 @@ public class TauvInspectQuestionVo extends TauvInspectQuestion { | |||
* 巡检时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inspectTime; | |||
/** |
@@ -80,14 +80,14 @@ public class TauvMountEquipmentListVo { | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
* 更新时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
} |
@@ -39,6 +39,6 @@ public class TauvWaterDataVo extends TauvWaterData { | |||
/** | |||
* 巡检时间 | |||
*/ | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date executionTime; | |||
} |
@@ -82,14 +82,14 @@ public class TauvInspectDriverInfoVo { | |||
* 巡检时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inspectTime; | |||
/** | |||
* 执行时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date executionTime; | |||
/** |
@@ -29,7 +29,7 @@ public class TauvInspectDriverListVo { | |||
* 巡检时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inspectTime; | |||
/** | |||
@@ -111,7 +111,7 @@ public class TauvInspectDriverListVo { | |||
* 申请时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date createTime; | |||
/** |
@@ -39,7 +39,7 @@ public class Entity extends BaseEntity { | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
@@ -51,7 +51,7 @@ public class Entity extends BaseEntity { | |||
* 更新时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
/** |
@@ -497,4 +497,20 @@ public class FunctionUtils { | |||
} | |||
return date; | |||
} | |||
/** | |||
* 日期转指定格式字符串 | |||
* @param date | |||
* @param formatStr | |||
* @return | |||
*/ | |||
public static String dateToString(Date date, String formatStr) { | |||
if (StringUtils.isEmpty(formatStr)) { | |||
formatStr = "yyyy-MM-dd HH:mm:ss"; | |||
} | |||
SimpleDateFormat format = new SimpleDateFormat(formatStr); | |||
String firstDayOfMonth = format.format(date.getTime()); | |||
return firstDayOfMonth; | |||
} | |||
} |
@@ -59,7 +59,7 @@ public class UserInspectQuestion extends Entity { | |||
* 指派时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date assignTime; | |||
/** | |||
@@ -81,7 +81,7 @@ public class UserInspectQuestion extends Entity { | |||
* 处理时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date handlerTime; | |||
@@ -59,6 +59,6 @@ public class UserNotice extends Entity { | |||
* 发布时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date publishTime; | |||
} |
@@ -92,7 +92,7 @@ public class SysCityVo { | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
@@ -104,7 +104,7 @@ public class SysCityVo { | |||
* 更新时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
/** |
@@ -140,14 +140,14 @@ public class UserAdminListVo { | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
* 更新时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
} |
@@ -123,7 +123,7 @@ public class UserAdminVo { | |||
* 上次登录时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date lastTime; | |||
/** | |||
@@ -150,14 +150,14 @@ public class UserAdminVo { | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
* 更新时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
/** |
@@ -92,7 +92,7 @@ public class UserInspectQuestionInfoVo { | |||
* 巡检时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date inspectTime; | |||
} |
@@ -72,7 +72,7 @@ public class UserInspectQuestionListVo { | |||
* 巡检时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date inspectTime; | |||
} |
@@ -68,7 +68,7 @@ public class UserNoticeInfoVo { | |||
* 发布时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date publishTime; | |||
} |
@@ -68,7 +68,7 @@ public class UserNoticeListVo { | |||
* 发布时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date publishTime; | |||
} |
@@ -40,7 +40,7 @@ public class UserWaterSpectrumListVo { | |||
* 巡检时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date inspectTime; | |||
/** |
@@ -32,7 +32,7 @@ public class UserWaterAlarmInfoVo { | |||
* 巡检日期 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inspectTime; | |||
/** |
@@ -52,7 +52,7 @@ public class UserWaterAlarmListVo { | |||
* 巡检日期 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inspectTime; | |||
/** | |||
@@ -69,7 +69,7 @@ public class UserWaterAlarmListVo { | |||
* 报警时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date alarmTime; | |||
/** |
@@ -42,7 +42,7 @@ public class UserWaterWarnListVo { | |||
* 巡检日期 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inspectTime; | |||
/** |
@@ -63,6 +63,8 @@ file: | |||
###静态资源实际存储路径 | |||
uploadFolder: /data/java/nanjing/public/upload/ | |||
uploadImage: temp/ | |||
####多光谱图文件后缀 | |||
spectrumExtension: tiff | |||
servlet: | |||
context-path: | |||
multipart: |
@@ -66,6 +66,8 @@ file: | |||
staticAccessPath: /upload/** | |||
###静态资源实际存储路径 | |||
uploadFolder: D:/sites/taauav/public/upload | |||
####多光谱图文件后缀 | |||
spectrumExtension: tiff | |||
mybatis-plus: | |||
configuration: |
@@ -69,6 +69,8 @@ file: | |||
enabled: true | |||
max-file-size: 50mb | |||
max-request-size: 100mb | |||
####多光谱图文件后缀 | |||
spectrumExtension: tiff | |||
mybatis-plus: | |||
configuration: |
@@ -69,6 +69,8 @@ file: | |||
enabled: true | |||
max-file-size: 10mb | |||
max-request-size: 10mb | |||
####多光谱图文件后缀 | |||
spectrumExtension: tiff | |||
mybatis-plus: | |||
configuration: |