| | |
| | | package com.mes.rawglassdetails.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.rawglassdetails.entity.RawGlassStorageDetails; |
| | | import com.mes.rawglassdetails.entity.request.RawGlassRequest; |
| | | import com.mes.rawglassdetails.mapper.RawGlassStorageDetailsMapper; |
| | | import com.mes.rawglassdetails.service.RawGlassStorageDetailsService; |
| | | import com.mes.rawglassstation.entity.RawGlassStorageStation; |
| | | import com.mes.userinfo.entity.vo.SysUserVO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | return list(); |
| | | } |
| | | |
| | | @Override |
| | | public boolean insertRawGlassStorageDetails(RawGlassStorageDetails rw) { |
| | | return this.save(rw); |
| | | } |
| | | |
| | | @Override |
| | | public String patternWarehousing(RawGlassRequest request) { |
| | |
| | | RawGlassStorageDetails details = new RawGlassStorageDetails(); |
| | | BeanUtils.copyProperties(request, details); |
| | | details.setState(Const.GLASS_STATE_IN); |
| | | details.setCreateTime(new Date()); |
| | | save(details); |
| | | return null; |
| | | return "success"; |
| | | } |
| | | |
| | | @Override |
| | | public String UpdateQuantity(RawGlassRequest request) { |
| | | update( |
| | | new LambdaUpdateWrapper<RawGlassStorageDetails>() |
| | | .set(RawGlassStorageDetails::getRemainQuantity, request.getRemainQuantity()) |
| | | .eq(RawGlassStorageDetails::getSlotId, request.getSlotId())); |
| | | return "success"; |
| | | } |
| | | @Override |
| | | public String deleteWarehousing(Long slotId) { |
| | | update(new LambdaUpdateWrapper<RawGlassStorageDetails>().eq(RawGlassStorageDetails::getSlotId, slotId) |
| | | .set(RawGlassStorageDetails::getState,Const.GLASS_STATE_OUT)); |
| | | return "success"; |
| | | } |
| | | @Override |
| | | public String outWarehousing(Long slotId) { |
| | | update(new LambdaUpdateWrapper<RawGlassStorageDetails>().eq(RawGlassStorageDetails::getSlotId, slotId) |
| | | .set(RawGlassStorageDetails::getState,Const.GLASS_STATE_OUT_ING)); |
| | | return "success"; |
| | | } |
| | | |
| | | } |