package com.jcdm.main.bs.workshop.service.impl; import java.util.List; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.jcdm.common.utils.DateUtils; import com.jcdm.main.bs.workshop.service.IBsWorkshopInfoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.jcdm.main.bs.workshop.mapper.BsWorkshopInfoMapper; import com.jcdm.main.bs.workshop.domain.BsWorkshopInfo; import static org.apache.commons.lang3.SystemUtils.getUserName; /** * 车间信息Service业务层处理 * * @author jc * @date 2023-12-06 */ @Service public class BsWorkshopInfoServiceImpl extends ServiceImpl implements IBsWorkshopInfoService { @Autowired private BsWorkshopInfoMapper bsWorkshopInfoMapper; /** * 查询车间信息 * * @param id 车间信息主键 * @return 车间信息 */ @Override public BsWorkshopInfo selectBsWorkshopInfoById(Long id) { return bsWorkshopInfoMapper.selectBsWorkshopInfoById(id); } /** * 查询车间信息列表 * * @param bsWorkshopInfo 车间信息 * @return 车间信息 */ @Override public List selectBsWorkshopInfoList(BsWorkshopInfo bsWorkshopInfo) { return bsWorkshopInfoMapper.selectBsWorkshopInfoList(bsWorkshopInfo); } /** * 新增车间信息 * * @param bsWorkshopInfo 车间信息 * @return 结果 */ @Override public int insertBsWorkshopInfo(BsWorkshopInfo bsWorkshopInfo) { bsWorkshopInfo.setCreateTime(DateUtils.getNowDate()); bsWorkshopInfo.setCreateUser(getUserName()); return bsWorkshopInfoMapper.insertBsWorkshopInfo(bsWorkshopInfo); } /** * 修改车间信息 * * @param bsWorkshopInfo 车间信息 * @return 结果 */ @Override public int updateBsWorkshopInfo(BsWorkshopInfo bsWorkshopInfo) { bsWorkshopInfo.setUpdateTime(DateUtils.getNowDate()); bsWorkshopInfo.setUpdateUser(getUserName()); return bsWorkshopInfoMapper.updateBsWorkshopInfo(bsWorkshopInfo); } /** * 批量删除车间信息 * * @param ids 需要删除的车间信息主键 * @return 结果 */ @Override public int deleteBsWorkshopInfoByIds(Long[] ids) { return bsWorkshopInfoMapper.deleteBsWorkshopInfoByIds(ids); } /** * 删除车间信息信息 * * @param id 车间信息主键 * @return 结果 */ @Override public int deleteBsWorkshopInfoById(Long id) { return bsWorkshopInfoMapper.deleteBsWorkshopInfoById(id); } }