Commit 5d461a68 authored by ad's avatar ad

Merge remote-tracking branch 'origin/dev' into dev

parents 7bef42b8 6782a3e0
...@@ -100,8 +100,8 @@ public class MaterialManagementApi { ...@@ -100,8 +100,8 @@ public class MaterialManagementApi {
* 查询未审核卡体详情 * 查询未审核卡体详情
*/ */
@RequestMapping("selectCardBody") @RequestMapping("selectCardBody")
public List<CardBodyEntity> selectCardBody(@Param("date")String date){ public List<CardBodyEntity> selectCardBody(@Param("date")String date,@Param("name")String name){
return materialManagementService.selectCardBody(replaceDate(date)); return materialManagementService.selectCardBody(replaceDate(date),name);
} }
...@@ -121,8 +121,8 @@ public class MaterialManagementApi { ...@@ -121,8 +121,8 @@ public class MaterialManagementApi {
* 查询未审核膜详情 * 查询未审核膜详情
*/ */
@RequestMapping("selectPlasticFilm") @RequestMapping("selectPlasticFilm")
public List<PlasticFilmEntity> selectPlasticFilm(@Param("date")String date){ public List<PlasticFilmEntity> selectPlasticFilm(@Param("date")String date,@Param("name")String name){
return materialManagementService.selectPlasticFilm(replaceDate(date)); return materialManagementService.selectPlasticFilm(replaceDate(date),name);
} }
......
...@@ -110,11 +110,19 @@ public interface MaterialManagementMapper { ...@@ -110,11 +110,19 @@ public interface MaterialManagementMapper {
"UNION all \n" + "UNION all \n" +
"select * from card_body where to_char(CHECK_DATE,'yyyyMMdd') = #{date}") "select * from card_body where to_char(CHECK_DATE,'yyyyMMdd') = #{date}")
public List<CardBodyEntity> selectCardBodyByState(String date); public List<CardBodyEntity> selectCardBodyByState(String date);
@Select("select * from card_body where state = 0 and name =#{name}\n" +
"UNION all \n" +
"select * from card_body where to_char(CHECK_DATE,'yyyyMMdd') = #{date} and name =#{name}")
public List<CardBodyEntity> selectCardBodyByStateAndName(@Param("date")String date,@Param("name")String name);
@Select("select * from Plastic_Film where state = 0 \n" + @Select("select * from Plastic_Film where state = 0 \n" +
"UNION all \n" + "UNION all \n" +
"select * from Plastic_Film where to_char(CHECK_DATE,'yyyyMMdd') = #{date}") "select * from Plastic_Film where to_char(CHECK_DATE,'yyyyMMdd') = #{date}")
public List<PlasticFilmEntity> selectPlasticFilmByState(String date); public List<PlasticFilmEntity> selectPlasticFilmByState(String date);
@Select("select * from Plastic_Film where state = 0 and name =#{name}\n" +
"UNION all \n" +
"select * from Plastic_Film where to_char(CHECK_DATE,'yyyyMMdd') = #{date} and name =#{name}")
public List<PlasticFilmEntity> selectPlasticFilmByStateAndName(@Param("date")String date,@Param("name")String name);
@Update("update card_body set state =1, check_date = sysdate where CARD_BODY_ID = #{id}") @Update("update card_body set state =1, check_date = sysdate where CARD_BODY_ID = #{id}")
public boolean updateCardBodyState(long id); public boolean updateCardBodyState(long id);
...@@ -204,4 +212,8 @@ public interface MaterialManagementMapper { ...@@ -204,4 +212,8 @@ public interface MaterialManagementMapper {
"where SYS_USER_ROLE.ROLE_ID = 31 or SYS_USER_ROLE.ROLE_ID = 90") "where SYS_USER_ROLE.ROLE_ID = 31 or SYS_USER_ROLE.ROLE_ID = 90")
public List<Map<String,Object>> selectPlasticFilmOperation(); public List<Map<String,Object>> selectPlasticFilmOperation();
@Select("select * from user_info left join SYS_USER_ROLE on user_info.ID = SYS_USER_ROLE.USER_ID\n" +
"where user_info.NAME = #{name}")
public List<Map<String,Object>> selectRoleByUserName(String name);
} }
...@@ -27,11 +27,11 @@ public interface MaterialManagementService { ...@@ -27,11 +27,11 @@ public interface MaterialManagementService {
public boolean updateCardBodyState(long id); public boolean updateCardBodyState(long id);
public List<CardBodyEntity> selectCardBody(String date); public List<CardBodyEntity> selectCardBody(String date,String name);
public boolean updatePlasticFilm(long id); public boolean updatePlasticFilm(long id);
public List<PlasticFilmEntity> selectPlasticFilm(String date); public List<PlasticFilmEntity> selectPlasticFilm(String date,String name);
public Map<String,Object> selectCardBodyReport(String beginDate, String endDate, String typeCode, String name, String cardBodyType,long start,long end); public Map<String,Object> selectCardBodyReport(String beginDate, String endDate, String typeCode, String name, String cardBodyType,long start,long end);
......
...@@ -71,8 +71,17 @@ public class MaterialManagementServiceImpl implements MaterialManagementService ...@@ -71,8 +71,17 @@ public class MaterialManagementServiceImpl implements MaterialManagementService
} }
@Override @Override
public List<CardBodyEntity> selectCardBody(String date) { public List<CardBodyEntity> selectCardBody(String date,String name) {
return materialManagementMapper.selectCardBodyByState(date); List<Map<String, Object>> maps = materialManagementMapper.selectRoleByUserName(name);
//判断查询人是否是耗材管理人员
//如果是耗材管理人员 查询全部记录
//不是 查询本人记录
if (maps.size()>0&&"90".equals(maps.get(0).get("ROLE_ID")+"")){
return materialManagementMapper.selectCardBodyByState(date);
}else {
return materialManagementMapper.selectCardBodyByStateAndName(date,name);
}
} }
@Override @Override
...@@ -81,8 +90,17 @@ public class MaterialManagementServiceImpl implements MaterialManagementService ...@@ -81,8 +90,17 @@ public class MaterialManagementServiceImpl implements MaterialManagementService
} }
@Override @Override
public List<PlasticFilmEntity> selectPlasticFilm(String date) { public List<PlasticFilmEntity> selectPlasticFilm(String date,String name) {
return materialManagementMapper.selectPlasticFilmByState(date); List<Map<String, Object>> maps = materialManagementMapper.selectRoleByUserName(name);
//判断查询人是否是耗材管理人员
//如果是耗材管理人员 查询全部记录
//不是 查询本人记录
if (maps.size()>0&&"90".equals(maps.get(0).get("ROLE_ID")+"")){
return materialManagementMapper.selectPlasticFilmByState(date);
}else {
return materialManagementMapper.selectPlasticFilmByStateAndName(date,name);
}
} }
@Override @Override
......
...@@ -162,7 +162,6 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -162,7 +162,6 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
id:searchInput id:searchInput
} }
}).then(function successCallback(response) { }).then(function successCallback(response) {
console.log(response.data,"------------------------")
success(response.data) success(response.data)
}) })
}, },
...@@ -1238,12 +1237,13 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -1238,12 +1237,13 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data) success(response.data)
}) })
}, },
selectMaterialManagement:function(date,success) { selectMaterialManagement:function(date,name,success) {
$http({ $http({
method: 'GET', method: 'GET',
url: "../MaterialManagementApi/selectCardBody" + urlTimeStamp(), url: "../MaterialManagementApi/selectCardBody" + urlTimeStamp(),
params:{ params:{
date:date date:date,
name:name
} }
}).then(function successCallback(response) { }).then(function successCallback(response) {
success(response.data) success(response.data)
...@@ -1260,12 +1260,13 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -1260,12 +1260,13 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data) success(response.data)
}) })
}, },
selectFilmManagement:function(date,success) { selectFilmManagement:function(date,name,success) {
$http({ $http({
method: 'GET', method: 'GET',
url: "../MaterialManagementApi/selectPlasticFilm" + urlTimeStamp(), url: "../MaterialManagementApi/selectPlasticFilm" + urlTimeStamp(),
params:{ params:{
date:date date:date,
name:name
} }
}).then(function successCallback(response) { }).then(function successCallback(response) {
success(response.data) success(response.data)
......
...@@ -50,7 +50,8 @@ angular.module('AvatarCheck.filmManagement', ['ngRoute', 'AvatarCheck.http']) ...@@ -50,7 +50,8 @@ angular.module('AvatarCheck.filmManagement', ['ngRoute', 'AvatarCheck.http'])
if(date==''){ if(date==''){
date = $scope.choseDate; date = $scope.choseDate;
} }
HttpService.selectFilmManagement(date,function (data) { var name = $rootScope.loginData.name;
HttpService.selectFilmManagement(date,name,function (data) {
$scope.filmManagement = data; $scope.filmManagement = data;
console.log($scope.filmManagement,"$scope.filmManagement") console.log($scope.filmManagement,"$scope.filmManagement")
}) })
......
...@@ -54,8 +54,8 @@ angular.module('AvatarCheck.materialManagement', ['ngRoute', 'AvatarCheck.http'] ...@@ -54,8 +54,8 @@ angular.module('AvatarCheck.materialManagement', ['ngRoute', 'AvatarCheck.http']
if(date==''){ if(date==''){
date = $scope.choseDate; date = $scope.choseDate;
} }
console.log(date) var name = $rootScope.loginData.name;
HttpService.selectMaterialManagement(date,function (data) { HttpService.selectMaterialManagement(date,name,function (data) {
$scope.materialManagement = data; $scope.materialManagement = data;
console.log($scope.materialManagement,"$scope.materialManagement") console.log($scope.materialManagement,"$scope.materialManagement")
}) })
......
...@@ -153,6 +153,8 @@ ...@@ -153,6 +153,8 @@
</div> </div>
</div> </div>
<!---没查到数据--> <!---没查到数据-->
<div >{{searchResult.length}} searchResult.length</div>
<div >{{searchResult.size()}} searchResult.size()</div>
<div class="box-info" <div class="box-info"
ng-if="(searchResult.workOrderDate.length==0&&searchResult.ACCdata.length==0&&searchResult.PRODData.length==0) ||searchResult==null"> ng-if="(searchResult.workOrderDate.length==0&&searchResult.ACCdata.length==0&&searchResult.PRODData.length==0) ||searchResult==null">
<div> <div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment