From f5f765e03af6f265281fa5c071d093238e00b2e4 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期一, 05 一月 2026 14:30:06 +0800
Subject: [PATCH] 最新版本541200007最新版本541200007
---
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java | 801 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 769 insertions(+), 32 deletions(-)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java
index 524f5b5..34f3fb1 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java
@@ -15,6 +15,7 @@
import com.doumee.core.dingTalk.DingTalk;
import com.doumee.core.erp.ErpConstants;
import com.doumee.core.erp.model.openapi.request.erp.OrgListRequest;
+import com.doumee.core.erp.model.openapi.response.erp.ERPApiResponse;
import com.doumee.core.erp.model.openapi.response.erp.ErpOrgListResponse;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.haikang.model.HKConstants;
@@ -806,7 +807,11 @@
deptIdList.add(deptId);
}
if(CollectionUtils.isNotEmpty(deptIdList)){
- syncDelCompany(deptIdList);
+ syncDelCompany( companyMapper.selectList(new QueryWrapper<Company>()
+ .lambda()
+ .eq(Company::getIsdeleted,Constants.ZERO)
+ .in(Company::getErpId,deptIdList)
+ ));
}
}else if(eventType.equals("org_dept_create")||eventType.equals("org_dept_modify")){
for (int i = 0; i < jsonArray.size(); i++) {
@@ -858,7 +863,7 @@
.in(Company::getId, delIds)
.notIn(fIds.size()>0,Company::getHkId, fIds));
companyMapper.update(null,new UpdateWrapper<Company>().lambda()
- .set(Company::getHkStatus,Constants.TWO)
+ .set(Company::getHkStatus,Constants.ZERO)
.set(Company::getHkDate,date)
.in(Company::getId, delIds)
.in(fIds.size()>0,Company::getHkId, fIds));
@@ -872,7 +877,7 @@
if(list !=null && list.size()>0){
List<Company> addList = new ArrayList<>();
List<Company> updateList = new ArrayList<>();
- List<Long> delIds = new ArrayList<>();//淇敼涓轰娇鐢ㄩ拤閽塱d erpId
+ List<Company> delIds = new ArrayList<>();//淇敼涓轰娇鐢ㄩ拤閽塱d erpId
List<Company> allList = companyMapper.selectList(new QueryWrapper<Company>().lambda()
.eq(Company::getIsdeleted,Constants.ZERO).eq(Company::getType,Constants.ONE));
dealCompanyChangeList(list,addList,updateList,delIds,allList);
@@ -894,7 +899,7 @@
// "dept_no": 1,//鏁板瓧 1 涓烘牴閮ㄩ棬缂栧彿銆�483636217锛氳姕婀栧競鍏徃
// "has_child": true
//}
- DeptApiClient deptApiClient = new DeptApiClient(systemDictDataBiz.queryByCode(Constants.JDY_CONFIG, Constants.API_KEY).getCode()
+ DeptApiClient deptApiClient = new DeptApiClient(systemDictDataBiz.queryByCode(Constants.JDY_CONFIG, Constants.JDY_API_KEY).getCode()
,systemDictDataBiz.queryByCode(Constants.JDY_CONFIG, Constants.JDY_API_HOST).getCode());
try {
int root = 1;
@@ -908,10 +913,11 @@
TypeReference<List<DeptEntityModel>> typeReference = new TypeReference<List<DeptEntityModel>>(){};
Object obj = result.get("departments");
List<DeptEntityModel> list = com.alibaba.fastjson.JSONObject.parseObject(JSON.toJSONString(obj), typeReference.getType());
+ list = sortJdyListBYParent(list,root);
if(list !=null && list.size()>0){
List<Company> addList = new ArrayList<>();
List<Company> updateList = new ArrayList<>();
- List<Long> delIds = new ArrayList<>();//淇敼涓轰娇鐢ㄩ拤閽塱d erpId
+ List<Company> delIds = new ArrayList<>();//淇敼涓轰娇鐢ㄩ拤閽塱d erpId
List<Company> allList = companyMapper.selectList(new QueryWrapper<Company>().lambda()
.eq(Company::getIsdeleted,Constants.ZERO).eq(Company::getType,Constants.ONE));
dealCompanyChangeListJdy(list,addList,updateList,delIds,allList);
@@ -920,17 +926,754 @@
}
return "鍚屾鏁版嵁锛氭柊澧炪��"+addList.size()+"銆戞潯锛屾洿鏂般��"+updateList.size()+"銆戞潯锛屽垹闄ゃ��"+delIds.size()+"銆戞潯";
}else{
- throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "鍚屾閽夐拤鏁版嵁涓虹┖锛�");
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "鍚屾绠�鍗曚簯鏁版嵁涓虹┖锛�");
}
}
+ }catch (BusinessException e){
+ throw e;
}catch (Exception e){
- e.printStackTrace();
- throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "鍚屾鏁版嵁寮傚父锛�");
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "鍚屾鏁版嵁寮傚父锛�"+e.getMessage());
}
return null;
}
- private void dealCompanyChangeListJdy(List<DeptEntityModel> list, List<Company> addList, List<Company> updateList, List<Long> delIds, List<Company> allList) {
+ private List<DeptEntityModel> sortJdyListBYParent(List<DeptEntityModel> list, int root) {
+ List<DeptEntityModel> all = new ArrayList<>();
+ for(DeptEntityModel t : list){
+ if(Constants.equalsInteger( t.getParent_no(),root)){
+ all.add(t);
+ if(hasChildCompany(list,t.getDept_no())){
+ all.addAll(sortJdyListBYParent(list,t.getDept_no()));
+ }
+ }
+ }
+ return all;
+ }
+
+
+ private boolean hasChildCompany(List<DeptEntityModel> list, Integer deptNo) {
+ for(DeptEntityModel t : list){
+ if(Constants.equalsInteger( t.getParent_no(),deptNo)){
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static void main(String[] args) {
+ String temp = " [{" +
+ "\"dept_no\": 567064650," +
+ "\"name\": \"瀹¤娲鹃┗鍔瀄"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567064650\"" +
+ "}, {" +
+ "\"dept_no\": 567086523," +
+ "\"name\": \"姹熷寳鍒嗗眬\"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567086523\"" +
+ "}, {" +
+ "\"dept_no\": 567354485," +
+ "\"name\": \"绂诲矖閫�鍏讳汉鍛榎"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567354485\"" +
+ "}, {" +
+ "\"dept_no\": 567303494," +
+ "\"name\": \"绾鐩戝療瀹わ紙宸″療棰嗗灏忕粍鍔炲叕瀹わ級\"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567303494\"" +
+ "}, {" +
+ "\"dept_no\": 566874731," +
+ "\"name\": \"鏃犱负甯傚眬绂婚��浼戝姙\"," +
+ "\"parent_no\": 566426902," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566874731\"" +
+ "}, {" +
+ "\"dept_no\": 566426902," +
+ "\"name\": \"绂婚��浼戜汉鍛樺\"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566426902\"" +
+ "}, {" +
+ "\"dept_no\": 566981590," +
+ "\"name\": \"鐗╂祦涓績\"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566981590\"" +
+ "}, {" +
+ "\"dept_no\": 566499662," +
+ "\"name\": \"鏃犱负甯傚眬锛堣惀閿�閮級\"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566499662\"" +
+ "}, {" +
+ "\"dept_no\": 567258434," +
+ "\"name\": \"婀炬矚鍖哄眬锛堣惀閿�閮級\"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567258434\"" +
+ "}, {" +
+ "\"dept_no\": 567458554," +
+ "\"name\": \"涓撳崠鐩戠潱绠$悊绉戯紙鍐呴儴涓撳崠绠$悊鐩戠潱绉戙�佺ń鏌ユ敮闃燂級\"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567458554\"" +
+ "}, {" +
+ "\"dept_no\": 567139640," +
+ "\"name\": \"婀炬矚鍖哄眬绂婚��浼戝姙\"," +
+ "\"parent_no\": 566426902," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567139640\"" +
+ "}, {" +
+ "\"dept_no\": 566379775," +
+ "\"name\": \"淇℃伅涓績\"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566379775\"" +
+ "}, {" +
+ "\"dept_no\": 567298538," +
+ "\"name\": \"浼佷笟绠$悊绉慭"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567298538\"" +
+ "}, {" +
+ "\"dept_no\": 567073617," +
+ "\"name\": \"鍔炲叕瀹"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567073617\"" +
+ "}, {" +
+ "\"dept_no\": 566496812," +
+ "\"name\": \"绻佹槍鍖哄眬绂婚��浼戝姙\"," +
+ "\"parent_no\": 566426902," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566496812\"" +
+ "}, {" +
+ "\"dept_no\": 566643894," +
+ "\"name\": \"鍗楅櫟鍘垮眬绂婚��浼戝姙\"," +
+ "\"parent_no\": 566426902," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566643894\"" +
+ "}, {" +
+ "\"dept_no\": 566699927," +
+ "\"name\": \"娉曡绉戯紙瑙勮寖绠$悊鍔炲叕瀹わ級\"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566699927\"" +
+ "}, {" +
+ "\"dept_no\": 567034633," +
+ "\"name\": \"鍏氬缓缇ゅ洟绉戯紙宸ヤ細鍔炲叕瀹わ級\"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567034633\"" +
+ "}, {" +
+ "\"dept_no\": 567095650," +
+ "\"name\": \"甯傚眬锛堝叕鍙革級棰嗗\"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567095650\"" +
+ "}, {" +
+ "\"dept_no\": 566464722," +
+ "\"name\": \"璐㈠姟绠$悊绉慭"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566464722\"" +
+ "}, {" +
+ "\"dept_no\": 567249497," +
+ "\"name\": \"鑺滄箹甯傚眬鐩村睘鍒嗗眬\"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567249497\"" +
+ "}, {" +
+ "\"dept_no\": 567266572," +
+ "\"name\": \"鍗楅櫟鍘垮眬锛堣惀閿�閮級\"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567266572\"" +
+ "}, {" +
+ "\"dept_no\": 567394584," +
+ "\"name\": \"绂婚��浼戜汉鍛樺\"," +
+ "\"parent_no\": 566426902," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567394584\"" +
+ "}, {" +
+ "\"dept_no\": 566952603," +
+ "\"name\": \"瀹夊叏绠$悊绉慭"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566952603\"" +
+ "}, {" +
+ "\"dept_no\": 567418536," +
+ "\"name\": \"绻佹槍鍖哄眬锛堣惀閿�閮級\"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567418536\"" +
+ "}, {" +
+ "\"dept_no\": 567080624," +
+ "\"name\": \"钀ラ攢涓績\"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567080624\"" +
+ "}, {" +
+ "\"dept_no\": 567395495," +
+ "\"name\": \"浜哄姏璧勬簮绉慭"," +
+ "\"parent_no\": 483636217," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567395495\"" +
+ "}, {" +
+ "\"dept_no\": 566852695," +
+ "\"name\": \"鏃犱负甯傚眬锛堣惀閿�閮級鍔炲叕瀹"," +
+ "\"parent_no\": 566499662," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566852695\"" +
+ "}, {" +
+ "\"dept_no\": 566597911," +
+ "\"name\": \"鏃犱负甯傚眬锛堣惀閿�閮級瑗勫畨鐑熻崏涓撳崠绠$悊鎵�锛堟湇鍔$珯銆佺ń鏌ヤ腑闃燂級\"," +
+ "\"parent_no\": 566499662," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566597911\"" +
+ "}, {" +
+ "\"dept_no\": 567383562," +
+ "\"name\": \"鏃犱负甯傚眬锛堣惀閿�閮級瀹㈡埛鏈嶅姟閮╘"," +
+ "\"parent_no\": 566499662," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567383562\"" +
+ "}, {" +
+ "\"dept_no\": 566596757," +
+ "\"name\": \"棰嗗鐝瓙\"," +
+ "\"parent_no\": 566499662," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566596757\"" +
+ "}, {" +
+ "\"dept_no\": 567126588," +
+ "\"name\": \"鏃犱负甯傚眬锛堣惀閿�閮級鍩庡尯鐑熻崏涓撳崠绠$悊鎵�锛堟湇鍔$珯銆佺ń鏌ヤ腑闃燂級\"," +
+ "\"parent_no\": 566499662," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567126588\"" +
+ "}, {" +
+ "\"dept_no\": 567423457," +
+ "\"name\": \"鏃犱负甯傚眬锛堣惀閿�閮級鐩戝療娉曡鍔瀄"," +
+ "\"parent_no\": 566499662," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567423457\"" +
+ "}, {" +
+ "\"dept_no\": 567444447," +
+ "\"name\": \"鏃犱负甯傚眬锛堣惀閿�閮級楂樻矡鐑熻崏涓撳崠绠$悊鎵�锛堟湇鍔$珯銆佺ń鏌ヤ腑闃燂級\"," +
+ "\"parent_no\": 566499662," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567444447\"" +
+ "}, {" +
+ "\"dept_no\": 566688696," +
+ "\"name\": \"鏃犱负甯傚眬锛堣惀閿�閮級涓撳崠鐩戠潱绠$悊鍔炲叕瀹わ紙鍐呴儴涓撳崠绠$悊鐩戠潱鍔炲叕瀹ゃ�佺ń鏌ュぇ闃燂級\"," +
+ "\"parent_no\": 566499662," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566688696\"" +
+ "}, {" +
+ "\"dept_no\": 567308492," +
+ "\"name\": \"鍗楅櫟鍘垮眬锛堣惀閿�閮級涓撳崠鐩戠潱绠$悊鍔炲叕瀹わ紙鍐呴儴涓撳崠绠$悊鐩戠潱鍔炲叕瀹ゃ�佺ń鏌ュぇ闃燂級琛屽姩缁刓"," +
+ "\"parent_no\": 567266572," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567308492\"" +
+ "}, {" +
+ "\"dept_no\": 567311569," +
+ "\"name\": \"涓撳崠鐩戠潱绠$悊鍔炲叕瀹わ紙鍐呴儴涓撳崠绠$悊鐩戠潱鍔炲叕瀹ゃ�佺ń鏌ュぇ闃燂級琛屽姩缁刓"," +
+ "\"parent_no\": 566499662," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567311569\"" +
+ "}, {" +
+ "\"dept_no\": 566586834," +
+ "\"name\": \"鐗╂祦涓績鍌ㄩ厤閮╘"," +
+ "\"parent_no\": 566981590," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566586834\"" +
+ "}, {" +
+ "\"dept_no\": 567052635," +
+ "\"name\": \"绋芥煡闃焅"," +
+ "\"parent_no\": 566930600," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567052635\"" +
+ "}, {" +
+ "\"dept_no\": 567250603," +
+ "\"name\": \"涓撳崠鐩戠潱绠$悊鍔炲叕瀹わ紙鍐呴儴涓撳崠绠$悊鐩戠潱鍔炲叕瀹ゃ�佺ń鏌ュぇ闃燂級琛屽姩缁刓"," +
+ "\"parent_no\": 567418536," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567250603\"" +
+ "}, {" +
+ "\"dept_no\": 566714645," +
+ "\"name\": \"鐗╂祦涓績閫佽揣閮╘"," +
+ "\"parent_no\": 566981590," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566714645\"" +
+ "}, {" +
+ "\"dept_no\": 567400554," +
+ "\"name\": \"鐗╂祦涓績缁煎悎閮╘"," +
+ "\"parent_no\": 566981590," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567400554\"" +
+ "}, {" +
+ "\"dept_no\": 901575528," +
+ "\"name\": \"鐗╂祦涓績鎶�鏈儴\"," +
+ "\"parent_no\": 566981590," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"901575528\"" +
+ "}, {" +
+ "\"dept_no\": 567406402," +
+ "\"name\": \"鐗╂祦涓績瀹変繚閮╘"," +
+ "\"parent_no\": 566981590," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567406402\"" +
+ "}, {" +
+ "\"dept_no\": 667523393," +
+ "\"name\": \"鐗╂祦涓績棰嗗\"," +
+ "\"parent_no\": 566981590," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"667523393\"" +
+ "}, {" +
+ "\"dept_no\": 567052636," +
+ "\"name\": \"涓撳崠鐩戠潱绠$悊鍔炲叕瀹わ紙鍐呴儴涓撳崠绠$悊鐩戠潱鍔炲叕瀹ゃ�佺ń鏌ュぇ闃燂級琛屽姩缁刓"," +
+ "\"parent_no\": 567249497," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567052636\"" +
+ "}, {" +
+ "\"dept_no\": 567351557," +
+ "\"name\": \"鐗╂祦涓績涓浆绔橽"," +
+ "\"parent_no\": 566981590," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567351557\"" +
+ "}, {" +
+ "\"dept_no\": 567052634," +
+ "\"name\": \"姹熷寳鍒嗗眬鍔炲叕瀹"," +
+ "\"parent_no\": 567086523," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567052634\"" +
+ "}, {" +
+ "\"dept_no\": 567359469," +
+ "\"name\": \"鍝佺墝閮╘"," +
+ "\"parent_no\": 567080624," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567359469\"" +
+ "}, {" +
+ "\"dept_no\": 821923828," +
+ "\"name\": \"缁煎悎閮╘"," +
+ "\"parent_no\": 567080624," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"821923828\"" +
+ "}, {" +
+ "\"dept_no\": 567151607," +
+ "\"name\": \"姹熷寳鍒嗗眬涓撳崠鐩戠潱绠$悊鍔炲叕瀹わ紙鍐呴儴涓撳崠绠$悊鐩戠潱鍔炲叕瀹ゃ�佺ń鏌ュぇ闃燂級\"," +
+ "\"parent_no\": 567086523," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567151607\"" +
+ "}, {" +
+ "\"dept_no\": 567297546," +
+ "\"name\": \"甯傚満閮╘"," +
+ "\"parent_no\": 567080624," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567297546\"" +
+ "}, {" +
+ "\"dept_no\": 566867618," +
+ "\"name\": \"缁堢閮╘"," +
+ "\"parent_no\": 567080624," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566867618\"" +
+ "}, {" +
+ "\"dept_no\": 567314532," +
+ "\"name\": \"璁㈠崟閮╘"," +
+ "\"parent_no\": 567080624," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567314532\"" +
+ "}, {" +
+ "\"dept_no\": 566848639," +
+ "\"name\": \"姹熷寳鍒嗗眬鐩戝療娉曡鍔瀄"," +
+ "\"parent_no\": 567086523," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566848639\"" +
+ "}, {" +
+ "\"dept_no\": 567272560," +
+ "\"name\": \"涓撳崠鐩戠潱绠$悊鍔炲叕瀹わ紙鍐呴儴涓撳崠绠$悊鐩戠潱鍔炲叕瀹ゃ�佺ń鏌ュぇ闃燂級瀵勯�掔粍\"," +
+ "\"parent_no\": 567258434," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567272560\"" +
+ "}, {" +
+ "\"dept_no\": 566564826," +
+ "\"name\": \"涓撳崠鐩戠潱绠$悊鍔炲叕瀹わ紙鍐呴儴涓撳崠绠$悊鐩戠潱鍔炲叕瀹ゃ�佺ń鏌ュぇ闃燂級琛屽姩缁刓"," +
+ "\"parent_no\": 567258434," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566564826\"" +
+ "}, {" +
+ "\"dept_no\": 567471441," +
+ "\"name\": \"姹熷寳鍒嗗眬瀹㈡埛鏈嶅姟閮╘"," +
+ "\"parent_no\": 567086523," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567471441\"" +
+ "}, {" +
+ "\"dept_no\": 711701716," +
+ "\"name\": \"姹熷寳鍒嗗眬鍩庡寳鐑熻崏涓撳崠绠$悊鎵�锛堟湇鍔$珯锛塡"," +
+ "\"parent_no\": 567086523," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"711701716\"" +
+ "}, {" +
+ "\"dept_no\": 567103611," +
+ "\"name\": \"棰嗗鐝瓙\"," +
+ "\"parent_no\": 567086523," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567103611\"" +
+ "}, {" +
+ "\"dept_no\": 664801291," +
+ "\"name\": \"姹熷寳鍒嗗眬浜屽潩鐑熻崏涓撳崠绠$悊鎵�锛堟湇鍔$珯锛塡"," +
+ "\"parent_no\": 567086523," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"664801291\"" +
+ "}, {" +
+ "\"dept_no\": 566323801," +
+ "\"name\": \"婀炬矚鍖哄眬锛堣惀閿�閮級鍔炲叕瀹"," +
+ "\"parent_no\": 567258434," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566323801\"" +
+ "}, {" +
+ "\"dept_no\": 567343637," +
+ "\"name\": \"婀炬矚鍖哄眬锛堣惀閿�閮級鍩庡尯鐑熻崏涓撳崠绠$悊鎵�锛堟湇鍔$珯銆佺ń鏌ヤ腑闃燂級\"," +
+ "\"parent_no\": 567258434," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567343637\"" +
+ "}, {" +
+ "\"dept_no\": 567087584," +
+ "\"name\": \"婀炬矚鍖哄眬锛堣惀閿�閮級鐩戝療娉曡鍔瀄"," +
+ "\"parent_no\": 567258434," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567087584\"" +
+ "}, {" +
+ "\"dept_no\": 567058556," +
+ "\"name\": \"瀹㈡埛鏈嶅姟閮╘"," +
+ "\"parent_no\": 567249497," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567058556\"" +
+ "}, {" +
+ "\"dept_no\": 566930600," +
+ "\"name\": \"涓撳崠鐩戠潱绠$悊鍔炲叕瀹わ紙鍐呴儴涓撳崠绠$悊鐩戠潱鍔炲叕瀹ゃ�佺ń鏌ュぇ闃燂級\"," +
+ "\"parent_no\": 567249497," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566930600\"" +
+ "}, {" +
+ "\"dept_no\": 566592977," +
+ "\"name\": \"涓撳崠鐩戠潱绠$悊鍔炲叕瀹わ紙鍐呴儴涓撳崠绠$悊鐩戠潱鍔炲叕瀹ゃ�佺ń鏌ュぇ闃燂級琛屽姩缁刓"," +
+ "\"parent_no\": 567086523," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566592977\"" +
+ "}, {" +
+ "\"dept_no\": 567283502," +
+ "\"name\": \"棰嗗鐝瓙\"," +
+ "\"parent_no\": 567249497," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567283502\"" +
+ "}, {" +
+ "\"dept_no\": 567571030," +
+ "\"name\": \"鐩戝療娉曡鍔瀄"," +
+ "\"parent_no\": 567249497," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567571030\"" +
+ "}, {" +
+ "\"dept_no\": 566605742," +
+ "\"name\": \"婀炬矚鍖哄眬锛堣惀閿�閮級瀹㈡埛鏈嶅姟閮╘"," +
+ "\"parent_no\": 567258434," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566605742\"" +
+ "}, {" +
+ "\"dept_no\": 567044634," +
+ "\"name\": \"棰嗗鐝瓙\"," +
+ "\"parent_no\": 567258434," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567044634\"" +
+ "}, {" +
+ "\"dept_no\": 566835635," +
+ "\"name\": \"鍔炲叕瀹"," +
+ "\"parent_no\": 567249497," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566835635\"" +
+ "}, {" +
+ "\"dept_no\": 566844724," +
+ "\"name\": \"鍩庡崡鐑熻崏涓撳崠绠$悊鎵�锛堟湇鍔$珯銆佺ń鏌ヤ腑闃燂級\"," +
+ "\"parent_no\": 567249497," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566844724\"" +
+ "}, {" +
+ "\"dept_no\": 566633782," +
+ "\"name\": \"棰嗗鐝瓙\"," +
+ "\"parent_no\": 567266572," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566633782\"" +
+ "}, {" +
+ "\"dept_no\": 566884644," +
+ "\"name\": \"鍗楅櫟鍘垮眬锛堣惀閿�閮級瀹㈡埛鏈嶅姟閮╘"," +
+ "\"parent_no\": 567266572," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566884644\"" +
+ "}, {" +
+ "\"dept_no\": 566656760," +
+ "\"name\": \"鍗楅櫟鍘垮眬锛堣惀閿�閮級涓撳崠鐩戠潱绠$悊鍔炲叕瀹わ紙鍐呴儴涓撳崠绠$悊鐩戠潱鍔炲叕瀹ゃ�佺ń鏌ュぇ闃燂級\"," +
+ "\"parent_no\": 567266572," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566656760\"" +
+ "}, {" +
+ "\"dept_no\": 567127606," +
+ "\"name\": \"婀炬矚鍖哄眬锛堣惀閿�閮級涓撳崠鐩戠潱绠$悊鍔炲叕瀹わ紙鍐呴儴涓撳崠绠$悊鐩戠潱鍔炲叕瀹ゃ�佺ń鏌ュぇ闃燂級\"," +
+ "\"parent_no\": 567258434," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567127606\"" +
+ "}, {" +
+ "\"dept_no\": 566965621," +
+ "\"name\": \"鍗楅櫟鍘垮眬锛堣惀閿�閮級鐩戝療娉曡鍔瀄"," +
+ "\"parent_no\": 567266572," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566965621\"" +
+ "}, {" +
+ "\"dept_no\": 566889723," +
+ "\"name\": \"鍗楅櫟鍘垮眬锛堣惀閿�閮級鍩庡尯鐑熻崏涓撳崠绠$悊鎵�锛堟湇鍔$珯銆佺ń鏌ヤ腑闃燂級\"," +
+ "\"parent_no\": 567266572," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566889723\"" +
+ "}, {" +
+ "\"dept_no\": 573565486," +
+ "\"name\": \"鍗楅櫟鍘垮眬锛堣惀閿�閮級鍔炲叕瀹"," +
+ "\"parent_no\": 567266572," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"573565486\"" +
+ "}, {" +
+ "\"dept_no\": 566880674," +
+ "\"name\": \"鍗楅櫟鍘垮眬绂诲矖閫�鍏讳汉鍛榎"," +
+ "\"parent_no\": 567354485," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566880674\"" +
+ "}, {" +
+ "\"dept_no\": 567176623," +
+ "\"name\": \"绻佹槍鍘垮眬绂诲矖閫�鍏讳汉鍛榎"," +
+ "\"parent_no\": 567354485," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567176623\"" +
+ "}, {" +
+ "\"dept_no\": 567314533," +
+ "\"name\": \"鑺滄箹甯傚眬绂诲矖閫�鍏讳汉鍛榎"," +
+ "\"parent_no\": 567354485," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567314533\"" +
+ "}, {" +
+ "\"dept_no\": 567340287," +
+ "\"name\": \"鏃犱负鍘垮眬绂诲矖閫�鍏讳汉鍛榎"," +
+ "\"parent_no\": 567354485," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567340287\"" +
+ "}, {" +
+ "\"dept_no\": 566636715," +
+ "\"name\": \"鑺滄箹鍘垮眬绂诲矖閫�鍏讳汉鍛榎"," +
+ "\"parent_no\": 567354485," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566636715\"" +
+ "}, {" +
+ "\"dept_no\": 567368506," +
+ "\"name\": \"绻佹槍鍖哄眬锛堣惀閿�閮級鐩戝療娉曡鍔瀄"," +
+ "\"parent_no\": 567418536," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567368506\"" +
+ "}, {" +
+ "\"dept_no\": 567354486," +
+ "\"name\": \"绻佹槍鍖哄眬锛堣惀閿�閮級鍔炲叕瀹"," +
+ "\"parent_no\": 567418536," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567354486\"" +
+ "}, {" +
+ "\"dept_no\": 566960827," +
+ "\"name\": \"绻佹槍鍖哄眬锛堣惀閿�閮級涓撳崠鐩戠潱绠$悊鍔炲叕瀹わ紙鍐呴儴涓撳崠绠$悊鐩戠潱鍔炲叕瀹ゃ�佺ń鏌ュぇ闃燂級\"," +
+ "\"parent_no\": 567418536," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566960827\"" +
+ "}, {" +
+ "\"dept_no\": 566649730," +
+ "\"name\": \"绻佹槍鍖哄眬锛堣惀閿�閮級鍩庡尯鐑熻崏涓撳崠绠$悊鎵�锛堟湇鍔$珯銆佺ń鏌ヤ腑闃燂級\"," +
+ "\"parent_no\": 567418536," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566649730\"" +
+ "}, {" +
+ "\"dept_no\": 566455834," +
+ "\"name\": \"绻佹槍鍖哄眬锛堣惀閿�閮級瀹㈡埛鏈嶅姟閮╘"," +
+ "\"parent_no\": 567418536," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566455834\"" +
+ "}, {" +
+ "\"dept_no\": 566975648," +
+ "\"name\": \"棰嗗鐝瓙\"," +
+ "\"parent_no\": 567418536," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"566975648\"" +
+ "}, {" +
+ "\"dept_no\": 822153494," +
+ "\"name\": \"鍖哄煙鍒嗕腑蹇僜"," +
+ "\"parent_no\": 567458554," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"822153494\"" +
+ "}, {" +
+ "\"dept_no\": 567328559," +
+ "\"name\": \"涓撳崠鐩戠潱绠$悊绉戯紙鍐呴儴涓撳崠绠$悊鐩戠潱绉戙�佺ń鏌ユ敮闃燂級琛屽姩缁刓"," +
+ "\"parent_no\": 567458554," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567328559\"" +
+ "}, {" +
+ "\"dept_no\": 567476616," +
+ "\"name\": \"涓撳崠鐩戠潱绠$悊绉戯紙鍐呴儴涓撳崠绠$悊鐩戠潱绉戙�佺ń鏌ユ敮闃燂級鏁版嵁鍒嗘瀽缁刓"," +
+ "\"parent_no\": 567458554," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"567476616\"" +
+ "}, {" +
+ "\"dept_no\": 821950791," +
+ "\"name\": \"鐜板満妫�鏌ョ粍\"," +
+ "\"parent_no\": 822153494," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"821950791\"" +
+ "}, {" +
+ "\"dept_no\": 922652428," +
+ "\"name\": \"缁煎悎绠$悊缁刓"," +
+ "\"parent_no\": 822153494," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"922652428\"" +
+ "}, {" +
+ "\"dept_no\": 822188538," +
+ "\"name\": \"鏁版嵁鍒嗘瀽缁刓"," +
+ "\"parent_no\": 822153494," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"822188538\"" +
+ "}, {" +
+ "\"dept_no\": 981649568," +
+ "\"name\": \"閮ㄩ棬棰嗗\"," +
+ "\"parent_no\": 567080624," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"981649568\"" +
+ "}, {" +
+ "\"dept_no\": 982346282," +
+ "\"name\": \"閮ㄩ棬棰嗗\"," +
+ "\"parent_no\": 567458554," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"982346282\"" +
+ "}, {" +
+ "\"dept_no\": 998004621," +
+ "\"name\": \"閮ㄩ棬棰嗗\"," +
+ "\"parent_no\": 822153494," +
+ "\"type\": 0," +
+ "\"status\": 1," +
+ "\"integrate_id\": \"998004621\"" +
+ "}]" ;
+ TypeReference typeReference =
+ new TypeReference< List<DeptEntityModel> >() {
+ };
+ List<DeptEntityModel> list = com.alibaba.fastjson.JSONObject.parseObject(temp, typeReference.getType());
+ CompanyServiceImpl obj = new CompanyServiceImpl();
+ list = obj.sortJdyListBYParent(list,483636217);
+ list.size();
+
+ }
+
+ private void dealCompanyChangeListJdy(List<DeptEntityModel> list, List<Company> addList, List<Company> updateList,
+ List<Company> delIds, List<Company> allList) {
Date date = new Date();
for(DeptEntityModel respone : list){
Company param = new Company();
@@ -941,7 +1684,6 @@
//鏍规嵁erpid鏌ヨ浼佷笟淇℃伅锛屽垽鏂槸鏂板杩樻槸鏇存柊
Company company = findCompanyByERPId(allList,respone.getDept_no().toString());
if(company == null){
- //濡傛灉鏄柊澧�
//灏佽鏂板缁勭粐瀵硅薄鏁版嵁
addList.add(getAddCompanyModel(param));
}else{
@@ -951,12 +1693,13 @@
if(allList!=null && allList.size()>0){
for(Company c : allList){
if(!isCompanyDeletedJdy(c,list)){
- delIds.add(Long.valueOf(c.getErpId()));
+ delIds.add(c);
}
}
}
}
- private void dealCompanyChangeList(List<OapiV2DepartmentGetResponse.DeptGetResponse> list, List<Company> addList, List<Company> updateList, List<Long> delIds, List<Company> allList) {
+ private void dealCompanyChangeList(List<OapiV2DepartmentGetResponse.DeptGetResponse> list, List<Company> addList,
+ List<Company> updateList, List<Company> delIds, List<Company> allList) {
Date date = new Date();
for(OapiV2DepartmentGetResponse.DeptGetResponse respone : list){
Company param = new Company();
@@ -977,7 +1720,7 @@
if(allList!=null && allList.size()>0){
for(Company c : allList){
if(!isCompanyDeleted(c,list)){
- delIds.add(Long.valueOf(c.getErpId()));
+ delIds.add(c);
}
}
}
@@ -1047,10 +1790,6 @@
company.setIsdeleted(Constants.ZERO);
company.setStatus(Constants.ZERO);
-// company.setName(deptGetResponse.getName());
-// company.setErpId(deptGetResponse.getDeptId().toString());
-// company.setErpParentId(deptGetResponse.getParentId().toString());
-// company.setSortnum(deptGetResponse.getOrder().intValue());//榛樿鏈�涓婇潰
company.setName(param.getName());
company.setErpId(param.getErpId() );
company.setErpParentId(param.getErpParentId());
@@ -1058,22 +1797,19 @@
company.setType(Constants.ONE);
String rootOrgId = systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_ROOTORG_CODE).getCode();
- Company root =getRootCompanyModel(rootOrgId);
+ String jdyRootId = systemDictDataBiz.queryByCode(Constants.JDY_CONFIG,Constants.JDY_COMPANY_ROOT_NO).getCode();
+ Company root =getRootCompanyModel(rootOrgId,jdyRootId);
+ company.setHkParentId(rootOrgId);
company.setCompanyPath(company.getId()+"/");//鍚嶇О璺緞
company.setCompanyNamePath(company.getName());//鍚嶇О璺緞
- company.setHkParentId(rootOrgId);
String idPath = "";
- if(StringUtils.isNotBlank(company.getErpParentId())){
- Company parent = companyMapper.selectOne(new QueryWrapper<Company>().lambda().eq(Company::getErpId,company.getErpParentId())
+ if(StringUtils.isNotBlank(param.getErpParentId())){
+ Company parent = companyMapper.selectOne(new QueryWrapper<Company>().lambda().eq(Company::getErpId,param.getErpParentId())
.eq(Company::getIsdeleted,Constants.ZERO).last(" limit 1 "));
if(parent == null || Constants.equalsInteger(parent.getIsdeleted(),Constants.ONE)){
//鐖剁骇涓嶅瓨鍦ㄧ殑锛岀洿鎺ユ寕鍦ㄦ牴缁勭粐涓�
parent = root;
-// throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "瀵逛笉璧凤紝鐖剁骇缁勭粐淇℃伅涓嶅瓨鍦▇");
}
-// if(StringUtils.isBlank(parent.getHkId())){
-// throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "瀵逛笉璧凤紝鐖剁骇缁勭粐淇℃伅灏氭湭鍚屾涓嬪彂鎴愬姛~");
-// }
if(Objects.nonNull(parent.getType())&&!Constants.equalsInteger(parent.getType(),-1)){
if(!Constants.equalsInteger(company.getType(),parent.getType())){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝缁勭粐淇℃伅閿欒");
@@ -1118,7 +1854,7 @@
* @param rootOrgId
* @return
*/
- private Company getRootCompanyModel(String rootOrgId) {
+ private Company getRootCompanyModel(String rootOrgId,String erpId) {
Company root = companyMapper.selectOne(new QueryWrapper<Company>().lambda()
.eq(Company::getIsdeleted,Constants.ZERO)
.isNull(Company::getParentId)
@@ -1135,6 +1871,7 @@
root.setHkStatus(Constants.ONE);
root.setIsdeleted(Constants.ZERO);
root.setStatus(Constants.ZERO);
+ root.setErpId(erpId);
root.setHkCompanyPath(rootOrgId+"/");
root.setCompanyNamePath(root.getName());
root.setHkDate(new Date());
@@ -1151,7 +1888,8 @@
public Company syncDDEditCompanyModel(Company param,Company company){
company.setErpParentId(param.getErpParentId().toString());
String rootOrgId = systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_ROOTORG_CODE).getCode();
- Company root =getRootCompanyModel(rootOrgId);
+ String jdyRootId = systemDictDataBiz.queryByCode(Constants.JDY_CONFIG,Constants.JDY_COMPANY_ROOT_NO).getCode();
+ Company root =getRootCompanyModel(rootOrgId,jdyRootId);
String idPath = "";
if(StringUtils.isNotBlank(company.getErpParentId())){
Company parent = companyMapper.selectOne(new QueryWrapper<Company>().lambda()
@@ -1201,16 +1939,15 @@
- public void syncDelCompany(List<Long> deptIdList){
- List<Company> companyList = companyMapper.selectList(new QueryWrapper<Company>()
+ public void syncDelCompany(List<Company> companyList ){
+/* List<Company> companyList = companyMapper.selectList(new QueryWrapper<Company>()
.lambda()
.eq(Company::getIsdeleted,Constants.ZERO)
- .in(Company::getErpId,deptIdList)
- );
+ .in(Company::getId,deptIdList)
+ );*/
if(CollectionUtils.isNotEmpty(companyList)){
List<Integer> delIds = companyList.stream().map(i->i.getId()).collect(Collectors.toList());
List<String> delHKIds = companyList.stream().filter(i->StringUtils.isNotBlank(i.getHkId())).map(i->i.getHkId()).collect(Collectors.toList());
-
//鏍囪涓氬姟鍒犻櫎
companyMapper.update(new UpdateWrapper<Company>().lambda()
.set(Company::getIsdeleted,Constants.ONE)
--
Gitblit v1.9.3