Commit afbf43f4 authored by 赵啸非's avatar 赵啸非

更新申报次数

parent 8c8d6740
...@@ -166,7 +166,12 @@ public class DeclareServiceImpl extends AbstractCRUDServiceImpl<DeclareDao, Decl ...@@ -166,7 +166,12 @@ public class DeclareServiceImpl extends AbstractCRUDServiceImpl<DeclareDao, Decl
private void updateCompanyCount(DeclareEntity entity, Context context) { private void updateCompanyCount(DeclareEntity entity, Context context) {
if (!ObjectUtils.isEmpty(entity.getCompanyId())) { if (!ObjectUtils.isEmpty(entity.getCompanyId())) {
int count = this.count(new DeclareQuery().companyId(entity.getCompanyId()), context); int count = this.count(new DeclareQuery().companyId(entity.getCompanyId()), context);
companyService.update(new CompanyQuery().id(entity.getId()).declarationCount(count), context); CompanyEntity companyEntity = companyService.get(entity.getCompanyId());
if(!ObjectUtils.isEmpty(companyEntity)){
companyEntity.setDeclarationCount(count);
companyService.update(companyEntity, context);
}
// companyService.update(new CompanyQuery().id(entity.getId()).declarationCount(count), context);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment