Commit 1200c03f authored by tianchao's avatar tianchao

1.菜单保存

2.组织机构保存
parent 37824bee
...@@ -98,7 +98,7 @@ public class SysMenuEnt implements Serializable { ...@@ -98,7 +98,7 @@ public class SysMenuEnt implements Serializable {
@XText("描述") @XText("描述")
@TableField @TableField
private String describe; private String menuDescribe;
@XText("应用场景(0:PC, 1:APP)") @XText("应用场景(0:PC, 1:APP)")
@TableField @TableField
...@@ -124,12 +124,12 @@ public class SysMenuEnt implements Serializable { ...@@ -124,12 +124,12 @@ public class SysMenuEnt implements Serializable {
this.showChildren = showChildren; this.showChildren = showChildren;
} }
public String getDescribe() { public String getMenuDescribe() {
return describe; return menuDescribe;
} }
public void setDescribe(String describe) { public void setMenuDescribe(String menuDescribe) {
this.describe = describe; this.menuDescribe = menuDescribe;
} }
public String getMediaType() { public String getMediaType() {
......
...@@ -101,7 +101,7 @@ public class SysMenuView implements Serializable { ...@@ -101,7 +101,7 @@ public class SysMenuView implements Serializable {
@XText("描述") @XText("描述")
@TableField @TableField
private String describe; private String menuDescribe;
@XText("填报进展配置表id") @XText("填报进展配置表id")
@Transient @Transient
...@@ -156,12 +156,16 @@ public class SysMenuView implements Serializable { ...@@ -156,12 +156,16 @@ public class SysMenuView implements Serializable {
this.showChildren = showChildren; this.showChildren = showChildren;
} }
public String getDescribe() { public boolean isShowChildren() {
return describe; return showChildren;
}
public String getMenuDescribe() {
return menuDescribe;
} }
public void setDescribe(String describe) { public void setMenuDescribe(String menuDescribe) {
this.describe = describe; this.menuDescribe = menuDescribe;
} }
public String getMediaAllType() { public String getMediaAllType() {
......
...@@ -136,7 +136,7 @@ public class SysDictionaryServiceImpl implements SystemDictionaryService { ...@@ -136,7 +136,7 @@ public class SysDictionaryServiceImpl implements SystemDictionaryService {
} }
} }
} }
if(ObjectUtils.isNotEmpty(sysDictionaryEnt.getIsOrg()) && sysDictionaryEnt.getIsOrg() == 1){ if(sysDictionaryEnt != null && ObjectUtils.isNotEmpty(sysDictionaryEnt.getIsOrg()) && sysDictionaryEnt.getIsOrg() == 1){
//查询当前登录人的组织机构层级路径 //查询当前登录人的组织机构层级路径
QueryWrapper<SysOrganizationRelEnt> queryOrgRel = new QueryWrapper<>(); QueryWrapper<SysOrganizationRelEnt> queryOrgRel = new QueryWrapper<>();
queryOrgRel.lambda().eq(SysOrganizationRelEnt::getOuId,input.getOuId()) queryOrgRel.lambda().eq(SysOrganizationRelEnt::getOuId,input.getOuId())
......
...@@ -599,6 +599,7 @@ public class SysMenuService { ...@@ -599,6 +599,7 @@ public class SysMenuService {
entity.setCreateByName(session.getUserName()); entity.setCreateByName(session.getUserName());
} }
entity.setMediaType("ALL");
entity.setShowChildren(false); entity.setShowChildren(false);
mapper.insert(entity); mapper.insert(entity);
......
...@@ -961,7 +961,7 @@ public class SysOrganizationService { ...@@ -961,7 +961,7 @@ public class SysOrganizationService {
insertSysOrganizationRel(context,date,uuid,input.getParentOuId(),input.getSort(),session); insertSysOrganizationRel(context,date,uuid,input.getParentOuId(),input.getSort(),session);
//新增组织机构属性表 //新增组织机构属性表
insertSysOrganizationProperty(context,date,uuid,input.getMediaType(),session); insertSysOrganizationProperty(context,date,input.getId(),"GAS",session);
//更新缓存中组织机构树 //更新缓存中组织机构树
selectSysOrganizationTree(context, new GetSysOrganizationInput()); selectSysOrganizationTree(context, new GetSysOrganizationInput());
...@@ -1083,41 +1083,41 @@ public class SysOrganizationService { ...@@ -1083,41 +1083,41 @@ public class SysOrganizationService {
} }
propertyMapper.updateById(sysOrganizationPropertyEnt); propertyMapper.updateById(sysOrganizationPropertyEnt);
}); });
insertSysOrganizationProperty(context,date,input.getId(),"GAS",session);
if (XStringUtils.isNotEmpty(input.getMediaType())){ // if (XStringUtils.isNotEmpty(input.getMediaType())){
String[] split = input.getMediaType().split(","); // String[] split = input.getMediaType().split(",");
StringBuilder builder = new StringBuilder(); // StringBuilder builder = new StringBuilder();
for (String mediaType : split) { // for (String mediaType : split) {
//用来判断库中是否存在选中的介质类型 // //用来判断库中是否存在选中的介质类型
int record=0; // int record=0;
for (SysOrganizationPropertyEnt propertyEntity : propertyEntitys) { // for (SysOrganizationPropertyEnt propertyEntity : propertyEntitys) {
//如果页面和库中的介质类型相等的话改为有效 // //如果页面和库中的介质类型相等的话改为有效
if (mediaType.equals(propertyEntity.getPropertyValue())){ // if (mediaType.equals(propertyEntity.getPropertyValue())){
record+=1; // record+=1;
//介质类型 // //介质类型
//propertyEntity.setPropertyValue(input.getMediumType()); // //propertyEntity.setPropertyValue(input.getMediumType());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String datetime="9999-12-31"; // String datetime="9999-12-31";
try { // try {
propertyEntity.setEndTime(sdf.parse(datetime)); // propertyEntity.setEndTime(sdf.parse(datetime));
} catch (ParseException e) { // } catch (ParseException e) {
e.printStackTrace(); // e.printStackTrace();
} // }
propertyMapper.updateById(propertyEntity); // propertyMapper.updateById(propertyEntity);
} // }
} // }
if (record ==0){ // if (record ==0){
builder.append(","); // builder.append(",");
builder.append(mediaType); // builder.append(mediaType);
//
} // }
} // }
if (builder.length()>0){ // if (builder.length()>0){
//新增组织机构属性表 // //新增组织机构属性表
String mediaType = builder.substring(1); // String mediaType = builder.substring(1);
insertSysOrganizationProperty(context,date,input.getId(),mediaType,session); //
} // }
} // }
}catch (Exception e){ }catch (Exception e){
throw new XServiceException(e); throw new XServiceException(e);
......
...@@ -64,7 +64,7 @@ public class CreateSysMenuInput { ...@@ -64,7 +64,7 @@ public class CreateSysMenuInput {
private String level; private String level;
@XText("描述") @XText("描述")
private String describe; private String menuDescribe;
@XText("是否展开") @XText("是否展开")
private boolean showChildren; private boolean showChildren;
...@@ -106,12 +106,12 @@ public class CreateSysMenuInput { ...@@ -106,12 +106,12 @@ public class CreateSysMenuInput {
this.showChildren = showChildren; this.showChildren = showChildren;
} }
public String getDescribe() { public String getMenuDescribe() {
return describe; return menuDescribe;
} }
public void setDescribe(String describe) { public void setMenuDescribe(String menuDescribe) {
this.describe = describe; this.menuDescribe = menuDescribe;
} }
public String getMediaType() { public String getMediaType() {
......
...@@ -62,7 +62,7 @@ public class GetSysMenuInput { ...@@ -62,7 +62,7 @@ public class GetSysMenuInput {
@XText("介质类型(字典)") @XText("介质类型(字典)")
@TableField @TableField
private String mediaType; private String menuDescribe;
@XText("菜单级别") @XText("菜单级别")
@TableField @TableField
...@@ -109,12 +109,12 @@ public class GetSysMenuInput { ...@@ -109,12 +109,12 @@ public class GetSysMenuInput {
this.oilGasType = oilGasType; this.oilGasType = oilGasType;
} }
public String getMediaType() { public String getMenuDescribe() {
return mediaType; return menuDescribe;
} }
public void setMediaType(String mediaType) { public void setMenuDescribe(String menuDescribe) {
this.mediaType = mediaType; this.menuDescribe = menuDescribe;
} }
public String getLevel() { public String getLevel() {
......
...@@ -53,7 +53,7 @@ public class QuerySysMenuOutputTree { ...@@ -53,7 +53,7 @@ public class QuerySysMenuOutputTree {
@XText("菜单级别") @XText("菜单级别")
private String level; private String level;
@XText("描述") @XText("描述")
private String describe; private String menuDescribe;
@XText("是否展开") @XText("是否展开")
...@@ -97,12 +97,12 @@ public class QuerySysMenuOutputTree { ...@@ -97,12 +97,12 @@ public class QuerySysMenuOutputTree {
this.showChildren = showChildren; this.showChildren = showChildren;
} }
public String getDescribe() { public String getMenuDescribe() {
return describe; return menuDescribe;
} }
public void setDescribe(String describe) { public void setMenuDescribe(String menuDescribe) {
this.describe = describe; this.menuDescribe = menuDescribe;
} }
public String getBusinessTypeName() { public String getBusinessTypeName() {
......
...@@ -68,7 +68,7 @@ public class UpdateSysMenuInput { ...@@ -68,7 +68,7 @@ public class UpdateSysMenuInput {
private String level; private String level;
@XText("描述") @XText("描述")
private String describe; private String menuDescribe;
@XText("是否展开") @XText("是否展开")
...@@ -111,12 +111,12 @@ public class UpdateSysMenuInput { ...@@ -111,12 +111,12 @@ public class UpdateSysMenuInput {
this.showChildren = showChildren; this.showChildren = showChildren;
} }
public String getDescribe() { public String getMenuDescribe() {
return describe; return menuDescribe;
} }
public void setDescribe(String describe) { public void setMenuDescribe(String menuDescribe) {
this.describe = describe; this.menuDescribe = menuDescribe;
} }
public String getMediaType() { public String getMediaType() {
......
...@@ -69,6 +69,15 @@ public class CreateSysOrganizationInput { ...@@ -69,6 +69,15 @@ public class CreateSysOrganizationInput {
@XText("介质类型") @XText("介质类型")
private String mediaType; private String mediaType;
@XText("经度")
private BigDecimal longitude;
@XText("纬度")
private BigDecimal latitude;
@XText("高程")
private BigDecimal elevation;
public String getMediaType() { public String getMediaType() {
return mediaType; return mediaType;
} }
...@@ -237,4 +246,27 @@ public class CreateSysOrganizationInput { ...@@ -237,4 +246,27 @@ public class CreateSysOrganizationInput {
this.province = value; this.province = value;
} }
public BigDecimal getLongitude() {
return longitude;
}
public void setLongitude(BigDecimal longitude) {
this.longitude = longitude;
}
public BigDecimal getLatitude() {
return latitude;
}
public void setLatitude(BigDecimal latitude) {
this.latitude = latitude;
}
public BigDecimal getElevation() {
return elevation;
}
public void setElevation(BigDecimal elevation) {
this.elevation = elevation;
}
} }
...@@ -68,6 +68,15 @@ public class UpdateSysOrganizationInput { ...@@ -68,6 +68,15 @@ public class UpdateSysOrganizationInput {
@XText("介质类型") @XText("介质类型")
private String mediaType; private String mediaType;
@XText("经度")
private BigDecimal longitude;
@XText("纬度")
private BigDecimal latitude;
@XText("高程")
private BigDecimal elevation;
public String getParentOuId() { public String getParentOuId() {
return parentOuId; return parentOuId;
} }
...@@ -236,4 +245,27 @@ public class UpdateSysOrganizationInput { ...@@ -236,4 +245,27 @@ public class UpdateSysOrganizationInput {
this.province = value; this.province = value;
} }
public BigDecimal getLongitude() {
return longitude;
}
public void setLongitude(BigDecimal longitude) {
this.longitude = longitude;
}
public BigDecimal getLatitude() {
return latitude;
}
public void setLatitude(BigDecimal latitude) {
this.latitude = latitude;
}
public BigDecimal getElevation() {
return elevation;
}
public void setElevation(BigDecimal elevation) {
this.elevation = elevation;
}
} }
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<result column="menu_type" property="menuType" jdbcType="VARCHAR" /> <result column="menu_type" property="menuType" jdbcType="VARCHAR" />
<result column="media_type" property="mediaType" jdbcType="VARCHAR" /> <result column="media_type" property="mediaType" jdbcType="VARCHAR" />
<result column="level" property="level" jdbcType="VARCHAR" /> <result column="level" property="level" jdbcType="VARCHAR" />
<result column="describe" property="describe" jdbcType="VARCHAR" /> <result column="menu_describe" property="menuDescribe" jdbcType="VARCHAR" />
<result column="show_children" property="showChildren" jdbcType="BOOLEAN" /> <result column="show_children" property="showChildren" jdbcType="BOOLEAN" />
<result column="menu_pattern" property="menuPattern" jdbcType="VARCHAR" /> <result column="menu_pattern" property="menuPattern" jdbcType="VARCHAR" />
<result column="fill_conf_id" property="fillConfId" jdbcType="VARCHAR" /> <result column="fill_conf_id" property="fillConfId" jdbcType="VARCHAR" />
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
menu_type, menu_type,
media_type, media_type,
`level`, `level`,
`describe`, menu_describe,
show_children, show_children,
apply_scene, apply_scene,
menu_icon menu_icon
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
sort, sort,
url, url,
apply_scene, apply_scene,
`describe`, menu_describe,
menu_icon menu_icon
from sys_menu sm from sys_menu sm
where apply_scene=#{applyScene} and sm.id in ( where apply_scene=#{applyScene} and sm.id in (
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
a.sort, a.sort,
a.url, a.url,
a.apply_scene, a.apply_scene,
a.`describe`, a.menu_describe,
a.menu_icon a.menu_icon
from temps inner join sys_menu a on temps.parent_menu_id = a.id from temps inner join sys_menu a on temps.parent_menu_id = a.id
) )
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
select 'GAS' as media_type select 'GAS' as media_type
</select> </select>
<select id="selectParentMenus" parameterType="pps.core.system.entity.SysMenuView" resultMap="BaseResultMap"> <select id="selectParentMenus" parameterType="pps.core.system.entity.SysMenuView" resultMap="BaseResultMap">
select id,menu_name ,parent_menu_id from select t.id,t.menu_name ,t.parent_menu_id from
( (
with RECURSIVE temps as with RECURSIVE temps as
( (
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
inner join sys_menu a on temps.parent_menu_id = a.id inner join sys_menu a on temps.parent_menu_id = a.id
) )
select temps.* from temps select temps.* from temps
) where id !=#{id} )t where t.id !=#{id}
</select> </select>
<select id="selectMenuForThreeLevelList" parameterType="pps.core.system.entity.SysMenuView" resultType="pps.core.system.entity.SysMenuView"> <select id="selectMenuForThreeLevelList" parameterType="pps.core.system.entity.SysMenuView" resultType="pps.core.system.entity.SysMenuView">
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
menu_type, menu_type,
media_type, media_type,
`level`, `level`,
`describe`, menu_describe,
show_children, show_children,
menu_icon menu_icon
from sys_menu from sys_menu
...@@ -208,11 +208,11 @@ ...@@ -208,11 +208,11 @@
with RECURSIVE temps as with RECURSIVE temps as
( (
select sm.id ,sm.menu_name ,sm.parent_menu_id ,sm.sort ,sm.url ,sm.media_type ,sm.menu_type ,sm.menu_pattern,sm.`describe`,sm.menu_icon select sm.id ,sm.menu_name ,sm.parent_menu_id ,sm.sort ,sm.url ,sm.media_type ,sm.menu_type ,sm.menu_pattern,sm.menu_describe,sm.menu_icon
from sys_menu sm from sys_menu sm
where menu_name like concat('%',#{menuName},'%') and apply_scene=#{applyScene} where menu_name like concat('%',#{menuName},'%') and apply_scene=#{applyScene}
union union
select sm.id ,sm.menu_name ,sm.parent_menu_id ,sm.sort ,sm.url ,sm.media_type ,sm.menu_type ,sm.menu_pattern,sm.`describe`,sm.menu_icon select sm.id ,sm.menu_name ,sm.parent_menu_id ,sm.sort ,sm.url ,sm.media_type ,sm.menu_type ,sm.menu_pattern,sm.menu_describe,sm.menu_icon
from temps inner join sys_menu sm on temps.parent_menu_id = sm.id from temps inner join sys_menu sm on temps.parent_menu_id = sm.id
) )
select temps.* from temps select temps.* from temps
...@@ -259,7 +259,7 @@ ...@@ -259,7 +259,7 @@
media_type, media_type,
sort, sort,
url, url,
`describe`, menu_describe,
menu_icon menu_icon
from sys_menu sm from sys_menu sm
where sm.id in ( where sm.id in (
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
a.media_type, a.media_type,
a.sort, a.sort,
a.url, a.url,
a.`describe`, a.menu_describe,
a.menu_icon a.menu_icon
from temps inner join sys_menu a on temps.parent_menu_id = a.id from temps inner join sys_menu a on temps.parent_menu_id = a.id
) )
......
...@@ -3,6 +3,10 @@ package pps.core.base.service; ...@@ -3,6 +3,10 @@ package pps.core.base.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.util.CollectionUtils;
import pps.cloud.system.service.SystemDictionaryService;
import pps.cloud.system.service.data.QuerySysDictionaryViewInput;
import pps.cloud.system.service.data.QuerySysDictionaryViewOutput;
import pps.core.base.entity.BaseLineAllView; import pps.core.base.entity.BaseLineAllView;
import pps.core.base.entity.BaseLineEnt; import pps.core.base.entity.BaseLineEnt;
import pps.core.base.entity.BaseLineView; import pps.core.base.entity.BaseLineView;
...@@ -87,6 +91,12 @@ public class BaseLineService { ...@@ -87,6 +91,12 @@ public class BaseLineService {
BaseLineMapper mapper = context.getBean(BaseLineMapper.class); BaseLineMapper mapper = context.getBean(BaseLineMapper.class);
List<BaseLineEnt> list = mapper.selectList(new QueryWrapper<>()); List<BaseLineEnt> list = mapper.selectList(new QueryWrapper<>());
List<QueryBaseLineOutput> outputs = XCopyUtils.copyNewList(list, QueryBaseLineOutput.class); List<QueryBaseLineOutput> outputs = XCopyUtils.copyNewList(list, QueryBaseLineOutput.class);
List<QuerySysDictionaryViewOutput> gridTypeList = getDictList(context , "grid_type");
List<QuerySysDictionaryViewOutput> lineTypeList = getDictList(context , "line_type");
outputs.stream().forEach(item->{
item.setGridTypeName(getDictName(item.getGridType() + "", gridTypeList));
item.setLineTypeName(getDictName(item.getGridType() + "", lineTypeList));
});
return XListResult.success(outputs); return XListResult.success(outputs);
} }
...@@ -119,4 +129,26 @@ public class BaseLineService { ...@@ -119,4 +129,26 @@ public class BaseLineService {
return XMapperHelper.query(mapper, input, BaseLineEnt.class, QueryBaseLineOutput.class); return XMapperHelper.query(mapper, input, BaseLineEnt.class, QueryBaseLineOutput.class);
} }
public List<QuerySysDictionaryViewOutput> getDictList(XContext context , String alias ){
SystemDictionaryService dictionaryService = context.getBean(SystemDictionaryService.class);
QuerySysDictionaryViewInput dictInput = new QuerySysDictionaryViewInput();
dictInput.setAlias(alias);
dictInput.setPage(1);
dictInput.setLimit(999);
XListResult<QuerySysDictionaryViewOutput> dictPageResult = dictionaryService.queryChildSysDictionarysByParentAlias(context, dictInput);
dictPageResult.throwIfFail();
return dictPageResult.getResult();
}
public String getDictName(String dictKey,List<QuerySysDictionaryViewOutput> dictList){
if(StringUtils.isBlank(dictKey) || CollectionUtils.isEmpty(dictList)){
return " ";
}
for (QuerySysDictionaryViewOutput dict : dictList) {
if(dict.getDicKey().equals(dictKey)){
return dict.getDicName();
}
}
return "";
}
} }
...@@ -19,13 +19,17 @@ public class QueryBaseLineOutput extends XPageInput { ...@@ -19,13 +19,17 @@ public class QueryBaseLineOutput extends XPageInput {
private String lineName; private String lineName;
@XText("线路类型") @XText("线路类型")
private Integer lineType; private Integer lineType;
@XText("电网类型") @XText("线路类型")
private String lineTypeName;
@XText("电网类型")
private Integer gridType; private Integer gridType;
@XText("电网类型")
private String gridTypeName;
@XText("装机容量") @XText("装机容量")
private BigDecimal installCapacity; private BigDecimal installCapacity;
...@@ -39,7 +43,6 @@ public class QueryBaseLineOutput extends XPageInput { ...@@ -39,7 +43,6 @@ public class QueryBaseLineOutput extends XPageInput {
private BigDecimal arrayToward; private BigDecimal arrayToward;
@XText("组织id") @XText("组织id")
private String ouId; private String ouId;
@XText("油田ouid") @XText("油田ouid")
...@@ -234,4 +237,28 @@ public class QueryBaseLineOutput extends XPageInput { ...@@ -234,4 +237,28 @@ public class QueryBaseLineOutput extends XPageInput {
public void setModifyTime(Date modifyTime) { public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime; this.modifyTime = modifyTime;
} }
public String getLineTypeName() {
return lineTypeName;
}
public void setLineTypeName(String lineTypeName) {
this.lineTypeName = lineTypeName;
}
public String getGridTypeName() {
return gridTypeName;
}
public void setGridTypeName(String gridTypeName) {
this.gridTypeName = gridTypeName;
}
public String getpLineName() {
return pLineName;
}
public void setpLineName(String pLineName) {
this.pLineName = pLineName;
}
} }
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