add 分标委翻译

This commit is contained in:
liao
2023-11-16 10:28:18 +08:00
parent 44036df8b6
commit d474aef1af
3 changed files with 29 additions and 6 deletions
@@ -291,11 +291,21 @@ public class LawsAsmsOpenApiServiceImpl extends ServiceImpl<LawsAsmsOpenApiMappe
// 如果是分标委
List<Map<String, String>> mapList = asmsPostUtil.sendGetReq(lawsAsmsOpenApi.getApiUrl(), map);
List<LawsStandardization> lawsStandardizationList = new ArrayList();
LawsStandardization parent = lawsStandardizationService.getById("0");
LambdaQueryWrapper<LawsStandardization> parentQueryWrapper = new LambdaQueryWrapper<>();
parentQueryWrapper.eq(LawsStandardization::getPid, "0");
List<LawsStandardization> parentList = lawsStandardizationService.list(parentQueryWrapper);
String parentId;
if (CollectionUtils.isEmpty(parentList)) {
parentId = "0";
} else {
parentId = parentList.get(0).getId();
}
mapList.forEach(eMap -> {
LawsStandardization lawsStandardization = new LawsStandardization();
lawsStandardization.setStandardizationType("分标委");
lawsStandardization.setPid(parent.getId());
lawsStandardization.setPid(parentId);
eMap.forEach((k,v) -> {
if ("code".equals(k)) {
lawsStandardization.setNum(v);