| | |
| | | import com.product.core.controller.support.AbstractBaseController; |
| | | import com.product.core.entity.FieldSetEntity; |
| | | import com.product.core.entity.RequestParameterEntity; |
| | | import com.product.core.exception.BaseException; |
| | | import com.product.core.spring.context.SpringMVCContextHolder; |
| | | import com.product.mobile.core.config.MobileCoreCode; |
| | | import com.product.mobile.core.service.SignInService; |
| | | import com.product.module.sys.version.ApiVersion; |
| | | import com.product.org.admin.config.CmnCode; |
| | | |
| | | /** |
| | | * 手机签到 |
| | |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //签到时,如果上传了uuid,表示,征对公司规定的考勤点的签到,否则表示不在公司规定的考勤点的签到(任意地点签到。) |
| | | signInService.signIn(fse); |
| | | return this.OK(); |
| | | try { |
| | | signInService.signIn(fse); |
| | | return this.OK(); |
| | | } catch (BaseException e) { |
| | | return this.error(e); |
| | | } catch (Exception e) { |
| | | |
| | | return this.error(MobileCoreCode.SIGN_IN_FAIL); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取当天打卡签到记录 |
| | | * |
| | |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | return this.OK_List(signInService.signInList(fse)); |
| | | try { |
| | | return this.OK_List(signInService.signInList()); |
| | | } catch (BaseException e) { |
| | | return this.error(e); |
| | | } catch (Exception e) { |
| | | |
| | | return this.error(MobileCoreCode.SIGN_IN_FAIL); |
| | | } |
| | | } |
| | | /** |
| | | * 获取公司固定考勤点的信息 |
| | |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | try { |
| | | //获取当前人的公司 |
| | | return this.OK_List(signInService.signInSites(SpringMVCContextHolder.getCurrentUser().getCurrentCompany().getUUID())); |
| | | |
| | | return this.OK_List(signInService.signInSites(null)); |
| | | } catch (BaseException e) { |
| | | return this.error(e); |
| | | } catch (Exception e) { |
| | | |
| | | return this.error(MobileCoreCode.SIGN_IN_FAIL); |
| | | } |
| | | } |
| | | /** |
| | | * 地理坐标转换接口 |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/map/coord/convert/{version}", method = RequestMethod.POST) |
| | | @ApiVersion(1) |
| | | public String coordinateTransform(HttpServletRequest request) { |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | try { |
| | | //返回经纬度 |
| | | return this.OK_List(signInService.coordinateTransform(fse.getInteger("type"),fse.getDouble("longitude"),fse.getDouble("latitude"))); |
| | | |
| | | } catch (BaseException e) { |
| | | return this.error(e); |
| | | } catch (Exception e) { |
| | | |
| | | return this.error(MobileCoreCode.SIGN_IN_FAIL); |
| | | } |
| | | } |
| | | } |