|
@@ -8,6 +8,7 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
import java.util.UUID;
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
|
|
+import com.goafanti.order.enums.ProjectType;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -160,14 +161,16 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public List<Map<String, String>> getAllCnames(Integer flag) {
|
|
|
|
|
- List<Map<String, String>> list=new ArrayList<Map<String, String>>();
|
|
|
|
|
|
|
+ public List<Map<String, Object>> getAllCnames(Integer flag) {
|
|
|
|
|
+ if (flag==null)flag=0;
|
|
|
|
|
+ List<Map<String, Object>> list=new ArrayList<Map<String, Object>>();
|
|
|
List<String> listcid=businessVarietiesMapper.getListId();
|
|
List<String> listcid=businessVarietiesMapper.getListId();
|
|
|
for (String s : listcid) {
|
|
for (String s : listcid) {
|
|
|
- Map<String, String> map=new HashMap<>();
|
|
|
|
|
|
|
+ Map<String, Object> map=new HashMap<>();
|
|
|
String cname=getAllCname(s);
|
|
String cname=getAllCname(s);
|
|
|
map.put("id", s);
|
|
map.put("id", s);
|
|
|
map.put("cname", cname);
|
|
map.put("cname", cname);
|
|
|
|
|
+ map.put("typeList",selectProjectAndTypeById(s));
|
|
|
if (flag==1) {
|
|
if (flag==1) {
|
|
|
if (StringUtils.isBlank(cname)) {
|
|
if (StringUtils.isBlank(cname)) {
|
|
|
map.put("cname", "平台超级业务品类");
|
|
map.put("cname", "平台超级业务品类");
|
|
@@ -457,5 +460,33 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
return businessProjectMapper.selectBusinessProjectCatalog();
|
|
return businessProjectMapper.selectBusinessProjectCatalog();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ public List<Map> selectProjectAndTypeById(String id) {
|
|
|
|
|
+ List<Map> list=businessProjectMapper.selectProjectAndTypeAll();
|
|
|
|
|
+ for (Map map : list) {
|
|
|
|
|
+ if (id.equals(map.get("id"))){
|
|
|
|
|
+ List<Map> typeList=new ArrayList<>();
|
|
|
|
|
+ String groupCount= (String) map.get("groupCount");
|
|
|
|
|
+ if (groupCount!=null){
|
|
|
|
|
+ String[] ss=groupCount.split(",");
|
|
|
|
|
+ Map<String, String> typeBo = new HashMap<>();
|
|
|
|
|
+ typeBo.put("id",null);
|
|
|
|
|
+ typeBo.put("name", "全部");
|
|
|
|
|
+ typeList.add(typeBo);
|
|
|
|
|
+ if (ss.length>0){
|
|
|
|
|
+ for (String s : ss) {
|
|
|
|
|
+ Map<String, String> types = new HashMap<>();
|
|
|
|
|
+ types.put("id",s);
|
|
|
|
|
+ types.put("name", ProjectType.getValueByCode(Integer.valueOf(s)));
|
|
|
|
|
+ typeList.add(types);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return typeList;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return new ArrayList<>();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|