Compare commits

..

3 Commits

Author SHA1 Message Date
姜玉琦 41f8cfcd35 提交代码 2025-02-12 00:19:52 +08:00
姜玉琦 e6cc6dbf52 Merge branch 'dev_xd' of http://62.234.3.186:3000/jiangyq/YZProjectCloud into dev_xd 2025-02-11 23:12:01 +08:00
姜玉琦 dc560902e3 提交代码 2025-02-11 23:11:51 +08:00
5 changed files with 133 additions and 9 deletions

View File

@ -120,10 +120,20 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery()
.processInstanceId(task.getProcessInstanceId())
.singleResult();
if(task.getName().indexOf("安全教育")>-1 || task.getName().indexOf("预算员审批")>-1){
/**if(task.getName().indexOf("预算员审批")>-1 || task.getName().indexOf("预算员审批")>-1 || task.getName().indexOf("预算员审批")>-1){
R<Boolean> data = remoteProService.findUserComSign(Convert.toLong(processInstance.getBusinessKey()), SecurityConstants.INNER);
Boolean vis = data.getData();
if(!vis){
return AjaxResult.error("未查询到三级安全教育主管签名信息...");
}
R<Boolean> data = remoteProService.findUserProSign(Convert.toLong(processInstance.getBusinessKey()), SecurityConstants.INNER);
Boolean vis = data.getData();
if(!vis){
return AjaxResult.error("未查询到安质部部长签名信息...");
}
}
if(task.getName().indexOf("安全教育")>-1){
R<Boolean> data = remoteProService.findUserComSign(Convert.toLong(processInstance.getBusinessKey()), SecurityConstants.INNER);
System.out.println("DDD1"+JSON.toJSONString(data));
Boolean vis = data.getData();
if(!vis){
return AjaxResult.error("未查询到三级安全教育主管签名信息...");
@ -131,7 +141,6 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
}
if(task.getName().indexOf("安质部")>-1){
R<Boolean> data = remoteProService.findUserProSign(Convert.toLong(processInstance.getBusinessKey()), SecurityConstants.INNER);
System.out.println("DDD2"+JSON.toJSONString(data));
Boolean vis = data.getData();
if(!vis){
return AjaxResult.error("未查询到安质部部长签名信息...");
@ -139,12 +148,11 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
}
if(task.getName().indexOf("班组")>-1){
R<Boolean> data = remoteProService.findUserGroSign(Convert.toLong(processInstance.getBusinessKey()), SecurityConstants.INNER);
System.out.println("DDD3"+JSON.toJSONString(data));
Boolean vis = data.getData();
if(!vis){
return AjaxResult.error("未查询到班组长签名信息...");
}
}
}*/
if (DelegationState.PENDING.equals(task.getDelegationState())) {
taskService.addComment(taskVo.getTaskId(), taskVo.getInstanceId(), FlowComment.DELEGATE.getType(), taskVo.getComment());
taskService.resolveTask(taskVo.getTaskId(), taskVo.getVariables());

View File

@ -284,4 +284,14 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
return toAjax(proProjectInfoSubdeptsUsersService.editDefaultProjectById(id));
}
/**
*
*/
@GetMapping("/fileSign/{id}")
public AjaxResult fileSign(@PathVariable("id") Long id)
{
proProjectInfoSubdeptsUsersService.fileSign(id);
return success();
}
}

View File

@ -171,4 +171,6 @@ public interface IProProjectInfoSubdeptsUsersService
Boolean findUserProSign(Long id);
Boolean findUserGroSign(Long id);
void fileSign(Long id);
}

View File

