|
@@ -7,6 +7,7 @@ import com.malk.lanyun.service.NCService;
|
|
|
import com.malk.server.aliwork.YDConf;
|
|
|
import com.malk.server.aliwork.YDParam;
|
|
|
import com.malk.service.aliwork.YDClient;
|
|
|
+import com.malk.service.aliwork.YDService;
|
|
|
import com.malk.utils.UtilDateTime;
|
|
|
import com.malk.utils.UtilMap;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -20,6 +21,7 @@ import java.sql.Statement;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
@Service
|
|
@@ -32,6 +34,9 @@ public class NCServiceImpl implements NCService {
|
|
|
@Autowired
|
|
|
private SqlServerBean sqlBean;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private YDService ydService;
|
|
|
+
|
|
|
// 获取当前日期
|
|
|
LocalDate lastMonth = LocalDate.now().minusMonths(1);
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
@@ -377,11 +382,19 @@ public class NCServiceImpl implements NCService {
|
|
|
if (ObjectUtil.isNotNull(month)){
|
|
|
yearAndMonth = yearAndMonth + "-" + month;
|
|
|
}
|
|
|
- ydClient.operateData(YDParam.builder()
|
|
|
+ List<Map> allProjectList = ydService.queryFormData_all(YDParam.builder()
|
|
|
.appType("APP_ERBDTFS82HOVBPL3NFH0")
|
|
|
.systemToken("RRB66F91T97H1WN89QZYC47PKLZO2ZQOUMOQLP")
|
|
|
.formUuid(formUuid)
|
|
|
- .formDataJson(JSON.toJSONString(UtilMap.map(key,yearAndMonth)))
|
|
|
- .build(), YDConf.FORM_OPERATION.delete);
|
|
|
+ .searchFieldJson(JSON.toJSONString(UtilMap.map(key, yearAndMonth)))
|
|
|
+ .build());
|
|
|
+ allProjectList.forEach(e->{
|
|
|
+ ydClient.operateData(YDParam.builder()
|
|
|
+ .appType("APP_ERBDTFS82HOVBPL3NFH0")
|
|
|
+ .systemToken("RRB66F91T97H1WN89QZYC47PKLZO2ZQOUMOQLP")
|
|
|
+ .formInstanceId(e.get("formInstanceId").toString())
|
|
|
+ .build(), YDConf.FORM_OPERATION.delete);
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
}
|