任务单号获取修改
This commit is contained in:
parent
f015b6cad5
commit
720ac160e6
|
|
@ -8,6 +8,7 @@ import java.util.List;
|
|||
|
||||
import com.bonus.sgzb.common.core.exception.ServiceException;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.core.utils.StringHelper;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import com.bonus.sgzb.material.domain.*;
|
||||
import com.bonus.sgzb.material.mapper.*;
|
||||
|
|
@ -387,15 +388,18 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||
Date nowDate = DateUtils.getNowDate();
|
||||
String format = dateFormat.format(nowDate);
|
||||
int taskNum = taskMapper.selectTaskNumByMonth(nowDate, taskType) + 1;
|
||||
String codeNum = "";
|
||||
if (taskNum > GlobalContants.NUM1 && taskNum < GlobalContants.NUM2) {
|
||||
codeNum = code + format + "-00" + taskNum;
|
||||
} else if (taskNum > GlobalContants.NUM3 && taskNum < GlobalContants.NUM4) {
|
||||
codeNum = code + format + "-0" + taskNum;
|
||||
} else {
|
||||
codeNum = code + format + "-000" + taskNum;
|
||||
String taskNum = taskMapper.selectTaskNumByMonths(nowDate, taskType);
|
||||
if (StringHelper.isNotEmpty(taskNum)){
|
||||
// 将字符串转换为整数
|
||||
int num = Integer.parseInt(taskNum);
|
||||
// 执行加一操作
|
||||
num++;
|
||||
// 将结果转换回字符串格式,并确保结果是四位数,不足四位则在前面补0
|
||||
taskNum = String.format("%04d", num);
|
||||
}else {
|
||||
taskNum = "0001";
|
||||
}
|
||||
String codeNum = code + format + "-" + taskNum;
|
||||
return codeNum;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.bonus.sgzb.common.core.constant.HttpStatus;
|
|||
import com.bonus.sgzb.common.core.exception.ServiceException;
|
||||
import com.bonus.sgzb.common.core.utils.DateTimeHelper;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.core.utils.StringHelper;
|
||||
import com.bonus.sgzb.common.core.utils.StringUtils;
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
|
|
@ -164,15 +165,18 @@ public class RepairTestInputServiceImpl implements RepairTestInputService {
|
|||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||
Date nowDate = DateUtils.getNowDate();
|
||||
String format = dateFormat.format(nowDate);
|
||||
int taskNum = taskMapper.selectTaskNumByMonth(nowDate, taskType) + 1;
|
||||
String codeNum = "";
|
||||
if (taskNum > GlobalContants.NUM1 && taskNum < GlobalContants.NUM2) {
|
||||
codeNum = code + format + "-00" + taskNum;
|
||||
} else if (taskNum > GlobalContants.NUM3 && taskNum < GlobalContants.NUM4) {
|
||||
codeNum = code + format + "-0" + taskNum;
|
||||
} else {
|
||||
codeNum = code + format + "-000" + taskNum;
|
||||
String taskNum = taskMapper.selectTaskNumByMonths(nowDate, taskType);
|
||||
if (StringHelper.isNotEmpty(taskNum)){
|
||||
// 将字符串转换为整数
|
||||
int num = Integer.parseInt(taskNum);
|
||||
// 执行加一操作
|
||||
num++;
|
||||
// 将结果转换回字符串格式,并确保结果是四位数,不足四位则在前面补0
|
||||
taskNum = String.format("%04d", num);
|
||||
}else {
|
||||
taskNum = "0001";
|
||||
}
|
||||
String codeNum = code + format + "-" + taskNum;
|
||||
return codeNum;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import java.util.List;
|
|||
|
||||
import com.bonus.sgzb.common.core.exception.ServiceException;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.core.utils.StringHelper;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import com.bonus.sgzb.material.domain.*;
|
||||
import com.bonus.sgzb.material.mapper.PurchaseCheckInfoMapper;
|
||||
|
|
@ -285,15 +286,18 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
|
|||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||
Date nowDate = DateUtils.getNowDate();
|
||||
String format = dateFormat.format(nowDate);
|
||||
int taskNum = taskMapper.selectTaskNumByMonth(nowDate, taskType) + 1;
|
||||
String codeNum = "";
|
||||
if (taskNum > GlobalContants.NUM1 && taskNum < GlobalContants.NUM2) {
|
||||
codeNum = code + format + "-00" + taskNum;
|
||||
} else if (taskNum > GlobalContants.NUM3 && taskNum < GlobalContants.NUM4) {
|
||||
codeNum = code + format + "-0" + taskNum;
|
||||
} else {
|
||||
codeNum = code + format + "-000" + taskNum;
|
||||
String taskNum = taskMapper.selectTaskNumByMonths(nowDate, taskType);
|
||||
if (StringHelper.isNotEmpty(taskNum)){
|
||||
// 将字符串转换为整数
|
||||
int num = Integer.parseInt(taskNum);
|
||||
// 执行加一操作
|
||||
num++;
|
||||
// 将结果转换回字符串格式,并确保结果是四位数,不足四位则在前面补0
|
||||
taskNum = String.format("%04d", num);
|
||||
}else {
|
||||
taskNum = "0001";
|
||||
}
|
||||
String codeNum = code + format + "-" + taskNum;
|
||||
return codeNum;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.core.utils.StringHelper;
|
||||
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.material.domain.TmTask;
|
||||
import com.bonus.sgzb.material.vo.GlobalContants;
|
||||
|
|
@ -133,15 +134,18 @@ public class TaskServiceImpl implements TaskService
|
|||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||
Date nowDate = DateUtils.getNowDate();
|
||||
String format = dateFormat.format(nowDate);
|
||||
int taskNum = tmTaskMapper.selectTaskNumByMonth(nowDate, 36) + 1;
|
||||
String code = "";
|
||||
if (taskNum > GlobalContants.NUM1 && taskNum < GlobalContants.NUM2) {
|
||||
code = "T" + format + "-00" + taskNum;
|
||||
} else if (taskNum > GlobalContants.NUM3 && taskNum < GlobalContants.NUM4) {
|
||||
code = "T" + format + "-0" + taskNum;
|
||||
} else {
|
||||
code = "T" + format + "-000" + taskNum;
|
||||
}
|
||||
String taskNum = tmTaskMapper.selectTaskNumByMonths(nowDate, 36);
|
||||
if (StringHelper.isNotEmpty(taskNum)){
|
||||
// 将字符串转换为整数
|
||||
int num = Integer.parseInt(taskNum);
|
||||
// 执行加一操作
|
||||
num++;
|
||||
// 将结果转换回字符串格式,并确保结果是四位数,不足四位则在前面补0
|
||||
taskNum = String.format("%04d", num);
|
||||
}else {
|
||||
taskNum = "0001";
|
||||
}
|
||||
String code = "T" + format + "-" + taskNum;
|
||||
return code;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue