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

This commit is contained in:
wangzhijiang
2022-07-15 18:33:31 +08:00
5 changed files with 41 additions and 20 deletions
@@ -1,6 +1,8 @@
package com.jero.modules.cert.collect.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
@@ -119,6 +121,7 @@ public class ParamsCollectManifestBaseEO implements Serializable {
/**工程接口人*/
@Excel(name = "工程接口人", width = 15)
@ApiModelProperty(value = "工程接口人")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String sdt;
/**填写人*/
@@ -1226,8 +1226,14 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
SysUser sysUser = sysUserService.getById(sdtId);
if (ObjectUtil.isNotEmpty(sysUser)) {
updateEO.setSdt(sysUser.getUsername()); // 设置工程接口人
} else {
updateEO.setSdt(null); // 设置工程接口人
}
} else {
updateEO.setSdt(null); // 设置工程接口人
}
} else {
updateEO.setSdt(null); // 设置工程接口人
}
return updateById(updateEO);
@@ -98,12 +98,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
String nioNumber = paramsInfoEO.getNioNumber();
String paramsTemplateId = paramsInfoEO.getParamsTemplateId();
// 校验nio编号 格式:字母数字横杠(-)
String nioNumberRegex = "^[A-Za-z0-9-]+$";
String nioNumberRegex = "^[A-Za-z0-9-/. ]+$";
if (!nioNumber.matches(nioNumberRegex)) {
if (CutEnum.CN.getValue().equals(paramsInfoEO.getCut())) {
throw new JeroBootException("NIO编号格式错误,仅能为字母,数字,横杠(-)!");
throw new JeroBootException("NIO编号格式错误,仅能为字母,数字,横杠(-),小数点(.),左斜杠,空格");
} else {
throw new JeroBootException("NIO number formatting errors, can only letters, numbers, dash (-)!");
throw new JeroBootException("NIO number formatting errors, can only letters,numbers,dash (-),dot (.),left slash,spaces!");
}
}
@@ -176,12 +176,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
String paramsTemplateId = paramsInfoEO.getParamsTemplateId();
// 校验nio编号 格式:字母数字横杠(-)
String nioNumberRegex = "^[A-Za-z0-9-]+$";
String nioNumberRegex = "^[A-Za-z0-9-/. ]+$";
if (!nioNumber.matches(nioNumberRegex)) {
if (CutEnum.CN.getValue().equals(paramsInfoEO.getCut())) {
throw new JeroBootException("NIO编号格式错误,仅能为字母,数字,横杠(-)!");
throw new JeroBootException("NIO编号格式错误,仅能为字母,数字,横杠(-),小数点(.),左斜杠,空格");
} else {
throw new JeroBootException("NIO number formatting errors, can only letters, numbers, dash (-)!");
throw new JeroBootException("NIO number formatting errors, can only letters,numbers,dash (-),dot (.),left slash,spaces!");
}
}
@@ -1134,12 +1134,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
countError += (int)resultMap.get("countError");
if (StringUtils.isNotEmpty(dto.getNioNumber())) {
// 校验nio编号 格式:字母数字横杠(-)
String nioNumberRegex = "^[A-Za-z0-9-]+$";
String nioNumberRegex = "^[A-Za-z0-9-/. ]+$";
if (!nioNumber.matches(nioNumberRegex)) {
if(CutEnum.CN.getValue().equals(cut)) {
errorMsg += "NIO编号格式错误,仅能为字母,数字,横杠(-);";
errorMsg += "NIO编号格式错误,仅能为字母,数字,横杠(-),小数点(.),左斜杠,空格";
} else {
errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-);";
errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-),dot (.),left slash,spaces;";
}
countError++;
}
@@ -1389,12 +1389,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
countError += (int)resultMap.get("countError");
if (StringUtils.isNotEmpty(ccDto.getNioNumber())) {
// 校验nio编号 格式:字母数字横杠(-)
String nioNumberRegex = "^[A-Za-z0-9-]+$";
String nioNumberRegex = "^[A-Za-z0-9-/. ]+$";
if (!nioNumber.matches(nioNumberRegex)) {
if(CutEnum.CN.getValue().equals(cut)) {
errorMsg += "nio编号格式错误,仅能为字母,数字,横杠(-);";
errorMsg += "nio编号格式错误,仅能为字母,数字,横杠(-),小数点(.),左斜杠,空格";
} else {
errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-);";
errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-),dot (.),left slash,spaces;";
}
countError++;
}
@@ -1420,12 +1420,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
countError += (int)resultMap.get("countError");
if (StringUtils.isNotEmpty(ccDto.getParamsNumber())) {
// 校验编号 格式:字母数字横杠(-)
String numberRegex = "^[A-Za-z0-9-]+$";
String numberRegex = "^[A-Za-z0-9-/. ]+$";
if (!paramsNumber.matches(numberRegex)) {
if(CutEnum.CN.getValue().equals(cut)) {
errorMsg += "编号格式错误,仅能为字母,数字,横杠(-);";
errorMsg += "编号格式错误,仅能为字母,数字,横杠(-),小数点(.),左斜杠,空格";
} else {
errorMsg += "Number formatting errors, can only letters, numbers, dash (-);";
errorMsg += "Number formatting errors, can only letters, numbers, dash (-),dot (.),left slash,spaces;";
}
countError++;
}
@@ -195,6 +195,7 @@ public class SyncDataServiceImpl implements ISyncDataService{
}
// 处理同步过来的数据id不同,username相同的情况 creation_time不能为空
// ppEmployeeList.sort(Comparator.comparing(PPEmployee::getCreation_time).reversed());
ppEmployeeList = ppEmployeeList.stream().distinct().collect(Collectors.toList()); // 去重
//此处获取全部pp用户信息
List<SysUser> sysUserList = sysUserService.getPPEmployeeList();
@@ -117,7 +117,7 @@
@cancel="cancel">
<a-form-model
class='tag-module'
ref='ruleForm'
ref='ruleFormOne'
:model='Dateline'
:rules='rules'
:label-col='labelCol'
@@ -136,6 +136,7 @@
<!-- </a-select-option>-->
<!-- </a-select>-->
<j-dict-select-tag class="box-input" v-model="Dateline.queryzr"
@input="handleInput('queryzr')"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
@@ -146,7 +147,7 @@
<div class="imports-footer">
<div class="imports-footer-wrap">
<a-button class="imports-btn imports-sub" type="primary" @click="handleSubmitzr">{{$t('preservation')}}
<a-button class="imports-btn imports-sub" :loading="confirmLoading" type="primary" @click="handleSubmitzr">{{$t('preservation')}}
</a-button>
<a-button class="imports-btn" type="primary" @click="cancel">{{$t('cancel')}}</a-button>
</div>
@@ -278,6 +279,7 @@
indeterminate: false,
columns: [],
content: [],
confirmLoading:false,
selectedRowKeys: [],
selectedRowrowValue: [],
dataSource: [],
@@ -348,6 +350,12 @@
return 'rowClassRed'
}
},
handleInput(value) {
this.$nextTick(() => {
this.Dateline = { ...this.Dateline }
this.$refs.ruleFormOne.validateField([value])
})
},
pageOnChange(page, pageSize) {
this.pageNo = page
this.$emit('handlePreservation')
@@ -415,8 +423,9 @@
handleSubmitzr(record) {
let _this = this
let param = { dutyTerritory: this.Dateline.queryzr, ids: this.getquerySdtId,paramsManifestId: this.$route.query.id, }
this.$refs.ruleForm.validate(valid => {
this.$refs.ruleFormOne.validate(valid => {
if (valid) {
this.confirmLoading = true
axios({
url: '/jero-boot/params/collectManifest/updateDutyTerritory',
method: 'post',
@@ -442,8 +451,10 @@
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
this.confirmLoading = false
})
.catch((error) => {
this.confirmLoading = false
console.log(error)
})
}
@@ -494,7 +505,7 @@
},
cancel(){
this.areaVisiblezr = false
this.$refs['ruleForm'].resetFields()
this.$refs['ruleFormOne'].resetFields()
},
// 点击工程接口人的详情人员 有权限
areaOfResponsibility(record) {
@@ -513,7 +524,7 @@
this.$nextTick(() => {
this.Dateline = { ...this.Dateline }
this.getquerySdtId = record.id
this.$refs.ruleForm.clearValidate()
this.$refs.ruleFormOne.clearValidate()
})
},
dataValueTobeinitiated() {