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

This commit is contained in:
wangzhijiang
2022-07-05 16:22:05 +08:00
4 changed files with 56 additions and 44 deletions
@@ -2163,32 +2163,22 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//实施类别 implementType //实施类别 implementType
if(org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getImplementType())){ if(org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getImplementType())){
projectLawsInventoryEOTemp.setImplementType(projectLawsInventoryEO.getImplementType()); projectLawsInventoryEOTemp.setImplementType(projectLawsInventoryEO.getImplementType());
}else{
projectLawsInventoryEOTemp.setImplementType("");
} }
//认证类型 attestationType //认证类型 attestationType
if(org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationType())){ if(org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationType())){
projectLawsInventoryEOTemp.setAttestationType(projectLawsInventoryEO.getAttestationType()); projectLawsInventoryEOTemp.setAttestationType(projectLawsInventoryEO.getAttestationType());
}else{
projectLawsInventoryEOTemp.setAttestationType("");
} }
//认证级别 attestationRank //认证级别 attestationRank
if(org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationRank())){ if(org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationRank())){
projectLawsInventoryEOTemp.setAttestationRank(projectLawsInventoryEO.getAttestationRank()); projectLawsInventoryEOTemp.setAttestationRank(projectLawsInventoryEO.getAttestationRank());
}else{
projectLawsInventoryEOTemp.setAttestationRank("");
} }
//责任领域 dutyTerritory //责任领域 dutyTerritory
if(org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getDutyTerritory())){ if(org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getDutyTerritory())){
projectLawsInventoryEOTemp.setDutyTerritory(projectLawsInventoryEO.getDutyTerritory()); projectLawsInventoryEOTemp.setDutyTerritory(projectLawsInventoryEO.getDutyTerritory());
}else{
projectLawsInventoryEOTemp.setDutyTerritory("");
} }
//适用地区region //适用地区region
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getRegion())){ if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getRegion())){
projectLawsInventoryEOTemp.setRegion(projectLawsInventoryEO.getRegion()); projectLawsInventoryEOTemp.setRegion(projectLawsInventoryEO.getRegion());
}else{
projectLawsInventoryEOTemp.setRegion("");
} }
//在产车实施日期implementTime //在产车实施日期implementTime
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getImplementTime())){ if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getImplementTime())){
@@ -2213,14 +2203,14 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
projectLawsInventoryEOList.add(projectLawsInventoryEOTemp); projectLawsInventoryEOList.add(projectLawsInventoryEOTemp);
} }
// this.updateBatchById(projectLawsInventoryEOList); this.updateBatchById(projectLawsInventoryEOList);
for (ProjectLawsInventoryEO lawsInventoryEO : projectLawsInventoryEOList) { // for (ProjectLawsInventoryEO lawsInventoryEO : projectLawsInventoryEOList) {
LambdaUpdateWrapper<ProjectLawsInventoryEO> updateWrapper = new LambdaUpdateWrapper<>(); // LambdaUpdateWrapper<ProjectLawsInventoryEO> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.in(ProjectLawsInventoryEO::getId,lawsInventoryEO.getId()); // updateWrapper.in(ProjectLawsInventoryEO::getId,lawsInventoryEO.getId());
setDateNull(lawsInventoryEO, updateWrapper); // setDateNull(lawsInventoryEO, updateWrapper);
//保存 // //保存
this.update(lawsInventoryEO,updateWrapper); // this.update(lawsInventoryEO,updateWrapper);
} // }
//更新log //更新log
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@@ -151,7 +151,7 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
// 飞书消息封装 // 飞书消息封装
FeishuMsgVo feishuMsgVo = new FeishuMsgVo(); FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has reply to your engineering deliverable information. Please check and address it in a timely manner."); feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has replied to your engineering deliverable information. Please check and address it in a timely manner.");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber()); feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()); feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
feishuMsgVo.setInitiator(currentUser.getUsername()); feishuMsgVo.setInitiator(currentUser.getUsername());
@@ -160,21 +160,21 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
String msgContentEN = ""; String msgContentEN = "";
String flowType = projectTaskInventoryFeedbackEO.getFlowType(); String flowType = projectTaskInventoryFeedbackEO.getFlowType();
if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){ if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
msgContentEN = currentUser.getUsername() + " has reply to your engineering deliverable information of " msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + " for design compliance confirmation. Please check and address it in time."; + projectNameInfoEO.getProjectName() + " for design compliance confirmation. Please check and address it in time.";
feishuMsgVo.setTaskType("Design Compliance Confirmation"); feishuMsgVo.setTaskType("Design Compliance Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate())); feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate()));
}else if(StringUtils.equals(flowType,FlowTypeEnum.PREHOMOQRLC.getValue())){ }else if(StringUtils.equals(flowType,FlowTypeEnum.PREHOMOQRLC.getValue())){
msgContentEN = currentUser.getUsername() + " has reply to your engineering deliverable information of " msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + " for Pre-Homo compliance confirmation. Please check and address it in time."; + projectNameInfoEO.getProjectName() + " for Pre-Homo compliance confirmation. Please check and address it in time.";
feishuMsgVo.setTaskType("Pre-Homo Confirmation"); feishuMsgVo.setTaskType("Pre-Homo Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate())); feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate()));
}else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){ }else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){
msgContentEN = currentUser.getUsername() + " has reply to your engineering deliverable information of " msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + " for validation compliance confirmation. Please check and address it in time."; + projectNameInfoEO.getProjectName() + " for validation compliance confirmation. Please check and address it in time.";
@@ -58,7 +58,7 @@
export default { export default {
name: 'index', name: 'index',
props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput', 'isClass','isDelete','distributionEngineerList'], props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput', 'isClass', 'isDelete', 'distributionEngineerList'],
data() { data() {
return { return {
loading: true, loading: true,
@@ -90,10 +90,10 @@
this.queryDepartUserTreeList() this.queryDepartUserTreeList()
this.visible = true this.visible = true
}, },
standardDelete(){ standardDelete() {
this.$emit('input', null) this.$emit('input', null)
this.$forceUpdate() this.$forceUpdate()
this.$emit('deleteData',this.query.db_field_name) this.$emit('deleteData', this.query.db_field_name)
}, },
// onSelect(selectedKeys, info) { // onSelect(selectedKeys, info) {
// console.log(selectedKeys) // console.log(selectedKeys)
@@ -155,23 +155,23 @@
for (var i = 0; i < arr.length - 1; i++) { for (var i = 0; i < arr.length - 1; i++) {
for (var j = i + 1; j < arr.length; j++) { for (var j = i + 1; j < arr.length; j++) {
if (arr[i] === arr[j]) { if (arr[i] === arr[j]) {
arr.splice(j, 1); arr.splice(j, 1)
j--; j--
} }
} }
} }
return arr; return arr
} }
if (this.distributionEngineerList && this.distributionEngineerList.length > 0){ if (this.distributionEngineerList && this.distributionEngineerList.length > 0) {
this.distributionEngineerList.forEach(res=>{ this.distributionEngineerList.forEach(res => {
userIds.shift(res.userId) userIds.unshift(res.userId)
userName.shift(res.name) userName.unshift(res.name)
}) })
} }
userIds = noRepeat1(userIds) userIds = noRepeat1(userIds)
userName = noRepeat1(userName) userName = noRepeat1(userName)
this.$emit('input', userName.join(',')) this.$emit('input', userName.join(','))
this.$emit('change', this.query.db_field_name, userIds.join(','),this.query.subscript) this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript)
this.visible = false this.visible = false
this.treeVisible = false this.treeVisible = false
// } else { // } else {
@@ -198,8 +198,8 @@
}, },
getUserAndDepart() { getUserAndDepart() {
getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => { getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => {
if (res){ if (res) {
this.gData = res.filter(ele => ele.flag === 'DEPART'); this.gData = res.filter(ele => ele.flag === 'DEPART')
} else { } else {
this.gData = [] this.gData = []
} }
@@ -691,15 +691,37 @@
this.formInline = { ...this.formInline } this.formInline = { ...this.formInline }
}, },
deleteText(num) { deleteText(num) {
this.distributionEngineerList.splice(num, 1) let _this = this
this.distributionEngineerList = [...this.distributionEngineerList] this.$confirm({
this.formInline.userName = this.formInline.userName.split(',') content: _this.$t('ConfirmDelete'),
this.formInline.userName.splice(num, 1) onOk() {
this.formInline.userName = this.formInline.userName.join(',') let id = ''
this.formInline.userId = this.formInline.userId.split(',') _this.dataSourceTable.forEach(res => {
this.formInline.userId.splice(num, 1) if (res.userName == _this.distributionEngineerList[num].name) {
this.formInline.userId = this.formInline.userId.join(',') id = res.id
this.formInline = { ...this.formInline } }
})
_this.distributionEngineerList.splice(num, 1)
_this.distributionEngineerList = [..._this.distributionEngineerList]
_this.formInline.userName = _this.formInline.userName.split(',')
_this.formInline.userName.splice(num, 1)
_this.formInline.userName = _this.formInline.userName.join(',')
_this.formInline.userId = _this.formInline.userId.split(',')
_this.formInline.userId.splice(num, 1)
_this.formInline.userId = _this.formInline.userId.join(',')
_this.formInline = { ..._this.formInline }
if (id){
deleteAction('/project/projectTaskInventoryDetailEO/delete', { id: id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
}
})
}, },
edit(val, title) { edit(val, title) {
this.title = title this.title = title