| | |
| | | import com.zy.asrs.service.ManLocDetlService; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.NodeService; |
| | | import com.zy.asrs.utils.SaasUtils; |
| | | import com.zy.asrs.utils.VersionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | manLocDetl.setCreateTime(now); |
| | | manLocDetl.setModiTime(now); |
| | | manLocDetl.setCreateBy(userId); |
| | | SaasUtils.insertLog(0,manLocDetl.getLocNo(),manLocDetl.getMatnr(), manLocDetl.getAnfme()); |
| | | manLocDetlService.insert(manLocDetl); |
| | | |
| | | } |
| | |
| | | if (manLocDetl.getAnfme() - param.getCount() < 0) { |
| | | return R.error("物料:"+ param.getMatnr() + " 在库位中数量不足"); |
| | | }else { |
| | | |
| | | manLocDetl.setAnfme(manLocDetl.getAnfme() - param.getCount()); |
| | | manLocDetlService.update(manLocDetl,new EntityWrapper<ManLocDetl>() |
| | | .eq("loc_no",node.getUuid()) |
| | | .eq("matnr",param.getMatnr())); |
| | | SaasUtils.insertLog(1,manLocDetl.getLocNo(), manLocDetl.getMatnr(),manLocDetl.getAnfme()); |
| | | } |
| | | } |
| | | } |
| | |
| | | manLocDetlService.deleteById(target); |
| | | target.setLocNo(uuid.getUuid()); |
| | | target.setNodeId(uuid.getId()); |
| | | SaasUtils.insertLog(2,target.getLocNo(), target.getMatnr(), target.getAnfme()); |
| | | manLocDetlService.insert(target); |
| | | } |
| | | } |