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