提交 16ac5cee 编写于 作者: ibizdev's avatar ibizdev

hebao1234 发布系统代码 [ibz-ou,统一组织单位]

上级 d1512977
...@@ -314,6 +314,50 @@ mock.onGet(new RegExp(/^\/sysorganizations\/fetchdefault(\?[\w-./?%&=,]*)*$/)).r ...@@ -314,6 +314,50 @@ mock.onGet(new RegExp(/^\/sysorganizations\/fetchdefault(\?[\w-./?%&=,]*)*$/)).r
console.groupEnd(); console.groupEnd();
return [status, records ? records : []]; return [status, records ? records : []];
}); });
// FetchTopOrg
mock.onGet(new RegExp(/^\/sysorganizations\/fetchtoporg$/)).reply((config: any) => {
console.groupCollapsed("实体:sysorganization 方法: FetchTopOrg");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchTopOrg
mock.onGet(new RegExp(/^\/sysorganizations\/fetchtoporg(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:sysorganization 方法: FetchTopOrg");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
......
...@@ -200,4 +200,33 @@ export default class SysOrganizationServiceBase extends EntityService { ...@@ -200,4 +200,33 @@ export default class SysOrganizationServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data)); let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/sysorganizations/searchdefault`,tempData,isloading); return await Http.getInstance().post(`/sysorganizations/searchdefault`,tempData,isloading);
} }
/**
* FetchTopOrg接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysOrganizationServiceBase
*/
public async FetchTopOrg(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/sysorganizations/fetchtoporg`,tempData,isloading);
return res;
}
/**
* searchTopOrg接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysOrganizationServiceBase
*/
public async searchTopOrg(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/sysorganizations/searchtoporg`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -37,11 +37,6 @@ ...@@ -37,11 +37,6 @@
git clone -b master $para2 ibzou/ git clone -b master $para2 ibzou/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibzou/ cd ibzou/
mvn clean package -Pweb
cd ibzou-app/ibzou-app-web
mvn -Pweb docker:build
mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzou-app-web.yaml ibzlab-rt --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -10,6 +10,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -10,6 +10,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Duser.timezone=$TZ -Djava.security.egd=file:/dev/./urandom -jar /ibzou-app-web.jar java ${JAVA_OPTS} -Duser.timezone=$TZ -Djava.security.egd=file:/dev/./urandom -jar /ibzou-app-web.jar
EXPOSE 30001 EXPOSE 8080
ADD ibzou-app-web.jar /ibzou-app-web.jar ADD ibzou-app-web.jar /ibzou-app-web.jar
...@@ -22,34 +22,7 @@ spec: ...@@ -22,34 +22,7 @@ spec:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-app-web:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-app-web:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 30001 - containerPort: 8080
env:
- name: SPRING_CLOUD_NACOS_DISCOVERY_IP
value: "172.16.180.237"
- name: SERVER_PORT
value: "30001"
- name: SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR
value: "172.16.100.243:8848"
- name: SPRING_REDIS_HOST
value: "172.16.100.243"
- name: SPRING_REDIS_PORT
value: "6379"
- name: SPRING_REDIS_DATABASE
value: "0"
- name: SPRING_DATASOURCE_USERNAME
value: "a_A_5d9d78509"
- name: SPRING_DATASOURCE_PASSWORD
value: "@6dEfb3@"
- name: SPRING_DATASOURCE_URL
value: "jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true"
- name: SPRING_DATASOURCE_DRIVER-CLASS-NAME
value: "com.mysql.jdbc.Driver"
- name: SPRING_DATASOURCE_DEFAULTSCHEMA
value: "a_A_5d9d78509"
- name: NACOS
value: "172.16.100.243:8848"
- name: SPRING_CLOUD_NACOS_DISCOVERY_GROUP
value: "ibizdev"
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /app/file mountPath: /app/file
...@@ -69,9 +42,9 @@ spec: ...@@ -69,9 +42,9 @@ spec:
type: NodePort type: NodePort
ports: ports:
- name: http - name: http
port: 30001 port: 8080
targetPort: 30001 targetPort: 8080
nodePort: 30001 nodePort: 8080
protocol: TCP protocol: TCP
selector: selector:
app: ibzou-app-web app: ibzou-app-web
......
...@@ -3,23 +3,9 @@ services: ...@@ -3,23 +3,9 @@ services:
ibzou-app-web: ibzou-app-web:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-app-web:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-app-web:latest
ports: ports:
- "30001:30001" - "8080:8080"
networks: networks:
- agent_network - agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=30001
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.100.243:8848
- SPRING_REDIS_HOST=172.16.100.243
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
- SPRING_DATASOURCE_PASSWORD=@6dEfb3@
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
- NACOS=172.16.100.243:8848
- SPRING_CLOUD_NACOS_DISCOVERY_GROUP=ibizdev
deploy: deploy:
resources: resources:
limits: limits:
......
...@@ -21,6 +21,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -21,6 +21,7 @@ import com.alibaba.fastjson.JSONObject;
public interface SysOrganizationMapper extends BaseMapper<SysOrganization> { public interface SysOrganizationMapper extends BaseMapper<SysOrganization> {
Page<SysOrganization> searchDefault(IPage page, @Param("srf") SysOrganizationSearchContext context, @Param("ew") Wrapper<SysOrganization> wrapper); Page<SysOrganization> searchDefault(IPage page, @Param("srf") SysOrganizationSearchContext context, @Param("ew") Wrapper<SysOrganization> wrapper);
Page<SysOrganization> searchTopOrg(IPage page, @Param("srf") SysOrganizationSearchContext context, @Param("ew") Wrapper<SysOrganization> wrapper);
@Override @Override
@Cacheable(value ="sysorganization", key = "'row:'+#p0") @Cacheable(value ="sysorganization", key = "'row:'+#p0")
SysOrganization selectById(Serializable id); SysOrganization selectById(Serializable id);
......
...@@ -38,6 +38,7 @@ public interface ISysDeptMemberService extends IService<SysDeptMember> { ...@@ -38,6 +38,7 @@ public interface ISysDeptMemberService extends IService<SysDeptMember> {
boolean save(SysDeptMember et); boolean save(SysDeptMember et);
void saveBatch(List<SysDeptMember> list); void saveBatch(List<SysDeptMember> list);
SysDeptMember saveDeptMember(SysDeptMember et); SysDeptMember saveDeptMember(SysDeptMember et);
boolean saveDeptMemberBatch(List<SysDeptMember> etList);
Page<SysDeptMember> searchDefault(SysDeptMemberSearchContext context); Page<SysDeptMember> searchDefault(SysDeptMemberSearchContext context);
List<SysDeptMember> selectByDeptid(String deptid); List<SysDeptMember> selectByDeptid(String deptid);
void removeByDeptid(String deptid); void removeByDeptid(String deptid);
......
...@@ -42,6 +42,7 @@ public interface ISysOrganizationService extends IService<SysOrganization> { ...@@ -42,6 +42,7 @@ public interface ISysOrganizationService extends IService<SysOrganization> {
@CacheEvict(value = "sysorganization",allEntries = true) @CacheEvict(value = "sysorganization",allEntries = true)
void saveBatch(List<SysOrganization> list); void saveBatch(List<SysOrganization> list);
Page<SysOrganization> searchDefault(SysOrganizationSearchContext context); Page<SysOrganization> searchDefault(SysOrganizationSearchContext context);
Page<SysOrganization> searchTopOrg(SysOrganizationSearchContext context);
List<SysOrganization> selectByParentorgid(String orgid); List<SysOrganization> selectByParentorgid(String orgid);
List<SysOrganization> selectByParentorgid(Collection<String> ids); List<SysOrganization> selectByParentorgid(Collection<String> ids);
@CacheEvict(value = "sysorganization", allEntries = true) @CacheEvict(value = "sysorganization", allEntries = true)
......
...@@ -199,6 +199,15 @@ public class SysDeptMemberServiceImpl extends ServiceImpl<SysDeptMemberMapper, S ...@@ -199,6 +199,15 @@ public class SysDeptMemberServiceImpl extends ServiceImpl<SysDeptMemberMapper, S
return et ; return et ;
} }
@Override
@Transactional
public boolean saveDeptMemberBatch(List<SysDeptMember> etList) {
for(SysDeptMember et : etList) {
saveDeptMember(et);
}
return true;
}
@Override @Override
public List<SysDeptMember> selectByDeptid(String deptid) { public List<SysDeptMember> selectByDeptid(String deptid) {
......
...@@ -231,6 +231,15 @@ public class SysOrganizationServiceImpl extends ServiceImpl<SysOrganizationMappe ...@@ -231,6 +231,15 @@ public class SysOrganizationServiceImpl extends ServiceImpl<SysOrganizationMappe
return new PageImpl<SysOrganization>(pages.getRecords(), context.getPageable(), pages.getTotal()); return new PageImpl<SysOrganization>(pages.getRecords(), context.getPageable(), pages.getTotal());
} }
/**
* 查询集合 顶级单位
*/
@Override
public Page<SysOrganization> searchTopOrg(SysOrganizationSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<SysOrganization> pages=baseMapper.searchTopOrg(context.getPages(),context,context.getSelectCond());
return new PageImpl<SysOrganization>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/** /**
......
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
<!--输出实体[SYS_ORG]数据结构 --> <!--输出实体[SYS_ORG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_org-49-4"> <changeSet author="a_A_5d9d78509" id="tab-sys_org-51-4">
<createTable tableName="IBZORG"> <createTable tableName="IBZORG">
<column name="ORGID" remarks="" type="VARCHAR(100)"> <column name="ORGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_ORG_ORGID"/> <constraints primaryKey="true" primaryKeyName="PK_SYS_ORG_ORGID"/>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
<addForeignKeyConstraint baseColumnNames="POSTID" baseTableName="IBZEMP" constraintName="DER1N_SYS_EMP_SYS_POST_POSTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="POSTID" referencedTableName="IBZPOST" validate="true"/> <addForeignKeyConstraint baseColumnNames="POSTID" baseTableName="IBZEMP" constraintName="DER1N_SYS_EMP_SYS_POST_POSTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="POSTID" referencedTableName="IBZPOST" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[SYS_ORG]外键关系 --> <!--输出实体[SYS_ORG]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_org-49-16"> <changeSet author="a_A_5d9d78509" id="fk-sys_org-51-16">
<addForeignKeyConstraint baseColumnNames="PORGID" baseTableName="IBZORG" constraintName="DER1N_SYS_ORG_SYS_ORG_PORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/> <addForeignKeyConstraint baseColumnNames="PORGID" baseTableName="IBZORG" constraintName="DER1N_SYS_ORG_SYS_ORG_PORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[SYS_POST]外键关系 --> <!--输出实体[SYS_POST]外键关系 -->
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性--> <!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="SysOrganizationResultMap" databaseId="mysql"> <select id="selectById" resultMap="SysOrganizationResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`DOMAINS`, t1.`ENABLE`, t1.`ISVALID`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN IBZORG t11 ON t1.PORGID = t11.ORGID ) t1 where orgid=#{id}]]> <![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`DOMAINS`, t1.`ENABLE`, t1.`ISVALID`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN `IBZORG` t11 ON t1.`PORGID` = t11.`ORGID` ) t1 where orgid=#{id}]]>
</select> </select>
<select id="selectById" resultMap="SysOrganizationResultMap" databaseId="oracle"> <select id="selectById" resultMap="SysOrganizationResultMap" databaseId="oracle">
<![CDATA[select t1.* from (SELECT t1.CREATEDATE, t1.DOMAINS, t1.ENABLE, t1.ISVALID, t1.ORGCODE, t1.ORGID, t1.ORGLEVEL, t1.ORGNAME, t1.PORGID, t11.ORGNAME AS PORGNAME, t1.SHORTNAME, t1.SHOWORDER, t1.UPDATEDATE FROM IBZORG t1 LEFT JOIN IBZORG t11 ON t1.PORGID = t11.ORGID ) t1 where orgid=#{id}]]> <![CDATA[select t1.* from (SELECT t1.CREATEDATE, t1.DOMAINS, t1.ENABLE, t1.ISVALID, t1.ORGCODE, t1.ORGID, t1.ORGLEVEL, t1.ORGNAME, t1.PORGID, t11.ORGNAME AS PORGNAME, t1.SHORTNAME, t1.SHOWORDER, t1.UPDATEDATE FROM IBZORG t1 LEFT JOIN IBZORG t11 ON t1.PORGID = t11.ORGID ) t1 where orgid=#{id}]]>
...@@ -41,9 +41,18 @@ ...@@ -41,9 +41,18 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if> <if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select> </select>
<!--数据集合[TopOrg]-->
<select id="searchTopOrg" parameterType="cn.ibizlab.core.ou.filter.SysOrganizationSearchContext" resultMap="SysOrganizationResultMap">
select t1.* from (
<include refid="TopOrg" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="mysql"> <sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`DOMAINS`, t1.`ENABLE`, t1.`ISVALID`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN IBZORG t11 ON t1.PORGID = t11.ORGID <![CDATA[ SELECT t1.`CREATEDATE`, t1.`DOMAINS`, t1.`ENABLE`, t1.`ISVALID`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN `IBZORG` t11 ON t1.`PORGID` = t11.`ORGID`
WHERE t1.ENABLE = 1 WHERE t1.ENABLE = 1
]]> ]]>
</sql> </sql>
...@@ -59,9 +68,16 @@ ...@@ -59,9 +68,16 @@
WHERE t1.ENABLE = 1 WHERE t1.ENABLE = 1
]]> ]]>
</sql> </sql>
<!--数据查询[TopOrg]-->
<sql id="TopOrg" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`DOMAINS`, t1.`ENABLE`, t1.`ISVALID`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN `IBZORG` t11 ON t1.`PORGID` = t11.`ORGID`
WHERE t1.ENABLE = 1
AND ( t1.`PORGID` IS NULL )
]]>
</sql>
<!--数据查询[View]--> <!--数据查询[View]-->
<sql id="View" databaseId="mysql"> <sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`DOMAINS`, t1.`ENABLE`, t1.`ISVALID`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN IBZORG t11 ON t1.PORGID = t11.ORGID <![CDATA[ SELECT t1.`CREATEDATE`, t1.`DOMAINS`, t1.`ENABLE`, t1.`ISVALID`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN `IBZORG` t11 ON t1.`PORGID` = t11.`ORGID`
WHERE t1.ENABLE = 1 WHERE t1.ENABLE = 1
]]> ]]>
</sql> </sql>
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
"dename":"SysOrganization", "dename":"SysOrganization",
"delogicname":"单位机构", "delogicname":"单位机构",
"sysmoudle":{"id":"OU","name":"ou"}, "sysmoudle":{"id":"OU","name":"ou"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}], "dedataset":[{"id":"Default" , "name":"DEFAULT"},{"id":"TopOrg" , "name":"顶级单位"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }], "deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"curorg","name":"当前单位"},{"id":"porg","name":"上级单位"},{"id":"sorg","name":"下级单位"} ] "datascope":[{"id":"all","name":"全部数据"}, {"id":"curorg","name":"当前单位"},{"id":"porg","name":"上级单位"},{"id":"sorg","name":"下级单位"} ]
} }
......
...@@ -146,6 +146,14 @@ public class SysDeptMemberResource { ...@@ -146,6 +146,14 @@ public class SysDeptMemberResource {
sysdeptmemberdto = sysdeptmemberMapping.toDto(domain); sysdeptmemberdto = sysdeptmemberMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(sysdeptmemberdto); return ResponseEntity.status(HttpStatus.OK).body(sysdeptmemberdto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-SaveDeptMember-all')")
@ApiOperation(value = "批量处理[保存部门成员]", tags = {"部门成员" }, notes = "批量处理[保存部门成员]")
@RequestMapping(method = RequestMethod.POST, value = "/sysdeptmembers/savedeptmemberbatch")
public ResponseEntity<Boolean> saveDeptMemberBatch(@RequestBody List<SysDeptMemberDTO> sysdeptmemberdtos) {
List<SysDeptMember> domains = sysdeptmemberMapping.toDomain(sysdeptmemberdtos);
boolean result = sysdeptmemberService.saveDeptMemberBatch(domains);
return ResponseEntity.status(HttpStatus.OK).body(result);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')")
@ApiOperation(value = "获取DEFAULT", tags = {"部门成员" } ,notes = "获取DEFAULT") @ApiOperation(value = "获取DEFAULT", tags = {"部门成员" } ,notes = "获取DEFAULT")
...@@ -286,6 +294,13 @@ public class SysDeptMemberResource { ...@@ -286,6 +294,13 @@ public class SysDeptMemberResource {
sysdeptmemberdto = sysdeptmemberMapping.toDto(domain); sysdeptmemberdto = sysdeptmemberMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(sysdeptmemberdto); return ResponseEntity.status(HttpStatus.OK).body(sysdeptmemberdto);
} }
@ApiOperation(value = "批量处理[根据部门部门成员]", tags = {"部门成员" }, notes = "批量处理[根据部门部门成员]")
@RequestMapping(method = RequestMethod.POST, value = "/sysdepartments/{sysdepartment_id}/sysdeptmembers/savedeptmemberbatch")
public ResponseEntity<Boolean> saveDeptMemberBySysDepartment(@PathVariable("sysdepartment_id") String sysdepartment_id, @RequestBody List<SysDeptMemberDTO> sysdeptmemberdtos) {
List<SysDeptMember> domains = sysdeptmemberMapping.toDomain(sysdeptmemberdtos);
boolean result = sysdeptmemberService.saveDeptMemberBatch(domains);
return ResponseEntity.status(HttpStatus.OK).body(result);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')")
@ApiOperation(value = "根据部门获取DEFAULT", tags = {"部门成员" } ,notes = "根据部门获取DEFAULT") @ApiOperation(value = "根据部门获取DEFAULT", tags = {"部门成员" } ,notes = "根据部门获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sysdepartments/{sysdepartment_id}/sysdeptmembers/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sysdepartments/{sysdepartment_id}/sysdeptmembers/fetchdefault")
...@@ -424,6 +439,13 @@ public class SysDeptMemberResource { ...@@ -424,6 +439,13 @@ public class SysDeptMemberResource {
sysdeptmemberdto = sysdeptmemberMapping.toDto(domain); sysdeptmemberdto = sysdeptmemberMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(sysdeptmemberdto); return ResponseEntity.status(HttpStatus.OK).body(sysdeptmemberdto);
} }
@ApiOperation(value = "批量处理[根据人员部门成员]", tags = {"部门成员" }, notes = "批量处理[根据人员部门成员]")
@RequestMapping(method = RequestMethod.POST, value = "/sysemployees/{sysemployee_id}/sysdeptmembers/savedeptmemberbatch")
public ResponseEntity<Boolean> saveDeptMemberBySysEmployee(@PathVariable("sysemployee_id") String sysemployee_id, @RequestBody List<SysDeptMemberDTO> sysdeptmemberdtos) {
List<SysDeptMember> domains = sysdeptmemberMapping.toDomain(sysdeptmemberdtos);
boolean result = sysdeptmemberService.saveDeptMemberBatch(domains);
return ResponseEntity.status(HttpStatus.OK).body(result);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')")
@ApiOperation(value = "根据人员获取DEFAULT", tags = {"部门成员" } ,notes = "根据人员获取DEFAULT") @ApiOperation(value = "根据人员获取DEFAULT", tags = {"部门成员" } ,notes = "根据人员获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sysemployees/{sysemployee_id}/sysdeptmembers/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sysemployees/{sysemployee_id}/sysdeptmembers/fetchdefault")
...@@ -562,6 +584,13 @@ public class SysDeptMemberResource { ...@@ -562,6 +584,13 @@ public class SysDeptMemberResource {
sysdeptmemberdto = sysdeptmemberMapping.toDto(domain); sysdeptmemberdto = sysdeptmemberMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(sysdeptmemberdto); return ResponseEntity.status(HttpStatus.OK).body(sysdeptmemberdto);
} }
@ApiOperation(value = "批量处理[根据部门人员部门成员]", tags = {"部门成员" }, notes = "批量处理[根据部门人员部门成员]")
@RequestMapping(method = RequestMethod.POST, value = "/sysdepartments/{sysdepartment_id}/sysemployees/{sysemployee_id}/sysdeptmembers/savedeptmemberbatch")
public ResponseEntity<Boolean> saveDeptMemberBySysDepartmentSysEmployee(@PathVariable("sysdepartment_id") String sysdepartment_id, @PathVariable("sysemployee_id") String sysemployee_id, @RequestBody List<SysDeptMemberDTO> sysdeptmemberdtos) {
List<SysDeptMember> domains = sysdeptmemberMapping.toDomain(sysdeptmemberdtos);
boolean result = sysdeptmemberService.saveDeptMemberBatch(domains);
return ResponseEntity.status(HttpStatus.OK).body(result);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')")
@ApiOperation(value = "根据部门人员获取DEFAULT", tags = {"部门成员" } ,notes = "根据部门人员获取DEFAULT") @ApiOperation(value = "根据部门人员获取DEFAULT", tags = {"部门成员" } ,notes = "根据部门人员获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sysdepartments/{sysdepartment_id}/sysemployees/{sysemployee_id}/sysdeptmembers/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sysdepartments/{sysdepartment_id}/sysemployees/{sysemployee_id}/sysdeptmembers/fetchdefault")
...@@ -700,6 +729,13 @@ public class SysDeptMemberResource { ...@@ -700,6 +729,13 @@ public class SysDeptMemberResource {
sysdeptmemberdto = sysdeptmemberMapping.toDto(domain); sysdeptmemberdto = sysdeptmemberMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(sysdeptmemberdto); return ResponseEntity.status(HttpStatus.OK).body(sysdeptmemberdto);
} }
@ApiOperation(value = "批量处理[根据单位机构部门部门成员]", tags = {"部门成员" }, notes = "批量处理[根据单位机构部门部门成员]")
@RequestMapping(method = RequestMethod.POST, value = "/sysorganizations/{sysorganization_id}/sysdepartments/{sysdepartment_id}/sysdeptmembers/savedeptmemberbatch")
public ResponseEntity<Boolean> saveDeptMemberBySysOrganizationSysDepartment(@PathVariable("sysorganization_id") String sysorganization_id, @PathVariable("sysdepartment_id") String sysdepartment_id, @RequestBody List<SysDeptMemberDTO> sysdeptmemberdtos) {
List<SysDeptMember> domains = sysdeptmemberMapping.toDomain(sysdeptmemberdtos);
boolean result = sysdeptmemberService.saveDeptMemberBatch(domains);
return ResponseEntity.status(HttpStatus.OK).body(result);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')")
@ApiOperation(value = "根据单位机构部门获取DEFAULT", tags = {"部门成员" } ,notes = "根据单位机构部门获取DEFAULT") @ApiOperation(value = "根据单位机构部门获取DEFAULT", tags = {"部门成员" } ,notes = "根据单位机构部门获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sysorganizations/{sysorganization_id}/sysdepartments/{sysdepartment_id}/sysdeptmembers/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sysorganizations/{sysorganization_id}/sysdepartments/{sysdepartment_id}/sysdeptmembers/fetchdefault")
...@@ -838,6 +874,13 @@ public class SysDeptMemberResource { ...@@ -838,6 +874,13 @@ public class SysDeptMemberResource {
sysdeptmemberdto = sysdeptmemberMapping.toDto(domain); sysdeptmemberdto = sysdeptmemberMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(sysdeptmemberdto); return ResponseEntity.status(HttpStatus.OK).body(sysdeptmemberdto);
} }
@ApiOperation(value = "批量处理[根据单位机构人员部门成员]", tags = {"部门成员" }, notes = "批量处理[根据单位机构人员部门成员]")
@RequestMapping(method = RequestMethod.POST, value = "/sysorganizations/{sysorganization_id}/sysemployees/{sysemployee_id}/sysdeptmembers/savedeptmemberbatch")
public ResponseEntity<Boolean> saveDeptMemberBySysOrganizationSysEmployee(@PathVariable("sysorganization_id") String sysorganization_id, @PathVariable("sysemployee_id") String sysemployee_id, @RequestBody List<SysDeptMemberDTO> sysdeptmemberdtos) {
List<SysDeptMember> domains = sysdeptmemberMapping.toDomain(sysdeptmemberdtos);
boolean result = sysdeptmemberService.saveDeptMemberBatch(domains);
return ResponseEntity.status(HttpStatus.OK).body(result);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')")
@ApiOperation(value = "根据单位机构人员获取DEFAULT", tags = {"部门成员" } ,notes = "根据单位机构人员获取DEFAULT") @ApiOperation(value = "根据单位机构人员获取DEFAULT", tags = {"部门成员" } ,notes = "根据单位机构人员获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sysorganizations/{sysorganization_id}/sysemployees/{sysemployee_id}/sysdeptmembers/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sysorganizations/{sysorganization_id}/sysemployees/{sysemployee_id}/sysdeptmembers/fetchdefault")
...@@ -976,6 +1019,13 @@ public class SysDeptMemberResource { ...@@ -976,6 +1019,13 @@ public class SysDeptMemberResource {
sysdeptmemberdto = sysdeptmemberMapping.toDto(domain); sysdeptmemberdto = sysdeptmemberMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(sysdeptmemberdto); return ResponseEntity.status(HttpStatus.OK).body(sysdeptmemberdto);
} }
@ApiOperation(value = "批量处理[根据单位机构部门人员部门成员]", tags = {"部门成员" }, notes = "批量处理[根据单位机构部门人员部门成员]")
@RequestMapping(method = RequestMethod.POST, value = "/sysorganizations/{sysorganization_id}/sysdepartments/{sysdepartment_id}/sysemployees/{sysemployee_id}/sysdeptmembers/savedeptmemberbatch")
public ResponseEntity<Boolean> saveDeptMemberBySysOrganizationSysDepartmentSysEmployee(@PathVariable("sysorganization_id") String sysorganization_id, @PathVariable("sysdepartment_id") String sysdepartment_id, @PathVariable("sysemployee_id") String sysemployee_id, @RequestBody List<SysDeptMemberDTO> sysdeptmemberdtos) {
List<SysDeptMember> domains = sysdeptmemberMapping.toDomain(sysdeptmemberdtos);
boolean result = sysdeptmemberService.saveDeptMemberBatch(domains);
return ResponseEntity.status(HttpStatus.OK).body(result);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')")
@ApiOperation(value = "根据单位机构部门人员获取DEFAULT", tags = {"部门成员" } ,notes = "根据单位机构部门人员获取DEFAULT") @ApiOperation(value = "根据单位机构部门人员获取DEFAULT", tags = {"部门成员" } ,notes = "根据单位机构部门人员获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sysorganizations/{sysorganization_id}/sysdepartments/{sysdepartment_id}/sysemployees/{sysemployee_id}/sysdeptmembers/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sysorganizations/{sysorganization_id}/sysdepartments/{sysdepartment_id}/sysemployees/{sysemployee_id}/sysdeptmembers/fetchdefault")
......
...@@ -157,6 +157,28 @@ public class SysOrganizationResource { ...@@ -157,6 +157,28 @@ public class SysOrganizationResource {
.body(new PageImpl(sysorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(sysorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysOrganization-searchTopOrg-all') and hasPermission(#context,'ibzou-SysOrganization-Get')")
@ApiOperation(value = "获取顶级单位", tags = {"单位机构" } ,notes = "获取顶级单位")
@RequestMapping(method= RequestMethod.GET , value="/sysorganizations/fetchtoporg")
public ResponseEntity<List<SysOrganizationDTO>> fetchTopOrg(SysOrganizationSearchContext context) {
Page<SysOrganization> domains = sysorganizationService.searchTopOrg(context) ;
List<SysOrganizationDTO> list = sysorganizationMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysOrganization-searchTopOrg-all') and hasPermission(#context,'ibzou-SysOrganization-Get')")
@ApiOperation(value = "查询顶级单位", tags = {"单位机构" } ,notes = "查询顶级单位")
@RequestMapping(method= RequestMethod.POST , value="/sysorganizations/searchtoporg")
public ResponseEntity<Page<SysOrganizationDTO>> searchTopOrg(@RequestBody SysOrganizationSearchContext context) {
Page<SysOrganization> domains = sysorganizationService.searchTopOrg(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(sysorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
} }
......
...@@ -52,6 +52,11 @@ public class AuthenticationUser implements UserDetails ...@@ -52,6 +52,11 @@ public class AuthenticationUser implements UserDetails
* 租户 * 租户
*/ */
private String srfdcid; private String srfdcid;
/**
* 系统标识
*/
private String srfsystemid;
/**
/** /**
* 动态实例标识 * 动态实例标识
*/ */
...@@ -254,6 +259,7 @@ public class AuthenticationUser implements UserDetails ...@@ -254,6 +259,7 @@ public class AuthenticationUser implements UserDetails
if(this.sessionParams==null) if(this.sessionParams==null)
{ {
sessionParams = getUserSessionParam(); sessionParams = getUserSessionParam();
sessionParams.put("srfsystemid",this.getSrfsystemid());
sessionParams.put("srfdynainstid",this.getSrfdynainstid()); sessionParams.put("srfdynainstid",this.getSrfdynainstid());
sessionParams.put("srfpersonid", this.getUserid()); sessionParams.put("srfpersonid", this.getUserid());
sessionParams.put("srfpersonname", this.getPersonname()); sessionParams.put("srfpersonname", this.getPersonname());
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册