Commit 1495b2be authored by fangxinjiang's avatar fangxinjiang

代码优化-fxj

parent 1820f7f1
......@@ -107,7 +107,7 @@ public class THouseHoldLimitController {
@Operation(summary = "获取派单发起时间", description = "获取派单发起时间")
@PostMapping("/getConfirmDate")
public R<String> getConfirmDate(@RequestBody BaseSearchVO paramVo) {
return R.ok(tHouseHoldLimitService.getConfirmDate(paramVo));
return tHouseHoldLimitService.getConfirmDate(paramVo);
}
......
......@@ -55,5 +55,5 @@ public interface THouseHoldLimitService extends IService<THouseHoldLimit> {
THouseHoldLimitInnerVo getWorkDayByDeadLineDay(BaseSearchVO paramVo);
String getConfirmDate(BaseSearchVO paramVo);
R<String> getConfirmDate(BaseSearchVO paramVo);
}
......@@ -426,13 +426,13 @@ public class THouseHoldLimitServiceImpl extends ServiceImpl<THouseHoldLimitMappe
}
@Override
public String getConfirmDate(BaseSearchVO paramVo) {
public R<String> getConfirmDate(BaseSearchVO paramVo) {
THouseHoldLimit houseHoldLimit = baseMapper.selectOne(Wrappers.<THouseHoldLimit>query().lambda()
.eq(THouseHoldLimit::getName,paramVo.getName())
.eq(THouseHoldLimit::getType,paramVo.getType())
.last(CommonConstants.LAST_ONE_SQL));
if (null == houseHoldLimit){
return null;
return R.failed("未找到户截止日配置信息");
}
String deadLineDay = houseHoldLimit.getDeadLineDay();
if (Common.isNotNull(deadLineDay)) {
......@@ -441,7 +441,7 @@ public class THouseHoldLimitServiceImpl extends ServiceImpl<THouseHoldLimitMappe
// 设置RegistDate为当前月份对应的截止日期deadLineDay
Date registDate = DateUtil.setDayByDate(new Date(), Integer.parseInt(deadLineDay));
if (null == registDate) {
return null;
return R.failed("未找到截止日期对应的可用工作日");
}
vo.setRegistDate(registDate);
vo.setType(CommonConstants.ONE_STRING);
......@@ -457,13 +457,13 @@ public class THouseHoldLimitServiceImpl extends ServiceImpl<THouseHoldLimitMappe
canBeHandle = true;
}
}
return initExpectedCollectionTime( paramVo.getStartDate(),canBeHandle,addHandleRule);
return R.ok(initExpectedCollectionTime( paramVo.getStartDate(),canBeHandle,addHandleRule));
} catch (NumberFormatException e) {
// 截止日期不是有效数字,返回null表示无法确定
return null;
return R.failed("截止日期不是有效数字");
}
}
return null;
return R.ok("获取日期信息失败,请查验配置数据");
}
/**
* @Author fxj
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment