|
|
@@ -5,6 +5,8 @@ import cn.hutool.core.util.NumberUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.malk.huagao.entity.YdNonProdPrice;
|
|
|
import com.malk.huagao.entity.YdProdWorkHoursPrice;
|
|
|
import com.malk.huagao.entity.YdUserInput;
|
|
|
@@ -78,7 +80,6 @@ public class HuaGaoServiceImpl implements HuaGaoService {
|
|
|
String price=UtilMap.getString(formData,"numberField_m8e4zajw_value");
|
|
|
List<String> users=ddClient_contacts.listDepartmentUserId(ddClient.getAccessToken(),Long.parseLong(deptId));
|
|
|
for (String user : users) {
|
|
|
-// if (!user.equals("17399270929001990") && !user.equals("17102075948191646") && !user.equals("16137991608422361") && !user.equals("16992517127785448")) continue;//刘多富、白涛、陈辉、吕明权
|
|
|
List<Map> valList=ddClientAttendance.getAttColumnVal(ddClient.getAccessToken(),user, Arrays.asList("82772106","89349019","82772125"),stTime,edTime);
|
|
|
if(valList!=null&&valList.size()==3){
|
|
|
Map<String,Map<String,String>> dateMap=toDateMap(valList);
|
|
|
@@ -88,9 +89,24 @@ public class HuaGaoServiceImpl implements HuaGaoService {
|
|
|
dataMap.get("89349019"): NumberUtil.add(dataMap.get("89349019"),dataMap.get("82772106")).toString();
|
|
|
|
|
|
//查询用户详情
|
|
|
- DDR_New ddrNew1 = (DDR_New) UtilHttp.doPost("https://oapi.dingtalk.com/topapi/v2/user/get", null, ddClient.initTokenParams(), UtilMap.map("userid", user), DDR_New.class);
|
|
|
- Map result1 = (Map) ddrNew1.getResult();
|
|
|
- String userName = UtilMap.getString(result1, "name");
|
|
|
+ String userName = "";
|
|
|
+
|
|
|
+ LambdaQueryWrapper<YdUserInput> ydUserInputLambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
|
|
+ ydUserInputLambdaQueryWrapper2.eq(YdUserInput::getUserId,user)
|
|
|
+ .isNotNull(YdUserInput::getUserName);
|
|
|
+
|
|
|
+ Page<YdUserInput> page = new Page<>(1, 1);
|
|
|
+ IPage<YdUserInput> result = ydUserInputMapper.selectPage(page, ydUserInputLambdaQueryWrapper2);
|
|
|
+
|
|
|
+ YdUserInput ydUserInput2 = result.getRecords().isEmpty() ? null : result.getRecords().get(0);
|
|
|
+
|
|
|
+ if (Objects.nonNull(ydUserInput2)){
|
|
|
+ userName = ydUserInput2.getUserName();
|
|
|
+ }else {
|
|
|
+ DDR_New ddrNew1 = (DDR_New) UtilHttp.doPost("https://oapi.dingtalk.com/topapi/v2/user/get", null, ddClient.initTokenParams(), UtilMap.map("userid", user), DDR_New.class);
|
|
|
+ Map result1 = (Map) ddrNew1.getResult();
|
|
|
+ userName = UtilMap.getString(result1, "name");
|
|
|
+ }
|
|
|
|
|
|
log.info("user:{},userName:{},date:{},workTime:{},price:{}",user,userName,date,workTime,price);
|
|
|
|