|
|
@@ -6,6 +6,8 @@ import com.dingtalk.api.response.OapiSmartworkHrmEmployeeListdimissionResponse;
|
|
|
import com.usoftchina.dingtalk.sdk.OaSdk;
|
|
|
import com.usoftchina.uas.office.dingtalk.core.DateUtil;
|
|
|
import com.usoftchina.uas.office.service.AbstractService;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.jdbc.support.rowset.SqlRowSet;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -17,7 +19,7 @@ import java.util.List;
|
|
|
|
|
|
@Service
|
|
|
public class UasOaService extends AbstractService {
|
|
|
-
|
|
|
+ private final Logger logger = LoggerFactory.getLogger(UasOaService.class);
|
|
|
@Autowired
|
|
|
private OaSdk oaSdk;
|
|
|
|
|
|
@@ -46,6 +48,7 @@ public class UasOaService extends AbstractService {
|
|
|
*/
|
|
|
public void saveAlitripList(String agentCode, String startTime, String endTime) {
|
|
|
List<OapiAlitripBtripApplySearchResponse.OpenApplyRs> alitripList = oaSdk.getAllAlitrip(agentCode,startTime,endTime);
|
|
|
+ logger.info("alitripList=="+alitripList);
|
|
|
if (!CollectionUtils.isEmpty(alitripList)) {
|
|
|
for (OapiAlitripBtripApplySearchResponse.OpenApplyRs openApplyRs:alitripList) {
|
|
|
String inDate = DateUtil.format(openApplyRs.getGmtCreate(),"yyyy-MM-dd HH:mm:ss");
|
|
|
@@ -57,7 +60,9 @@ public class UasOaService extends AbstractService {
|
|
|
String projectTitle = openItineraryInfo.getProjectTitle();
|
|
|
String projectCode = openItineraryInfo.getProjectCode();
|
|
|
String statusDesc = openApplyRs.getStatusDesc()==null?"":openApplyRs.getStatusDesc();
|
|
|
- Integer count =queryForObject("select count(1) from FeePlease where dp_ddid=" + rsId, Integer.class);
|
|
|
+ int count =queryForObject("select count(1) from FeePlease where dp_ddid=" + rsId, Integer.class);
|
|
|
+ logger.info("saveAlitripList-count=="+count);
|
|
|
+ logger.info("saveAlitripList-statusDesc=="+statusDesc);
|
|
|
if (count<=0&&"已同意".equals(statusDesc)) {
|
|
|
int id = generateId("FEEPLEASE_SEQ");
|
|
|
String code = generateCode("FeePlease!CCSQ!new", 2);
|