修改切換角色
This commit is contained in:
+46
-1
@@ -1105,7 +1105,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
result = "拒绝";
|
result = "拒绝";
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> idList = Arrays.asList(ids.split(","));
|
/*List<String> idList = Arrays.asList(ids.split(","));
|
||||||
|
|
||||||
for (String id : idList) {
|
for (String id : idList) {
|
||||||
int isProjectRole = checkUserRole(projectLibraryId, currentUser.getId(), id);
|
int isProjectRole = checkUserRole(projectLibraryId, currentUser.getId(), id);
|
||||||
@@ -1143,7 +1143,52 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
}
|
}
|
||||||
super.baseMapper.updateById(projectLawsInventoryEO);
|
super.baseMapper.updateById(projectLawsInventoryEO);
|
||||||
}
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
List<Map<String,Object>> lawsInventoryList = (List<Map<String, Object>>) params.get("lawsInventoryList");
|
||||||
|
if(CollectionUtils.isNotEmpty(lawsInventoryList)){
|
||||||
|
lawsInventoryList.forEach(lawsInventory -> {
|
||||||
|
int isProjectRole = (int) lawsInventory.get("roleCode");
|
||||||
|
String id = (String) lawsInventory.get("id");
|
||||||
|
|
||||||
|
ProjectLawsInventoryEO projectLawsInventoryEO = getById(id);
|
||||||
|
|
||||||
|
if(isProjectRole == Integer.parseInt(ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue())){
|
||||||
|
projectLawsInventoryEO.setRegulationOwnerSubmitStatus(operatorResult);
|
||||||
|
projectLawsInventoryEO.setHomologationEngineerSubmitStatus(operatorResult);
|
||||||
|
}else if(isProjectRole == Integer.parseInt(ProjectRoleEnum.REGULATI_ENGINEER.getValue())){
|
||||||
|
projectLawsInventoryEO.setRegulationOwnerSubmitStatus(operatorResult);
|
||||||
|
}else if(isProjectRole == Integer.parseInt(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue())){
|
||||||
|
projectLawsInventoryEO.setHomologationEngineerSubmitStatus(operatorResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
//如果不是studio
|
||||||
|
if(isProjectRole != -1 && isProjectRole != Integer.parseInt(ProjectRoleEnum.STUDIO_ENGINEER.getValue())){
|
||||||
|
|
||||||
|
String inventoryAffirmStatus = "";
|
||||||
|
|
||||||
|
//如果法规工程师与认证工程师都是提交通过 把清单确认状态设置为 接受
|
||||||
|
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus()) && StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())){
|
||||||
|
if(projectLawsInventoryEO.getRegulationOwnerSubmitStatus().equals("0") && projectLawsInventoryEO.getHomologationEngineerSubmitStatus().equals("0")){
|
||||||
|
inventoryAffirmStatus = InventoryAffirmStatusEnum.ACCEPTED.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
//如果法规工程师与认证工程师 其中一个人是拒绝 把清单确认状态设置为 拒绝
|
||||||
|
if(projectLawsInventoryEO.getRegulationOwnerSubmitStatus().equals("1") || projectLawsInventoryEO.getHomologationEngineerSubmitStatus().equals("1")){
|
||||||
|
inventoryAffirmStatus = InventoryAffirmStatusEnum.REJECTED.getValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(inventoryAffirmStatus)){
|
||||||
|
projectLawsInventoryEO.setInventoryAffirmStatus(inventoryAffirmStatus);
|
||||||
|
}
|
||||||
|
super.baseMapper.updateById(projectLawsInventoryEO);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
throw new JeroBootException("请至少勾选一条法规清单进行" + result);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}catch (Exception ex){
|
}catch (Exception ex){
|
||||||
log.error("批量"+result+" 更新状态失败:" + ex.getMessage());
|
log.error("批量"+result+" 更新状态失败:" + ex.getMessage());
|
||||||
|
|||||||
@@ -254,7 +254,7 @@
|
|||||||
_this.selectedRowKeys = []
|
_this.selectedRowKeys = []
|
||||||
_this.getList()
|
_this.getList()
|
||||||
} else {
|
} else {
|
||||||
_this.$message.warning(_this.$t('operationFailed'))
|
_this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -346,7 +346,7 @@
|
|||||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||||
_this.getList()
|
_this.getList()
|
||||||
} else {
|
} else {
|
||||||
_this.$message.warning(_this.$t('operationFailed'))
|
_this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1316,9 +1316,29 @@
|
|||||||
|
|
||||||
updateStatusBatch(num, selectedRowKeys) {
|
updateStatusBatch(num, selectedRowKeys) {
|
||||||
let _this = this
|
let _this = this
|
||||||
|
let lawsInventoryList = []
|
||||||
|
for (let i = 0; i < this.dataSource.length; i++) {
|
||||||
|
for (let j = 0; j < selectedRowKeys.length; j++) {
|
||||||
|
if (this.dataSource[i].id == selectedRowKeys[j]) {
|
||||||
|
let roleCode
|
||||||
|
if (this.dataSource[i].regulationOwnerId == this.userInfo().id &&
|
||||||
|
this.dataSource[i].homologationEngineerId == this.userInfo().id) {
|
||||||
|
roleCode = 4
|
||||||
|
} else if (this.dataSource[i].regulationOwnerId == this.userInfo().id) {
|
||||||
|
roleCode = 1
|
||||||
|
} else if (this.dataSource[i].homologationEngineerId == this.userInfo().id) {
|
||||||
|
roleCode = 2
|
||||||
|
}
|
||||||
|
lawsInventoryList.push({
|
||||||
|
id: this.dataSource[i].id,
|
||||||
|
roleCode: roleCode
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
let query = {
|
let query = {
|
||||||
operatorType: 1,
|
operatorType: 1,
|
||||||
ids: selectedRowKeys.join(','),
|
lawsInventoryList: lawsInventoryList,
|
||||||
projectLibraryId: _this.$route.query.id,
|
projectLibraryId: _this.$route.query.id,
|
||||||
operatorResult: num
|
operatorResult: num
|
||||||
}
|
}
|
||||||
@@ -1685,9 +1705,11 @@
|
|||||||
.box-input .ant-select-selection__rendered {
|
.box-input .ant-select-selection__rendered {
|
||||||
line-height: 38px;
|
line-height: 38px;
|
||||||
}
|
}
|
||||||
.popconfirm{
|
|
||||||
z-index: 999;
|
.popconfirm {
|
||||||
}
|
z-index: 999;
|
||||||
|
}
|
||||||
|
|
||||||
.popconfirm .ant-popover-buttons {
|
.popconfirm .ant-popover-buttons {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user