فهرست منبع

Merge branch 'dev' of zd_123/patient-co-management into dev

huangwenjie 7 سال پیش
والد
کامیت
c1a3456a4b

+ 45 - 0
patient-co/patient-co-figure-label/src/main/java/com/yihu/wlyy/figure/label/convert/SignIsOnlineConvert.java

@ -0,0 +1,45 @@
package com.yihu.wlyy.figure.label.convert;
import com.yihu.figure_label.entity.FLlabelDict;
import com.yihu.wlyy.figure.label.model.DataModel;
import com.yihu.wlyy.figure.label.model.SaveModel;
import com.yihu.wlyy.figure.label.util.ConstantUtil;
import com.yihu.wlyy.figure.label.util.IdCardUtil;
import com.yihu.wlyy.figure.label.util.MakeModelIDUtil;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.util.*;
@Component
public class SignIsOnlineConvert implements Convert {
    @Override
    public List<SaveModel> convert(List<DataModel> models,List<FLlabelDict> flLabelDictList) {
        List<SaveModel> saveModels = new ArrayList<>();
        if(CollectionUtils.isEmpty(flLabelDictList)){
            return saveModels;
        }
        FLlabelDict one = flLabelDictList.get(0);
        Map<String,String> map = new HashMap<>();
        flLabelDictList.forEach(
                fLlabelDict -> {
                    map.put(fLlabelDict.getLabelCode(),fLlabelDict.getLabelName());
                }
        );
        models.forEach(
                model -> {
                    SaveModel saveModel = new SaveModel();
                    saveModel.setModelId(MakeModelIDUtil.makeModelID(model,""));
                    saveModel.setIdcard(model.getIdcard());
                    saveModel.setLabelType(one.getParentCode());
                    saveModel.setLabelCode(model.getLabelCode());
                    saveModel.setLabeName(map.get(model.getLabelCode()));
                    saveModel.setCreateTime(DateFormatUtils.format(new Date(), ConstantUtil.date_format));
                    saveModels.add(saveModel);
                }
        );
        return saveModels;
    }
}

+ 3 - 0
patient-co/patient-co-figure-label/src/main/java/com/yihu/wlyy/figure/label/convert/SignStateConvert.java

@ -5,6 +5,7 @@ import com.yihu.wlyy.figure.label.model.DataModel;
import com.yihu.wlyy.figure.label.model.SaveModel;
import com.yihu.wlyy.figure.label.util.ConstantUtil;
import com.yihu.wlyy.figure.label.util.IdCardUtil;
import com.yihu.wlyy.figure.label.util.MakeModelIDUtil;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.util.CollectionUtils;
@ -32,6 +33,8 @@ public class SignStateConvert implements Convert{
                model -> {
                    SaveModel saveModel = new SaveModel();
                    saveModel.setIdcard(model.getIdcard());
                    saveModel.setModelId(MakeModelIDUtil.makeModelID(model,""));
                    saveModel.setLabelCode(model.getLabelCode());
                    saveModel.setLabelType(one.getParentCode());
                    saveModel.setLabeName(map.get(model.getLabelCode()));
                    saveModel.setCreateTime(DateFormatUtils.format(new Date(), ConstantUtil.date_format));

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statisticsES/StatisticsESService.java

@ -5087,7 +5087,7 @@ public class StatisticsESService {
                }
            }
        }
        if (SaveModel.OrgLevel.equals(level + "")) {
        if (SaveModel.OrgLevel.equals(level + "") || SaveModel.teamLevel.equals(lowLevel)) {
            statisticsAllService.translateTeamLeaderName(resultList);
        }
        Collections.sort(resultList, new Comparator<Map<String, Object>>() {