|
@@ -30,6 +30,7 @@ import org.springblade.core.log.exception.ServiceException;
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
|
|
import org.springblade.core.oss.model.BladeFile;
|
|
|
import org.springblade.core.redis.cache.BladeRedis;
|
|
|
+import org.springblade.core.secure.BladeUser;
|
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
|
import org.springblade.core.secure.utils.SecureUtil;
|
|
|
import org.springblade.core.tool.api.R;
|
|
@@ -2303,6 +2304,10 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
|
|
|
@Override
|
|
|
public R reSigningEVisaByUserIds(String ids, String userIds) {
|
|
|
+ BladeUser user = AuthUtil.getUser();
|
|
|
+ if (user == null || user.getUserId() == null || user.getDeptId() == null || !"1536982621165592577".equals(user.getDeptId())) {
|
|
|
+ return R.fail("权限不足,请联系管理员处理!");
|
|
|
+ }
|
|
|
if (Func.isEmpty(ids) && ids == null) {
|
|
|
return R.fail("未获取到taskIds,操作失败!");
|
|
|
}
|
|
@@ -2317,7 +2322,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
ids2 = ids2.substring(0, ids2.length() - 1);
|
|
|
}
|
|
|
|
|
|
- String sqlqu = "update u_information_query set status=2,e_visa_pdf_url='' where id in( " + ids + ") and is_deleted=0 ";
|
|
|
+ String sqlqu = "update u_information_query set status=2,e_visa_pdf_url='' where id in( " + ids + ") and is_deleted=0 and status in (1,2)";
|
|
|
String sqlForTask = "update u_task set status=2 where form_data_id in( " + ids2 + ") and status in(1,2) and is_deleted=0 ";
|
|
|
String sqlForTaskPall = "UPDATE u_task_parallel a set a.is_resign = 1, a.`status`=2 , a.e_visa_status=1 ,a.e_visa_content='电签成功' where a.process_instance_id in(select process_instance_id from u_task b where b.form_data_id in( " + ids2 + ") and b.status in(0,1,2) and b.is_deleted = 0) and a.`status` in(0,1)";
|
|
|
|
|
@@ -2329,7 +2334,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
taskBtech += " and b.task_user in("+userIds+")";
|
|
|
sqlForTaskPall += " and a.task_user in("+userIds+")";
|
|
|
sqlqu = "update u_information_query a set status = if((select count(1) from u_task_parallel where process_instance_id = ( select process_instance_id from u_task where form_data_id = cast(a.id as char) and is_deleted = 0 and status in (1,2) order by id desc limit 1 ) " +
|
|
|
- "and `is_deleted` = 0 and task_user not in ( " + userIds + ") and status != 2 and e_visa_status != 1 ) > 0, 1, 2) ,e_visa_pdf_url='' where id in( "+ ids + ") and is_deleted=0 ";
|
|
|
+ "and `is_deleted` = 0 and task_user not in ( " + userIds + ") and status != 2 and e_visa_status != 1 ) > 0, 1, 2) ,e_visa_pdf_url='' where id in( "+ ids + ") and is_deleted=0 and status in (1,2)";
|
|
|
sqlForTask = "update u_task a set status = if((select count(1) from u_task_parallel where process_instance_id = a.process_instance_id " +
|
|
|
"and `is_deleted` = 0 and task_user not in ( " + userIds + ") and status != 2 and e_visa_status != 1 ) > 0, 1, 2) where form_data_id in( " + ids2 + ") and status in(1,2) and is_deleted=0 ";
|
|
|
}
|