|
@@ -7,14 +7,11 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.malk.lanyun.Mapper.ProjectAnalysisMapper;
|
|
import com.malk.lanyun.Mapper.ProjectAnalysisMapper;
|
|
|
-import com.malk.lanyun.Mapper.SalaryMapper;
|
|
|
|
|
import com.malk.lanyun.entity.ProjectAnalysis;
|
|
import com.malk.lanyun.entity.ProjectAnalysis;
|
|
|
-import com.malk.lanyun.entity.Salary;
|
|
|
|
|
import com.malk.lanyun.service.TimerService;
|
|
import com.malk.lanyun.service.TimerService;
|
|
|
import com.malk.server.aliwork.YDConf;
|
|
import com.malk.server.aliwork.YDConf;
|
|
|
import com.malk.server.aliwork.YDParam;
|
|
import com.malk.server.aliwork.YDParam;
|
|
|
import com.malk.server.common.McException;
|
|
import com.malk.server.common.McException;
|
|
|
-import com.malk.server.dingtalk.DDR_New;
|
|
|
|
|
import com.malk.service.aliwork.YDClient;
|
|
import com.malk.service.aliwork.YDClient;
|
|
|
import com.malk.service.aliwork.YDService;
|
|
import com.malk.service.aliwork.YDService;
|
|
|
import com.malk.service.dingtalk.DDClient;
|
|
import com.malk.service.dingtalk.DDClient;
|
|
@@ -823,31 +820,36 @@ public class TimerServiceImpl implements TimerService {
|
|
|
.searchFieldJson(JSON.toJSONString(UtilMap.map("textField_ltxrn8h1", projectCode)))
|
|
.searchFieldJson(JSON.toJSONString(UtilMap.map("textField_ltxrn8h1", projectCode)))
|
|
|
.build());
|
|
.build());
|
|
|
bigList.forEach(e->{
|
|
bigList.forEach(e->{
|
|
|
- List<Map> sonList = (List<Map>) e.get("tableField_lrru2tnq");
|
|
|
|
|
- if (ObjectUtil.isNotEmpty(sonList)){
|
|
|
|
|
- sonList.forEach(s->{
|
|
|
|
|
- //年月文本
|
|
|
|
|
- String projectDate = s.get("textField_luh0k82j").toString();
|
|
|
|
|
- if (date.equals(projectDate)){
|
|
|
|
|
- //物耗定额
|
|
|
|
|
- double remaining = s.get("numberField_lrru2tnu_value") == null || s.get("numberField_lrru2tnu_value").toString().isEmpty() ? 0f:Double.parseDouble(s.get("numberField_lrru2tnu_value").toString());
|
|
|
|
|
- //已用物耗定额
|
|
|
|
|
- double used = UtilMap.getDouble(s,"numberField_ludujw4f");
|
|
|
|
|
- used = used + nowCost;
|
|
|
|
|
- s.put("numberField_ludujw4f",used);
|
|
|
|
|
- log.info("已用物耗定额:{}",used);
|
|
|
|
|
- remaining = remaining - used;
|
|
|
|
|
- s.put("numberField_lrru2tnv",remaining);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- ydClient.operateData(YDParam.builder()
|
|
|
|
|
- .appType("APP_ERBDTFS82HOVBPL3NFH0")
|
|
|
|
|
- .systemToken("RRB66F91T97H1WN89QZYC47PKLZO2ZQOUMOQLP")
|
|
|
|
|
- .formInstanceId(e.get("formInstanceId").toString())
|
|
|
|
|
|
|
+ String big = UtilMap.getString(e, "selectField_lr25icd0");
|
|
|
|
|
+ if (!"大业主".equals(big)){
|
|
|
|
|
+
|
|
|
|
|
+ List<Map> sonList = (List<Map>) e.get("tableField_lrru2tnq");
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(sonList)){
|
|
|
|
|
+ sonList.forEach(s->{
|
|
|
|
|
+ //年月文本
|
|
|
|
|
+ String projectDate = s.get("textField_luh0k82j").toString();
|
|
|
|
|
+ if (date.equals(projectDate)){
|
|
|
|
|
+ //物耗定额
|
|
|
|
|
+ double remaining = s.get("numberField_lrru2tnu_value") == null || s.get("numberField_lrru2tnu_value").toString().isEmpty() ? 0f:Double.parseDouble(s.get("numberField_lrru2tnu_value").toString());
|
|
|
|
|
+ //已用物耗定额
|
|
|
|
|
+ double used = UtilMap.getDouble(s,"numberField_ludujw4f");
|
|
|
|
|
+ used = used + nowCost;
|
|
|
|
|
+ s.put("numberField_ludujw4f",used);
|
|
|
|
|
+ log.info("已用物耗定额:{}",used);
|
|
|
|
|
+ remaining = remaining - used;
|
|
|
|
|
+ s.put("numberField_lrru2tnv",remaining);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ ydClient.operateData(YDParam.builder()
|
|
|
|
|
+ .appType("APP_ERBDTFS82HOVBPL3NFH0")
|
|
|
|
|
+ .systemToken("RRB66F91T97H1WN89QZYC47PKLZO2ZQOUMOQLP")
|
|
|
|
|
+ .formInstanceId(e.get("formInstanceId").toString())
|
|
|
// .useLatestVersion(true)
|
|
// .useLatestVersion(true)
|
|
|
- .updateFormDataJson(JSON.toJSONString(UtilMap.map("tableField_lrru2tnq", sonList)))
|
|
|
|
|
- .build(), YDConf.FORM_OPERATION.update);
|
|
|
|
|
|
|
+ .updateFormDataJson(JSON.toJSONString(UtilMap.map("tableField_lrru2tnq", sonList)))
|
|
|
|
|
+ .build(), YDConf.FORM_OPERATION.update);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
log.info("日常物耗流程id为:{}",formInstId);
|
|
log.info("日常物耗流程id为:{}",formInstId);
|
|
|
log.info("初始物耗费用合计为:{}",firstCost);
|
|
log.info("初始物耗费用合计为:{}",firstCost);
|