Merge remote-tracking branch 'origin/master'

master
admin 2 years ago
commit 6a47584518
  1. 23825
      ant-design-vue-jeecg/package-lock.json
  2. 17
      ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue
  3. 335
      ant-design-vue-jeecg/src/views/functionx/modules/FunctionTemplateList.vue
  4. 78
      ant-design-vue-jeecg/src/views/functionx/modules/MoBanModal.vue
  5. 43
      jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/base/controller/JeecgController.java
  6. 7
      jeecg-boot/jeecg-boot-module-cms/src/main/java/org/jeecg/modules/cms/admin/controller/CmsArticleController.java
  7. 20
      jeecg-boot/jeecg-boot-module-cms/src/main/java/org/jeecg/modules/cms/admin/controller/CmsColumnController.java
  8. 2
      jeecg-boot/jeecg-boot-module-system/pom.xml
  9. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java
  10. 44
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functiontemplate/controller/FunctionTemplateController.java
  11. 20
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java
  12. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/entity/RoleConstant.java
  13. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/IFunctionxService.java
  14. 32
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/impl/FunctionxServiceImpl.java
  15. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysDictMapper.xml

File diff suppressed because it is too large Load Diff

@ -39,6 +39,9 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus" v-if="role==1">新增</a-button>
<!--待开发功能模块提供思路给你们将模板list全部展示之后传出一个id对应加入-->
<a-button @click="muban" type="primary" icon="plus" v-if="role==1">模板</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('功能管理')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" v-if="role==1">
<a-button type="primary" icon="import" >导入</a-button>
@ -143,6 +146,7 @@
</div>
<functionx-modal ref="modalForm" @ok="modalFormOk"></functionx-modal>
<mo-ban-modal ref="modalForm2" @valueChange="valueChange" @ok="modalFormOk"></mo-ban-modal>
<bugx-modal ref="modalForm1" @ok="modalFormOk"></bugx-modal>
</a-card>
</template>
@ -157,13 +161,15 @@
import {filterObj} from "@/utils/util";
import store from '@/store'
import BugxModal from "./modules/BugxModal";
import MoBanModal from "./modules/MoBanModal";
export default {
name: 'FunctionxList',
mixins:[JeecgListMixin, mixinDevice],
components: {
FunctionxModal,
BugxModal
BugxModal,
MoBanModal
},
data () {
return {
@ -443,7 +449,9 @@
fieldList.push({type:'int',value:'verison',text:'版本号',dictCode:''})
this.superFieldList = fieldList
},
valueChange(value){
if (value) this.loadData()
},
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.moduleid;
@ -504,6 +512,11 @@
this.$refs.modalForm1.title = "反馈问题";
this.$refs.modalForm1.disableSubmit = false;
},
muban: function (record) {
this.$refs.modalForm2.add()
this.$refs.modalForm2.title = '模板导入'
this.$refs.modalForm2.disableSubmit = false;
},
}
}
</script>

