Merge remote-tracking branch 'origin/feature_dev_20221125_YW' into feature_dev_20221125_YW
This commit is contained in:
+12
@@ -652,4 +652,16 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
||||
return super.importExcel(request, response, ParamsCollectManifestEO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤回
|
||||
*
|
||||
* @param paramsCollectManifestVO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "参数项收集清单-强制撤回")
|
||||
@ApiOperation(value="参数项收集清单-强制撤回", notes="参数项收集清单-强制撤回")
|
||||
@PostMapping(value = "/mandatoryWithdraw")
|
||||
public Result<?> mandatoryWithdraw(ParamsCollectManifestVO paramsCollectManifestVO) {
|
||||
return this.paramsCollectManifestEOService.mandatoryWithdraw(paramsCollectManifestVO);
|
||||
}
|
||||
}
|
||||
|
||||
+3
@@ -187,4 +187,7 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
|
||||
|
||||
// 认证工程师-更新参考列
|
||||
boolean updateReferencesCol(List<Map<String, Object>> configDataList, String paramsManifestId);
|
||||
|
||||
// 认证工程师-强制撤回
|
||||
Result<?> mandatoryWithdraw(ParamsCollectManifestVO paramsCollectManifestVO);
|
||||
}
|
||||
|
||||
+71
@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.common.collect.Lists;
|
||||
@@ -57,6 +58,7 @@ import com.jero.modules.system.service.ISysAnnouncementService;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import com.jero.modules.system.service.ISysUserRoleService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -5139,6 +5141,75 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
return updateBatchById(updateEOList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> mandatoryWithdraw(ParamsCollectManifestVO paramsCollectManifestVO) {
|
||||
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds())) {
|
||||
throw new JeroBootException("参数不能为空!");
|
||||
}
|
||||
String paramsCollectManifestIds = paramsCollectManifestVO.getIds();
|
||||
String[] paramsCollectManifestIdArr = paramsCollectManifestIds.split(",");
|
||||
|
||||
// 根据参数收集清单id数组,查询参数配置数据
|
||||
QueryWrapper<ParamsConfigDataEO> configDataQueryWrap = new QueryWrapper<>();
|
||||
configDataQueryWrap.lambda().in(ParamsConfigDataEO::getParamsCollectManifestId,paramsCollectManifestIdArr);
|
||||
List<ParamsConfigDataEO> paramsConfigDataList = this.paramsConfigDataEOService.list(configDataQueryWrap);
|
||||
|
||||
for (int i=0; i<paramsCollectManifestIdArr.length; i++) {
|
||||
String paramsCollectManifestId = paramsCollectManifestIdArr[i];
|
||||
ParamsCollectManifestEO collectManifestEO = this.getById(paramsCollectManifestId);
|
||||
// 如果数据状态为 "已同步上报库",不予处理
|
||||
if(StringUtils.equals(collectManifestEO.getState(),CollectManifestStateEnum.SYNC_REPORT.getValue())){
|
||||
continue;
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(paramsConfigDataList)){
|
||||
List<ParamsConfigDataEO> paramsConfigDataListTemp = paramsConfigDataList.stream().filter(paramsConfig -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(paramsConfig.getParamsCollectManifestId(), paramsCollectManifestId)) {
|
||||
// 如果三种数据其中一种不为空,需要更新,都为空的话无需更新。
|
||||
if(StringUtils.isNotEmpty(paramsConfig.getTextData()) || StringUtils.isNotEmpty(paramsConfig.getPullData()) || StringUtils.isNotEmpty(paramsConfig.getFileConnectId())){
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
// 如果该参数收集清单数据对应的参数配置数据不为空,则设置将填写人填写的数据设置为空
|
||||
if(CollectionUtils.isNotEmpty(paramsConfigDataListTemp)){
|
||||
for (ParamsConfigDataEO paramsConfigDataEO : paramsConfigDataListTemp) {
|
||||
LambdaUpdateWrapper<ParamsConfigDataEO> configDataUpdateWrap = new LambdaUpdateWrapper<>();
|
||||
configDataUpdateWrap.set(ParamsConfigDataEO::getTextData,null);
|
||||
configDataUpdateWrap.set(ParamsConfigDataEO::getPullData,null);
|
||||
configDataUpdateWrap.set(ParamsConfigDataEO::getFileConnectId,null);
|
||||
configDataUpdateWrap.eq(ParamsConfigDataEO::getId,paramsConfigDataEO.getId());
|
||||
try {
|
||||
this.paramsConfigDataEOService.update(configDataUpdateWrap);
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
log.error("强制撤回,更新参数配置数据失败:" + ex.getMessage());
|
||||
throw new JeroBootException("强制撤回,更新参数配置数据失败!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LambdaUpdateWrapper<ParamsCollectManifestEO> updateWrap = new LambdaUpdateWrapper<>();
|
||||
updateWrap.set(ParamsCollectManifestEO::getSdt,null);
|
||||
updateWrap.set(ParamsCollectManifestEO::getDre,null);
|
||||
updateWrap.set(ParamsCollectManifestEO::getDeadline,null);
|
||||
updateWrap.set(ParamsCollectManifestEO::getState,CollectManifestStateEnum.WAIT_COLLECT.getValue());
|
||||
updateWrap.eq(ParamsCollectManifestEO::getId,paramsCollectManifestId);
|
||||
try {
|
||||
this.update(updateWrap);
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
log.error("强制撤回,更新参数收集清单失败:" + ex.getMessage());
|
||||
throw new JeroBootException("强制撤回,更新参数收集清单失败!");
|
||||
}
|
||||
}
|
||||
return Result.OK("强制撤回成功!");
|
||||
}
|
||||
|
||||
private void deadlineDateMap(Map<String, List<String>> today, ParamsCollectManifestEO collectManifestEO, String thirdId) {
|
||||
List<String> stringList = today.get(thirdId);
|
||||
if (ObjectUtils.isEmpty(stringList)) {
|
||||
|
||||
@@ -737,6 +737,7 @@ module.exports = {
|
||||
Attentionfreeze: 'Note: Note: The item can no longer be configured after its frozen. ',
|
||||
Filledperson: 'The project contact person has not been filled in. Please fill in the project contact person before issuing and collecting.',
|
||||
Datastatusis: 'Datastatusis',
|
||||
Datastateexcept: 'Data state except',
|
||||
Dropdownradio: 'Drop Down Radio',
|
||||
Dropdownmultipleselection: 'Drop down multiple selection',
|
||||
a: '+',
|
||||
|
||||
@@ -753,6 +753,7 @@ module.exports = {
|
||||
Attentionfreeze: '注:冻结后该冻结配置内容不可进行编辑。',
|
||||
Filledperson: '工程接口人没有填写,请填写完工程接口人再进行下发收集。',
|
||||
Datastatusis: '数据状态为',
|
||||
Datastateexcept: '数据状态除了',
|
||||
Dropdownradio: '下拉单选',
|
||||
Dropdownmultipleselection: '下拉多选',
|
||||
a: '+',
|
||||
|
||||
@@ -426,7 +426,7 @@
|
||||
<!-- 认证工程师-提示-->
|
||||
<div style='font-size: 16px;color: red;text-align: center' v-if='NoEngineer === 1'>
|
||||
{{ currentPersonRole =='homo'? $t('certifiedEngineer'): (currentPersonRole =='sdt'?
|
||||
$t('engineeringInterfacePerson'): $t('completedBy')) }}{{$t('Datastatusis')}}
|
||||
$t('engineeringInterfacePerson'): $t('completedBy')) }}{{jurisdiction === "homoQZTH"? $t('Datastateexcept') : $t('Datastatusis')}}
|
||||
<!-- 下发收集时-->
|
||||
<span v-if='jurisdiction === "HOMOZFSJ"' class="text-wraning">
|
||||
'{{$t('CollectionInitiated')}}'、'{{$t('ReturnedPerson')}}'{{$t('or')}}'{{$t('alteration')}}'
|
||||
@@ -459,7 +459,7 @@
|
||||
</span>
|
||||
<!-- 强制撤回-->
|
||||
<span v-else-if='jurisdiction === "homoQZTH"' class="text-wraning">
|
||||
'{{$t('handledInterface')}}'{{$t('or')}}'{{$t('Filledreturn')}}'
|
||||
'{{$t('SynchronizedLibrary')}}'{{$t('or')}}'{{$t('CollectionInitiated')}}'
|
||||
</span>
|
||||
<span v-else-if='jurisdiction === "sdtQZTH"' class="text-wraning">
|
||||
{{$t('completed')}}
|
||||
@@ -1081,7 +1081,8 @@
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
} else {
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
if (item.state !== '待工程接口人处理' && item.state !== '填写人退回' && item.state !== 'To be processed by eng. interface' && item.state !== 'Rejected by the applicant') {
|
||||
console.log(item)
|
||||
if (item.state == '已同步至上报库' || item.state == 'Synced to library' || item.state == '待发起收集' || item.state == 'To be collected') {
|
||||
this.NotSelectedRowKeysValue.push(item)
|
||||
this.jurisdiction = 'homoQZTH'
|
||||
flag = 0
|
||||
@@ -1665,8 +1666,14 @@
|
||||
let _this = this
|
||||
let param = { ids: _array.join(',') }
|
||||
this.textLoading = true
|
||||
let url = ''
|
||||
if(this.currentPersonRole == 'homo'){
|
||||
url = '/jero-boot/params/collectManifest/mandatoryWithdraw'
|
||||
}else{
|
||||
url = '/jero-boot/params/collectManifest/withdraw'
|
||||
}
|
||||
axios({
|
||||
url: '/jero-boot/params/collectManifest/withdraw',
|
||||
url: url,
|
||||
method: 'post',
|
||||
data: param,
|
||||
transformRequest: [function(data) {
|
||||
|
||||
Reference in New Issue
Block a user