同分复评

main
Gitea 5 months ago
parent b91cded52d
commit 6909766a15
  1. 35
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java
  2. 1
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java
  3. 11
      jeecgboot-vue3-master/src/views/scorepersion/ScorePersion.api.ts
  4. 12
      jeecgboot-vue3-master/src/views/scorepersion/ScorePersionList.vue
  5. 172
      jeecgboot-vue3-master/src/views/scorepersion/components/ScorePersionForm2.vue
  6. 2
      jeecgboot-vue3-master/src/views/scorepersion/components/ScorePersionModal1.vue
  7. 75
      jeecgboot-vue3-master/src/views/scorepersion/components/ScorePersionModal2.vue

@ -444,6 +444,41 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
return Result.OK("成功!");
}
/**
* 同分复评
*
* @param
* @return
*/
@AutoLog(value = "同分复评")
@ApiOperation(value="同分复评", notes="同分复评")
@PostMapping(value = "/tffp")
public Result<String> tffp(@RequestBody ScorePersion scorePersiontem,HttpServletRequest req) {
ScorePersion scorePersionsc = new ScorePersion();
QueryWrapper<ScorePersion> queryWrappersc = QueryGenerator.initQueryWrapper(scorePersionsc, req.getParameterMap());
queryWrappersc.eq("annualid",scorePersiontem.getAnnualid());
queryWrappersc.eq("annual_compid",scorePersiontem.getAnnualCompid());
queryWrappersc.eq("annual_comp_p",scorePersiontem.getAnnualCompP());
queryWrappersc.inSql("score","SELECT score FROM score_persion GROUP BY score HAVING COUNT( score ) > 1");
List<ScorePersion> listsc = scorePersionService.list(queryWrappersc);
if(listsc.size()>0){
for (int i = 0 ; i < listsc.size(); i++){
ExpScore expScore = new ExpScore();
QueryWrapper<ExpScore> queryWrapper = QueryGenerator.initQueryWrapper(expScore, req.getParameterMap());
queryWrapper.eq("annid",listsc.get(i).getAnnualid());
queryWrapper.eq("annal_comp",listsc.get(i).getAnnualCompid());
queryWrapper.eq("ann_com_p",listsc.get(i).getAnnualCompP());
queryWrapper.eq("bmcode",listsc.get(i).getEnrollCode());
List<ExpScore> list = expScoreService.list(queryWrapper);
ExpScore expScore1 = list.get(0);
expScore1.setIspf("0");
}
}
return Result.OK("成功!");
}
/**
* 评奖数据生成
*

@ -105,6 +105,7 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
//逻辑变动:奖项管理针对学生(上传证书和查询),组委会(全部都可以),学院(上传和查询),学校(教务处)(全部都可以),做一下数据筛选以及操作列权限
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());

@ -14,6 +14,7 @@ enum Api {
exportXlsMb = '/scorepersion/scorePersion/exportXlsMb',
queryCompId = '/annualcompgroup/annualCompGroup/queryCompId',
save1='/AnnualCompPoint/annualCompPoint/cjcxhq',
save2='/AnnualCompPoint/annualCompPoint/tffp',
}
export const queryCompId = (params) => defHttp.get({ url: Api.queryCompId, params }, { successMessageMode: 'none' });
@ -56,6 +57,16 @@ export const saveOrUpdate1 = (params, isUpdate) => {
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}
/**
*
* @param params
* @param isUpdate
*/
export const saveOrUpdate2 = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save2;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}
/**
*
* @param params

@ -35,6 +35,7 @@
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" @click="cxhq" preIcon="ant-design:sync-outlined"> 重新获取</a-button>
<a-button type="primary" @click="tpfp" preIcon="ant-design:sync-outlined"> 同分复评</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXlsMb"> 导出模板</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
@ -72,6 +73,7 @@
<!-- 表单区域 -->
<ScorePersionModal ref="registerModal" @success="handleSuccess"></ScorePersionModal>
<ScorePersionModal1 ref="registerModal1" @success="handleSuccess"></ScorePersionModal1>
<ScorePersionModal2 ref="registerModal2" @success="handleSuccess"></ScorePersionModal2>
</div>
</template>
@ -84,6 +86,7 @@
import { downloadFile } from '/@/utils/common/renderUtils';
import ScorePersionModal from './components/ScorePersionModal.vue'
import ScorePersionModal1 from './components/ScorePersionModal1.vue'
import ScorePersionModal2 from './components/ScorePersionModal2.vue'
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
@ -92,6 +95,7 @@
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const registerModal1 = ref();
const registerModal2 = ref();
//table
const { prefixCls, tableContext, onExportXls, onImportXls,onExportXlsMb } = useListPage({
tableProps: {
@ -148,6 +152,14 @@
registerModal1.value.add();
}
/**
* 同分复评
*/
function tpfp() {
registerModal2.value.disableSubmit = false;
registerModal2.value.add();
}
/**
* 编辑事件
*/

@ -0,0 +1,172 @@
<template>
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<a-col :span="24">
<a-form-item label="年度" v-bind="validateInfos.annualid">
<j-dict-select-tag v-model:value="formData.annualid" dictCode="annual,annual_name,id" placeholder="请选择年度" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="年度比赛" v-bind="validateInfos.annualCompid">
<j-search-select v-model:value="formData.annualCompid" :dict="strst" :disabled="disabled" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="年度比赛项目" v-bind="validateInfos.annualCompP">
<j-search-select v-model:value="formData.annualCompP" :dict="ndbsxm" :disabled="disabled" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted,watch } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
import { getValueType } from '/@/utils';
import { saveOrUpdate2,queryCompId } from '../ScorePersion.api';
import { Form } from 'ant-design-vue';
import { duplicateValidate } from '/@/utils/helper/validator'
let strst = ref();
let ndbsxm = ref();
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: ()=>{} },
formBpm: { type: Boolean, default: true }
});
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
annualid: '',
annualCompid: '',
annualCompP: '',
enrollCode: '',
score: '',
sort: undefined,
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = {
annualid: [{ required: true, message: '请输入年度!'},],
annualCompid: [{ required: true, message: '请输入年度比赛!'},],
annualCompP: [{ required: true, message: '请输入年度比赛项目!'},],
};
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
//
const disabled = computed(()=>{
if(props.formBpm === true){
if(props.formData.disabled === false){
return false;
}else{
return true;
}
}
return props.formDisabled;
});
watch(formData, (newVal) => {
if(formData.annualid==null||formData.annualid==""){
}else{
queryCompId("").then((result)=>{
//console.log(result);
const str = result;
if (str!=null&&str!="") {
//const ndbs = "annual_comp,name,id,annualid='1691982939857920001' and (compid='1696134761153875969' or compid='1697137689830363138')";
var ndbsstr="annual_comp,name,id,annualid='"+formData.annualid+"' and "+"("+str+")";
strst.value=ndbsstr;
}
});
}
if(formData.annualCompid!=""){
ndbsxm.value = "annual_comp_point,obj_name,id,annual_comp_id='"+formData.annualCompid+"'";
}
});
/**
* 新增
*/
function add() {
edit({});
}
/**
* 编辑
*/
function edit(record) {
nextTick(() => {
resetFields();
//
Object.assign(formData, record);
});
}
/**
* 提交数据
*/
async function submitForm() {
//
await validate();
confirmLoading.value = true;
const isUpdate = ref<boolean>(false);
//
let model = formData;
if (model.id) {
isUpdate.value = true;
}
//
for (let data in model) {
//
if (model[data] instanceof Array) {
let valueType = getValueType(formRef.value.getProps, data);
//
if (valueType === 'string') {
model[data] = model[data].join(',');
}
}
}
await saveOrUpdate2(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
}
async function enrollCodeDuplicatevalidate(_r, value) {
return duplicateValidate('score_persion', 'enroll_code', value, formData.id || '')
}
defineExpose({
add,
edit,
submitForm,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
min-height: 500px !important;
overflow-y: auto;
padding: 24px 24px 24px 24px;
}
</style>

@ -19,7 +19,7 @@
* 新增
*/
function add() {
title.value = '新增';
title.value = '重新获取';
visible.value = true;
nextTick(() => {
registerForm.value.add();

@ -0,0 +1,75 @@
<template>
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<ScorePersionForm2 ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ScorePersionForm2>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import ScorePersionForm2 from './ScorePersionForm2.vue'
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 新增
*/
function add() {
title.value = '同分复评';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
add,
edit,
disableSubmit,
});
</script>
<style>
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>
Loading…
Cancel
Save