|
@@ -1,5 +1,6 @@
|
|
|
package com.malk.lanyun.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.malk.lanyun.entity.SqlServerBean;
|
|
|
import com.malk.lanyun.service.NCService;
|
|
@@ -7,6 +8,7 @@ import com.malk.server.aliwork.YDConf;
|
|
|
import com.malk.server.aliwork.YDParam;
|
|
|
import com.malk.service.aliwork.YDClient;
|
|
|
import com.malk.utils.UtilDateTime;
|
|
|
+import com.malk.utils.UtilMap;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -38,6 +40,7 @@ public class NCServiceImpl implements NCService {
|
|
|
// 获取上月年,月
|
|
|
int year = lastMonth.getYear();
|
|
|
String month = String.format("%02d",lastMonth.getMonthValue()) ;
|
|
|
+ deleteMonthDate("FORM-D7FAD41DA72041ED96431F4219F082B7DTNH","textField_m0dkzhwo", String.valueOf(year),month);
|
|
|
|
|
|
Connection connection = null;
|
|
|
Statement statement = null;
|
|
@@ -103,6 +106,7 @@ public class NCServiceImpl implements NCService {
|
|
|
// 获取当前年
|
|
|
int year = lastMonth.getYear();
|
|
|
String month = String.format("%02d",lastMonth.getMonthValue()) ;
|
|
|
+ deleteMonthDate("FORM-EC67BCB875264EE9AE25C9D663568CAFCYU6","textField_m0dkzhwo", String.valueOf(year),month);
|
|
|
|
|
|
Connection connection = null;
|
|
|
Statement statement = null;
|
|
@@ -172,6 +176,7 @@ public class NCServiceImpl implements NCService {
|
|
|
// 获取当前年
|
|
|
int year = lastMonth.getYear();
|
|
|
String month = String.format("%02d",lastMonth.getMonthValue()) ;
|
|
|
+ deleteMonthDate("FORM-87BF51F1E54D4D73A987939613D07BD5ZZE9","textField_m0dkzhwo", String.valueOf(year),month);
|
|
|
|
|
|
Connection connection = null;
|
|
|
Statement statement = null;
|
|
@@ -239,6 +244,7 @@ public class NCServiceImpl implements NCService {
|
|
|
// 获取当前年
|
|
|
int year = lastMonth.getYear();
|
|
|
String month = String.format("%02d",lastMonth.getMonthValue()) ;
|
|
|
+ deleteMonthDate("FORM-5654B7C22E7546E9BBE7B4EF46DE08BAXZXU","textField_m0dkzhwo", String.valueOf(year),month);
|
|
|
|
|
|
System.out.println(month);
|
|
|
Connection connection = null;
|
|
@@ -307,6 +313,7 @@ public class NCServiceImpl implements NCService {
|
|
|
// 获取当前年
|
|
|
int year = lastMonth.getYear();
|
|
|
String month = String.format("%02d",lastMonth.getMonthValue()) ;
|
|
|
+ deleteMonthDate("FORM-09CDC75CDC6048379567EC87ED6CE7B6T8PP","textField_m0g4itw4", String.valueOf(year),null);
|
|
|
|
|
|
LocalDate firstDayOfYear = LocalDate.of(year, 1, 1);
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
@@ -365,4 +372,16 @@ public class NCServiceImpl implements NCService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ private void deleteMonthDate(String formUuid,String key, String year, String month){
|
|
|
+ String yearAndMonth = year;
|
|
|
+ if (ObjectUtil.isNotNull(month)){
|
|
|
+ yearAndMonth = yearAndMonth + "-" + month;
|
|
|
+ }
|
|
|
+ ydClient.operateData(YDParam.builder()
|
|
|
+ .appType("APP_ERBDTFS82HOVBPL3NFH0")
|
|
|
+ .systemToken("RRB66F91T97H1WN89QZYC47PKLZO2ZQOUMOQLP")
|
|
|
+ .formUuid(formUuid)
|
|
|
+ .formDataJson(JSON.toJSONString(UtilMap.map(key,yearAndMonth)))
|
|
|
+ .build(), YDConf.FORM_OPERATION.delete);
|
|
|
+ }
|
|
|
}
|