Merge remote-tracking branch 'origin/dev_xd' into dev_xd
commit
f4ecf0425f
Binary file not shown.
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 894 B |
|
@ -2,12 +2,11 @@ package com.yanzhu.flowable.listener;
|
||||||
|
|
||||||
import com.yanzhu.common.core.constant.SecurityConstants;
|
import com.yanzhu.common.core.constant.SecurityConstants;
|
||||||
import com.yanzhu.common.core.text.Convert;
|
import com.yanzhu.common.core.text.Convert;
|
||||||
|
import com.yanzhu.flowable.util.SpringBeanUtil;
|
||||||
import com.yanzhu.system.api.RemoteProService;
|
import com.yanzhu.system.api.RemoteProService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.flowable.engine.delegate.DelegateExecution;
|
import org.flowable.engine.delegate.TaskListener;
|
||||||
import org.flowable.engine.delegate.ExecutionListener;
|
import org.flowable.task.service.delegate.DelegateTask;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.annotation.Lazy;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,15 +26,13 @@ import org.springframework.stereotype.Component;
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
public class FlowComSignListener implements ExecutionListener {
|
public class FlowComSignListener implements TaskListener {
|
||||||
|
|
||||||
@Lazy
|
|
||||||
@Autowired
|
|
||||||
private RemoteProService remoteProService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void notify(DelegateExecution execution) {
|
public void notify(DelegateTask delegateTask) {
|
||||||
log.info("公司审批签名执行监听器:{}", execution.getProcessInstanceBusinessKey());
|
Long businessKey = Convert.toLong(delegateTask.getVariable("businessKey"));
|
||||||
remoteProService.subDeptsUserComSign(Convert.toLong(execution.getProcessInstanceBusinessKey(),null), SecurityConstants.INNER);
|
log.info("公司审批签名执行监听器:{}", businessKey);
|
||||||
|
RemoteProService remoteProService = SpringBeanUtil.getBean(RemoteProService.class);
|
||||||
|
remoteProService.subDeptsUserComSign(businessKey, SecurityConstants.INNER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,11 @@ package com.yanzhu.flowable.listener;
|
||||||
|
|
||||||
import com.yanzhu.common.core.constant.SecurityConstants;
|
import com.yanzhu.common.core.constant.SecurityConstants;
|
||||||
import com.yanzhu.common.core.text.Convert;
|
import com.yanzhu.common.core.text.Convert;
|
||||||
|
import com.yanzhu.flowable.util.SpringBeanUtil;
|
||||||
import com.yanzhu.system.api.RemoteProService;
|
import com.yanzhu.system.api.RemoteProService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.flowable.engine.delegate.DelegateExecution;
|
import org.flowable.engine.delegate.TaskListener;
|
||||||
import org.flowable.engine.delegate.ExecutionListener;
|
import org.flowable.task.service.delegate.DelegateTask;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.annotation.Lazy;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,15 +26,13 @@ import org.springframework.stereotype.Component;
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
public class FlowGroSignListener implements ExecutionListener {
|
public class FlowGroSignListener implements TaskListener {
|
||||||
|
|
||||||
@Lazy
|
|
||||||
@Autowired
|
|
||||||
private RemoteProService remoteProService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void notify(DelegateExecution execution) {
|
public void notify(DelegateTask delegateTask) {
|
||||||
log.info("班组审批签名执行监听器:{}", execution.getProcessInstanceBusinessKey());
|
Long businessKey = Convert.toLong(delegateTask.getVariable("businessKey"));
|
||||||
remoteProService.subDeptsUserGroSign(Convert.toLong(execution.getProcessInstanceBusinessKey(),null), SecurityConstants.INNER);
|
log.info("班组审批签名执行监听器:{}", businessKey);
|
||||||
|
RemoteProService remoteProService = SpringBeanUtil.getBean(RemoteProService.class);
|
||||||
|
remoteProService.subDeptsUserGroSign(businessKey, SecurityConstants.INNER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,11 @@ package com.yanzhu.flowable.listener;
|
||||||
|
|
||||||
import com.yanzhu.common.core.constant.SecurityConstants;
|
import com.yanzhu.common.core.constant.SecurityConstants;
|
||||||
import com.yanzhu.common.core.text.Convert;
|
import com.yanzhu.common.core.text.Convert;
|
||||||
|
import com.yanzhu.flowable.util.SpringBeanUtil;
|
||||||
import com.yanzhu.system.api.RemoteProService;
|
import com.yanzhu.system.api.RemoteProService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.flowable.common.engine.api.delegate.Expression;
|
import org.flowable.engine.delegate.TaskListener;
|
||||||
import org.flowable.engine.delegate.DelegateExecution;
|
import org.flowable.task.service.delegate.DelegateTask;
|
||||||
import org.flowable.engine.delegate.ExecutionListener;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.annotation.Lazy;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,15 +26,13 @@ import org.springframework.stereotype.Component;
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
public class FlowProSignListener implements ExecutionListener {
|
public class FlowProSignListener implements TaskListener {
|
||||||
|
|
||||||
@Lazy
|
|
||||||
@Autowired
|
|
||||||
private RemoteProService remoteProService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void notify(DelegateExecution execution) {
|
public void notify(DelegateTask delegateTask) {
|
||||||
log.info("项目审批签名执行监听器:{}", execution.getProcessInstanceBusinessKey());
|
Long businessKey = Convert.toLong(delegateTask.getVariable("businessKey"));
|
||||||
remoteProService.subDeptsUserProSign(Convert.toLong(execution.getProcessInstanceBusinessKey(),null), SecurityConstants.INNER);
|
log.info("项目审批签名执行监听器:{}", businessKey);
|
||||||
|
RemoteProService remoteProService = SpringBeanUtil.getBean(RemoteProService.class);
|
||||||
|
remoteProService.subDeptsUserProSign(businessKey, SecurityConstants.INNER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.alibaba.fastjson2.TypeReference;
|
import com.alibaba.fastjson2.TypeReference;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.yanzhu.common.core.constant.SecurityConstants;
|
import com.yanzhu.common.core.constant.SecurityConstants;
|
||||||
|
import com.yanzhu.common.core.domain.R;
|
||||||
import com.yanzhu.common.core.exception.ServiceException;
|
import com.yanzhu.common.core.exception.ServiceException;
|
||||||
import com.yanzhu.common.core.exception.base.BaseException;
|
import com.yanzhu.common.core.exception.base.BaseException;
|
||||||
import com.yanzhu.common.core.text.Convert;
|
import com.yanzhu.common.core.text.Convert;
|
||||||
|
@ -63,6 +64,7 @@ import org.flowable.task.api.TaskQuery;
|
||||||
import org.flowable.task.api.history.HistoricTaskInstance;
|
import org.flowable.task.api.history.HistoricTaskInstance;
|
||||||
import org.flowable.task.api.history.HistoricTaskInstanceQuery;
|
import org.flowable.task.api.history.HistoricTaskInstanceQuery;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@ -91,6 +93,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
||||||
@Resource
|
@Resource
|
||||||
private ISysFormService sysFormService;
|
private ISysFormService sysFormService;
|
||||||
|
|
||||||
|
@Lazy
|
||||||
@Resource
|
@Resource
|
||||||
private RemoteProService remoteProService;
|
private RemoteProService remoteProService;
|
||||||
|
|
||||||
|
@ -113,22 +116,33 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
||||||
return AjaxResult.error("任务不存在");
|
return AjaxResult.error("任务不存在");
|
||||||
}
|
}
|
||||||
String userId = taskVo.getUserId();
|
String userId = taskVo.getUserId();
|
||||||
if(task.getName().indexOf("安全教育")>-1){
|
// 获取流程实例对象
|
||||||
Boolean vis = remoteProService.findUserComSign(Convert.toLong(task.getCaseVariables().get("businessKey")), SecurityConstants.INNER).getData();
|
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery()
|
||||||
|
.processInstanceId(task.getProcessInstanceId())
|
||||||
|
.singleResult();
|
||||||
|
|
||||||
|
if(task.getName().indexOf("安全教育")>-1 || 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){
|
if(!vis){
|
||||||
throw new ServiceException("未查询到三级安全教育主管签名信息...");
|
return AjaxResult.error("未查询到三级安全教育主管签名信息...");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(task.getName().indexOf("安质部")>-1){
|
if(task.getName().indexOf("安质部")>-1){
|
||||||
Boolean vis = remoteProService.findUserGroSign(Convert.toLong(task.getCaseVariables().get("businessKey")), SecurityConstants.INNER).getData();
|
R<Boolean> data = remoteProService.findUserProSign(Convert.toLong(processInstance.getBusinessKey()), SecurityConstants.INNER);
|
||||||
|
System.out.println("DDD2"+JSON.toJSONString(data));
|
||||||
|
Boolean vis = data.getData();
|
||||||
if(!vis){
|
if(!vis){
|
||||||
throw new ServiceException("未查询到安质部部长签名信息...");
|
return AjaxResult.error("未查询到安质部部长签名信息...");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(task.getName().indexOf("班组")>-1){
|
if(task.getName().indexOf("班组")>-1){
|
||||||
Boolean vis = remoteProService.findUserGroSign(Convert.toLong(task.getCaseVariables().get("businessKey")), SecurityConstants.INNER).getData();
|
R<Boolean> data = remoteProService.findUserGroSign(Convert.toLong(processInstance.getBusinessKey()), SecurityConstants.INNER);
|
||||||
|
System.out.println("DDD3"+JSON.toJSONString(data));
|
||||||
|
Boolean vis = data.getData();
|
||||||
if(!vis){
|
if(!vis){
|
||||||
throw new ServiceException("未查询到班组长签名信息...");
|
return AjaxResult.error("未查询到班组长签名信息...");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (DelegationState.PENDING.equals(task.getDelegationState())) {
|
if (DelegationState.PENDING.equals(task.getDelegationState())) {
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.yanzhu.flowable.util;
|
||||||
|
|
||||||
|
import org.springframework.beans.BeansException;
|
||||||
|
import org.springframework.context.ApplicationContext;
|
||||||
|
import org.springframework.context.ApplicationContextAware;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class SpringBeanUtil implements ApplicationContextAware {
|
||||||
|
//ApplicationContext对象是Spring开源框架的上下文对象实例,在项目运行时自动装载Handler内的所有信息到内存。
|
||||||
|
private static ApplicationContext applicationContext;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||||
|
if (SpringBeanUtil.applicationContext == null) {
|
||||||
|
SpringBeanUtil.applicationContext = applicationContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取applicationContext
|
||||||
|
public static ApplicationContext getApplicationContext() {
|
||||||
|
return applicationContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
//通过name获取 Bean.
|
||||||
|
public static Object getBean(String name) {
|
||||||
|
return getApplicationContext().getBean(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
//通过class获取Bean.
|
||||||
|
public static <T> T getBean(Class<T> clazz) {
|
||||||
|
return getApplicationContext().getBean(clazz);
|
||||||
|
}
|
||||||
|
|
||||||
|
//通过name,以及Clazz返回指定的Bean
|
||||||
|
public static <T> T getBean(String name, Class<T> clazz) {
|
||||||
|
return getApplicationContext().getBean(name, clazz);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.yanzhu.manage.service;
|
package com.yanzhu.manage.service;
|
||||||
|
|
||||||
import com.sun.org.apache.xpath.internal.operations.Bool;
|
|
||||||
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
|
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
|
||||||
import com.yanzhu.manage.domain.SignetFileVo;
|
import com.yanzhu.manage.domain.SignetFileVo;
|
||||||
|
|
||||||
|
|
|
@ -279,7 +279,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
||||||
subdeptsUser.setSubDeptPowerPath(proProjectInfoSubdepts.getSubDeptLeaderPowerPath());
|
subdeptsUser.setSubDeptPowerPath(proProjectInfoSubdepts.getSubDeptLeaderPowerPath());
|
||||||
subdeptsUser.setUserId(proProjectInfoSubdepts.getSubDeptLeaderId());
|
subdeptsUser.setUserId(proProjectInfoSubdepts.getSubDeptLeaderId());
|
||||||
subdeptsUser.setUserPost(UserPostEnums.WTDL.getCode());
|
subdeptsUser.setUserPost(UserPostEnums.WTDL.getCode());
|
||||||
subdeptsUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
subdeptsUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderName());
|
||||||
subdeptsUser.setCardType(CardTypeEnums.SFZ.getCode());
|
subdeptsUser.setCardType(CardTypeEnums.SFZ.getCode());
|
||||||
subdeptsUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
|
subdeptsUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
|
||||||
subdeptsUser.setUserPhone(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
subdeptsUser.setUserPhone(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
||||||
|
@ -344,7 +344,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
||||||
subdeptsUser.setSubDeptType(proProjectInfoSubdepts.getSubDeptType());
|
subdeptsUser.setSubDeptType(proProjectInfoSubdepts.getSubDeptType());
|
||||||
subdeptsUser.setSubDeptPowerPath(proProjectInfoSubdepts.getSubDeptLeaderPowerPath());
|
subdeptsUser.setSubDeptPowerPath(proProjectInfoSubdepts.getSubDeptLeaderPowerPath());
|
||||||
subdeptsUser.setUserId(proProjectInfoSubdepts.getSubDeptLeaderId());
|
subdeptsUser.setUserId(proProjectInfoSubdepts.getSubDeptLeaderId());
|
||||||
subdeptsUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
subdeptsUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderName());
|
||||||
subdeptsUser.setCardType(CardTypeEnums.SFZ.getCode());
|
subdeptsUser.setCardType(CardTypeEnums.SFZ.getCode());
|
||||||
subdeptsUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
|
subdeptsUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
|
||||||
subdeptsUser.setUserPhone(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
subdeptsUser.setUserPhone(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
||||||
|
@ -413,7 +413,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
||||||
subdeptsUser.setSubDeptGroupName(groups.get(0).getGroupName());
|
subdeptsUser.setSubDeptGroupName(groups.get(0).getGroupName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
subdeptsUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
subdeptsUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderName());
|
||||||
subdeptsUser.setCardType(CardTypeEnums.SFZ.getCode());
|
subdeptsUser.setCardType(CardTypeEnums.SFZ.getCode());
|
||||||
subdeptsUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
|
subdeptsUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
|
||||||
subdeptsUser.setUserPhone(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
subdeptsUser.setUserPhone(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
||||||
|
|
|
@ -866,17 +866,17 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void startFlowableProcess(){
|
public void startFlowableProcess(){
|
||||||
String procDefId = Convert.toStr("flow_bg7gh1jg:1:102504");
|
String procDefId = Convert.toStr("flow_z48zrx1o:3:167508");
|
||||||
// 启动工作流审批节点...
|
// 启动工作流审批节点...
|
||||||
Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> variables = new HashMap<>();
|
||||||
variables.put("INITIATOR",17);
|
variables.put("INITIATOR",50);
|
||||||
variables.put("userName","姜玉琦_TEST");
|
variables.put("userName","姜玉琦_TEST");
|
||||||
variables.put("userDeptName","中国西电集团_TEST");
|
variables.put("userDeptName","中国西电集团_TEST");
|
||||||
variables.put("comId","101");
|
variables.put("comId","101");
|
||||||
variables.put("comName","建安公司");
|
variables.put("comName","建安公司");
|
||||||
variables.put("proId","116");
|
variables.put("proId","133");
|
||||||
variables.put("proName","泾河新城");
|
variables.put("proName","泾河新城xxxxxx");
|
||||||
variables.put("businessKey",12);
|
variables.put("businessKey",50);
|
||||||
remoteFlowService.startDefinitionByParams(procDefId,variables,SecurityConstants.INNER);
|
remoteFlowService.startDefinitionByParams(procDefId,variables,SecurityConstants.INNER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -991,7 +991,8 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
||||||
List<BasSignet> signets = basSignetMapper.selectBasSignetList(query);
|
List<BasSignet> signets = basSignetMapper.selectBasSignetList(query);
|
||||||
if(StringUtils.isNotEmpty(signets)){
|
if(StringUtils.isNotEmpty(signets)){
|
||||||
String newFilePath = filePath.replace(".pdf","-g.pdf");
|
String newFilePath = filePath.replace(".pdf","-g.pdf");
|
||||||
PdfImageSignetUtil.imageWaterMark(filePath, newFilePath, signets.get(0).getSignetPath().replace(ProfileConfig.profile, ProfileConfig.profilePath),SignetKeyEnums.GROUP_SIGN.getCode());
|
String signPath = signets.get(0).getSignetPath().replace(ProfileConfig.profile, ProfileConfig.profilePath);
|
||||||
|
PdfImageSignetUtil.imageWaterMark(filePath, newFilePath, signPath, SignetKeyEnums.GROUP_SIGN.getCode());
|
||||||
proProjectInfoSubdeptsUsers.setEduFilePath(newFilePath.replace(ProfileConfig.profilePath,ProfileConfig.profile));
|
proProjectInfoSubdeptsUsers.setEduFilePath(newFilePath.replace(ProfileConfig.profilePath,ProfileConfig.profile));
|
||||||
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
|
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
|
||||||
}
|
}
|
||||||
|
@ -1019,7 +1020,8 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
||||||
List<BasSignet> signets = basSignetMapper.selectBasSignetList(query);
|
List<BasSignet> signets = basSignetMapper.selectBasSignetList(query);
|
||||||
if(StringUtils.isNotEmpty(signets)){
|
if(StringUtils.isNotEmpty(signets)){
|
||||||
String newFilePath = filePath.replace(".pdf","-p.pdf");
|
String newFilePath = filePath.replace(".pdf","-p.pdf");
|
||||||
PdfImageSignetUtil.imageWaterMark(filePath, newFilePath, signets.get(0).getSignetPath().replace(ProfileConfig.profile, ProfileConfig.profilePath),SignetKeyEnums.PROJECT_SIGN.getCode());
|
String signPath = signets.get(0).getSignetPath().replace(ProfileConfig.profile, ProfileConfig.profilePath);
|
||||||
|
PdfImageSignetUtil.imageWaterMark(filePath, newFilePath, signPath,SignetKeyEnums.PROJECT_SIGN.getCode());
|
||||||
proProjectInfoSubdeptsUsers.setEduFilePath(newFilePath.replace(ProfileConfig.profilePath,ProfileConfig.profile));
|
proProjectInfoSubdeptsUsers.setEduFilePath(newFilePath.replace(ProfileConfig.profilePath,ProfileConfig.profile));
|
||||||
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
|
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
|
||||||
}
|
}
|
||||||
|
@ -1036,7 +1038,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
||||||
ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersById(id);
|
ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersById(id);
|
||||||
String filePath = proProjectInfoSubdeptsUsers.getEduFilePath().replace(ProfileConfig.profile, ProfileConfig.profilePath);
|
String filePath = proProjectInfoSubdeptsUsers.getEduFilePath().replace(ProfileConfig.profile, ProfileConfig.profilePath);
|
||||||
ProProjectInfoSubdeptsUsers userQuery = new ProProjectInfoSubdeptsUsers();
|
ProProjectInfoSubdeptsUsers userQuery = new ProProjectInfoSubdeptsUsers();
|
||||||
userQuery.setWorkType(18L);
|
userQuery.setWorkType(101L);
|
||||||
userQuery.setProjectId(proProjectInfoSubdeptsUsers.getProjectId());
|
userQuery.setProjectId(proProjectInfoSubdeptsUsers.getProjectId());
|
||||||
List<ProProjectInfoSubdeptsUsers> users = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(userQuery);
|
List<ProProjectInfoSubdeptsUsers> users = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(userQuery);
|
||||||
if(StringUtils.isNotEmpty(users)){
|
if(StringUtils.isNotEmpty(users)){
|
||||||
|
@ -1046,19 +1048,27 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
||||||
List<BasSignet> signets = basSignetMapper.selectBasSignetList(query);
|
List<BasSignet> signets = basSignetMapper.selectBasSignetList(query);
|
||||||
if(StringUtils.isNotEmpty(signets)){
|
if(StringUtils.isNotEmpty(signets)){
|
||||||
String newFilePath = filePath.replace(".pdf","-c.pdf");
|
String newFilePath = filePath.replace(".pdf","-c.pdf");
|
||||||
PdfImageSignetUtil.imageWaterMark(filePath, newFilePath, signets.get(0).getSignetPath().replace(ProfileConfig.profile, ProfileConfig.profilePath),SignetKeyEnums.PROJECT_SIGN.getCode());
|
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));
|
proProjectInfoSubdeptsUsers.setEduFilePath(newFilePath.replace(ProfileConfig.profilePath,ProfileConfig.profile));
|
||||||
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
|
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
String path = "D:\\meta\\test.pdf";
|
||||||
|
String newPath = path.replace(".pdf","-c.pdf");;
|
||||||
|
String signPath = "D:\\meta\\sign.png.v1.png";
|
||||||
|
PdfImageSignetUtil.imageWaterMark(path, newPath, signPath, SignetKeyEnums.PROJECT_SIGN.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean findUserComSign(Long id){
|
public Boolean findUserComSign(Long id){
|
||||||
// 审核文件签名
|
// 审核文件签名
|
||||||
ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersById(id);
|
ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersById(id);
|
||||||
ProProjectInfoSubdeptsUsers userQuery = new ProProjectInfoSubdeptsUsers();
|
ProProjectInfoSubdeptsUsers userQuery = new ProProjectInfoSubdeptsUsers();
|
||||||
userQuery.setWorkType(18L);
|
userQuery.setWorkType(101L);
|
||||||
userQuery.setProjectId(proProjectInfoSubdeptsUsers.getProjectId());
|
userQuery.setProjectId(proProjectInfoSubdeptsUsers.getProjectId());
|
||||||
List<ProProjectInfoSubdeptsUsers> users = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(userQuery);
|
List<ProProjectInfoSubdeptsUsers> users = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(userQuery);
|
||||||
if(StringUtils.isNotEmpty(users)){
|
if(StringUtils.isNotEmpty(users)){
|
||||||
|
@ -1117,13 +1127,6 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
String path = "D:\\meta\\test.pdf";
|
|
||||||
String newPath = path.replace(".pdf","-c.pdf");;
|
|
||||||
String signPath = "D:\\meta\\sign.png.v1.png";
|
|
||||||
PdfImageSignetUtil.imageWaterMark(path, newPath, signPath, SignetKeyEnums.PROJECT_SIGN.getCode());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 封装用户文件参数...
|
* 封装用户文件参数...
|
||||||
* @param proSubdeptsUser 用户对象
|
* @param proSubdeptsUser 用户对象
|
||||||
|
|
|
@ -33,6 +33,7 @@ public class PdfImageSignetUtil {
|
||||||
*/
|
*/
|
||||||
public static void imageWaterMark(String templatePath,String targetPath,String imagePath,String keyWord){
|
public static void imageWaterMark(String templatePath,String targetPath,String imagePath,String keyWord){
|
||||||
log.error("imageWaterMark...PDF...PATH{}:" + templatePath);
|
log.error("imageWaterMark...PDF...PATH{}:" + templatePath);
|
||||||
|
log.error("imageWaterMark...NEWPDF...PATH{}:" + targetPath);
|
||||||
try {
|
try {
|
||||||
File pdfFile = org.apache.commons.io.FileUtils.getFile(templatePath);
|
File pdfFile = org.apache.commons.io.FileUtils.getFile(templatePath);
|
||||||
byte[] pdfData = new byte[(int) pdfFile.length()];
|
byte[] pdfData = new byte[(int) pdfFile.length()];
|
||||||
|
|
|
@ -304,6 +304,16 @@ Page({
|
||||||
getMaPhoneNumber(data).then(res => {
|
getMaPhoneNumber(data).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
let phoneNumber = res.data;
|
let phoneNumber = res.data;
|
||||||
|
this.initData(phoneNumber);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
//用户决绝授权
|
||||||
|
app.toast("请允许微信手机号一键登录");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
initData(phoneNumber){
|
||||||
//使用手机号码查询详情
|
//使用手机号码查询详情
|
||||||
if (this.data.userPost == "1") {
|
if (this.data.userPost == "1") {
|
||||||
findProSubDeptsInfo(this.data.proId, phoneNumber).then(deptRes => {
|
findProSubDeptsInfo(this.data.proId, phoneNumber).then(deptRes => {
|
||||||
|
@ -408,12 +418,6 @@ Page({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
//用户决绝授权
|
|
||||||
app.toast("请允许微信手机号一键登录");
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -670,6 +674,13 @@ Page({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签名..
|
||||||
|
*/
|
||||||
|
startSignFile_0(){
|
||||||
|
this.initData(this.data.userPhoneNumber);
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开始签署文件
|
* 开始签署文件
|
||||||
* @param {*} skip
|
* @param {*} skip
|
||||||
|
@ -677,8 +688,8 @@ Page({
|
||||||
startSignFile(skip) {
|
startSignFile(skip) {
|
||||||
let _fileForm = {};
|
let _fileForm = {};
|
||||||
let currDate = new Date().toLocaleString().substring(0, 10).split("/");
|
let currDate = new Date().toLocaleString().substring(0, 10).split("/");
|
||||||
currDate[2] = currDate[2].replace("上午","").replace("下午","");
|
currDate[2] = currDate[2].replace("上","").replace("下","").replace("午","");
|
||||||
if (this.data.userPost == 1) {
|
if (this.data.form.userPost == 1) {
|
||||||
_fileForm.fName = this.data.form.subDeptLeaderName;
|
_fileForm.fName = this.data.form.subDeptLeaderName;
|
||||||
_fileForm.fCardId = this.data.form.subDeptLeaderCode;
|
_fileForm.fCardId = this.data.form.subDeptLeaderCode;
|
||||||
_fileForm.fSex = this.getGenderFromIdCard(this.data.form.subDeptLeaderCode);
|
_fileForm.fSex = this.getGenderFromIdCard(this.data.form.subDeptLeaderCode);
|
||||||
|
|
|
@ -688,7 +688,7 @@
|
||||||
<project-select init="{{initProject}}"></project-select>
|
<project-select init="{{initProject}}"></project-select>
|
||||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
||||||
<view class="kaoshimianban">
|
<view class="kaoshimianban">
|
||||||
<jyq-result wx:if="{{busExamInfos.passMark<=busExamInfos.userMark}}" iconPath="https://xiangguan.sxyanzhu.com/profile/icon/cg.png" title="恭喜!考试通过" description="本次考试已顺利完成,您可以去签署安全承诺文件了。" actionText="立 即 签 署" bind:action="startSignFile" />
|
<jyq-result wx:if="{{busExamInfos.passMark<=busExamInfos.userMark}}" iconPath="https://xiangguan.sxyanzhu.com/profile/icon/cg.png" title="恭喜!考试通过" description="本次考试已顺利完成,您可以去签署安全承诺文件了。" actionText="立 即 签 署" bind:action="startSignFile_0" />
|
||||||
<jyq-result wx:if="{{busExamInfos.passMark>busExamInfos.userMark}}" iconPath="https://xiangguan.sxyanzhu.com/profile/icon/sb.png" title="很遗憾!考试未通过" description="本次考试未通过,重新考试通过后您才可以签署安全承诺文件,请返回学习或继续考试。" actionText="继 续 考 试" bind:action="anewBusEduQuestion" descActionText="返 回 学 习" bind:descAction="onClickPreviousNode" />
|
<jyq-result wx:if="{{busExamInfos.passMark>busExamInfos.userMark}}" iconPath="https://xiangguan.sxyanzhu.com/profile/icon/sb.png" title="很遗憾!考试未通过" description="本次考试未通过,重新考试通过后您才可以签署安全承诺文件,请返回学习或继续考试。" actionText="继 续 考 试" bind:action="anewBusEduQuestion" descActionText="返 回 学 习" bind:descAction="onClickPreviousNode" />
|
||||||
<!-- <view class="time-unit">
|
<!-- <view class="time-unit">
|
||||||
<text class="timeline_for_state_2 timeline_for_state_6" wx:if="{{busExamInfos.passMark>busExamInfos.userMark}}">很 遗 憾 ! 考 试 不 通 过</text><text class="timeline_for_state_1 timeline_for_state_6" wx:if="{{busExamInfos.passMark<=busExamInfos.userMark}}">恭 喜 ! 考 试 通 过</text>
|
<text class="timeline_for_state_2 timeline_for_state_6" wx:if="{{busExamInfos.passMark>busExamInfos.userMark}}">很 遗 憾 ! 考 试 不 通 过</text><text class="timeline_for_state_1 timeline_for_state_6" wx:if="{{busExamInfos.passMark<=busExamInfos.userMark}}">恭 喜 ! 考 试 通 过</text>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
{
|
{
|
||||||
"name": "pages/project_qr/index",
|
"name": "pages/project_qr/index",
|
||||||
"pathName": "pages/project_qr/index",
|
"pathName": "pages/project_qr/index",
|
||||||
"query": "QRPID=132&SIGID=1",
|
"query": "QRPID=133&SIGID=1",
|
||||||
"launchMode": "default",
|
"launchMode": "default",
|
||||||
"scene": null
|
"scene": null
|
||||||
},
|
},
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 894 B |
Loading…
Reference in New Issue