@ -1243,4 +1243,85 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
return res+1;
}
@Override
public void fileSign(Long id){
ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersById(id);
String filePath = proProjectInfoSubdeptsUsers.getEduFilePath().replace(ProfileConfig.profile, ProfileConfig.profilePath).replace("-g","").replace("-p","").replace("-c","");
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.LWGR.getCode()) || Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.TSGZ.getCode())){
// 查询班组长签名
if(proProjectInfoSubdeptsUsers.getSubDeptGroup()!=null){
ProProjectInfoSubdeptsGroup group = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupById(proProjectInfoSubdeptsUsers.getSubDeptGroup());
if(group!=null && StringUtils.isNotEmpty(group.getGroupLeaderPhone())){
ProProjectInfoSubdeptsUsers userQuery = new ProProjectInfoSubdeptsUsers();
userQuery.setUserPhone(group.getGroupLeaderPhone());
userQuery.setProjectId(group.getProjectId());
List<ProProjectInfoSubdeptsUsers> users = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(userQuery);
if(StringUtils.isNotEmpty(users)){
BasSignet query = new BasSignet();
query.setProjectId(users.get(0).getProjectId());
query.setUserId(users.get(0).getUserId());
List<BasSignet> signets = basSignetMapper.selectBasSignetList(query);
if(StringUtils.isNotEmpty(signets)){
String newFilePath = filePath.replace(".pdf","-g.pdf");
String signPath = signets.get(0).getSignetPath().replace(ProfileConfig.profile, ProfileConfig.profilePath);
PdfImageSignetUtil.imageWaterMark(filePath, newFilePath, signPath, SignetKeyEnums.GROUP_SIGN.getCode());
filePath = newFilePath;
}else{
throw new ServiceException("未查询到班组长签名信息...");
}
}else{
throw new ServiceException("未查询到班组长签名信息...");
}
}else{
throw new ServiceException("未查询到班组长签名信息...");
}
}else{
throw new ServiceException("未查询到班组长签名信息...");
}
}
ProProjectInfoSubdeptsUsers userQuery = new ProProjectInfoSubdeptsUsers();
userQuery.setWorkType(18L);
userQuery.setProjectId(proProjectInfoSubdeptsUsers.getProjectId());
List<ProProjectInfoSubdeptsUsers> users = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(userQuery);
if(StringUtils.isNotEmpty(users)){
BasSignet query = new BasSignet();
query.setProjectId(users.get(0).getProjectId());
query.setUserId(users.get(0).getUserId());
List<BasSignet> signets = basSignetMapper.selectBasSignetList(query);
if(StringUtils.isNotEmpty(signets)){
String newFilePath = filePath.replace(".pdf","-p.pdf");
String signPath = signets.get(0).getSignetPath().replace(ProfileConfig.profile, ProfileConfig.profilePath);
PdfImageSignetUtil.imageWaterMark(filePath, newFilePath, signPath,SignetKeyEnums.PROJECT_SIGN.getCode());
filePath = newFilePath;
}else{
throw new ServiceException("未查询安质部部长签名信息...");
}
}else {
throw new ServiceException("未查询安质部部长签名信息...");
}
ProProjectInfoSubdeptsUsers comUserQuery = new ProProjectInfoSubdeptsUsers();
comUserQuery.setWorkType(101L);
comUserQuery.setProjectId(proProjectInfoSubdeptsUsers.getProjectId());
List<ProProjectInfoSubdeptsUsers> comUsers = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(comUserQuery);
if(StringUtils.isNotEmpty(comUsers)){
BasSignet query = new BasSignet();
query.setProjectId(comUsers.get(0).getProjectId());
query.setUserId(comUsers.get(0).getUserId());
List<BasSignet> signets = basSignetMapper.selectBasSignetList(query);
if(StringUtils.isNotEmpty(signets)){
String newFilePath = filePath.replace(".pdf","-c.pdf");
String signPath = signets.get(0).getSignetPath().replace(ProfileConfig.profile, ProfileConfig.profilePath);
PdfImageSignetUtil.imageWaterMark(filePath, newFilePath, signPath, SignetKeyEnums.COMPANY_SIGN.getCode());
proProjectInfoSubdeptsUsers.setEduFilePath(newFilePath.replace(ProfileConfig.profilePath,ProfileConfig.profile));
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
}else{
throw new ServiceException("未查询三级安全教育主管签名信息...");
}
}else{
throw new ServiceException("未查询三级安全教育主管签名信息...");
}
}
}

View File

@ -78,9 +78,8 @@
<el-table-column label="性别" align="center" prop="userSex">
<template #default="scope">{{ scope.row.userSex == '男' ? '男' : '女' }}</template>
</el-table-column>
<el-table-column label="民族" align="center" prop="info.nation" width="80" />
<!-- <el-table-column label="民族" align="center" prop="info.nation" width="80" /> -->
<el-table-column label="所属单位" align="center" prop="subDeptName" />
<el-table-column label="联系电话" align="center" prop="user.phonenumber" v-if="false" />
<el-table-column label="班组" align="center" prop="subDeptGroupName" />
<el-table-column label="工种类型" align="center" prop="craftType">
@ -125,7 +124,9 @@
<el-button link type="primary" icon="Delete" @click="handleEnter(scope.row)" v-if="scope.row.useStatus == 0"
v-hasPermi="['manage:proProjectInfoSubdeptsUsers:remove']">离场</el-button>
<el-button link type="primary" icon="Delete" @click="handleEnter(scope.row)" v-else
v-hasPermi="['manage:proProjectInfoSubdeptsUsers:remove']">进场</el-button>
v-hasPermi="['manage:proProjectInfoSubdeptsUsers:remove']">进场</el-button><el-icon>< /></el-icon>
<el-button v-if="isSign(scope.row)" link type="primary" icon="StarFilled" @click="handleFileSign(scope.row)"
v-hasPermi="['manage:proProjectInfoSubdeptsUsers:edit']">签名</el-button>
</template>
</el-table-column>
</el-table>
@ -511,6 +512,28 @@ function getList() {
});
}
function isSign(row){
if(row.approveStatus==100){
if(row.userPost=='1' || row.userPost=='2' || row.userPost=='3' || row.userPost=='6' || row.userPost=='8'){
if(row.eduFilePath.indexOf("-p")>-1 && row.eduFilePath.indexOf("-c")>-1){
return false;
}else{
return true;
}
}else if(row.userPost=='4' || row.userPost=='5'){
if(row.eduFilePath.indexOf("-g")>-1 && row.eduFilePath.indexOf("-p")>-1 && row.eduFilePath.indexOf("-c")>-1){
return false;
}else{
return true;
}
}else{
return false;
}
}else{
return false;
}
}
//
function cancel() {
open.value = false;