liuling 5 mēneši atpakaļ
vecāks
revīzija
6a0d8df6ec

+ 6 - 5
src/com/kingdee/eas/custom/beisen/synchronousorg/synchronousOrgControllerBean.java

@@ -160,6 +160,11 @@ public class synchronousOrgControllerBean extends AbstractsynchronousOrgControll
                 logger.error("获取人员岗位信息集合时发生异常", e);
                 throw e;
             }
+            JSONObject customFieldList = new JSONObject();
+            //部门负责人岗位编码
+            customFieldList.put("extbumenfuzerengangweibianma_433107_1704083012",responPosition.getNumber());
+            customFieldList.put("extbumenfuzerengangweimingcheng_433107_501692677",responPosition.getName());
+            requestBody.put("customFieldList",customFieldList);
         }
 
         if (originalIds.size() > 0) {
@@ -172,11 +177,7 @@ public class synchronousOrgControllerBean extends AbstractsynchronousOrgControll
         // 添加组织创建时间
         requestBody.put("createTime", formatDate(adminOrgUnitInfo.getCreateTime()));
 
-        JSONObject customFieldList = new JSONObject();
-        //部门负责人岗位编码
-        customFieldList.put("extbumenfuzerengangweibianma_433107_1704083012",responPosition.getNumber());
-        customFieldList.put("extbumenfuzerengangweimingcheng_433107_501692677",responPosition.getName());
-        requestBody.put("customFieldList",customFieldList);
+
 
 //        // 获取组织是否为织状态
 //        boolean isSaleOrgUnit = adminOrgUnitInfo.isIsSealUp();

+ 1 - 1
src/com/kingdee/eas/custom/beisen/utils/BeiSenUtils.java

@@ -132,7 +132,6 @@ public class BeiSenUtils {
             // 设置请求头的 Authorization
             header.put("Authorization", "Bearer " + token);
             if (originalId!=null&&!originalId.equals("")){
-
                 // 调用 Helper 类的 getURL 方法发送请求并获取响应的 JSONObject
                 orgid = URLEncoder.encode(orgid, "UTF-8");
                 header.put("originalId",orgid);
@@ -146,6 +145,7 @@ public class BeiSenUtils {
                 responseJson = helper.getURL(departmentspost, header, requestBody, "POST",orgid,"创建","北森");
                 System.out.println("url:"+propt.getProperty("DEPARTMENTSPOST"));
                 System.out.println("requestBody:"+requestBody);
+
             }
 
         }

+ 2 - 1
src/com/kingdee/eas/custom/beisen/utils/Helper.java

@@ -176,7 +176,7 @@ public class Helper {
 		// 用于存储响应数据日志
 		String dataLog = "";
 		// 如果响应体字符串长度超过1500,则截取前1500个字符
-		if (responseBody.length() > 1500) {
+		if (responseJson.toString().length() > 1500) {
 			dataLog = responseJson.toString().substring(0, 1500);
 		}
 		// 设置返回值到操作日志条目
@@ -190,6 +190,7 @@ public class Helper {
 			operateLogEntryInfo.setRequestStatus(RequestStatusEnum.NORMAL);
 		}
 		try {
+			entrys.add(operateLogEntryInfo);
 			// 保存操作日志信息
 			OperateLogFactory.getLocalInstance(context).save(operateLogInfo);
 		} catch (BOSException e) {

+ 1 - 1
src/com/kingdee/eas/custom/interfacelog/businessoperationlog/app/OperateLogControllerBean.java

@@ -79,7 +79,7 @@ public class OperateLogControllerBean extends AbstractOperateLogControllerBean {
             // 创建 BOS 对象实例
             ICoreBase bosObject = (ICoreBase) (BOSObjectFactory.createBOSObject(ctx, type));
             // 根据业务 ID 获取对象集合
-            CoreBaseCollection collection = bosObject.getCollection("id = '" + businessId + "'");
+            CoreBaseCollection collection = bosObject.getCollection(" where id = '" + businessId + "'");
 
             // 检查集合中是否有元素
             if (collection.size() > 0) {