丽知:新增公司三对一方法
This commit is contained in:
parent
29a17362b2
commit
6417c9c1fd
|
@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 查询U8C实体工具类,返回对象
|
||||
|
@ -280,4 +281,38 @@ public class QueryU8CEntityUtil {
|
|||
return bdCostsubjEntityList.get(0);
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////////////存货分类-收支项目结束
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////公司自定义档案查询
|
||||
|
||||
/**
|
||||
* 公司三对一
|
||||
* KS 上海棵丝网络科技有限公司
|
||||
* YX 杭州言禧电子商务有限公司
|
||||
* YD 杭州盈达电子商务有限公司
|
||||
* 都传到 YD,杭州盈达电子商务有限公司
|
||||
* SELECT * FROM BD_DEFDOC WHERE pk_defdoclist=(SELECT pk_defdoclist FROM BD_DEFDOCLIST WHERE doclistcode='GSDY')-- 0001A11000000004XB42
|
||||
* @param corpCode 公司编码
|
||||
* @return corpCode 如果时需要转换的会自动转换,如果不需要返回原始公司编码
|
||||
*/
|
||||
public String queryBdDefDocByPkDefDocList(String corpCode){
|
||||
Assert.notNull(corpCode,"公司三对一,入参公司不能为空!!!");
|
||||
BdDefdocEntity bdDefdocEntity = new BdDefdocEntity();
|
||||
bdDefdocEntity.setPkDefdoclist("0001A11000000004XB42");
|
||||
bdDefdocEntity.setDr(0);
|
||||
bdDefdocEntity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||
List<BdDefdocEntity> bdDefdocEntityList = iBdDefdocDao.query(bdDefdocEntity);
|
||||
if (bdDefdocEntityList.size() == 0) {
|
||||
Assert.state(false,"根据:自定义档案列表编码:GSDY,主键:[0001A11000000004XB42],未查询到自定义档案");
|
||||
}
|
||||
List<String> corpCollect = bdDefdocEntityList.stream().map(BdDefdocEntity::getDoccode).collect(Collectors.toList());
|
||||
if(corpCollect.contains(corpCode)){
|
||||
String memo = bdDefdocEntityList.get(0).getMemo();
|
||||
String[] split = memo.split(",");
|
||||
corpCode=split[0];
|
||||
}
|
||||
return corpCode;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////公司自定义档案查询
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue