提交 16bdee00 authored 作者: 000516's avatar 000516 提交者: Coding

1. 打卡报错提示信息明确详细;打下班卡判断销售状态记录

1. 销售单元提交审核必需有数据 2. 打卡报错提示信息明确详细 3. 打下班卡判断有没有创建记录,没有的情况下就去创建记录页面 4. 打下班卡判断有没有提交审批,没有的情况下跳转到提交审核页面
......@@ -47,7 +47,7 @@ public class TemporaryActivityClockCoreController {
boolean isClockIn = ClockType.TEMPORARY_CLOCK_IN.equals(clockType);
// 上班卡必需有店铺id
if (isClockIn && (Objects.isNull(clockVo.getStoreId()) || clockVo.getStoreId() <= 0)) {
throw new ParamException(RCode.CLOCK_DETAIL_ERROR, null);
throw new ParamException(RCode.NOT_CLOCK_STORE_ERROR, null);
}
// 非上班卡必需有打卡记录ID
if (!isClockIn && Objects.isNull((clockVo.getId()))) {
......
......@@ -84,11 +84,14 @@ public class TemporaryClockVo {
if (Objects.isNull(temporaryId)){
throw new ParamException(RCode.LOGIN_PARAM_ERROR, null);
}
if (StringUtils.isBlank(clockAddress) || StringUtils.isBlank(clockPhoto)){
throw new ParamException(RCode.CLOCK_DETAIL_ERROR, null);
if (StringUtils.isBlank(clockAddress)){
throw new ParamException(RCode.NOT_ADDRESS_ERROR, null);
}
if (StringUtils.isBlank(clockPhoto)){
throw new ParamException(RCode.NOT_CLOCK_PHOTO_ERROR, null);
}
if (StringUtils.isBlank(this.activityPattern)){
throw new ParamException(RCode.CLOCK_DETAIL_ERROR, null);
throw new ParamException(RCode.NOT_CLOCK_ACTIVITY_PATTERN_ERROR, null);
}
}
......
......@@ -60,7 +60,7 @@ public class QinCeDataTaskServiceImpl implements QinCeDataTaskService {
// 查询组织架构参数、创建url
Map<String, Object> params = qinCeUtils.queryEmployeeParam(false);
String url = qinCeUtils.builderUrl(QinCeUtils.QUERY_EMPLOYEE, params);
System.out.println(url);
// 发起请求、接收结果
JSONObject resultJson = OkHttp.postQC(url, params);
JSONArray responseDatas = resultJson.getJSONArray("response_data");
......
......@@ -3,12 +3,15 @@ package com.wangxiaolu.promotion.utils;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import static org.junit.jupiter.api.Assertions.*;
......@@ -28,7 +31,23 @@ class DateUtilsTest {
}
public static void main(String[] args) {
DateTime dateTime = DateUtil.offsetDay(new Date(), -7);
System.out.println(DateUtil.format(dateTime, DatePattern.NORM_DATETIME_PATTERN));
Map<String, Object> params = new HashMap<>();
// 根据来源第三方系统的员工唯一标识精确查询,id、emp_id如果同时存在优先取id
params.put("emp_id", "");
// 根据员工登录帐号精确查询
params.put("emp_code", "");
// 根据姓名模糊查询
params.put("emp_name", "");
// 根据人员编码精确查询
params.put("employee_code", "");
// 根据员工状态查询
params.put("emp_status", "");
// 根据创建日期查询用户。格式:yyyy-MM-dd
params.put("create_date", "");
// 根据修改日期查询用户。格式:yyyy-MM-dd
params.put("modify_date", "");
// 根据手机号查询
params.put("emp_mobile", "");
System.out.println(JSONObject.toJSONString(params));
}
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论