@ -0,0 +1,335 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="中文名称">
<a-input placeholder="中文名称" v-model="queryParam.functionTemplateName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="英文名称">
<a-input placeholder="英文名称" v-model="queryParam.functionTemplateEnName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="功能类型">
<j-dict-select-tag type="list" v-model="queryParam.functionType" dictCode="function_type" placeholder="请选择功能类型"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="任务状态">
<j-dict-select-tag type="list" v-model="queryParam.workStatus" dictCode="work_status" placeholder="请选择任务状态" />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('功能模板管理')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!--&lt;!&ndash; <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>&ndash;&gt;-->
<!--&lt;!&ndash; <a-dropdown v-if="selectedRowKeys.length > 0">&ndash;&gt;-->
<!--&lt;!&ndash; <a-menu slot="overlay">&ndash;&gt;-->
<!--&lt;!&ndash; <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>&ndash;&gt;-->
<!--&lt;!&ndash; </a-menu>&ndash;&gt;-->
<!--&lt;!&ndash; <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>&ndash;&gt;-->
<!--&lt;!&ndash; </a-dropdown>&ndash;&gt;-->
<!-- <a-button @click="fanhui" type="primary" icon="rollback">返回</a-button>-->
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange1}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
</a-table>
</div>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'FunctionTemplateList',
mixins:[JeecgListMixin, mixinDevice],
components: {
},
data () {
return {
description: '功能模板管理管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'模块模板类型',
align:"center",
dataIndex: 'modulextypeId_dictText'
},
{
title:'中文名称',
align:"center",
dataIndex: 'functionTemplateName'
},
{
title:'英文名称',
align:"center",
dataIndex: 'functionTemplateEnName'
},
{
title:'功能编码',
align:"center",
dataIndex: 'functionTemplateCode'
},
{
title:'功能类型',
align:"center",
dataIndex: 'functionTemplateType_dictText'
},
{
title:'功能描述',
align:"center",
dataIndex: 'functionTemplateDescribe'
},
{
title:'分析图',
align:"center",
dataIndex: 'diagrams',
scopedSlots: {customRender: 'imgSlot'}
},
// {
// title:'',
// align:"center",
// dataIndex: 'userRole_dictText'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'managerUsers_dictText'
// },
{
title:'任务等级',
align:"center",
dataIndex: 'workLevel_dictText'
},
{
title:'任务状态',
align:"center",
dataIndex: 'workStatus_dictText'
},
{
title:'发布时间',
align:"center",
dataIndex: 'publishTime'
},
{
title:'开始时间',
align:"center",
dataIndex: 'startTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'任务时长',
align:"center",
dataIndex: 'duration'
},
{
title:'创建人',
align:"center",
dataIndex: 'createBy_dictText'
},
],
url: {
list: "/functiontemplate/functionTemplate/list1",
delete: "/functiontemplate/functionTemplate/delete",
deleteBatch: "/functiontemplate/functionTemplate/deleteBatch",
exportXlsUrl: "/functiontemplate/functionTemplate/exportXls",
importExcelUrl: "functiontemplate/functionTemplate/importExcel",
},
dictOptions:{},
superFieldList:[],
loadRouteType:false,
queryParam:{},
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
onSelectChange1(selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys;
this.selectionRows = selectionRows;
let ids = "";
for (var a = 0; a < this.selectionRows.length; a++) {
ids += this.selectionRows[a].id + ",";
}
console.log(ids,"------------*****---")
this.$emit('onChangeRowKey',ids)
},
fanhui(){
this.$router.push({
/*返回产品*/
path: '/src/views/moduletype/ModuleTypeList',
});
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'modulextypeId',text:'模块模板类型id',dictCode:''})
fieldList.push({type:'string',value:'functionTemplateName',text:'中文名称',dictCode:''})
fieldList.push({type:'string',value:'functionTemplateEnName',text:'英文名称',dictCode:''})
fieldList.push({type:'string',value:'functionTemplateCode',text:'功能编码',dictCode:''})
fieldList.push({type:'int',value:'functionTemplateType',text:'功能类型',dictCode:''})
fieldList.push({type:'string',value:'functionTemplateDescribe',text:'功能描述',dictCode:''})
fieldList.push({type:'string',value:'diagrams',text:'分析图',dictCode:''})
fieldList.push({type:'sel_user',value:'userRole',text:'用户角色'})
fieldList.push({type:'sel_user',value:'managerUsers',text:'责任人'})
fieldList.push({type:'int',value:'workLevel',text:'任务等级',dictCode:''})
fieldList.push({type:'int',value:'workStatus',text:'任务状态',dictCode:''})
fieldList.push({type:'datetime',value:'publishTime',text:'发布时间'})
fieldList.push({type:'date',value:'startTime',text:'开始时间'})
fieldList.push({type:'double',value:'duration',text:'任务时长',dictCode:''})
this.superFieldList = fieldList
},
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.type;
// console.log("***********")
this.loadRouteType = true;
}
},
add(){
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!");
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
//update-end---author:zhangyafei Date:20201118 for------------
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
//param.id=this.id;
param.modulextypeId = this.$route.query.type;
return filterObj(param);
},
searchReset() {
this.queryParam=''
this.loadData();
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,78 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<!-- <functionx-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></functionx-form>-->
<function-template-list ref="realForm" @ok="submitCallback" :disabled="disableSubmit" @onChangeRowKey="chuancan"></function-template-list>
</j-modal>
</template>
<script>
import FunctionTemplateList from "./FunctionTemplateList";
import {getAction, postAction} from "../../../api/manage";
export default {
name: 'FunctionxModal',
components: {
FunctionTemplateList
},
data () {
return {
title:'',
width:800,
visible: false,
ids:'',
disableSubmit: false,
url:{
add:"/functionx/functionx/muban"
}
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
chuancan(res){
this.ids=res;
},
handleOk () {
getAction(this.url.add,{id:this.$route.query.moduleid,ids:this.ids}).then((res)=> {
if (res.success) {
this.$message.success(res.message);
} else {
this.$message.warning(res.message);
}
this.$emit('valueChange', 1)
this.close()
})
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.beanutils.PropertyUtils;
import org.apache.shiro.SecurityUtils;
import org.hibernate.procedure.spi.ParameterRegistrationImplementor;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
@ -37,11 +38,15 @@ import java.util.stream.Collectors;
*/
@Slf4j
public class JeecgController<T, S extends IService<T>> {
public static final Boolean HAS_QUERY = Boolean.TRUE.booleanValue();
@Autowired
S service;
@Value("${jeecg.path.upload}")
private String upLoadPath;
/**
* 导出excel
*
@ -53,10 +58,9 @@ public class JeecgController<T, S extends IService<T>> {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String getRealname="佚名";
if(sysUser!=null)
{
getRealname=sysUser.getRealname();
String getRealname = "佚名";
if (sysUser != null) {
getRealname = sysUser.getRealname();
}
// Step.2 获取导出数据
@ -76,34 +80,35 @@ public class JeecgController<T, S extends IService<T>> {
mv.addObject(NormalExcelConstants.FILE_NAME, title); //此处设置的filename无效 ,前端会重更新设置一下
mv.addObject(NormalExcelConstants.CLASS, clazz);
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + getRealname, title);
ExportParams exportParams = new ExportParams(title + "报表", "导出人:" + getRealname, title);
exportParams.setImageBasePath(upLoadPath);
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
mv.addObject(NormalExcelConstants.PARAMS, exportParams);
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
return mv;
}
/**
* 根据每页sheet数量导出多sheet
*
* @param request
* @param object 实体类
* @param clazz 实体类class
* @param title 标题
* @param object 实体类
* @param clazz 实体类class
* @param title 标题
* @param exportFields 导出字段自定义
* @param pageNum 每个sheet的数据条数
* @param pageNum 每个sheet的数据条数
* @param request
*/
protected ModelAndView exportXlsSheet(HttpServletRequest request, T object, Class<T> clazz, String title,String exportFields,Integer pageNum) {
protected ModelAndView exportXlsSheet(HttpServletRequest request, T object, Class<T> clazz, String title, String exportFields, Integer pageNum) {
// Step.1 组装查询条件
QueryWrapper<T> queryWrapper = QueryGenerator.initQueryWrapper(object, request.getParameterMap());
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// Step.2 计算分页sheet数据
double total = service.count();
int count = (int)Math.ceil(total/pageNum);
int count = (int) Math.ceil(total / pageNum);
// Step.3 多sheet处理
List<Map<String, Object>> listMap = new ArrayList<Map<String, Object>>();
for (int i = 1; i <=count ; i++) {
for (int i = 1; i <= count; i++) {
Page<T> page = new Page<T>(i, pageNum);
IPage<T> pageList = service.page(page, queryWrapper);
List<T> records = pageList.getRecords();
@ -117,11 +122,11 @@ public class JeecgController<T, S extends IService<T>> {
exportList = records;
}
Map<String, Object> map = new HashMap<String, Object>();
ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title+i,upLoadPath);
ExportParams exportParams = new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title + i, upLoadPath);
exportParams.setType(ExcelType.XSSF);
//map.put("title",exportParams);//表格Title
map.put(NormalExcelConstants.PARAMS,exportParams);//表格Title
map.put(NormalExcelConstants.CLASS,clazz);//表格对应实体
map.put(NormalExcelConstants.PARAMS, exportParams);//表格Title
map.put(NormalExcelConstants.CLASS, clazz);//表格对应实体
map.put(NormalExcelConstants.DATA_LIST, exportList);//数据集合
listMap.add(map);
}
@ -138,9 +143,9 @@ public class JeecgController<T, S extends IService<T>> {
*
* @param request
*/
protected ModelAndView exportXls(HttpServletRequest request, T object, Class<T> clazz, String title,String exportFields) {
ModelAndView mv = this.exportXls(request,object,clazz,title);
mv.addObject(NormalExcelConstants.EXPORT_FIELDS,exportFields);
protected ModelAndView exportXls(HttpServletRequest request, T object, Class<T> clazz, String title, String exportFields) {
ModelAndView mv = this.exportXls(request, object, clazz, title);
mv.addObject(NormalExcelConstants.EXPORT_FIELDS, exportFields);
return mv;
}

@ -55,7 +55,7 @@ public class CmsArticleController extends JeecgController<CmsArticle, ICmsArticl
* @param req
* @return
*/
// @AutoLog(value = "文章管理-分页列表查询")
@AutoLog(value = "文章管理-分页列表查询")
@ApiOperation(value = "文章管理-分页列表查询", notes = "文章管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(CmsArticle cmsArticle,
@ -74,7 +74,6 @@ public class CmsArticleController extends JeecgController<CmsArticle, ICmsArticl
* @param cmsArticle
* @return
*/
// @AutoLog(value = "文章管理-添加")
@ApiOperation(value = "文章管理-添加", notes = "文章管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody CmsArticle cmsArticle) {
@ -106,7 +105,6 @@ public class CmsArticleController extends JeecgController<CmsArticle, ICmsArticl
* @param cmsArticle
* @return
*/
// @AutoLog(value = "文章管理-编辑")
@ApiOperation(value = "文章管理-编辑", notes = "文章管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody CmsArticle cmsArticle) {
@ -125,7 +123,6 @@ public class CmsArticleController extends JeecgController<CmsArticle, ICmsArticl
* @param id
* @return
*/
// @AutoLog(value = "文章管理-通过id删除")
@ApiOperation(value = "文章管理-通过id删除", notes = "文章管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
@ -139,7 +136,6 @@ public class CmsArticleController extends JeecgController<CmsArticle, ICmsArticl
* @param ids
* @return
*/
// @AutoLog(value = "文章管理-批量删除")
@ApiOperation(value = "文章管理-批量删除", notes = "文章管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
@ -153,7 +149,6 @@ public class CmsArticleController extends JeecgController<CmsArticle, ICmsArticl
* @param id
* @return
*/
// @AutoLog(value = "文章管理-通过id查询")
@ApiOperation(value = "文章管理-通过id查询", notes = "文章管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {

@ -46,6 +46,8 @@ public class CmsColumnController extends JeecgController<CmsColumn, ICmsColumnSe
@Autowired
private ICmsColumnService cmsColumnService;
private static final String ADMIN_COLUMN_KEY = "99";
@ApiOperation(value = "文章栏目-获取栏目树型列表", notes = "文章栏目-获取栏目树型列表")
@GetMapping(value = "/getColumnTree")
public Result<?> getColumnTree(HttpServletRequest req) {
@ -76,7 +78,6 @@ public class CmsColumnController extends JeecgController<CmsColumn, ICmsColumnSe
* @param req
* @return
*/
// @AutoLog(value = "文章栏目-分页列表查询")
@ApiOperation(value = "文章栏目-分页列表查询", notes = "文章栏目-分页列表查询")
@GetMapping(value = "/rootList")
public Result<?> queryPageList(CmsColumn cmsColumn,
@ -84,7 +85,7 @@ public class CmsColumnController extends JeecgController<CmsColumn, ICmsColumnSe
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
String hasQuery = req.getParameter("hasQuery");
if (hasQuery != null && "true".equals(hasQuery)) {
if (hasQuery != null && HAS_QUERY.equals(hasQuery)) {
QueryWrapper<CmsColumn> queryWrapper = QueryGenerator.initQueryWrapper(cmsColumn, req.getParameterMap());
List<CmsColumn> list = cmsColumnService.queryTreeListNoPage(queryWrapper);
IPage<CmsColumn> pageList = new Page<>(1, 10, list.size());
@ -101,11 +102,10 @@ public class CmsColumnController extends JeecgController<CmsColumn, ICmsColumnSe
QueryWrapper<CmsColumn> queryWrapper = QueryGenerator.initQueryWrapper(cmsColumn, req.getParameterMap());
// 使用 eq 防止模糊查询
queryWrapper.eq("pid", parentId);
queryWrapper.last("order by sort");
queryWrapper.last(" ,sort asc ");
Page<CmsColumn> page = new Page<CmsColumn>(pageNo, pageSize);
IPage<CmsColumn> pageList = cmsColumnService.page(page, queryWrapper);
List<CmsColumn> records = pageList.getRecords();
// records.sort(Comparator.comparing(CmsColumn::getSort));
Collections.sort(records, Comparator.comparingInt(CmsColumn::getSort));
return Result.OK(pageList);
@ -119,7 +119,6 @@ public class CmsColumnController extends JeecgController<CmsColumn, ICmsColumnSe
* @param req
* @return
*/
// @AutoLog(value = "文章栏目-获取子数据")
@ApiOperation(value = "文章栏目-获取子数据", notes = "文章栏目-获取子数据")
@GetMapping(value = "/childList")
public Result<?> queryPageList(CmsColumn cmsColumn, HttpServletRequest req) {
@ -138,7 +137,6 @@ public class CmsColumnController extends JeecgController<CmsColumn, ICmsColumnSe
* @return 返回 IPage
* @return
*/
// @AutoLog(value = "文章栏目-批量获取子数据")
@ApiOperation(value = "文章栏目-批量获取子数据", notes = "文章栏目-批量获取子数据")
@GetMapping("/getChildListBatch")
public Result getChildListBatch(@RequestParam("parentIds") String parentIds) {
@ -162,7 +160,6 @@ public class CmsColumnController extends JeecgController<CmsColumn, ICmsColumnSe
* @param cmsColumn
* @return
*/
// @AutoLog(value = "文章栏目-添加")
@ApiOperation(value = "文章栏目-添加", notes = "文章栏目-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody CmsColumn cmsColumn) {
@ -178,7 +175,6 @@ public class CmsColumnController extends JeecgController<CmsColumn, ICmsColumnSe
* @param cmsColumn
* @return
*/
// @AutoLog(value = "文章栏目-编辑")
@ApiOperation(value = "文章栏目-编辑", notes = "文章栏目-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody CmsColumn cmsColumn) {
@ -196,9 +192,13 @@ public class CmsColumnController extends JeecgController<CmsColumn, ICmsColumnSe
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
CmsColumn cmsColumn = cmsColumnService.getById(id);
if (StringUtils.equals("99", cmsColumn.getId())) throw new JeecgBootException("文章总栏目不可删除");
if (StringUtils.equals(ADMIN_COLUMN_KEY, cmsColumn.getId())) {
throw new JeecgBootException("文章总栏目不可删除");
}
int count = cmsColumnService.count(new LambdaQueryWrapper<CmsColumn>().eq(CmsColumn::getPid, cmsColumn.getId()));
if (count > 0) throw new JeecgBootException("存在子栏目暂不可删除");
if (count > 0) {
throw new JeecgBootException("存在子栏目暂不可删除");
}
cmsColumnService.deleteCmsColumn(id);
return Result.OK("删除成功!");
}

@ -125,7 +125,7 @@
</dependencies>
<build>
<finalName>projectManagement</finalName>
<!-- <finalName>projectManagement</finalName>-->
<plugins>
<plugin>
<!-- <groupId>org.springframework.boot</groupId>-->

@ -26,6 +26,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.functionx.entity.Functionx;
import org.jeecg.modules.demo.functionx.entity.RoleConstant;
import org.jeecg.modules.demo.functionx.mapper.FunctionxMapper;
import org.jeecg.modules.demo.rulex.entity.Rulex;
import org.jeecg.modules.demo.rulex.mapper.RulexMapper;
@ -92,7 +93,7 @@ public class BugxController extends JeecgController<Bugx, IBugxService> {
queryWrapper.orderByDesc("bug_level");
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> role = functionxMapper.findRole(user.getId());
if (role.contains("1645284981182980098") || role.contains("f6817f48af4fb3af11b9e8bf182f618b")) {
if (role.contains(RoleConstant.managementId) || role.contains(RoleConstant.adminId)) {
} else {
//因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到
queryWrapper.like("manager_users", user.getId());
@ -196,8 +197,8 @@ public class BugxController extends JeecgController<Bugx, IBugxService> {
if (bugx.getBugStatus() == 4) {
return Result.error("已提交过!!");
}
if (bugx.getBugStatus() == 2)
return Result.error("当前BUG已解决!!");
if (bugx.getBugStatus() == 2){
return Result.error("当前BUG已解决!!");}
//提交时就相当于xiugai
bugx.setSubmitTime(new Date());
bugx.setBugStatus(4);

@ -1,18 +1,13 @@
package org.jeecg.modules.demo.functiontemplate.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.functiontemplate.entity.FunctionTemplate;
@ -23,18 +18,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
@ -88,6 +77,31 @@ public class FunctionTemplateController extends JeecgController<FunctionTemplate
IPage<FunctionTemplate> pageList = functionTemplateService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "功能模板管理-分页列表查询")
@ApiOperation(value="功能模板管理-分页列表查询", notes="功能模板管理-分页列表查询")
@GetMapping(value = "/list1")
public Result<?> queryPageList1(FunctionTemplate functionTemplate,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
// QueryWrapper<FunctionTemplate> queryWrapper = QueryGenerator.initQueryWrapper(functionTemplate, req.getParameterMap());
QueryWrapper<FunctionTemplate> queryWrapper=new QueryWrapper<>();
if(functionTemplate.getFunctionTemplateName()!=null){
queryWrapper.like("function_template_name",functionTemplate.getFunctionTemplateName());
}
if(functionTemplate.getFunctionTemplateEnName()!=null){
queryWrapper.like("function_template_en_name",functionTemplate.getFunctionTemplateEnName());
}
if(functionTemplate.getWorkStatus()!=null){
queryWrapper.eq("work_status",functionTemplate.getWorkStatus());
}
if(functionTemplate.getFunctionTemplateType()!=null){
queryWrapper.eq("function_template_type",functionTemplate.getFunctionTemplateType());
}
Page<FunctionTemplate> page = new Page<FunctionTemplate>(pageNo, pageSize);
IPage<FunctionTemplate> pageList = functionTemplateService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加

@ -16,6 +16,7 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.functionx.entity.Functionx;
import org.jeecg.modules.demo.functionx.entity.RoleConstant;
import org.jeecg.modules.demo.functionx.service.IFunctionxService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -78,7 +79,7 @@ public class FunctionxController extends JeecgController<Functionx, IFunctionxSe
QueryWrapper<Functionx> queryWrapper=new QueryWrapper<>();
LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> role = functionxService.findRole(user.getId());
if(role.contains("1645284981182980098")||role.contains("f6817f48af4fb3af11b9e8bf182f618b")){
if(role.contains(RoleConstant.managementId)||role.contains(RoleConstant.adminId)){
}else{
//因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到
queryWrapper.like("manager_users",user.getId());
@ -219,11 +220,11 @@ public class FunctionxController extends JeecgController<Functionx, IFunctionxSe
public Result<?> loginrole(@RequestParam(name="id",required=true) String id) {
List<String> list=functionxService.findRole(id);
//如果角色是项目管理员或管理员 就返回1 其他的返回 2
if(list.contains("1645284981182980098")||list.contains("f6817f48af4fb3af11b9e8bf182f618b"))//是项目负责人,管理员也可以
return Result.OK("1");
else
return Result.OK("2");
}
if(list.contains(RoleConstant.managementId)||list.contains(RoleConstant.adminId)){//是项目负责人,管理员也可以
return Result.OK("1");}
else {
return Result.OK("2");
} }
@GetMapping(value = "/fabu")
public Result<?> fabu(@RequestParam(name="id",required=true) String id) {
return functionxService.fabu(id);
@ -246,5 +247,12 @@ public class FunctionxController extends JeecgController<Functionx, IFunctionxSe
}
@GetMapping(value = "/muban")
public Result<?> muban(@RequestParam(name="id",required=true) String id,@RequestParam(name="ids",required=true) String ids){
return functionxService.muban(id,ids);
}
}

@ -0,0 +1,6 @@
package org.jeecg.modules.demo.functionx.entity;
public interface RoleConstant {
public final String adminId="f6817f48af4fb3af11b9e8bf182f618b";
public final String managementId="1645284981182980098";
}

@ -27,4 +27,6 @@ public interface IFunctionxService extends IService<Functionx> {
Result<?> cehui(String id);
Result<?> shenhe(String id);
Result<?> muban(String id, String ids);
}

@ -1,9 +1,12 @@
package org.jeecg.modules.demo.functionx.service.impl;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.functiontemplate.entity.FunctionTemplate;
import org.jeecg.modules.demo.functiontemplate.mapper.FunctionTemplateMapper;
import org.jeecg.modules.demo.functionx.entity.Functionx;
import org.jeecg.modules.demo.functionx.mapper.FunctionxMapper;
import org.jeecg.modules.demo.functionx.service.IFunctionxService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -24,6 +27,8 @@ public class FunctionxServiceImpl extends ServiceImpl<FunctionxMapper, Functionx
@Autowired
FunctionxMapper functionxMapper;
@Autowired
FunctionTemplateMapper functionTemplateMapper;
@Override
public String findModuleCode(String id) {
@ -133,4 +138,31 @@ public class FunctionxServiceImpl extends ServiceImpl<FunctionxMapper, Functionx
}
return null;
}
@Override
public Result<?> muban(String id, String ids) {
//本质上就是添加,id为对应的模块id,然后ids为id集合
System.err.println(id+" "+ids);
String[] split = ids.split(",");
for (String s : split) {
FunctionTemplate functionTemplate = functionTemplateMapper.selectById(s);
Functionx functionx=new Functionx();
if(functionTemplate!=null){
functionx.setFunctionName(functionTemplate.getFunctionTemplateName());
functionx.setFunctionEnName(functionTemplate.getFunctionTemplateEnName());
functionx.setWorkStatus(functionTemplate.getWorkStatus());
//根据id获得当前对应模块的编码,然后截取模板的最后两个字符,拼接成为新的功能编码
functionx.setFunctionCode(functionTemplate.getFunctionTemplateCode());
functionx.setFunctionType(functionTemplate.getFunctionTemplateType());
functionx.setDiagrams(functionTemplate.getDiagrams());
functionx.setPmDescribe(functionTemplate.getFunctionTemplateDescribe());
functionx.setWorkLevel(functionTemplate.getWorkLevel());
functionx.setWorkStatus(functionTemplate.getWorkStatus());
functionx.setModuleId(id);
functionx.setId(null);
functionxMapper.insert(functionx);
}
}
return Result.OK("模板添加成功");
}
}

@ -63,7 +63,7 @@
SELECT COUNT(*) FROM ${tableName} WHERE ${fieldName} = #{fieldVal} and module_id=#{moduleid}
</select>
<select id="duplicateCheckCountSql1" resultType="Long" parameterType="org.jeecg.modules.system.model.DuplicateCheckVo">
<select id="duplicateCheckCountSql2" resultType="Long" parameterType="org.jeecg.modules.system.model.DuplicateCheckVo">
SELECT COUNT(*) FROM ${tableName} WHERE ${fieldName} = #{fieldVal} and id &lt;&gt; #{dataId} and modulextype_id=#{moduleid}
</select>
<select id="duplicateCheckCountSqlNoDataId2" resultType="Long" parameterType="org.jeecg.modules.system.model.DuplicateCheckVo">

Loading…
Cancel
Save