问题修改

master
王家东 2 weeks ago
parent f8dc4accc6
commit 31409fdfb7
  1. 31
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/depsbncz/controller/DepsbnczController.java
  2. 7
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java
  3. 18
      jeecgboot-vue3/src/views/depsbncz/DepsbnczList.vue
  4. 7
      jeecgboot-vue3/src/views/depsbncz/components/DepsbnczForm.vue
  5. 19
      jeecgboot-vue3/src/views/expert/admin/ExpertList.vue
  6. 19
      jeecgboot-vue3/src/views/expert/adminback/ExpertList.vue
  7. 11
      jeecgboot-vue3/src/views/expert/county/ExpertList.vue
  8. 21
      jeecgboot-vue3/src/views/expert/firm/ExpertList.vue
  9. 35
      jeecgboot-vue3/src/views/expert/self/ExpertList.vue
  10. 35
      jeecgboot-vue3/src/views/expert/selfback/ExpertList.vue

@ -120,16 +120,19 @@ public class DepsbnczController extends JeecgController<Depsbncz, IDepsbnczServi
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
depsbncz.setUserid(user.getId());
String depiid = depadminlxService.getdepid(user.getId());
// 获取当前日期
LocalDate currentDate = LocalDate.now();
// 获取当前年份并直接转换为字符串
String currentYearString = String.valueOf(currentDate.getYear());
Annual annual = annualService.query().eq("annual_name",currentYearString).one();
List<Depsbncz> depsbnczs=depsbnczService.query().eq("annualid",annual.getId()).eq("depid",depiid).list();
if (depsbnczs.size()>0){
if (depiid == null || depiid.isEmpty()){
return Result.error("请确定自己的单位信息是否完整");
}
List<Depsbncz> depsbnczList =depsbnczService.query().eq("annualid",depsbncz.getAnnualid()).eq("depid",depiid).list();
int a=0;
if (depsbnczList == null || depsbnczList.isEmpty()) {
} else {
a=depsbnczList.size();
}
if (a>0){
return Result.error("本年度已经添加过了");
}else {
depsbncz.setAnnualid(annual.getId());
depsbncz.setDepid(depiid);
depsbnczService.save(depsbncz);
return Result.OK("添加成功!");
@ -146,6 +149,18 @@ public class DepsbnczController extends JeecgController<Depsbncz, IDepsbnczServi
@ApiOperation(value="上年度(末)主要财务数据-编辑", notes="上年度(末)主要财务数据-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody Depsbncz depsbncz) {
List<Depsbncz> depsbnczList =depsbnczService.query().eq("annualid",depsbncz.getAnnualid()).eq("depid",depsbncz.getDepid()).list();
int a=0;
if (depsbnczList == null || depsbnczList.isEmpty()) {
} else {
a=depsbnczList.size();
}
if (a>0){
return Result.error("每年度仅可添加一次");
}
depsbnczService.updateById(depsbncz);
return Result.OK("编辑成功!");
}

@ -173,7 +173,12 @@ public class ExpertController extends JeecgController<Expert, IExpertService> {
//开始对比两个List获取相同部分,获取的交叉id就是需要的id
List<String> commonElements = userdepids.stream().filter(userbyrole::contains).collect(Collectors.toList());
//根据查询的userid去获取username
List<SysUser> sysUserList = sysUserService.query().in("id",commonElements).list();
List<SysUser> sysUserList =new ArrayList<>();
if(commonElements!=null && !commonElements.isEmpty()) {
sysUserList = sysUserService.query().in("id", commonElements).list();
} else{
return Result.error("目前没有专家注册。");
}
//根据查询的结果获取username的list
List<String> usernames = sysUserList.stream().map(SysUser::getUsername).collect(Collectors.toList());

@ -4,6 +4,24 @@
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="annualid">
<template #label><span title="年度">年度</span></template>
<j-search-select placeholder="请选择年度" v-model:value="queryParam.annualid" dict="annual,annual_name,id" allow-clear />
</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-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>

@ -4,6 +4,11 @@
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="DepsbnczForm">
<a-row>
<a-col :span="24">
<a-form-item label="年度" v-bind="validateInfos.annualid" id="DepsbnczForm-annualid" name="annualid">
<j-search-select v-model:value="formData.annualid" dict="annual,annual_name,id" allow-clear />
</a-form-item>
</a-col>
<!-- <a-col :span="24">
<a-form-item label="部门" v-bind="validateInfos.depid" id="DepsbnczForm-depid" name="depid">
<j-search-select v-model:value="formData.depid" dict="sys_depart,depart_name,id" allow-clear />
@ -96,6 +101,8 @@
jyzc: '',
jyjy: '',
nsze: '',
annualid: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });

@ -7,30 +7,22 @@
<a-col :lg="6">
<a-form-item name="seusername">
<template #label><span title="用户名">用户名</span></template>
<a-input placeholder="请输入用户名" v-model:value="queryParam.seusername" allow-clear ></a-input>
<j-search-select placeholder="请选择用户名" v-model:value="queryParam.seusername" dict="sys_user,realname,username" allow-clear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="directioncal">
<template #label><span title="研究领域">研究领域</span></template>
<a-input placeholder="请输入研究领域" v-model:value="queryParam.directioncal" allow-clear ></a-input>
<a-form-item name="compopen">
<template #label><span title="部门审核">部门审核</span></template>
<j-select-multiple placeholder="请选择部门审核" v-model:value="queryParam.compopen" dictCode="examstures" allow-clear />
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :lg="6">
<a-form-item name="adminopen">
<template #label><span title="管理员审核">管理员审</span></template>
<j-select-multiple placeholder="请选择管理员审核" v-model:value="queryParam.adminopen" dictCode="examstures" allow-clear />
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :lg="6">
<a-form-item name="research">
<template #label><span title="细分方向">细分方向</span></template>
<a-input placeholder="请输入细分方向" v-model:value="queryParam.research" allow-clear ></a-input>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
@ -96,6 +88,7 @@
import JDictSelectTag from '/src/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSwitch from '/src/components/Form/src/jeecg/components/JSwitch.vue';
import JSelectMultiple from '/src/components/Form/src/jeecg/components/JSelectMultiple.vue';
import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
const formRef = ref();
const queryParam = reactive<any>({});

@ -7,30 +7,22 @@
<a-col :lg="6">
<a-form-item name="seusername">
<template #label><span title="用户名">用户名</span></template>
<a-input placeholder="请输入用户名" v-model:value="queryParam.seusername" allow-clear ></a-input>
<j-search-select placeholder="请选择用户名" v-model:value="queryParam.seusername" dict="sys_user,realname,username" allow-clear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="directioncal">
<template #label><span title="研究领域">研究领域</span></template>
<a-input placeholder="请输入研究领域" v-model:value="queryParam.directioncal" allow-clear ></a-input>
<a-form-item name="compopen">
<template #label><span title="部门审核">部门审核</span></template>
<j-select-multiple placeholder="请选择部门审核" v-model:value="queryParam.compopen" dictCode="examstures" allow-clear />
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :lg="6">
<a-form-item name="adminopen">
<template #label><span title="管理员审核">管理员审</span></template>
<j-select-multiple placeholder="请选择管理员审核" v-model:value="queryParam.adminopen" dictCode="examstures" allow-clear />
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :lg="6">
<a-form-item name="research">
<template #label><span title="细分方向">细分方向</span></template>
<a-input placeholder="请输入细分方向" v-model:value="queryParam.research" allow-clear ></a-input>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
@ -94,6 +86,7 @@
import JDictSelectTag from '/src/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSwitch from '/src/components/Form/src/jeecg/components/JSwitch.vue';
import JSelectMultiple from '/src/components/Form/src/jeecg/components/JSelectMultiple.vue';
import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
const formRef = ref();
const queryParam = reactive<any>({});

@ -7,21 +7,23 @@
<a-col :lg="6">
<a-form-item name="seusername">
<template #label><span title="用户名">用户名</span></template>
<a-input placeholder="请输入用户名" v-model:value="queryParam.seusername" allow-clear ></a-input>
<j-search-select placeholder="请选择用户名" v-model:value="queryParam.seusername" dict="sys_user,realname,username" allow-clear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="directioncal">
<template #label><span title="研究领域">研究领域</span></template>
<a-input placeholder="请输入研究领域" v-model:value="queryParam.directioncal" allow-clear ></a-input>
<a-form-item name="compopen">
<template #label><span title="部门审核">部门审核</span></template>
<j-select-multiple placeholder="请选择部门审核" v-model:value="queryParam.compopen" dictCode="examstures" allow-clear />
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :lg="6">
<a-form-item name="adminopen">
<template #label><span title="管理员审核">管理员审</span></template>
<j-select-multiple placeholder="请选择管理员审核" v-model:value="queryParam.adminopen" dictCode="examstures" allow-clear />
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
@ -87,6 +89,7 @@
import JSwitch from '/src/components/Form/src/jeecg/components/JSwitch.vue';
import JSelectMultiple from '/src/components/Form/src/jeecg/components/JSelectMultiple.vue';
import {handlebackback} from "@/views/expert/firm/Expert.api";
import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
const formRef = ref();
const queryParam = reactive<any>({});

@ -7,32 +7,20 @@
<a-col :lg="6">
<a-form-item name="seusername">
<template #label><span title="用户名">用户名</span></template>
<a-input placeholder="请输入用户名" v-model:value="queryParam.seusername" allow-clear ></a-input>
<j-search-select placeholder="请选择用户名" v-model:value="queryParam.seusername" dict="sys_user,realname,username" allow-clear />
</a-form-item>
</a-col>
<a-col :lg="6">
<!-- <a-form-item name="directioncal">
<template #label><span title="研究领域">研究领域</span></template>
<a-input placeholder="请输入研究领域" v-model:value="queryParam.directioncal" allow-clear ></a-input>
</a-form-item>-->
<a-form-item name="compopen">
<template #label><span title="部门审核">部门审核</span></template>
<j-select-multiple placeholder="请选择部门审核" v-model:value="queryParam.compopen" dictCode="examstures" allow-clear />
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :lg="6">
<a-form-item name="research">
<template #label><span title="细分方向">细分方向</span></template>
<a-input placeholder="请输入细分方向" v-model:value="queryParam.research" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="compopen">
<template #label><span title="部门审核">部门审核</span></template>
<j-select-multiple placeholder="请选择部门审核" v-model:value="queryParam.compopen" dictCode="examstures" allow-clear />
<a-form-item name="adminopen">
<template #label><span title="管理员审核">管理员审</span></template>
<j-select-multiple placeholder="请选择管理员审核" v-model:value="queryParam.adminopen" dictCode="examstures" allow-clear />
</a-form-item>
</a-col>
</template>
@ -98,6 +86,7 @@
import JDictSelectTag from '/src/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSwitch from '/src/components/Form/src/jeecg/components/JSwitch.vue';
import JSelectMultiple from '/src/components/Form/src/jeecg/components/JSelectMultiple.vue';
import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
const formRef = ref();
const queryParam = reactive<any>({});

@ -3,40 +3,7 @@
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="seusername">
<template #label><span title="用户名">用户名</span></template>
<a-input placeholder="请输入用户名" v-model:value="queryParam.seusername" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="directioncal">
<template #label><span title="研究领域">研究领域</span></template>
<a-input placeholder="请输入研究领域" v-model:value="queryParam.directioncal" allow-clear ></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :lg="6">
<a-form-item name="research">
<template #label><span title="细分方向">细分方向</span></template>
<a-input placeholder="请输入细分方向" v-model:value="queryParam.research" allow-clear ></a-input>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->

@ -3,40 +3,7 @@
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="seusername">
<template #label><span title="用户名">用户名</span></template>
<a-input placeholder="请输入用户名" v-model:value="queryParam.seusername" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="directioncal">
<template #label><span title="研究领域">研究领域</span></template>
<a-input placeholder="请输入研究领域" v-model:value="queryParam.directioncal" allow-clear ></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :lg="6">
<a-form-item name="research">
<template #label><span title="细分方向">细分方向</span></template>
<a-input placeholder="请输入细分方向" v-model:value="queryParam.research" allow-clear ></a-input>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->

Loading…
Cancel
Save