|
@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import org.nl.common.domain.query.PageQuery; |
|
|
import org.nl.common.domain.query.PageQuery; |
|
|
import org.nl.common.utils.SecurityUtils; |
|
|
import org.nl.common.utils.SecurityUtils; |
|
|
|
|
|
import org.nl.config.language.LangProcess; |
|
|
import org.nl.modules.common.exception.BadRequestException; |
|
|
import org.nl.modules.common.exception.BadRequestException; |
|
|
import org.nl.wms.basedata.master.transport.service.ITransportationBaseService; |
|
|
import org.nl.wms.basedata.master.transport.service.ITransportationBaseService; |
|
|
import org.nl.wms.basedata.master.transport.service.dao.TransportationBase; |
|
|
import org.nl.wms.basedata.master.transport.service.dao.TransportationBase; |
|
@ -57,7 +58,7 @@ public class TransportationBaseServiceImpl extends ServiceImpl<TransportationBas |
|
|
public void create(TransportationBase dto) { |
|
|
public void create(TransportationBase dto) { |
|
|
TransportationBase oneTran = findByCode(dto.getCust_code()); |
|
|
TransportationBase oneTran = findByCode(dto.getCust_code()); |
|
|
if (ObjectUtil.isNotEmpty(oneTran)) { |
|
|
if (ObjectUtil.isNotEmpty(oneTran)) { |
|
|
throw new BadRequestException("此编码已存在"); |
|
|
throw new BadRequestException(LangProcess.msg("master_exists")); |
|
|
} |
|
|
} |
|
|
String currentUserId = SecurityUtils.getCurrentUserId(); |
|
|
String currentUserId = SecurityUtils.getCurrentUserId(); |
|
|
String nickName = SecurityUtils.getCurrentNickName(); |
|
|
String nickName = SecurityUtils.getCurrentNickName(); |
|
@ -66,8 +67,8 @@ public class TransportationBaseServiceImpl extends ServiceImpl<TransportationBas |
|
|
dto.setCust_id(IdUtil.getSnowflake(1, 1).nextIdStr()); |
|
|
dto.setCust_id(IdUtil.getSnowflake(1, 1).nextIdStr()); |
|
|
dto.setCreate_id(currentUserId); |
|
|
dto.setCreate_id(currentUserId); |
|
|
dto.setCreate_name(nickName); |
|
|
dto.setCreate_name(nickName); |
|
|
dto.setUpdate_id(currentUserId); |
|
|
dto.setUpdate_optid(currentUserId); |
|
|
dto.setUpdate_name(nickName); |
|
|
dto.setUpdate_optname(nickName); |
|
|
dto.setUpdate_time(now); |
|
|
dto.setUpdate_time(now); |
|
|
dto.setCreate_time(now); |
|
|
dto.setCreate_time(now); |
|
|
|
|
|
|
|
@ -78,7 +79,7 @@ public class TransportationBaseServiceImpl extends ServiceImpl<TransportationBas |
|
|
public void update(TransportationBase dto) { |
|
|
public void update(TransportationBase dto) { |
|
|
TransportationBase oneTran = getById(dto.getCust_id()); |
|
|
TransportationBase oneTran = getById(dto.getCust_id()); |
|
|
if (oneTran == null) { |
|
|
if (oneTran == null) { |
|
|
throw new BadRequestException("被删除或无权限,操作失败!"); |
|
|
throw new BadRequestException(LangProcess.msg("master_operation_permissions")); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
String currentUserId = SecurityUtils.getCurrentUserId(); |
|
|
String currentUserId = SecurityUtils.getCurrentUserId(); |
|
@ -86,8 +87,8 @@ public class TransportationBaseServiceImpl extends ServiceImpl<TransportationBas |
|
|
|
|
|
|
|
|
String now = DateUtil.now(); |
|
|
String now = DateUtil.now(); |
|
|
dto.setUpdate_time(now); |
|
|
dto.setUpdate_time(now); |
|
|
dto.setUpdate_id(currentUserId); |
|
|
dto.setUpdate_optid(currentUserId); |
|
|
dto.setUpdate_name(nickName); |
|
|
dto.setUpdate_optname(nickName); |
|
|
transportationBaseMapper.updateById(dto); |
|
|
transportationBaseMapper.updateById(dto); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|