|
|
@@ -74,6 +74,10 @@ public class AdminReleaseApiController extends CertifyApiController{
|
|
|
@RequestMapping(value = "/updatePublicRelease", method = RequestMethod.POST)
|
|
|
public Result updatePublicRelease(InputPublicRelease in){
|
|
|
Result res = new Result();
|
|
|
+ if (in.getId()==null){
|
|
|
+ res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"编号"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
if (in.getStatus()!=3&&publicReleaseService.checkTime(in)) {
|
|
|
res.getError().add(buildError("公出时段已经被使用!","公出时段已经被使用!"));
|
|
|
return res;
|
|
|
@@ -82,6 +86,21 @@ public class AdminReleaseApiController extends CertifyApiController{
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+ @RequestMapping(value = "/updateLocation", method = RequestMethod.POST)
|
|
|
+ public Result updateLocation(InputPublicRelease in){
|
|
|
+ Result res = new Result();
|
|
|
+ if (in.getId()==null){
|
|
|
+ res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"编号"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ if (in.getLatitude()==null&&in.getLongitude()==null&&in.getUserName()==null){
|
|
|
+ res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"位置"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ res.setData(publicReleaseService.updateLocation(in));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 外出打卡、公出打卡
|
|
|
* @return
|