新增公共区域上报

This commit is contained in:
wenc000 2020-04-20 19:17:30 +08:00
parent 718bbd53ed
commit 186a04251f

View File

@ -10,6 +10,7 @@ import com.cm.common.pojo.ListPage;
import com.cm.common.result.ErrorResult;
import com.cm.common.result.SuccessResult;
import com.cm.common.result.SuccessResultList;
import com.cm.common.utils.DateUtil;
import com.cm.common.utils.RegexUtil;
import com.cm.inspection.pojo.dtos.publicareareport.PublicAreaReportDTO;
import com.cm.inspection.pojo.vos.publicareareport.PublicAreaReportVO;
@ -49,12 +50,13 @@ public class PublicAreaReportAppController extends AbstractController {
if (publicAreaReportVO.getCheckType() != 1) {
throw new ParamsException("检查类型错误");
}
if (!RegexUtil.isDate(publicAreaReportVO.getCheckDate())) {
throw new ParamsException("检查日期错误");
}
return publicAreaReportService.savePublicAreaReportByToken(token, publicAreaReportVO);
}
public static void main(String[] args) {
System.out.println(RegexUtil.isDate("2020-04-20 19:14:10"));
}
@ApiOperation(value = "删除公共区域上报(id列表)", notes = "删除公共区域上报(id列表)接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ -78,9 +80,6 @@ public class PublicAreaReportAppController extends AbstractController {
if (publicAreaReportVO.getCheckType() != 2 && publicAreaReportVO.getCheckType() != 3) {
throw new ParamsException("检查类型错误");
}
if (!RegexUtil.isDate(publicAreaReportVO.getRecheckDate())) {
throw new ParamsException("检查日期错误");
}
return publicAreaReportService.updatePublicAreaReportByToken(token, publicAreaReportId, publicAreaReportVO);
}