修改待办受理号生成逻辑
This commit is contained in:
parent
225aaff6a9
commit
aa519bdec1
|
|
@ -672,7 +672,14 @@ public class TSBizRemListServiceImpl extends ServiceImpl<TSBizRemListMapper, TSB
|
||||||
BeanUtils.copyProperties(tsTaskList, taskListNew);
|
BeanUtils.copyProperties(tsTaskList, taskListNew);
|
||||||
taskListNew.setTasklistid(null);
|
taskListNew.setTasklistid(null);
|
||||||
//设置受理号
|
//设置受理号
|
||||||
taskListNew.setAcceptno(aicUser.getRegionID().substring(0, Math.min(aicUser.getRegionID().length(), 6)) + uuidUtil.getCurAcceptNo());
|
// taskListNew.setAcceptno(aicUser.getRegionID().substring(0, Math.min(aicUser.getRegionID().length(), 6)) + uuidUtil.getCurAcceptNo());
|
||||||
|
//因xr_id_maker容易被锁,临时用新的生成规则生成受理编号
|
||||||
|
LocalDateTime nowLocalDateTime = LocalDateTime.now(); // 获取当前日期和时间
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); // 定义格式化模式
|
||||||
|
String formattedDate = nowLocalDateTime.format(formatter); // 将日期格式化为字符串
|
||||||
|
String acceptno = "7" + formattedDate + UUID.randomUUID().toString().replaceAll("-", "").substring(0, 8);
|
||||||
|
taskListNew.setAcceptno(acceptno);
|
||||||
|
|
||||||
//设置签收人信息
|
//设置签收人信息
|
||||||
taskListNew.setSignuserid(aicUser.getPrimaryKey());
|
taskListNew.setSignuserid(aicUser.getPrimaryKey());
|
||||||
taskListNew.setSignloginname(aicUser.getName());
|
taskListNew.setSignloginname(aicUser.getName());
|
||||||
|
|
@ -903,7 +910,14 @@ public class TSBizRemListServiceImpl extends ServiceImpl<TSBizRemListMapper, TSB
|
||||||
BeanUtils.copyProperties(tsTaskList, taskListNew);
|
BeanUtils.copyProperties(tsTaskList, taskListNew);
|
||||||
taskListNew.setTasklistid(null);
|
taskListNew.setTasklistid(null);
|
||||||
//设置受理号
|
//设置受理号
|
||||||
taskListNew.setAcceptno(aicUser.getRegionID().substring(0, Math.min(aicUser.getRegionID().length(), 6)) + uuidUtil.getCurAcceptNo());
|
// taskListNew.setAcceptno(aicUser.getRegionID().substring(0, Math.min(aicUser.getRegionID().length(), 6)) + uuidUtil.getCurAcceptNo());
|
||||||
|
//因xr_id_maker容易被锁,临时用新的生成规则生成受理编号
|
||||||
|
LocalDateTime nowLocalDateTime = LocalDateTime.now(); // 获取当前日期和时间
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); // 定义格式化模式
|
||||||
|
String formattedDate = nowLocalDateTime.format(formatter); // 将日期格式化为字符串
|
||||||
|
String acceptno = "7" + formattedDate + UUID.randomUUID().toString().replaceAll("-", "").substring(0, 8);
|
||||||
|
taskListNew.setAcceptno(acceptno);
|
||||||
|
|
||||||
//设置签收人信息
|
//设置签收人信息
|
||||||
taskListNew.setSignuserid(aicUser.getPrimaryKey());
|
taskListNew.setSignuserid(aicUser.getPrimaryKey());
|
||||||
taskListNew.setSignloginname(aicUser.getName());
|
taskListNew.setSignloginname(aicUser.getName());
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,14 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
|
||||||
@Override
|
@Override
|
||||||
public String startWorkFlow(TSTaskList taskListModel, AICUser user, String definitionName) {
|
public String startWorkFlow(TSTaskList taskListModel, AICUser user, String definitionName) {
|
||||||
//受理编号
|
//受理编号
|
||||||
taskListModel.setAcceptno(user.getRegionID().substring(0, 6) + uuidUtil.getCurAcceptNo());
|
// taskListModel.setAcceptno(user.getRegionID().substring(0, 6) + uuidUtil.getCurAcceptNo());
|
||||||
|
//因xr_id_maker容易被锁,临时用新的生成规则生成受理编号
|
||||||
|
LocalDateTime nowLocalDateTime = LocalDateTime.now(); // 获取当前日期和时间
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); // 定义格式化模式
|
||||||
|
String formattedDate = nowLocalDateTime.format(formatter); // 将日期格式化为字符串
|
||||||
|
String acceptno = "7" + formattedDate + UUID.randomUUID().toString().replaceAll("-", "").substring(0, 8);
|
||||||
|
taskListModel.setAcceptno(acceptno);
|
||||||
|
|
||||||
ResultMap resultMap = workFlowService.startAndClaim(user.getPrimaryKey(), null, definitionName, null);
|
ResultMap resultMap = workFlowService.startAndClaim(user.getPrimaryKey(), null, definitionName, null);
|
||||||
String workflowid = resultMap.getWorkflowid();
|
String workflowid = resultMap.getWorkflowid();
|
||||||
taskListModel.setWorkflowid(workflowid);
|
taskListModel.setWorkflowid(workflowid);
|
||||||
|
|
@ -139,7 +146,14 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
|
||||||
@Override
|
@Override
|
||||||
public String startWorkFlow(TSTaskList taskListModel, List<String> userids, String decorg, String definitionName) {
|
public String startWorkFlow(TSTaskList taskListModel, List<String> userids, String decorg, String definitionName) {
|
||||||
//受理编号
|
//受理编号
|
||||||
taskListModel.setAcceptno(decorg.substring(0, 6) + uuidUtil.getCurAcceptNo());
|
// taskListModel.setAcceptno(decorg.substring(0, 6) + uuidUtil.getCurAcceptNo());
|
||||||
|
//因xr_id_maker容易被锁,临时用新的生成规则生成受理编号
|
||||||
|
LocalDateTime nowLocalDateTime = LocalDateTime.now(); // 获取当前日期和时间
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); // 定义格式化模式
|
||||||
|
String formattedDate = nowLocalDateTime.format(formatter); // 将日期格式化为字符串
|
||||||
|
String acceptno = "7" + formattedDate + UUID.randomUUID().toString().replaceAll("-", "").substring(0, 8);
|
||||||
|
taskListModel.setAcceptno(acceptno);
|
||||||
|
|
||||||
ResultMap resultMap = workFlowService.startAndClaim(userids.get(0), userids, definitionName, null);
|
ResultMap resultMap = workFlowService.startAndClaim(userids.get(0), userids, definitionName, null);
|
||||||
String workflowid = resultMap.getWorkflowid();
|
String workflowid = resultMap.getWorkflowid();
|
||||||
taskListModel.setWorkflowid(workflowid);
|
taskListModel.setWorkflowid(workflowid);
|
||||||
|
|
@ -308,7 +322,14 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
|
||||||
@Override
|
@Override
|
||||||
public String startWorkFlowApp(TSTaskList taskListModel, String definitionName) {
|
public String startWorkFlowApp(TSTaskList taskListModel, String definitionName) {
|
||||||
//受理编号
|
//受理编号
|
||||||
taskListModel.setAcceptno("400000" + uuidUtil.getCurAcceptNo());
|
// taskListModel.setAcceptno("400000" + uuidUtil.getCurAcceptNo());
|
||||||
|
//因xr_id_maker容易被锁,临时用新的生成规则生成受理编号
|
||||||
|
LocalDateTime nowLocalDateTime = LocalDateTime.now(); // 获取当前日期和时间
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); // 定义格式化模式
|
||||||
|
String formattedDate = nowLocalDateTime.format(formatter); // 将日期格式化为字符串
|
||||||
|
String acceptno = "7" + formattedDate + UUID.randomUUID().toString().replaceAll("-", "").substring(0, 8);
|
||||||
|
taskListModel.setAcceptno(acceptno);
|
||||||
|
|
||||||
// ResultMap resultMap = workFlowService.startAndClaim(user.getPrimaryKey(), null, definitionName, null);
|
// ResultMap resultMap = workFlowService.startAndClaim(user.getPrimaryKey(), null, definitionName, null);
|
||||||
ResultMap resultMap = workFlowService.startAndClaimApp(null, null, definitionName, null);
|
ResultMap resultMap = workFlowService.startAndClaimApp(null, null, definitionName, null);
|
||||||
String workflowid = resultMap.getWorkflowid();
|
String workflowid = resultMap.getWorkflowid();
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ import javax.servlet.ServletContextListener;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
@ -707,7 +708,14 @@ public class BizSerIllegalRemController extends BaseController implements Servle
|
||||||
BeanUtils.copyProperties(tsTaskList, taskListNew);
|
BeanUtils.copyProperties(tsTaskList, taskListNew);
|
||||||
taskListNew.setTasklistid(null);
|
taskListNew.setTasklistid(null);
|
||||||
//设置受理号
|
//设置受理号
|
||||||
taskListNew.setAcceptno(aicUser.getRegionID().substring(0, Math.min(aicUser.getRegionID().length(), 6)) + uuidUtil.getCurAcceptNo());
|
// taskListNew.setAcceptno(aicUser.getRegionID().substring(0, Math.min(aicUser.getRegionID().length(), 6)) + uuidUtil.getCurAcceptNo());
|
||||||
|
//因xr_id_maker容易被锁,临时用新的生成规则生成受理编号
|
||||||
|
LocalDateTime nowLocalDateTime = LocalDateTime.now(); // 获取当前日期和时间
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); // 定义格式化模式
|
||||||
|
String formattedDate = nowLocalDateTime.format(formatter); // 将日期格式化为字符串
|
||||||
|
String acceptno = "7" + formattedDate + UUID.randomUUID().toString().replaceAll("-", "").substring(0, 8);
|
||||||
|
taskListNew.setAcceptno(acceptno);
|
||||||
|
|
||||||
//设置签收人信息
|
//设置签收人信息
|
||||||
taskListNew.setSignuserid(aicUser.getPrimaryKey());
|
taskListNew.setSignuserid(aicUser.getPrimaryKey());
|
||||||
taskListNew.setSignloginname(aicUser.getName());
|
taskListNew.setSignloginname(aicUser.getName());
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -664,7 +665,14 @@ public class TSBizSerIllegalRemServiceImpl extends BaseServiceImpl<TSBizSerIlleg
|
||||||
BeanUtils.copyProperties(tsTaskList, taskListNew);
|
BeanUtils.copyProperties(tsTaskList, taskListNew);
|
||||||
taskListNew.setTasklistid(null);
|
taskListNew.setTasklistid(null);
|
||||||
//设置受理号
|
//设置受理号
|
||||||
taskListNew.setAcceptno(aicUser.getRegionID().substring(0, Math.min(aicUser.getRegionID().length(), 6)) + uuidUtil.getCurAcceptNo());
|
// taskListNew.setAcceptno(aicUser.getRegionID().substring(0, Math.min(aicUser.getRegionID().length(), 6)) + uuidUtil.getCurAcceptNo());
|
||||||
|
//因xr_id_maker容易被锁,临时用新的生成规则生成受理编号
|
||||||
|
LocalDateTime nowLocalDateTime = LocalDateTime.now(); // 获取当前日期和时间
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); // 定义格式化模式
|
||||||
|
String formattedDate = nowLocalDateTime.format(formatter); // 将日期格式化为字符串
|
||||||
|
String acceptno = "7" + formattedDate + UUID.randomUUID().toString().replaceAll("-", "").substring(0, 8);
|
||||||
|
taskListNew.setAcceptno(acceptno);
|
||||||
|
|
||||||
//设置签收人信息
|
//设置签收人信息
|
||||||
taskListNew.setSignuserid(aicUser.getPrimaryKey());
|
taskListNew.setSignuserid(aicUser.getPrimaryKey());
|
||||||
taskListNew.setSignloginname(aicUser.getName());
|
taskListNew.setSignloginname(aicUser.getName());
|
||||||
|
|
|
||||||
|
|
@ -74,29 +74,29 @@ public class UuidUtil {
|
||||||
*
|
*
|
||||||
* @return 新产生的流水号
|
* @return 新产生的流水号
|
||||||
*/
|
*/
|
||||||
// public synchronized String getCurAcceptNo() {
|
public synchronized String getCurAcceptNo() {
|
||||||
// return getTridmaker("acceptNoForCase");
|
return getTridmaker("acceptNoForCase");
|
||||||
// }
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 规则年月日+5位顺序号。例如:13060400001
|
* 规则年月日+5位顺序号。例如:13060400001
|
||||||
*
|
*
|
||||||
* @return 新产生的流水号(Redis) todo: 新的一年要重新获取
|
* @return 新产生的流水号(Redis) todo: 新的一年要重新获取
|
||||||
*/
|
*/
|
||||||
public String getCurAcceptNo() {
|
// public String getCurAcceptNo() {
|
||||||
String key = "Redis_acceptNoForCase";
|
// String key = "Redis_acceptNoForCase";
|
||||||
String num = null;
|
// String num = null;
|
||||||
if (redisService.exists(key)) {
|
// if (redisService.exists(key)) {
|
||||||
num = redisService.incr(key);
|
// num = redisService.incr(key);
|
||||||
|
//
|
||||||
// 根据规则生成受理号
|
// // 根据规则生成受理号
|
||||||
LocalDate localDate = LocalDate.now();
|
// LocalDate localDate = LocalDate.now();
|
||||||
int year = localDate.getYear();
|
// int year = localDate.getYear();
|
||||||
return "7" + String.valueOf(year).substring(2, 4) + beforeZeroFill(num, 8);
|
// return "7" + String.valueOf(year).substring(2, 4) + beforeZeroFill(num, 8);
|
||||||
} else {
|
// } else {
|
||||||
throw new RuntimeException("获取新产生的流水号异常");
|
// throw new RuntimeException("获取新产生的流水号异常");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue