代码codeview

This commit is contained in:
liang.chao 2024-05-10 17:05:24 +08:00
parent 2c14888e0d
commit 86dc06dd54
1 changed files with 5 additions and 8 deletions

View File

@ -88,14 +88,14 @@ public class BackApplyServiceImpl implements BackApplyService {
Date nowDate = DateUtils.getNowDate(); Date nowDate = DateUtils.getNowDate();
String format = dateFormat.format(nowDate); String format = dateFormat.format(nowDate);
String taskNum = backApplyMapper.selectTaskNumByMonth(nowDate, 36); String taskNum = backApplyMapper.selectTaskNumByMonth(nowDate, 36);
if (StringHelper.isNotEmpty(taskNum)){ if (StringHelper.isNotEmpty(taskNum)) {
// 将字符串转换为整数 // 将字符串转换为整数
int num = Integer.parseInt(taskNum); int num = Integer.parseInt(taskNum);
// 执行加一操作 // 执行加一操作
num++; num++;
// 将结果转换回字符串格式并确保结果是四位数不足四位则在前面补0 // 将结果转换回字符串格式并确保结果是四位数不足四位则在前面补0
taskNum = String.format("%04d", num); taskNum = String.format("%04d", num);
}else { } else {
taskNum = "0001"; taskNum = "0001";
} }
String code = "T" + format + "-" + taskNum; String code = "T" + format + "-" + taskNum;
@ -137,13 +137,9 @@ public class BackApplyServiceImpl implements BackApplyService {
} }
if (companyId != null) { if (companyId != null) {
bean.setCompanyId(companyId.toString()); bean.setCompanyId(companyId.toString());
List<BackApplyInfo> view = backApplyMapper.getView(bean);
return getMaTypeDetails(view);
} else {
List<BackApplyInfo> view = backApplyMapper.getView(bean);
return getMaTypeDetails(view);
} }
List<BackApplyInfo> view = backApplyMapper.getView(bean);
return getMaTypeDetails(view);
} }
private List<BackApplyInfo> getMaTypeDetails(List<BackApplyInfo> view) { private List<BackApplyInfo> getMaTypeDetails(List<BackApplyInfo> view) {
@ -411,6 +407,7 @@ public class BackApplyServiceImpl implements BackApplyService {
/** /**
* 退料批量审核-审核(web) * 退料批量审核-审核(web)
*
* @param dto * @param dto
* @return * @return
*/ */