liupeng 4 rokov pred
rodič
commit
b827bd2e7c

+ 8 - 0
code/sapparent/sapservice/src/main/java/org/fouram/core/base/service/BaseService.java

@@ -123,6 +123,14 @@ public abstract class BaseService {
 		return map;
 	}
 	
+	public String getUserIdList(List<String> sapUserIds) {
+		String userIds = "";
+		for (String sapUser : sapUserIds) {
+			userIds += "'" + sapUser + "',";
+		}
+		return userIds;
+	}
+	
 	public void throwPromptException(String msg) throws Exception {
 		throw new PromptException(msg);
 	}

+ 2 - 11
code/sapparent/sapservice/src/main/java/org/fouram/service/SapEmployeeTimeService.java

@@ -23,14 +23,6 @@ public class SapEmployeeTimeService extends BaseService {
 	@Autowired
 	private WxUserService wxUserService;
 
-	public String getUserIdList(List<String> sapUserIds) {
-		String userIds = "";
-		for (String sapUser : sapUserIds) {
-			userIds += "'" + sapUser + "',";
-		}
-		return userIds;
-	}
-
 	@SuppressWarnings("unchecked")
 	public void saveEmployeeTimes() throws Exception {
 		List<String> allSapUserIds = wxUserService.selectSapUserId();
@@ -68,8 +60,7 @@ public class SapEmployeeTimeService extends BaseService {
 					String startTime = JsonNodeUtil.getValue(userNode, "startTime");
 					String loaEndJobInfoId = JsonNodeUtil.getValue(userNode, "loaEndJobInfoId");
 					String approvalStatus = JsonNodeUtil.getValue(userNode, "approvalStatus");
-					String cancellationWorkflowRequestId = JsonNodeUtil.getValue(userNode,
-							"cancellationWorkflowRequestId");
+					String cwr = JsonNodeUtil.getValue(userNode, "cancellationWorkflowRequestId");
 					String deductionQuantity = JsonNodeUtil.getValue(userNode, "deductionQuantity");
 					String editable = JsonNodeUtil.getValue(userNode, "editable");
 					String lastModifiedBy = JsonNodeUtil.getValue(userNode, "lastModifiedBy");
@@ -92,7 +83,7 @@ public class SapEmployeeTimeService extends BaseService {
 							.loaStartJobInfoId(loaStartJobInfoId).startDate(startDate).startDateTime(startDateTime)
 							.endDate(endDate).endDateTime(endDateTime).displayQuantity(displayQuantity)
 							.quantityInDays(quantityInDays).startTime(startTime).loaEndJobInfoId(loaEndJobInfoId)
-							.approvalStatus(approvalStatus).cancellationWorkflowRequestId(cancellationWorkflowRequestId)
+							.approvalStatus(approvalStatus).cancellationWorkflowRequestId(cwr)
 							.deductionQuantity(deductionQuantity).editable(editable).lastModifiedBy(lastModifiedBy)
 							.workflowRequestId(workflowRequestId).undeterminedEndDate(undeterminedEndDate)
 							.userId(userId).recurrenceGroup(recurrenceGroup).createdBy(createdBy)