Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
80dc2573a3
|
|
@ -59,7 +59,28 @@ public class HealthPopularArticleServiceImpl implements IHealthPopularArticleSer
|
||||||
public int insertHealthPopularArticle(HealthPopularArticle healthPopularArticle) {
|
public int insertHealthPopularArticle(HealthPopularArticle healthPopularArticle) {
|
||||||
healthPopularArticle.setCreateTime(DateUtils.getNowDate());
|
healthPopularArticle.setCreateTime(DateUtils.getNowDate());
|
||||||
try {
|
try {
|
||||||
return healthPopularArticleMapper.insertHealthPopularArticle(healthPopularArticle);
|
healthPopularArticleMapper.insertHealthPopularArticle(healthPopularArticle);
|
||||||
|
HealthPersonInfo chronicVo=new HealthPersonInfo();
|
||||||
|
chronicVo.setChronicIds(healthPopularArticle.getChronicIds());
|
||||||
|
List<HealthPersonInfo> chronicVos=healthPersonInfoMapper.selectHealthChronicList(chronicVo);
|
||||||
|
if(chronicVos!=null&&chronicVos.size()>0){
|
||||||
|
/**
|
||||||
|
* 疾病信息处理
|
||||||
|
*/
|
||||||
|
List<HealthPopularArticle> articleVos=new ArrayList<>();
|
||||||
|
for(HealthPersonInfo vo:chronicVos){
|
||||||
|
HealthPopularArticle hpa=new HealthPopularArticle();
|
||||||
|
hpa.setArticleId(healthPopularArticle.getArticleId());
|
||||||
|
hpa.setChronicId(vo.getChronicIds());
|
||||||
|
hpa.setChronicName(vo.getChronicNames());
|
||||||
|
articleVos.add(hpa);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 重新录入疾病信息
|
||||||
|
*/
|
||||||
|
healthPopularArticleMapper.insertHealthArticleChronic(articleVos);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException(e.getMessage());
|
throw new ServiceException(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue