Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
wangzhijiang
2022-08-05 10:55:47 +08:00
4 changed files with 52 additions and 129 deletions
@@ -60,13 +60,12 @@
</select>
<select id="queryById" resultType="com.jero.modules.project.entity.ProjectRelatedPersonnel">
SELECT
<include refid="select_item"/>
SELECT *
FROM
project_related_personnel AS prp
project_related_personnel
<where>
prp.id=#{id}
id=#{id}
</where>
order by prp.create_time desc
order by create_time desc
</select>
</mapper>
@@ -34,14 +34,7 @@ import org.apache.poi.hssf.usermodel.HSSFRichTextString;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -475,8 +468,9 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
if (id.contains(",")) {//多个id
List<String> idList = Arrays.asList(id.split(","));
QueryWrapper<ProjectRelatedPersonnel> queryWrapper = new QueryWrapper<>();
queryWrapper.in("id",idList);
queryWrapper.lambda().in(ProjectRelatedPersonnel::getId, idList);
records = list(queryWrapper);
disposeData(records);
} else {//1个id
records = queryById(id);
@@ -486,8 +480,12 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
}
//id无值,传全部
disposeDutyTerritory(records,cut);
records = records.stream()
.sorted(Comparator.comparing(ProjectRelatedPersonnel::getDutyTerritory))
.collect(Collectors.toList());
return records;
}
public void disposeDutyTerritory(List<ProjectRelatedPersonnel> records,String cut) {
//查标签内容里的责任领域数据
List<SysDictItem> sysDictItemValueList = sysDictItemMapper.selectItemsByDictCode(DictCodeEnum.DUTY_TERRITORY.getValue());
@@ -2,7 +2,7 @@
<div class='diolag-area'>
<a-spin :spinning='spinLoading'>
<a-form-model
class='formAdd'
class='tag-module'
ref='ruleForm'
:model='form'
:rules='rules'
@@ -10,35 +10,30 @@
:wrapper-col='wrapperCol'
>
<a-row :gutter='24'>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('areaOfResponsibility')">
{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel" prop="dutyTerritory">
<j-dict-select-tag class="box-input" v-model="form.dutyTerritory"
style='width: 200px'
@input="handleInput('queryzr')"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item>
</div>
<!-- <a-col :span='24'>-->
<!-- <span style='display: flex;justify-content: center;margin-bottom: 20px;'> <span style='margin-top: 6px;margin-right: 7px'>{{$t('cutoffTime')}}</span>-->
<!-- <a-date-picker :placeholder="$t('PleaseSelect')+$t('cutoffTime')" @change="onChange" @ok="onOk" />-->
<!-- </span>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-model-item ref='region' :label="$t('areaOfResponsibility')" prop='dutyTerritory'>
<j-dict-select-tag class="box-input" v-model="form.dutyTerritory"
@input="handleInput('dutyTerritory')"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<div class="imports-footer">
<div class="imports-footer-wrap">
<a-button class="imports-btn imports-sub" type="primary" @click="handleSubmit">{{$t('submit')}}
</a-button>
<a-button class="imports-btn" type="primary" @click="handleCancel">{{$t('cancel')}}</a-button>
</div>
</div>
</a-spin>
<div class='drawer-bootom-button'>
<a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>
<a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>
</div>
<!-- <div class='drawer-bootom-button'>-->
<!-- <a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>-->
<!-- <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>-->
<!-- </div>-->
<!-- 错误数据提示-->
<a-modal
:title="$t('operationFailed')"
@@ -125,7 +120,6 @@ export default {
}
},
mounted() {
this.loadData()
this.bodystyle = {
height: '480px',
overflow: 'hidden',
@@ -133,55 +127,17 @@ export default {
}
},
methods: {
loadData() {
this.loading = true
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.form
}
getAction(`sys/user/page`, params).then(res => {
if (res.success) {
this.areaTable = [...res.result.records]
this.total = res.result.total
}
}).finally(() => {
this.loading = false
})
},
handleInput(value) {
this.$nextTick(() => {
this.form = { ...this.form }
this.$refs.ruleFormOne.validateField([value])
this.$refs.ruleForm.validateField([value])
})
},
searchQuery() {
this.loadData()
},
searchReset() {
this.form = {}
this.loadData()
},
handleCancel() {
this.$emit('areaVisibleTaskCutOffTimeflag', false)
},
handleTableChange(val) {
this.$emit('AdjustareasofresponAll', false)
},
//保存
handleSubmit() {
// let _this = this
// let param = {ids: this.selectedRowKeysArray, deadline: `${this.pickerDate}`, }
// this.confirmLoading = true
// postAction('/params/collectManifest/updateDeadlineBatch', param).then((res) => {
// if (res.success) {
// this.$emit('areaVisibleTaskCutOffTimeflag', false)
// this.$message.success(_this.$t('OperationSuccessful'))
// this.confirmLoading = false
// } else {
// this.$message.warning(_this.$t('operationFailed'))
// this.confirmLoading = false
// }
// })
this.$refs.ruleForm.validate(valid => {
if(valid){
let long = localStorage.getItem('language')
@@ -205,62 +161,32 @@ export default {
}
this.textLoading = true
axios({
url: '/jero-boot/params/collectManifest/issueCollection',
method: 'post',
data: param,
transformRequest: [function(data) {
let ret = ''
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
postAction('/params/collectManifest/updateBatchDutyTerritory', param).then((res) => {
if (res.success) {
if(res.result.length == 0){
this.visibleoperationFailed = false
this.textLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.$emit('AdjustareasofresponAll', false)
this.$emit('GetgetTableList')
}else{
this.NotSelectedRowKeysValue = res.result
this.visibleoperationFailed = true
this.textLoading = false
}
return ret
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token': _this.token
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
.then((res) => {
if (res.data.success) {
// _this.$message.success(this.$t('OperationSuccessful'))
if(res.data.result.length == 0){
this.visibleoperationFailed = false
this.textLoading = false
_this.$message.success(this.$t('OperationSuccessful'))
this.$emit('areaVisibleTaskCutOffTimeflag', false)
this.$emit('GetgetTableList')
}else{
this.NotSelectedRowKeysValue = res.data.result
this.visibleoperationFailed = true
this.textLoading = false
}
// this.$emit('areaVisibleTaskCutOffTimeflag', false)
// this.$emit('GetgetTableList')
} else {
_this.$message.warning(this.$t('operationFailed'))
}
})
.catch((error) => {
this.textLoading = false
})
}
})
},
// 错误数据的弹框
cancleoperationFailed() {
this.visibleoperationFailed = false
this.$emit('areaVisibleTaskCutOffTimeflag', false)
this.$emit('AdjustareasofresponAll', false)
this.$emit('GetgetTableList')
// this.GetgetTableList()
},
onChange(val) {
this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss')
},
onOk(val) {
this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss')
},
}
}
@@ -300,10 +300,10 @@
@areaVisibleTaskCutOffTimeAll='areaVisibleTaskCutOffTimeAll'/>
</a-modal>
<!-- 调整责任领域-->
<a-modal v-model="Adjustareasofrespon" :title="$t('Adjustareasofresponsibility')" width='400px' :footer="null">
<a-modal v-model="Adjustareasofrespon" :title="$t('Adjustareasofresponsibility')" width='620px' :footer="null">
<adjustarea-sofrespon v-if='Adjustareasofrespon' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList'
@areaVisibleTaskCutOffTimeAll='AdjustareasofresponAll'/>
@AdjustareasofresponAll='AdjustareasofresponAll'/>
</a-modal>
<!-- 引用参数--->
<a-modal v-model="areaVisiblereferenceparameter" :title="$t('referenceparameter')" width='650px' :footer="null">