zhangback
7 天以前 ca412ade3b178fbc8ba0a4b6215a040acdede954
tms/src/main/java/com/ruoyi/tms/service/impl/TmsRouteServiceImpl.java
@@ -2,8 +2,13 @@
import java.util.List;
import com.ruoyi.common.enums.SystemDataNoEnum;
import com.ruoyi.common.utils.DateUtils;
import javax.annotation.Resource;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.service.ISystemDataNoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Service;
import org.springframework.scheduling.annotation.Async;
@@ -33,7 +38,8 @@
    protected final Logger logger = LoggerFactory.getLogger(getClass());
    @Resource
    private TmsRouteMapper tmsRouteMapper;
    @Autowired
    ISystemDataNoService systemDataNoService;
    /**
     * 查询运输路线管理
@@ -102,6 +108,9 @@
    @Override
    public int insertTmsRoute(TmsRoute tmsRoute)
    {
        String noByKey = systemDataNoService.getNoByKey(SystemDataNoEnum.LX);
        tmsRoute.setSystemCode(noByKey);
        tmsRoute.setCreateBy(SecurityUtils.getUsername());
        tmsRoute.setCreateTime(DateUtils.getNowDate());
        return tmsRouteMapper.insertTmsRoute(tmsRoute);
    }
@@ -128,6 +137,7 @@
    @Override
    public int updateTmsRoute(TmsRoute tmsRoute)
    {
        tmsRoute.setUpdateBy(SecurityUtils.getUsername());
        tmsRoute.setUpdateTime(DateUtils.getNowDate());
        return tmsRouteMapper.updateTmsRoute(tmsRoute);
    }