|
@@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
@@ -38,7 +39,7 @@ public class StorageLocationServiceImpl implements StorageLocationService {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public Map<String, Object> addStorage(StorageLocation storageLocation) {
|
|
|
|
|
|
|
+ public Map<String, Object> addStorage(StorageLocation storageLocation, HttpServletRequest request) {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
try{
|
|
try{
|
|
|
int count = storageLocationMapper.getStorageCount(storageLocation);
|
|
int count = storageLocationMapper.getStorageCount(storageLocation);
|
|
@@ -47,6 +48,7 @@ public class StorageLocationServiceImpl implements StorageLocationService {
|
|
|
map.put("errMsg", "编号存在!");
|
|
map.put("errMsg", "编号存在!");
|
|
|
return map;
|
|
return map;
|
|
|
}
|
|
}
|
|
|
|
|
+ storageLocation.setModifyUser(request.getHeader("userId"));
|
|
|
storageLocationMapper.addStorage(storageLocation);
|
|
storageLocationMapper.addStorage(storageLocation);
|
|
|
map.put("msg", "200");
|
|
map.put("msg", "200");
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
@@ -74,9 +76,10 @@ public class StorageLocationServiceImpl implements StorageLocationService {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public Map<String, Object> updateStorage(StorageLocation storageLocation) {
|
|
|
|
|
|
|
+ public Map<String, Object> updateStorage(StorageLocation storageLocation, HttpServletRequest request) {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
try{
|
|
try{
|
|
|
|
|
+ storageLocation.setModifyUser(request.getHeader("userId"));
|
|
|
storageLocationMapper.updateStorage(storageLocation);
|
|
storageLocationMapper.updateStorage(storageLocation);
|
|
|
map.put("msg", "200");
|
|
map.put("msg", "200");
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|