Commit 7bcece8d authored by cq990612's avatar cq990612

优化代码结构

parent b7270b0c
......@@ -19,7 +19,6 @@ public class WorkOrderChangeLogDto {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@JsonFormat(shape=JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "changeDate",value = "变更日期")
private Date changeDate;
......
......@@ -532,7 +532,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
@Override
public Boolean rejectById(Integer reviewerId, Integer id, String reason) {
log.info("WorkOrderServiceImpl[]rejectById[]input.param.reviewerId:{},id:{},reason:{}" + reviewerId, id, reason);
if (null == reviewerId || null == id || StringUtils.isEmpty(reason)) {
if (null == reviewerId || null == id || StringUtils.isBlank(reason)) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.INPUT_PARAM_IS_NULL);
}
// 判断当前用户是否有权限
......@@ -1337,7 +1337,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
// 判断新增的工单变更是否为空
private void OrderChangeVoIsNull(OrderChangeVo vo, Boolean workIdIsNeed) {
System.out.println(vo);
if (null == vo || null ==vo.getOperatorId() || null == vo.getWorkDay() || null == vo.getWorkTime() || StringUtils.isEmpty(vo.getDes()) || StringUtils.isEmpty(vo.getChangeReason())) {
if (null == vo || null ==vo.getOperatorId() || null == vo.getWorkDay() || null == vo.getWorkTime() || StringUtils.isBlank(vo.getDes()) || StringUtils.isBlank(vo.getChangeReason())) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.INPUT_PARAM_IS_NULL);
}
if (!UserRoleLevelUtils.isManagerLevel(vo.getOperatorId(), LevelEnum.WORKORDER_CHANGEMANAGEMENT.getLevelName())) {
......
......@@ -137,9 +137,6 @@ public class WorkTimeOrderController extends BaseController {
@PutMapping(value = "/reject")
public Result<Boolean> rejectById(Integer reviewerId, Integer id, String reason) {
log.info("WorkTimeOrderController[]rejectById[]input.param.reviewerId:{},id:{},reason:{}" + reviewerId, id, reason);
if (null == reviewerId || null == id || StringUtils.isEmpty(reason)) {
throw new CustomException(RESP_CODE_ENUM.INPUT_PARAM_IS_NULL);
}
Boolean aBoolean = workTimeOrderService.rejectById(reviewerId, id, reason);
return getResult(aBoolean);
}
......
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