Commit 7a8c3171 by wxh

'对所有API的JAVABEAN进行修改'

parents 9cefa529 6fb688b8
...@@ -48,6 +48,9 @@ public class SpringBootStart { ...@@ -48,6 +48,9 @@ public class SpringBootStart {
// public final static String SCHEMA_STUDENT = "graphql/student.graphqls"; // public final static String SCHEMA_STUDENT = "graphql/student.graphqls";
// public final static String SCHEMA_ECLASS = "graphql/eclass.graphqls"; // public final static String SCHEMA_ECLASS = "graphql/eclass.graphqls";
public final static String SCHEMA_MATERIAL = "graphql/material.graphqls"; public final static String SCHEMA_MATERIAL = "graphql/material.graphqls";
public final static String SCHEMA_SITE = "graphql/site.graphqls";
public final static String SCHEMA_ROOM = "graphql/room.graphqls";
public final static String SCHEMA_FLOOR = "graphql/floor.graphqls";
// public final static String SCHEMA_SCHOOLBASEINFO= "graphql/schoolbaseinfo.graphqls"; // public final static String SCHEMA_SCHOOLBASEINFO= "graphql/schoolbaseinfo.graphqls";
// public final static String SCHEMA_SYSTEMCTL= "graphql/systemctl.graphqls"; // public final static String SCHEMA_SYSTEMCTL= "graphql/systemctl.graphqls";
// public final static String SCHEMA_STATISTICS= "graphql/teacherstatistics.graphqls"; // public final static String SCHEMA_STATISTICS= "graphql/teacherstatistics.graphqls";
...@@ -89,7 +92,7 @@ public class SpringBootStart { ...@@ -89,7 +92,7 @@ public class SpringBootStart {
* 定义schema文件列表... * 定义schema文件列表...
*/ */
protected String[] getSchemas(){ protected String[] getSchemas(){
return new String[]{SCHEMA_ROOT , SCHEMA_BASIC ,SCHEMA_MATERIAL}; return new String[]{SCHEMA_ROOT , SCHEMA_BASIC ,SCHEMA_MATERIAL,SCHEMA_SITE,SCHEMA_ROOM,SCHEMA_FLOOR};
//return new String[]{SCHEMA_ROOT , SCHEMA_BASIC ,SCHEMA_USER , SCHEMA_TEACHER ,SCHEMA_STUDENT, SCHEMA_ECLASS,SCHEMA_MATERIAL, SCHEMA_SCHOOLBASEINFO,SCHEMA_SYSTEMCTL,SCHEMA_STATISTICS }; //return new String[]{SCHEMA_ROOT , SCHEMA_BASIC ,SCHEMA_USER , SCHEMA_TEACHER ,SCHEMA_STUDENT, SCHEMA_ECLASS,SCHEMA_MATERIAL, SCHEMA_SCHOOLBASEINFO,SCHEMA_SYSTEMCTL,SCHEMA_STATISTICS };
} }
......
...@@ -2,7 +2,6 @@ package com.orhon.smartcampus.material.modules.management.dao; ...@@ -2,7 +2,6 @@ package com.orhon.smartcampus.material.modules.management.dao;
import com.orhon.smartcampus.material.basicComponents.baseDao.BaseDaoImpl; import com.orhon.smartcampus.material.basicComponents.baseDao.BaseDaoImpl;
import com.orhon.smartcampus.material.modules.management.entity.Buildings; import com.orhon.smartcampus.material.modules.management.entity.Buildings;
import com.orhon.smartcampus.material.modules.management.entity.GoodsManage;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Component @Component
......
package com.orhon.smartcampus.material.modules.management.dao;
import com.orhon.smartcampus.material.basicComponents.baseDao.BaseDaoImpl;
import com.orhon.smartcampus.material.modules.management.entity.FloorEntity;
import com.orhon.smartcampus.material.modules.management.entity.GoodsClassify;
import org.springframework.stereotype.Component;
@Component
public class FloorDao extends BaseDaoImpl<FloorEntity> {
}
package com.orhon.smartcampus.material.modules.management.dao;
import com.orhon.smartcampus.material.basicComponents.baseDao.BaseDaoImpl;
import com.orhon.smartcampus.material.modules.management.entity.RoomEntity;
import com.orhon.smartcampus.material.modules.management.entity.RootEntity;
import org.springframework.stereotype.Component;
@Component
public class RoomDao extends BaseDaoImpl<RoomEntity> {
}
package com.orhon.smartcampus.material.modules.management.dao;
import com.orhon.smartcampus.material.basicComponents.baseDao.BaseDaoImpl;
import com.orhon.smartcampus.material.modules.base.gqlModel.GQLPageParam;
import com.orhon.smartcampus.material.modules.base.mm.EnvArgsMapper;
import com.orhon.smartcampus.material.modules.management.entity.RootEntity;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import org.springframework.stereotype.Component;
@Component
public class RootDao extends BaseDaoImpl<RootEntity> {
}
...@@ -20,19 +20,17 @@ public class Buildings { ...@@ -20,19 +20,17 @@ public class Buildings {
@Column(name = "buildings_name", nullable = false) @Column(name = "buildings_name", nullable = false)
private String buildings_name; private String buildings_name;
@Column(name = "site_id", nullable = false) @Column(name = "site_id", nullable = false)
private String site_id; private Integer site_id;
@Column(name = "buildings_units", nullable = false) @Column(name = "buildings_units", nullable = false)
private String buildings_units; private Integer buildings_units;
@Column(name = "buildings_head", nullable = false)
private String buildings_head;
@Column(name = "buildings_introduce", nullable = false) @Column(name = "buildings_introduce", nullable = false)
private String buildings_introduce; private String buildings_introduce;
@Column(name = "buildings_status", nullable = false) @Column(name = "buildings_status", nullable = false)
private int buildings_status; private Integer buildings_status;
@Column(name = "buildings_head_id", nullable = false)
private String buildings_head_id;
@Column(name = "add_id", nullable = false) @Column(name = "add_id", nullable = false)
private String add_id; private String add_id;
@Column(name = "school_id", nullable = false)
private String school_id;
@Column(name = "created_at", nullable = false) @Column(name = "created_at", nullable = false)
private Date created_at; private Date created_at;
@Column(name = "updated_at", nullable = false) @Column(name = "updated_at", nullable = false)
......
package com.orhon.smartcampus.material.modules.management.entity;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.util.Date;
@Setter
@Getter
@EqualsAndHashCode
@Entity
@Table(name = "material_floor", schema = "material", catalog = "")
public class FloorEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "unit_id", nullable = false)
private Integer unit_id;
@Column(name = "floor_name", nullable = false)
private String floor_name;
@Column(name = "floor_head", nullable = false)
private String floor_head;
@Column(name = "floor_status", nullable = false)
private Integer floor_status;
@Column(name = "add_id", nullable = false)
private String add_id;
@Column(name = "created_at", nullable = false)
private Date created_at;
@Column(name = "updated_at", nullable = false)
private Date updated_at;
}
...@@ -17,10 +17,14 @@ public class GoodsClassify { ...@@ -17,10 +17,14 @@ public class GoodsClassify {
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false) @Column(name = "id", nullable = false)
private Long id; private Long id;
@Column(name = "parent_id", nullable = false)
private Integer parent_id;
@Column(name = "classify_name", nullable = false) @Column(name = "classify_name", nullable = false)
private String classify_name; private String classify_name;
@Column(name = "classify_status", nullable = false) @Column(name = "classify_status", nullable = false)
private Integer classify_status; private Integer classify_status;
@Column(name = "sort_order", nullable = false)
private Integer sort_order;
@Column(name = "school_id", nullable = false) @Column(name = "school_id", nullable = false)
private String school_id; private String school_id;
@Column(name = "add_id", nullable = false) @Column(name = "add_id", nullable = false)
......
...@@ -25,18 +25,22 @@ public class GoodsManage { ...@@ -25,18 +25,22 @@ public class GoodsManage {
private String main_image; private String main_image;
@Column(name = "sub_images", nullable = false) @Column(name = "sub_images", nullable = false)
private String sub_images; private String sub_images;
@Column(name = "goods_number", nullable = false)
private String goods_number;
@Column(name = "good_status", nullable = false)
private int good_status;
@Column(name = "goods_price", nullable = false) @Column(name = "goods_price", nullable = false)
private String goods_price; private String goods_price;
@Column(name = "goods_number", nullable = false)
private String goods_number;
@Column(name = "goods_stock", nullable = false) @Column(name = "goods_stock", nullable = false)
private Integer goods_stock; private Integer goods_stock;
@Column(name = "userid", nullable = false) @Column(name = "goods_note", nullable = false)
private String userid; private String goods_note;
@Column(name = "school_id", nullable = false) @Column(name = "good_status", nullable = false)
private String school_id; private Integer good_status;
@Column(name = "add_id", nullable = false)
private String add_id;
@Column(name = "employ_time", nullable = false)
private String employ_time;
@Column(name = "employ_department", nullable = false)
private String employ_department;
@Column(name = "created_at", nullable = false) @Column(name = "created_at", nullable = false)
private Date created_at; private Date created_at;
@Column(name = "updated_at", nullable = false) @Column(name = "updated_at", nullable = false)
......
package com.orhon.smartcampus.material.modules.management.entity;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.util.Date;
@Setter
@Getter
@EqualsAndHashCode
@Entity
@Table(name = "material_floor", schema = "material", catalog = "")
public class RoomEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "floor_id", nullable = false)
private Integer floor_id;
@Column(name = "room_head", nullable = false)
private String room_head;
@Column(name = "room_key", nullable = false)
private Integer room_key;
@Column(name = "room_number", nullable = false)
private Integer room_number;
@Column(name = "room_name", nullable = false)
private String room_name;
@Column(name = "room_status", nullable = false)
private Integer room_status;
@Column(name = "add_id", nullable = false)
private String add_id;
@Column(name = "created_at", nullable = false)
private Date created_at;
@Column(name = "updated_at", nullable = false)
private Date updated_at;
}
package com.orhon.smartcampus.material.modules.management.entity;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.util.Date;
@Setter
@Getter
@EqualsAndHashCode
@Entity
@Table(name = "material_site", schema = "material", catalog = "")
public class RootEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "parent_id", nullable = false)
private Integer parent_id;
@Column(name = "site_name", nullable = false)
private String site_name;
@Column(name = "site_status", nullable = false)
private String site_status;
@Column(name = "sort_order", nullable = false)
private Integer sort_order;
@Column(name = "school_id", nullable = false)
private String school_id;
@Column(name = "add_id", nullable = false)
private String add_id;
@Column(name = "created_at", nullable = false)
private Date created_at;
@Column(name = "updated_at", nullable = false)
private Date updated_at;
}
...@@ -18,21 +18,19 @@ public class Unit { ...@@ -18,21 +18,19 @@ public class Unit {
@Column(name = "id", nullable = false) @Column(name = "id", nullable = false)
private Long id; private Long id;
@Column(name = "building_id", nullable = false) @Column(name = "building_id", nullable = false)
private String building_id; private Integer building_id;
@Column(name = "head_id", nullable = false) @Column(name = "unit_name", nullable = false)
private String head_id; private String unit_name;
@Column(name = "unit_head", nullable = false)
private String unit_head;
@Column(name = "floor_status", nullable = false) @Column(name = "floor_status", nullable = false)
private String floor_status; private String floor_status;
@Column(name = "floor_number", nullable = false)
private String floor_number;
@Column(name = "floor_start", nullable = false) @Column(name = "floor_start", nullable = false)
private int floor_start; private Integer floor_start;
@Column(name = "floor_end", nullable = false) @Column(name = "floor_end", nullable = false)
private String floor_end; private Integer floor_end;
@Column(name = "add_id", nullable = false) @Column(name = "add_id", nullable = false)
private String add_id; private String add_id;
@Column(name = "school_id", nullable = false)
private String school_id;
@Column(name = "created_at", nullable = false) @Column(name = "created_at", nullable = false)
private Date created_at; private Date created_at;
@Column(name = "updated_at", nullable = false) @Column(name = "updated_at", nullable = false)
......
...@@ -47,28 +47,6 @@ public class GoodsClassifyListFetcher implements DataFetcher { ...@@ -47,28 +47,6 @@ public class GoodsClassifyListFetcher implements DataFetcher {
List<GoodsClassify> list = goodsClassifyDao.find(hql,null,page.getPage(),page.getLimit()); List<GoodsClassify> list = goodsClassifyDao.find(hql,null,page.getPage(),page.getLimit());
// GQLGoodsClassify gqlGoodsClassify = null;
// if (env.getSelectionSet().contains("data/classify")){
// GoodsClassify goodsClassify = item.getBaseSchoolsBySchoolId();
// GgqlSchool = SchoolMapper.MAPPER.toSchool(schools);
// }
//
// GQLUnit gqlUnit=null;
// if (env.getSelectionSet().contains("data/unit")){
// Unit unit = item.getMaterialUnitByUnitId();
// gqlUnit = UnitMapper.MAPPER.toUnit(unit);
// }
//
// GQL floor = FloorMapper.MAPPER.toFloor(item);
// floor.setSchool(GgqlSchool);
// floor.setUnit(gqlUnit);
// GQLFloor.add(floor);
// List<GQLGoodsClassify> GQLFloor = new ArrayList<>();
//
// for (GQLGoodsClassify item : list) {
// // GQLGoodsClassify gqlGoodsClassify = GoodsClassifyMapper.MAPPER.toGoodsClassifyList(item);
// // GQLFloor.add(gqlGoodsClassify);
// }
List<GQLGoodsClassify> gqlGoodsClassifies = GoodsClassifyMapper.MAPPER.toGoodsClassifyList(list); List<GQLGoodsClassify> gqlGoodsClassifies = GoodsClassifyMapper.MAPPER.toGoodsClassifyList(list);
Long total = 0L; Long total = 0L;
if (env.getSelectionSet().contains("total")){ if (env.getSelectionSet().contains("total")){
......
package com.orhon.smartcampus.material.modules.management.fetcher; package com.orhon.smartcampus.material.modules.management.fetcher;
import com.orhon.smartcampus.material.modules.management.mutation.AddFloorMutation;
import com.orhon.smartcampus.material.modules.management.mutation.AddGoodsClassifyMutation; import com.orhon.smartcampus.material.modules.management.mutation.AddGoodsClassifyMutation;
import com.orhon.smartcampus.material.modules.management.mutation.AddRoomMutation;
import com.orhon.smartcampus.material.modules.management.mutation.AddRootSiteMutation;
import graphql.schema.idl.RuntimeWiring; import graphql.schema.idl.RuntimeWiring;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -23,14 +26,50 @@ public class MaterialFetchersLoader { ...@@ -23,14 +26,50 @@ public class MaterialFetchersLoader {
@Autowired @Autowired
BuildingsListFetcher buildingsListFetcher; BuildingsListFetcher buildingsListFetcher;
@Autowired
AddRootSiteMutation addRootSiteMutation;
@Autowired
RootBeanFetcher rootBeanFetcher;
@Autowired
SiteListFetcher siteListFetcher;
@Autowired
AddRoomMutation addRoomMutation;
@Autowired
SeleRoomListFetcher seleRoomListFetcher;
@Autowired
SeleRoomOnceFetcher roomOnceFetcher;
@Autowired
AddFloorMutation addFloorMutation;
@Autowired
SeleFloorOnceFetcher seleFloorOnceFetcher;
@Autowired
SeleFloorListFetcher seleFloorListFetcher;
public void LoadFetchers(RuntimeWiring.Builder builder){ public void LoadFetchers(RuntimeWiring.Builder builder){
builder.type("Query" , t->t.dataFetcher("GoodsClassify" , goodsClassifyFetcher)); builder.type("Query" , t->t.dataFetcher("GoodsClassify" , goodsClassifyFetcher));
builder.type("Query" , t->t.dataFetcher("GoodsClassifys" , goodsClassifyListFetcher)); builder.type("Query" , t->t.dataFetcher("GoodsClassifys" , goodsClassifyListFetcher));
builder.type("Query" , t->t.dataFetcher("GoodsManages" , goodsManageListFetcher)); builder.type("Query" , t->t.dataFetcher("GoodsManages" , goodsManageListFetcher));
builder.type("Query" , t->t.dataFetcher("BuildingsList" , buildingsListFetcher)); builder.type("Query" , t->t.dataFetcher("BuildingsList" , buildingsListFetcher));
builder.type("Query" , t->t.dataFetcher("SeleSite" , rootBeanFetcher));
builder.type("Query" , t->t.dataFetcher("SeleSites" , siteListFetcher));
builder.type("Query" , t->t.dataFetcher("SeleRoom" ,roomOnceFetcher ));
builder.type("Query" , t->t.dataFetcher("SeleRooms" , seleRoomListFetcher));
builder.type("Query" , t->t.dataFetcher("SeleFloor" , seleFloorOnceFetcher));
builder.type("Query" , t->t.dataFetcher("SeleFloors" , seleFloorListFetcher));
builder.type("Mutation" , t->t.dataFetcher("addMaterialRoomAdds" , addRoomMutation));
builder.type("Mutation" , t->t.dataFetcher("addMaterialSiteAdds" , addRootSiteMutation));
builder.type("Mutation" , t->t.dataFetcher("addGoodsClassify" , addGoodsClassifyMutation));
builder.type("Mutation" , t->t.dataFetcher("addMaterialFloorAdds" , addFloorMutation));
builder.type("Mutation" , t->t.dataFetcher("addGoodsClassify" , addGoodsClassifyMutation)); builder.type("Mutation" , t->t.dataFetcher("addGoodsClassify" , addGoodsClassifyMutation));
builder.type("Mutation" , t->t.dataFetcher("addGoodsManage" , goodsManageListFetcher)); builder.type("Mutation" , t->t.dataFetcher("addGoodsManage" , goodsManageListFetcher));
builder.type("Mutation" , t->t.dataFetcher("addBuildings" , buildingsListFetcher)); builder.type("Mutation" , t->t.dataFetcher("addBuildings" , buildingsListFetcher));
......
package com.orhon.smartcampus.material.modules.management.fetcher;
import com.orhon.smartcampus.material.modules.management.dao.GoodsClassifyDao;
import com.orhon.smartcampus.material.modules.management.dao.RootDao;
import com.orhon.smartcampus.material.modules.management.entity.GoodsClassify;
import com.orhon.smartcampus.material.modules.management.entity.RootEntity;
import com.orhon.smartcampus.material.modules.management.gqlModel.GQLGoodsClassify;
import com.orhon.smartcampus.material.modules.management.gqlModel.GQLRootBeans;
import com.orhon.smartcampus.material.modules.management.mm.GoodsClassifyMapper;
import com.orhon.smartcampus.material.modules.management.mm.RootBeanMapper;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class RootBeanFetcher implements DataFetcher {
@Autowired
RootDao rootDao;
@Override
public Object get(DataFetchingEnvironment env) throws Exception {
// + schoolId
String hql = "from RootEntity";
RootEntity item = rootDao.findId(hql, null);
if(item!=null) {
GQLRootBeans goodsClassify = RootBeanMapper.MAPPER.toRootsClassify(item);
return goodsClassify;
}
return null;
}
}
package com.orhon.smartcampus.material.modules.management.fetcher;
import com.orhon.smartcampus.material.basicComponents.Result;
import com.orhon.smartcampus.material.modules.base.gqlModel.GQLPageParam;
import com.orhon.smartcampus.material.modules.base.mm.EnvArgsMapper;
import com.orhon.smartcampus.material.modules.management.dao.FloorDao;
import com.orhon.smartcampus.material.modules.management.dao.RoomDao;
import com.orhon.smartcampus.material.modules.management.entity.FloorEntity;
import com.orhon.smartcampus.material.modules.management.entity.RoomEntity;
import com.orhon.smartcampus.material.modules.management.gqlModel.FloorGqlModel;
import com.orhon.smartcampus.material.modules.management.gqlModel.RoomGqlModel;
import com.orhon.smartcampus.material.modules.management.mm.FloorMapper;
import com.orhon.smartcampus.material.modules.management.mm.RoomMapper;
import com.orhon.smartcampus.material.utils.ObjectToMap;
import com.orhon.smartcampus.material.utils.Util;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.List;
@Component
public class SeleFloorListFetcher implements DataFetcher {
@Autowired
FloorDao floorDao;
@Override
public Object get(DataFetchingEnvironment env) throws Exception {
// + schoolId
String hql = "from FloorEntity";
GQLPageParam page = EnvArgsMapper.MAPPER.fromArgs(env);
if(env.containsArgument("condition")) {
HashMap<String,Object> map = ObjectToMap.to(env.getArgument("condition"));
if(map.get("id")!=null) {
hql += "and id " + Util.decide(map.get("id"));
}
if(map.get("floor_name")!=null) {
hql += "and floor_name " + Util.decide(map.get("unit_id"));
}
if(map.get("floor_status")!=null) {
hql += "and floor_status " + Util.decide(map.get("floor_number"));
}
}
List<FloorEntity> list = floorDao.find(hql,null,page.getPage(),page.getLimit());
List<FloorGqlModel> gqlGoodsClassifies = FloorMapper.MAPPER.toFloorList(list);
Long total = 0L;
if (env.getSelectionSet().contains("total")){
total = floorDao.getTotalCount(hql);
}
return Result.ok().put("data", gqlGoodsClassifies).put("total", total);
}
}
package com.orhon.smartcampus.material.modules.management.fetcher;
import com.orhon.smartcampus.material.modules.management.dao.FloorDao;
import com.orhon.smartcampus.material.modules.management.dao.RoomDao;
import com.orhon.smartcampus.material.modules.management.entity.FloorEntity;
import com.orhon.smartcampus.material.modules.management.entity.RoomEntity;
import com.orhon.smartcampus.material.modules.management.gqlModel.FloorGqlModel;
import com.orhon.smartcampus.material.modules.management.gqlModel.RoomGqlModel;
import com.orhon.smartcampus.material.modules.management.mm.FloorMapper;
import com.orhon.smartcampus.material.modules.management.mm.RoomMapper;
import com.sun.scenario.effect.Flood;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class SeleFloorOnceFetcher implements DataFetcher {
@Autowired
FloorDao floorDao;
@Override
public Object get(DataFetchingEnvironment environment) throws Exception {
String hql = "from RoomEntity";
FloorEntity item = floorDao.findId(hql, null);
if(item!=null) {
FloorGqlModel floorGqlModel = FloorMapper.MAPPER.toFloorModel(item);
return floorGqlModel;
}
return null;
}
}
package com.orhon.smartcampus.material.modules.management.fetcher;
import com.orhon.smartcampus.material.basicComponents.Result;
import com.orhon.smartcampus.material.modules.base.gqlModel.GQLPageParam;
import com.orhon.smartcampus.material.modules.base.mm.EnvArgsMapper;
import com.orhon.smartcampus.material.modules.management.dao.GoodsClassifyDao;
import com.orhon.smartcampus.material.modules.management.dao.RoomDao;
import com.orhon.smartcampus.material.modules.management.entity.GoodsClassify;
import com.orhon.smartcampus.material.modules.management.entity.RoomEntity;
import com.orhon.smartcampus.material.modules.management.gqlModel.GQLGoodsClassify;
import com.orhon.smartcampus.material.modules.management.gqlModel.RoomGqlModel;
import com.orhon.smartcampus.material.modules.management.mm.GoodsClassifyMapper;
import com.orhon.smartcampus.material.modules.management.mm.RoomMapper;
import com.orhon.smartcampus.material.utils.ObjectToMap;
import com.orhon.smartcampus.material.utils.Util;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.List;
@Component
public class SeleRoomListFetcher implements DataFetcher {
@Autowired
RoomDao roomDao;
@Override
public Object get(DataFetchingEnvironment env) throws Exception {
// + schoolId
String hql = "from RoomEntity";
GQLPageParam page = EnvArgsMapper.MAPPER.fromArgs(env);
if(env.containsArgument("condition")) {
HashMap<String,Object> map = ObjectToMap.to(env.getArgument("condition"));
if(map.get("id")!=null) {
hql += "and id " + Util.decide(map.get("id"));
}
if(map.get("room_name")!=null) {
hql += "and room_name " + Util.decide(map.get("unit_id"));
}
if(map.get("room_status")!=null) {
hql += "and room_status " + Util.decide(map.get("room_head"));
}
}
List<RoomEntity> list = roomDao.find(hql,null,page.getPage(),page.getLimit());
List<RoomGqlModel> gqlGoodsClassifies = RoomMapper.MAPPER.toRoomList(list);
Long total = 0L;
if (env.getSelectionSet().contains("total")){
total = roomDao.getTotalCount(hql);
}
return Result.ok().put("data", gqlGoodsClassifies).put("total", total);
}
}
package com.orhon.smartcampus.material.modules.management.fetcher;
import com.orhon.smartcampus.material.modules.management.dao.RoomDao;
import com.orhon.smartcampus.material.modules.management.dao.RootDao;
import com.orhon.smartcampus.material.modules.management.entity.RoomEntity;
import com.orhon.smartcampus.material.modules.management.entity.RootEntity;
import com.orhon.smartcampus.material.modules.management.gqlModel.GQLRootBeans;
import com.orhon.smartcampus.material.modules.management.gqlModel.RoomGqlModel;
import com.orhon.smartcampus.material.modules.management.mm.RoomMapper;
import com.orhon.smartcampus.material.modules.management.mm.RootBeanMapper;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class SeleRoomOnceFetcher implements DataFetcher {
@Autowired
RoomDao roomDao;
@Override
public Object get(DataFetchingEnvironment environment) throws Exception {
String hql = "from RoomEntity";
RoomEntity item = roomDao.findId(hql, null);
if(item!=null) {
RoomGqlModel goodsClassify = RoomMapper.MAPPER.toRoomModel(item);
return goodsClassify;
}
return null;
}
}
package com.orhon.smartcampus.material.modules.management.fetcher;
import com.orhon.smartcampus.material.basicComponents.Result;
import com.orhon.smartcampus.material.modules.base.gqlModel.GQLPageParam;
import com.orhon.smartcampus.material.modules.base.mm.EnvArgsMapper;
import com.orhon.smartcampus.material.modules.management.dao.GoodsClassifyDao;
import com.orhon.smartcampus.material.modules.management.dao.RootDao;
import com.orhon.smartcampus.material.modules.management.entity.GoodsClassify;
import com.orhon.smartcampus.material.modules.management.entity.RootEntity;
import com.orhon.smartcampus.material.modules.management.gqlModel.GQLGoodsClassify;
import com.orhon.smartcampus.material.modules.management.gqlModel.GQLRootBeans;
import com.orhon.smartcampus.material.modules.management.inputMapper.RootInputMapper;
import com.orhon.smartcampus.material.modules.management.mm.GoodsClassifyMapper;
import com.orhon.smartcampus.material.modules.management.mm.RootBeanMapper;
import com.orhon.smartcampus.material.utils.ObjectToMap;
import com.orhon.smartcampus.material.utils.Util;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.List;
@Component
public class SiteListFetcher implements DataFetcher {
@Autowired
RootDao rootDao;
@Override
public Object get(DataFetchingEnvironment env) throws Exception {
// + schoolId
String hql = "from RootEntity";
GQLPageParam page = EnvArgsMapper.MAPPER.fromArgs(env);
if(env.containsArgument("condition")) {
HashMap<String,Object> map = ObjectToMap.to(env.getArgument("condition"));
if(map.get("id")!=null) {
hql += "and id " + Util.decide(map.get("id"));
}
if(map.get("site_name")!=null) {
hql += "and site_name " + Util.decide(map.get("site_name"));
}
if(map.get("site_status")!=null) {
hql += "and site_status " + Util.decide(map.get("site_status"));
}
}
List<RootEntity> list = rootDao.find(hql,null,page.getPage(),page.getLimit());
// GQLGoodsClassify gqlGoodsClassify = null;
// if (env.getSelectionSet().contains("data/classify")){
// GoodsClassify goodsClassify = item.getBaseSchoolsBySchoolId();
// GgqlSchool = SchoolMapper.MAPPER.toSchool(schools);
// }
//
// GQLUnit gqlUnit=null;
// if (env.getSelectionSet().contains("data/unit")){
// Unit unit = item.getMaterialUnitByUnitId();
// gqlUnit = UnitMapper.MAPPER.toUnit(unit);
// }
//
// GQL floor = FloorMapper.MAPPER.toFloor(item);
// floor.setSchool(GgqlSchool);
// floor.setUnit(gqlUnit);
// GQLFloor.add(floor);
// List<GQLGoodsClassify> GQLFloor = new ArrayList<>();
//
// for (GQLGoodsClassify item : list) {
// // GQLGoodsClassify gqlGoodsClassify = GoodsClassifyMapper.MAPPER.toGoodsClassifyList(item);
// // GQLFloor.add(gqlGoodsClassify);
// }
List<GQLRootBeans> gqlGoodsClassifies = RootBeanMapper.MAPPER.toRootList(list);
Long total = 0L;
if (env.getSelectionSet().contains("total")){
total = rootDao.getTotalCount(hql);
}
return Result.ok().put("data", gqlGoodsClassifies).put("total", total);
}
}
...@@ -27,7 +27,7 @@ public class UnitListFetcher implements DataFetcher { ...@@ -27,7 +27,7 @@ public class UnitListFetcher implements DataFetcher {
public Object get(DataFetchingEnvironment env) throws Exception { public Object get(DataFetchingEnvironment env) throws Exception {
// + schoolId // + schoolId
String hql = "from Buildings"; String hql = "from Unit";
GQLPageParam page = EnvArgsMapper.MAPPER.fromArgs(env); GQLPageParam page = EnvArgsMapper.MAPPER.fromArgs(env);
......
...@@ -2,16 +2,22 @@ package com.orhon.smartcampus.material.modules.management.gqlInputModel; ...@@ -2,16 +2,22 @@ package com.orhon.smartcampus.material.modules.management.gqlInputModel;
import lombok.Data; import lombok.Data;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;
@Data @Data
public class GQLBuildingsInput { public class GQLBuildingsInput {
private Long id; private Long id;
private String buildings_name; private String buildings_name;
private String site_id; private Integer site_id;
private String buildings_units; private Integer buildings_units;
private String buildings_head;
private String buildings_introduce; private String buildings_introduce;
private int buildings_status; private Integer buildings_status;
private String buildings_head_id;
private String add_id; private String add_id;
private String school_id;
} }
package com.orhon.smartcampus.material.modules.management.gqlInputModel;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;
@Data
public class GQLFloorInput {
private Long id;
private Integer unit_id;
private String floor_name;
private String floor_head;
private Integer floor_status;
private String add_id;
}
...@@ -2,17 +2,16 @@ package com.orhon.smartcampus.material.modules.management.gqlInputModel; ...@@ -2,17 +2,16 @@ package com.orhon.smartcampus.material.modules.management.gqlInputModel;
import lombok.Data; import lombok.Data;
import javax.persistence.Column; import java.util.Date;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Data @Data
public class GQLGoodsClassifyInput { public class GQLGoodsClassifyInput {
private Long id; private Long id;
private Integer parent_id;
private String classify_name; private String classify_name;
private Integer classify_status; private Integer classify_status;
private Integer sort_order;
private String school_id; private String school_id;
private String add_id; private String add_id;
} }
...@@ -5,16 +5,17 @@ import lombok.Data; ...@@ -5,16 +5,17 @@ import lombok.Data;
@Data @Data
public class GQLGoodsManageInput { public class GQLGoodsManageInput {
private Long id; private Long id;
private Integer classify_id; private Integer classify_id;
private String goods_name; private String goods_name;
private String main_image; private String main_image;
private String sub_images; private String sub_images;
private String goods_number;
private Integer good_status;
private String goods_price; private String goods_price;
private String goods_number;
private Integer goods_stock; private Integer goods_stock;
private String userid; private String goods_note;
private String school_id; private Integer good_status;
private String add_id;
private String employ_time;
private String employ_department;
} }
package com.orhon.smartcampus.material.modules.management.gqlInputModel;
import lombok.Data;
@Data
public class GQLRoomInput {
private Long id;
private Integer floor_id;
private String room_head;
private Integer room_key;
private Integer room_number;
private String room_name;
private Integer room_status;
private String add_id;
}
package com.orhon.smartcampus.material.modules.management.gqlInputModel;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;
@Data
public class GQLRootInput {
private Long id;
private Integer parent_id;
private String site_name;
private String site_status;
private Integer sort_order;
private String school_id;
private String add_id;
}
...@@ -5,14 +5,12 @@ import lombok.Data; ...@@ -5,14 +5,12 @@ import lombok.Data;
@Data @Data
public class GQLUnitInput { public class GQLUnitInput {
private Long id; private Long id;
private String building_id; private Integer building_id;
private String head_id; private String unit_name;
private String unit_head;
private String floor_status; private String floor_status;
private String floor_number; private Integer floor_start;
private int floor_start; private Integer floor_end;
private String floor_end;
private String add_id; private String add_id;
private String school_id;
} }
package com.orhon.smartcampus.material.modules.management.gqlModel;
import lombok.Data;
import java.util.Date;
@Data
public class FloorGqlModel {
private Long id;
private Integer unit_id;
private String floor_name;
private String floor_head;
private Integer floor_status;
private String add_id;
private Date created_at;
private Date updated_at;
}
...@@ -2,16 +2,19 @@ package com.orhon.smartcampus.material.modules.management.gqlModel; ...@@ -2,16 +2,19 @@ package com.orhon.smartcampus.material.modules.management.gqlModel;
import lombok.Data; import lombok.Data;
import java.util.Date;
@Data @Data
public class GQLBuildings { public class GQLBuildings {
private Long id; private Long id;
private String buildings_name; private String buildings_name;
private String site_id; private Integer site_id;
private String buildings_units; private Integer buildings_units;
private String buildings_head;
private String buildings_introduce; private String buildings_introduce;
private int buildings_status; private Integer buildings_status;
private String buildings_head_id;
private String add_id; private String add_id;
private String school_id; private Date created_at;
private Date updated_at;
} }
...@@ -2,13 +2,19 @@ package com.orhon.smartcampus.material.modules.management.gqlModel; ...@@ -2,13 +2,19 @@ package com.orhon.smartcampus.material.modules.management.gqlModel;
import lombok.Data; import lombok.Data;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date; import java.util.Date;
@Data @Data
public class GQLGoodsClassify { public class GQLGoodsClassify {
private Long id; private Long id;
private Integer parent_id;
private String classify_name; private String classify_name;
private Integer classify_status; private Integer classify_status;
private Integer sort_order;
private String school_id; private String school_id;
private String add_id; private String add_id;
private Date created_at; private Date created_at;
......
...@@ -15,12 +15,14 @@ public class GQLGoodsManage { ...@@ -15,12 +15,14 @@ public class GQLGoodsManage {
private String goods_name; private String goods_name;
private String main_image; private String main_image;
private String sub_images; private String sub_images;
private String goods_number;
private Integer good_status;
private String goods_price; private String goods_price;
private String goods_number;
private Integer goods_stock; private Integer goods_stock;
private String userid; private String goods_note;
private String school_id; private Integer good_status;
private String add_id;
private String employ_time;
private String employ_department;
private Date created_at; private Date created_at;
private Date updated_at; private Date updated_at;
} }
package com.orhon.smartcampus.material.modules.management.gqlModel;
import lombok.Data;
import java.util.Date;
@Data
public class GQLRootBeans {
private Long id;
private Integer parent_id;
private String site_name;
private String site_status;
private Integer sort_order;
private String school_id;
private String add_id;
private Date created_at;
private Date updated_at;
}
...@@ -2,16 +2,18 @@ package com.orhon.smartcampus.material.modules.management.gqlModel; ...@@ -2,16 +2,18 @@ package com.orhon.smartcampus.material.modules.management.gqlModel;
import lombok.Data; import lombok.Data;
import java.util.Date;
@Data @Data
public class GQLUnit { public class GQLUnit {
private Long id; private Long id;
private String building_id; private Integer building_id;
private String head_id; private String unit_name;
private String unit_head;
private String floor_status; private String floor_status;
private String floor_number; private Integer floor_start;
private int floor_start; private Integer floor_end;
private String floor_end;
private String add_id; private String add_id;
private String school_id; private Date created_at;
private Date updated_at;
} }
package com.orhon.smartcampus.material.modules.management.gqlModel;
import lombok.Data;
import javax.persistence.Column;
import java.util.Date;
@Data
public class RoomGqlModel {
private Long id;
private Integer floor_id;
private String room_head;
private Integer room_key;
private Integer room_number;
private String room_name;
private Integer room_status;
private String add_id;
private Date created_at;
private Date updated_at;
}
package com.orhon.smartcampus.material.modules.management.inputMapper;
import com.alibaba.fastjson.JSON;
import com.orhon.smartcampus.material.basicComponents.ConvertHelper;
import com.orhon.smartcampus.material.modules.management.gqlInputModel.GQLFloorInput;
import com.orhon.smartcampus.material.modules.management.gqlInputModel.GQLRoomInput;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import java.util.Map;
@Mapper(uses = {
ConvertHelper.class
})
public interface FloomInputMapper {
FloomInputMapper MAPPER = Mappers.getMapper(FloomInputMapper.class);
default GQLFloorInput mapInput(final Map map){
String json = JSON.toJSONString(map);
GQLFloorInput input = JSON.parseObject(json , GQLFloorInput.class);
return input;
}
}
package com.orhon.smartcampus.material.modules.management.inputMapper;
import com.alibaba.fastjson.JSON;
import com.orhon.smartcampus.material.basicComponents.ConvertHelper;
import com.orhon.smartcampus.material.modules.management.gqlInputModel.GQLRoomInput;
import com.orhon.smartcampus.material.modules.management.gqlModel.GQLRootBeans;
import com.orhon.smartcampus.material.modules.management.gqlModel.RoomGqlModel;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import java.util.Map;
@Mapper(uses = {
ConvertHelper.class
})
public interface RoomInputMapper {
RoomInputMapper MAPPER = Mappers.getMapper(RoomInputMapper.class);
default GQLRoomInput mapInput(final Map map){
String json = JSON.toJSONString(map);
GQLRoomInput input = JSON.parseObject(json , GQLRoomInput.class);
return input;
}
}
package com.orhon.smartcampus.material.modules.management.inputMapper;
import com.alibaba.fastjson.JSON;
import com.orhon.smartcampus.material.basicComponents.ConvertHelper;
import com.orhon.smartcampus.material.modules.management.gqlInputModel.GQLGoodsClassifyInput;
import com.orhon.smartcampus.material.modules.management.gqlModel.GQLRootBeans;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import java.util.Map;
@Mapper(uses = {
ConvertHelper.class
})
public interface RootInputMapper {
RootInputMapper MAPPER = Mappers.getMapper(RootInputMapper.class);
default GQLRootBeans mapInput(final Map map){
String json = JSON.toJSONString(map);
GQLRootBeans input = JSON.parseObject(json , GQLRootBeans.class);
return input;
}
}
...@@ -24,13 +24,13 @@ public interface BuildingsMapper { ...@@ -24,13 +24,13 @@ public interface BuildingsMapper {
BuildingsMapper MAPPER = Mappers.getMapper(BuildingsMapper.class); BuildingsMapper MAPPER = Mappers.getMapper(BuildingsMapper.class);
@Mapping(source = "id" , target = "id") // @Mapping(source = "id" , target = "id")
@Mapping(source = "classify_name" , target = "classify_name") // @Mapping(source = "classify_name" , target = "classify_name")
@Mapping(source = "classify_status" , target = "classify_status") // @Mapping(source = "classify_status" , target = "classify_status")
@Mapping(source = "classify_campus_id" , target = "classify_campus_id") // @Mapping(source = "classify_campus_id" , target = "classify_campus_id")
@Mapping(source = "classify_userid" , target = "classify_userid") // @Mapping(source = "classify_userid" , target = "classify_userid")
@Mapping(source = "created_at" , target = "created_at") // @Mapping(source = "created_at" , target = "created_at")
@Mapping(source = "updated_at" , target = "updated_at") // @Mapping(source = "updated_at" , target = "updated_at")
GQLGoodsClassify toGoodsClassify(GoodsClassify entity); GQLGoodsClassify toGoodsClassify(GoodsClassify entity);
@InheritConfiguration(name = "toBuildings") @InheritConfiguration(name = "toBuildings")
......
package com.orhon.smartcampus.material.modules.management.mm;
import com.orhon.smartcampus.material.basicComponents.ConvertHelper;
import com.orhon.smartcampus.material.modules.management.entity.FloorEntity;
import com.orhon.smartcampus.material.modules.management.entity.RoomEntity;
import com.orhon.smartcampus.material.modules.management.gqlModel.FloorGqlModel;
import com.orhon.smartcampus.material.modules.management.gqlModel.RoomGqlModel;
import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import java.util.List;
@Mapper(
uses = {
ConvertHelper.class
}
)
public interface FloorMapper {
FloorMapper MAPPER = Mappers.getMapper(FloorMapper.class);
// @Mapping(source = "id" , target = "id")
// @Mapping(source = "unit_id" , target = "unit_id")
// @Mapping(source = "floor_number" , target = "floor_number")
// @Mapping(source = "floor_head" , target = "floor_head")
// @Mapping(source = "add_id" , target = "add_id")
// @Mapping(source = "created_at" , target = "created_at")
// @Mapping(source = "updated_at" , target = "updated_at")
FloorGqlModel toFloorModel(FloorEntity entity);
@InheritConfiguration(name = "toFloorList")
List<FloorGqlModel> toFloorList(List<FloorEntity> entities);
}
package com.orhon.smartcampus.material.modules.management.mm;
import com.orhon.smartcampus.material.basicComponents.ConvertHelper;
import com.orhon.smartcampus.material.modules.management.entity.RoomEntity;
import com.orhon.smartcampus.material.modules.management.entity.RootEntity;
import com.orhon.smartcampus.material.modules.management.gqlModel.GQLRootBeans;
import com.orhon.smartcampus.material.modules.management.gqlModel.RoomGqlModel;
import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import java.util.List;
@Mapper(
uses = {
ConvertHelper.class
}
)
public interface RoomMapper {
RoomMapper MAPPER = Mappers.getMapper(RoomMapper.class);
// @Mapping(source = "id" , target = "id")
// @Mapping(source = "unit_id" , target = "unit_id")
// @Mapping(source = "room_head" , target = "room_head")
// @Mapping(source = "room_number" , target = "room_number")
// @Mapping(source = "room_number_of" , target = "room_number_of")
// @Mapping(source = "room_list_name" , target = "room_list_name")
// @Mapping(source = "room_status" , target = "room_status")
// @Mapping(source = "add_id" , target = "add_id")
// @Mapping(source = "created_at" , target = "created_at")
// @Mapping(source = "updated_at" , target = "updated_at")
RoomGqlModel toRoomModel(RoomEntity entity);
@InheritConfiguration(name = "toRoomList")
List<RoomGqlModel> toRoomList(List<RoomEntity> entities);
}
package com.orhon.smartcampus.material.modules.management.mm;
import com.orhon.smartcampus.material.basicComponents.ConvertHelper;
import com.orhon.smartcampus.material.modules.management.entity.GoodsClassify;
import com.orhon.smartcampus.material.modules.management.entity.RootEntity;
import com.orhon.smartcampus.material.modules.management.gqlModel.GQLGoodsClassify;
import com.orhon.smartcampus.material.modules.management.gqlModel.GQLRootBeans;
import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import java.util.List;
@Mapper(
uses = {
ConvertHelper.class
}
)
public interface RootBeanMapper {
RootBeanMapper MAPPER = Mappers.getMapper(RootBeanMapper.class);
// @Mapping(source = "id" , target = "id")
// @Mapping(source = "site_name" , target = "site_name")
// @Mapping(source = "site_status" , target = "site_status")
// @Mapping(source = "school_id" , target = "school_id")
// @Mapping(source = "add_id" , target = "add_id")
// @Mapping(source = "created_at" , target = "created_at")
// @Mapping(source = "updated_at" , target = "updated_at")
GQLRootBeans toRootsClassify(RootEntity entity);
@InheritConfiguration(name = "toGoodsClassify")
List<GQLRootBeans> toRootList(List<RootEntity> entities);
}
...@@ -22,13 +22,13 @@ public interface UnitMapper { ...@@ -22,13 +22,13 @@ public interface UnitMapper {
UnitMapper MAPPER = Mappers.getMapper(UnitMapper.class); UnitMapper MAPPER = Mappers.getMapper(UnitMapper.class);
@Mapping(source = "id" , target = "id") // @Mapping(source = "id" , target = "id")
@Mapping(source = "classify_name" , target = "classify_name") // @Mapping(source = "classify_name" , target = "classify_name")
@Mapping(source = "classify_status" , target = "classify_status") // @Mapping(source = "classify_status" , target = "classify_status")
@Mapping(source = "classify_campus_id" , target = "classify_campus_id") // @Mapping(source = "classify_campus_id" , target = "classify_campus_id")
@Mapping(source = "classify_userid" , target = "classify_userid") // @Mapping(source = "classify_userid" , target = "classify_userid")
@Mapping(source = "created_at" , target = "created_at") // @Mapping(source = "created_at" , target = "created_at")
@Mapping(source = "updated_at" , target = "updated_at") // @Mapping(source = "updated_at" , target = "updated_at")
GQLGoodsClassify toGoodsClassify(GoodsClassify entity); GQLGoodsClassify toGoodsClassify(GoodsClassify entity);
@InheritConfiguration(name = "toUnit") @InheritConfiguration(name = "toUnit")
......
...@@ -52,18 +52,18 @@ public class AddBuildingsMutation implements DataFetcher { ...@@ -52,18 +52,18 @@ public class AddBuildingsMutation implements DataFetcher {
if(input.getBuildings_units() != null){ if(input.getBuildings_units() != null){
buildings.setBuildings_units(input.getBuildings_units()); buildings.setBuildings_units(input.getBuildings_units());
} }
if(input.getBuildings_head() != null){
buildings.setBuildings_head(input.getBuildings_head());
}
if(input.getBuildings_introduce()!= null){ if(input.getBuildings_introduce()!= null){
buildings.setBuildings_introduce(input.getBuildings_introduce()); buildings.setBuildings_introduce(input.getBuildings_introduce());
} }
if(input.getBuildings_head_id() != null){ if(input.getBuildings_status() != null){
buildings.setBuildings_head_id(input.getBuildings_head_id()); buildings.setBuildings_status(input.getBuildings_status());
} }
if(input.getAdd_id() != null){ if(input.getAdd_id() != null){
buildings.setAdd_id(input.getAdd_id()); buildings.setAdd_id(input.getAdd_id());
} }
if(input.getSchool_id() != null){
buildings.setSchool_id(input.getSchool_id());
}
try { try {
buildingsDao.saveOrUpdate(buildings); buildingsDao.saveOrUpdate(buildings);
} catch (Exception e) { } catch (Exception e) {
......
package com.orhon.smartcampus.material.modules.management.mutation;
import com.orhon.smartcampus.material.basicComponents.Result;
import com.orhon.smartcampus.material.modules.management.dao.FloorDao;
import com.orhon.smartcampus.material.modules.management.dao.RoomDao;
import com.orhon.smartcampus.material.modules.management.entity.FloorEntity;
import com.orhon.smartcampus.material.modules.management.entity.RoomEntity;
import com.orhon.smartcampus.material.modules.management.gqlInputModel.GQLFloorInput;
import com.orhon.smartcampus.material.modules.management.gqlInputModel.GQLRoomInput;
import com.orhon.smartcampus.material.modules.management.inputMapper.FloomInputMapper;
import com.orhon.smartcampus.material.modules.management.inputMapper.RoomInputMapper;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Date;
@Component
public class AddFloorMutation implements DataFetcher {
@Autowired
FloorDao floorDao;
/**
* Room管理添加
* editor : ths
*/
@Override
public Object get(DataFetchingEnvironment environment) throws Exception {
//String token = (String) SecurityUtils.getSubject().getPrincipal();
GQLFloorInput input = FloomInputMapper.MAPPER.mapInput(environment.getArgument("inputData"));
FloorEntity roomEntity = null;
if (input.getId() != null) {
roomEntity = floorDao.get(FloorEntity.class, input.getId());
roomEntity.setUpdated_at(new Date());
} else {
roomEntity = new FloorEntity();
roomEntity.setCreated_at(new Date());
}
if(input.getUnit_id() != null){
roomEntity.setUnit_id(input.getUnit_id());
}
if(input.getFloor_name() != null){
roomEntity.setFloor_name(input.getFloor_name());
}
if(input.getFloor_head() != null){
roomEntity.setFloor_head(input.getFloor_head());
}
if(input.getFloor_status() != null){
roomEntity.setFloor_status(input.getFloor_status());
}
if(input.getAdd_id() != null){
roomEntity.setAdd_id(input.getAdd_id());
}
try {
floorDao.saveOrUpdate(roomEntity);
} catch (Exception e) {
return Result.error(500, "" + e);
}
return Result.ok();
}
}
...@@ -40,20 +40,22 @@ public class AddGoodsClassifyMutation implements DataFetcher { ...@@ -40,20 +40,22 @@ public class AddGoodsClassifyMutation implements DataFetcher {
goodsClassify = new GoodsClassify(); goodsClassify = new GoodsClassify();
goodsClassify.setCreated_at(new Date()); goodsClassify.setCreated_at(new Date());
} }
if(input.getParent_id() != null){
goodsClassify.setParent_id(input.getParent_id());
}
if(input.getClassify_name() != null){ if(input.getClassify_name() != null){
goodsClassify.setClassify_name(input.getClassify_name()); goodsClassify.setClassify_name(input.getClassify_name());
} }
if(input.getSchool_id() != null){
goodsClassify.setSchool_id(input.getSchool_id());
}
if(input.getClassify_status() != null){ if(input.getClassify_status() != null){
goodsClassify.setClassify_status(input.getClassify_status()); goodsClassify.setClassify_status(input.getClassify_status());
} }
if(input.getSort_order() != null){
goodsClassify.setSort_order(input.getSort_order());
}
if(input.getSchool_id() != null){
goodsClassify.setSchool_id(input.getSchool_id());
}
if(input.getAdd_id() != null){ if(input.getAdd_id() != null){
goodsClassify.setAdd_id(JSON.toJSONString(input.getAdd_id())); goodsClassify.setAdd_id(JSON.toJSONString(input.getAdd_id()));
} }
try { try {
......
...@@ -53,23 +53,29 @@ public class AddGoodsManageMutation implements DataFetcher { ...@@ -53,23 +53,29 @@ public class AddGoodsManageMutation implements DataFetcher {
if(input.getMain_image() != null){ if(input.getMain_image() != null){
goodsManage.setMain_image(input.getMain_image()); goodsManage.setMain_image(input.getMain_image());
} }
if(input.getGoods_price() != null){
goodsManage.setGoods_price(input.getGoods_price());
}
if(input.getGoods_number() != null){ if(input.getGoods_number() != null){
goodsManage.setGoods_number(input.getGoods_number()); goodsManage.setGoods_number(input.getGoods_number());
} }
if(input.getGoods_stock() != null){
goodsManage.setGoods_price(input.getGoods_price());
}
if(input.getGoods_note() != null){
goodsManage.setGoods_note(input.getGoods_note());
}
if(input.getGood_status() != null){ if(input.getGood_status() != null){
goodsManage.setGood_status(input.getGood_status()); goodsManage.setGood_status(input.getGood_status());
} }
if(input.getGoods_price() != null){ if(input.getAdd_id() != null){
goodsManage.setGoods_price(input.getGoods_price()); goodsManage.setAdd_id(input.getAdd_id());
}
if(input.getGoods_stock() != null){
goodsManage.setGoods_price(input.getGoods_price());
} }
if(input.getUserid() != null){ if(input.getEmploy_time() != null){
goodsManage.setUserid(input.getUserid()); goodsManage.setEmploy_time(input.getEmploy_time());
} }
if(input.getSchool_id() != null){ if(input.getEmploy_department() != null){
goodsManage.setSchool_id(input.getSchool_id()); goodsManage.setEmploy_department(input.getEmploy_department());
} }
try { try {
goodsManageDao.saveOrUpdate(goodsManage); goodsManageDao.saveOrUpdate(goodsManage);
......
package com.orhon.smartcampus.material.modules.management.mutation;
import com.alibaba.fastjson.JSON;
import com.orhon.smartcampus.material.basicComponents.Result;
import com.orhon.smartcampus.material.modules.management.dao.GoodsClassifyDao;
import com.orhon.smartcampus.material.modules.management.dao.RoomDao;
import com.orhon.smartcampus.material.modules.management.entity.GoodsClassify;
import com.orhon.smartcampus.material.modules.management.entity.RoomEntity;
import com.orhon.smartcampus.material.modules.management.gqlInputModel.GQLGoodsClassifyInput;
import com.orhon.smartcampus.material.modules.management.gqlInputModel.GQLRoomInput;
import com.orhon.smartcampus.material.modules.management.inputMapper.GoodsClassifyInputMapper;
import com.orhon.smartcampus.material.modules.management.inputMapper.RoomInputMapper;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Date;
@Component
public class AddRoomMutation implements DataFetcher {
@Autowired
RoomDao roomDao;
/**
* Room管理添加
* editor : ths
*/
@Override
public Object get(DataFetchingEnvironment environment) throws Exception {
//String token = (String) SecurityUtils.getSubject().getPrincipal();
GQLRoomInput input = RoomInputMapper.MAPPER.mapInput(environment.getArgument("inputData"));
RoomEntity roomEntity = null;
if (input.getId() != null) {
roomEntity = roomDao.get(RoomEntity.class, input.getId());
roomEntity.setUpdated_at(new Date());
} else {
roomEntity = new RoomEntity();
roomEntity.setCreated_at(new Date());
}
if(input.getFloor_id() != null){
roomEntity.setFloor_id(input.getFloor_id());
}
if(input.getRoom_head() != null){
roomEntity.setRoom_head(input.getRoom_head());
}
if(input.getRoom_key() != null){
roomEntity.setRoom_key(input.getRoom_key());
}
if(input.getRoom_number() != null){
roomEntity.setRoom_number(input.getRoom_number());
}
if(input.getRoom_name() != null){
roomEntity.setRoom_name(input.getRoom_name());
}
if(input.getRoom_status() != null){
roomEntity.setRoom_status(input.getRoom_status());
}
if(input.getAdd_id() != null){
roomEntity.setAdd_id(input.getAdd_id());
}
try {
roomDao.saveOrUpdate(roomEntity);
} catch (Exception e) {
return Result.error(500, "" + e);
}
return Result.ok();
}
}
package com.orhon.smartcampus.material.modules.management.mutation;
import com.alibaba.fastjson.JSON;
import com.orhon.smartcampus.material.basicComponents.Result;
import com.orhon.smartcampus.material.modules.management.dao.GoodsClassifyDao;
import com.orhon.smartcampus.material.modules.management.dao.RootDao;
import com.orhon.smartcampus.material.modules.management.entity.GoodsClassify;
import com.orhon.smartcampus.material.modules.management.entity.RootEntity;
import com.orhon.smartcampus.material.modules.management.gqlInputModel.GQLGoodsClassifyInput;
import com.orhon.smartcampus.material.modules.management.gqlInputModel.GQLRootInput;
import com.orhon.smartcampus.material.modules.management.gqlModel.GQLRootBeans;
import com.orhon.smartcampus.material.modules.management.inputMapper.GoodsClassifyInputMapper;
import com.orhon.smartcampus.material.modules.management.inputMapper.RootInputMapper;
import com.orhon.smartcampus.material.utils.ObjectToMap;
import com.orhon.smartcampus.material.utils.Util;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@Component
public class AddRootSiteMutation implements DataFetcher {
@Autowired
RootDao rootDao;
/**
* 楼层管理
* editor : ths
*/
@Override
public Object get(DataFetchingEnvironment environment) throws Exception {
//String token = (String) SecurityUtils.getSubject().getPrincipal();
// try {
// GQLRootBeans input = RootInputMapper.MAPPER.mapInput(environment.getArgument("inputData"));
// String hql = "from RootEntity as site where 1=1";
// RootEntity goodsClassify = null;
// if(environment.containsArgument("inputData")){
// HashMap<String,Object> map = ObjectToMap.to(environment.getArgument("inputData"));
// if(map.get("site_name")!=null){
// hql+= "and site.site_name" + Util.decide(map.get("site_name"));
// }
// if(map.get("school_id")!=null){
// hql+= "and site.school_id" + Util.decide(map.get("school_id"));
// }
// if(map.get("add_id")!=null){
// hql+= "and site.add_id" + Util.decide(map.get("add_id"));
// }
// }
// List<RootEntity> rootEntityList = rootDao.find(hql,null);
// if(rootEntityList==null||rootEntityList.size()<=0){
// goodsClassify = rootEntityList.get(0);
// goodsClassify.setUpdated_at(new Date());
// }else{
// goodsClassify = new RootEntity();
// goodsClassify.setCreated_at(new Date());
// }
// if(!String.valueOf(input.getSchool_id()).equals("null")){
// goodsClassify.setSchool_id(input.getSchool_id());
// }
// if(!String.valueOf(input.getAdd_id()).equals("null")){
// goodsClassify.setAdd_id(input.getAdd_id());
// }
// if(!String.valueOf(input.getSite_name()).equals("null")){
// goodsClassify.setSite_name(input.getSite_name());
// }
// if(input.getSite_status() != null){
// goodsClassify.setSite_status(input.getSite_status());
// }
// rootDao.saveOrUpdate(goodsClassify);
// } catch (Exception e) {
// return Result.error(500, "" + e);
// }
GQLRootBeans input = RootInputMapper.MAPPER.mapInput(environment.getArgument("inputData"));
RootEntity rootEntity = null;
if (input.getId() != null) {
rootEntity = rootDao.get(RootEntity.class, input.getId());
rootEntity.setUpdated_at(new Date());
} else {
rootEntity = new RootEntity();
rootEntity.setCreated_at(new Date());
}
if(input.getParent_id() != null){
rootEntity.setParent_id(input.getParent_id());
}
if(input.getSite_name() != null){
rootEntity.setSite_name(input.getSite_name());
}
if(input.getSite_status() != null){
rootEntity.setSite_status(input.getSite_status());
}
if(input.getSort_order() != null){
rootEntity.setSort_order(input.getSort_order());
}
if(input.getSchool_id() != null){
rootEntity.setSchool_id(input.getSchool_id());
}
if(input.getAdd_id() != null){
rootEntity.setAdd_id(JSON.toJSONString(input.getAdd_id()));
}
try {
rootDao.saveOrUpdate(rootEntity);
} catch (Exception e) {
return Result.error(500, "" + e);
}
return Result.ok();
}
}
...@@ -46,21 +46,21 @@ public class AddUnitMutation implements DataFetcher { ...@@ -46,21 +46,21 @@ public class AddUnitMutation implements DataFetcher {
if(input.getBuilding_id() != null){ if(input.getBuilding_id() != null){
unit.setBuilding_id(input.getBuilding_id()); unit.setBuilding_id(input.getBuilding_id());
} }
if(input.getHead_id() != null){ if(input.getUnit_name() != null){
unit.setHead_id(input.getHead_id()); unit.setUnit_name(input.getUnit_name());
} }
if(input.getFloor_status() != null){ if(input.getFloor_status() != null){
unit.setFloor_status(input.getFloor_status()); unit.setFloor_status(input.getFloor_status());
} }
if(input.getFloor_number()!= null){ if(input.getFloor_start()!= null){
unit.setFloor_number(input.getFloor_number()); unit.setFloor_start(input.getFloor_start());
}
if(input.getFloor_end() != null){
unit.setFloor_end(input.getFloor_end());
} }
if(input.getAdd_id() != null){ if(input.getAdd_id() != null){
unit.setAdd_id(input.getAdd_id()); unit.setAdd_id(input.getAdd_id());
} }
if(input.getSchool_id() != null){
unit.setSchool_id(input.getSchool_id());
}
try { try {
unitDao.saveOrUpdate(unit); unitDao.saveOrUpdate(unit);
} catch (Exception e) { } catch (Exception e) {
......
spring: spring:
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
#url: jdbc:mysql://39.104.181.104:3311/smartcloud?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=true url: jdbc:mysql://39.104.181.104:3311/smartcloud?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=true
url: jdbc:mysql://localhost:3306/material?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=true #url: jdbc:mysql://192.168.2.117:3306/material?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=true
username: root username: root
password: weixuanhe2233 password: SmartCampusDB7893
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
#最大活跃数 #最大活跃数
maxActive: 20 maxActive: 20
......
input MaterialFloorAdd{
id:Int
unit_id:Int
floor_name:String
floor_head:String
floor_status:Int
add_id:String
}
type MaterialFloorListResult {
code:Int
msg:String
data:[MaterialFloorResultType]
total:Int
}
type MaterialFloorBean{
id:Int
"单元ID"
unit_id:Int
"楼层名称"
floor_name:String
"楼层负责人"
floor_head:String
"楼层状态"
floor_status:Int
"添加人ID"
add_id:String
created_at:Date
updated_at:Date
}
type MaterialFloorResultType{
id:Int
unit_id:Int
floor_name:String
floor_head:String
floor_status:Int
add_id:String
created_at:Date
updated_at:Date
}
input MaterialFloorResult{
id:Int
floor_name:String
floor_status:Int
}
\ No newline at end of file
#物品分类 #物品分类
type GoodsClassify { type GoodsClassify {
id:Int id:Int
"父类ID"
parent_id:Int
"分类名称"
classify_name:String classify_name:String
"分类状态"
classify_status:Int classify_status:Int
"排序"
sort_order:Int
"校区ID"
school_id:String school_id:String
"添加人"
add_id:String add_id:String
"创建时间"
created_at:Date created_at:Date
"更新时间"
updated_at:Date updated_at:Date
} }
input GoodsClassifyInput { input GoodsClassifyInput {
id:Int id:Int
parent_id:Int
classify_name:String classify_name:String
classify_status:Int classify_status:Int
sort_order:Int
school_id:String school_id:String
add_id:String add_id:String
} }
...@@ -20,11 +32,6 @@ input GoodsClassifyCondition { ...@@ -20,11 +32,6 @@ input GoodsClassifyCondition {
id:Int id:Int
classify_name:String classify_name:String
classify_status:Int classify_status:Int
code:String
school_id:String
add_id:String
created_at:Date
updated_at:Date
} }
type GoodsClassifyResponse { type GoodsClassifyResponse {
code:Int code:Int
...@@ -35,16 +42,30 @@ type GoodsClassifyResponse { ...@@ -35,16 +42,30 @@ type GoodsClassifyResponse {
#物品管理 #物品管理
type GoodsManage { type GoodsManage {
id:Int id:Int
"分类ID"
classify_id:Int classify_id:Int
"物品名称"
goods_name:String goods_name:String
"图片地址"
main_image:String main_image:String
"图片地址扩展用"
sub_images:String sub_images:String
goods_number:String "价格"
good_status:Int
goods_price:String goods_price:String
"物品编码"
goods_number:String
"物品库存"
goods_stock:Int goods_stock:Int
userid:String "物品备注"
school_id:String goods_note:String
"物品状态"
good_status:Int
"添加人"
add_id:String
"使用期限"
employ_time:String
"使用部门扩展用"
employ_department:String
created_at:Date created_at:Date
updated_at:Date updated_at:Date
} }
...@@ -55,21 +76,19 @@ input GoodsManageInput { ...@@ -55,21 +76,19 @@ input GoodsManageInput {
goods_name:String goods_name:String
main_image:String main_image:String
sub_images:String sub_images:String
goods_number:String
good_status:Int
goods_price:String goods_price:String
goods_number:String
goods_stock:Int goods_stock:Int
userid:String goods_note:String
school_id:String good_status:Int
add_id:String
employ_time:String
employ_department:String
} }
input GoodsManageCondition { input GoodsManageCondition {
id:Int id:Int
code:String goods_name:String
userid:String good_status:Int
school_id:String
classify_id:Int
created_at:Date
updated_at:Date
} }
type GoodsManageResponse { type GoodsManageResponse {
code:Int code:Int
...@@ -80,14 +99,20 @@ type GoodsManageResponse { ...@@ -80,14 +99,20 @@ type GoodsManageResponse {
#楼宇管理 #楼宇管理
type Buildings { type Buildings {
id:Int id:Int
"楼宇名称"
buildings_name:String buildings_name:String
site_id:String "场地ID"
buildings_units:String site_id:Int
"楼宇单元数量"
buildings_units:Int
"楼宇负责人"
buildings_head:String
"楼宇介绍"
buildings_introduce:String buildings_introduce:String
"楼宇状态"
buildings_status:Int buildings_status:Int
buildings_head_id:String "添加人"
add_id:String add_id:String
school_id:String
created_at:Date created_at:Date
updated_at:Date updated_at:Date
} }
...@@ -95,27 +120,65 @@ type Buildings { ...@@ -95,27 +120,65 @@ type Buildings {
input BuildingsInput { input BuildingsInput {
id:Int id:Int
buildings_name:String buildings_name:String
site_id:String site_id:Int
buildings_units:String buildings_units:Int
buildings_head:String
buildings_introduce:String buildings_introduce:String
buildings_status:Int buildings_status:Int
buildings_head_id:String
add_id:String add_id:String
school_id:String
} }
input BuildingsCondition { input BuildingsCondition {
id:Int id:Int
code:String
buildings_name:String buildings_name:String
site_id:String buildings_status:Int
}
type BuildingsResponse {
code:Int
msg:String
data:[Buildings]
total:Int
}
#单元管理
type Unit {
id:Int
"楼宇ID"
building_id:Int
"单元名称"
unit_name:String
"单元负责人"
unit_head:String
"单元状态"
unit_status:String
"楼层区间开始"
floor_start:Int
"楼层区间结束"
floor_end:Int
"添加人"
add_id:String add_id:String
school_id:String
created_at:Date created_at:Date
updated_at:Date updated_at:Date
} }
type BuildingsResponse {
input UnitInput {
id:Int
building_id:Int
unit_name:String
unit_head:String
floor_status:String
floor_start:Int
floor_end:Int
add_id:String
}
input UnitCondition {
id:Int
unit_name:String
buildings_status:Int
}
type UnitResponse {
code:Int code:Int
msg:String msg:String
data:[Buildings] data:[Unit]
total:Int total:Int
} }
\ No newline at end of file
input MaterialRoomAdd{
id:Int
floor_id:Int
room_head:String
room_key:Int
room_number:Int
room_name:String
room_status:Int
add_id:String
}
type MaterialRoomListResult {
code:Int
msg:String
data:[MaterialRoomResultType]
total:Int
}
type MaterialRoomBean{
id:Int
"楼层ID"
floor_id:Int
"房间负责人"
room_head:String
"房间钥匙数量"
room_key:Int
"房间人数"
room_number:Int
"房间人数名称"
room_name:String
"房间状态"
room_status:Int
"添加人ID"
add_id:String
created_at:Date
updated_at:Date
}
type MaterialRoomResultType{
id:Int
floor_id:Int
room_head:String
room_key:Int
room_number:Int
room_name:String
room_status:Int
add_id:String
created_at:Date
updated_at:Date
}
input MaterialRoomResult{
id:Int
room_name:String
room_status:Int
}
\ No newline at end of file
type Query { type Query{
query:Query query:Query
hello(a:SubjectType):String hello(a:SubjectType):String
...@@ -8,25 +8,44 @@ type Query { ...@@ -8,25 +8,44 @@ type Query {
#物品管理 #物品管理
GoodsManages(page:Int,limit:Int,condition: GoodsManageCondition):GoodsManageResponse GoodsManages(page:Int,limit:Int,condition: GoodsManageCondition):GoodsManageResponse
GoodsManage(id:Int!):GoodsManage GoodsManage(id:Int!):GoodsManage
#场地查询
SeleSite(id:Int!):MaterialSiteResultType
SeleSites(page:Int,limit:Int,condition: MaterialSiteResult):MaterialSiteListResult
#楼宇管理 #楼宇管理
BuildingsList(page:Int,limit:Int,condition: BuildingsCondition):BuildingsResponse BuildingsList(page:Int,limit:Int,condition: BuildingsCondition):BuildingsResponse
Buildings(id:Int!):Buildings Buildings(id:Int!):Buildings
#单元管理
UnitList(page:Int,limit:Int,condition: UnitCondition):UnitResponse
Unit(id:Int!):Unit
#Floor查询
SeleFloor(id:Int!):MaterialFloorResultType
SeleFloors(page:Int,limit:Int,condition: MaterialFloorResult):MaterialFloorListResult
#Room查询
SeleRoom(id:Int!):MaterialRoomResultType
SeleRooms(page:Int,limit:Int,condition: MaterialRoomAdd):MaterialRoomListResult
} }
input MessageInput{ type Mutation{
hello:String
}
type Mutation {
#物品分类 #物品分类
addGoodsClassify(inputData:GoodsClassifyInput): GoodsClassifyResponse addGoodsClassify(inputData:GoodsClassifyInput): GoodsClassifyResponse
#物品管理 #物品管理
addGoodsManage(inputData:GoodsManageInput): GoodsManageResponse addGoodsManage(inputData:GoodsManageInput): GoodsManageResponse
#场地添加
addMaterialSiteAdds(inputData:MaterialSiteAdd):NormalResponse
#楼宇管理 #楼宇管理
addBuildings(inputData:BuildingsInput): BuildingsResponse addBuildings(inputData:BuildingsInput): BuildingsResponse
#单元管理
addUnit(inputData:UnitInput): UnitResponse
#Floor添加
addMaterialFloorAdds(inputData:MaterialFloorAdd):NormalResponse
#Room添加
addMaterialRoomAdds(inputData:MaterialRoomAdd):NormalResponse
} }
input MaterialSiteAdd{
id:Int
parent_id:Int
site_name:String
site_status:String
sort_order:Int
school_id:String
add_id:String
}
type MaterialSiteListResult {
code:Int
msg:String
data:[MaterialSiteResultType]
total:Int
}
type MaterialSiteBean{
id:Int
"分类ID"
parent_id:Int
"场地名称"
site_name:String
"场地状态"
site_status:String
"排序"
sort_order:Int
"学校ID"
school_id:String
"添加人ID"
add_id:String
created_at:Date
updated_at:Date
}
type MaterialSiteResultType{
id:Int
parent_id:Int
site_name:String
site_status:String
sort_order:Int
school_id:String
add_id:String
created_at:Date
updated_at:Date
}
input MaterialSiteResult{
id:Int
site_name:String
site_status:Int
}
\ No newline at end of file
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