Commit 2fcee5b2 authored by Administrator's avatar Administrator

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

parents 8660a919 f493d4d1
...@@ -320,6 +320,13 @@ public class AdminApi { ...@@ -320,6 +320,13 @@ public class AdminApi {
// } // }
// return map.toString(); // return map.toString();
// } // }
/**
* 添加角色
* @param jsonStr
* @param resp
* @return
*/
@RequestMapping("roleAdd") @RequestMapping("roleAdd")
public Map<String, String> roleAdd(@RequestBody String jsonStr, HttpServletResponse resp) { public Map<String, String> roleAdd(@RequestBody String jsonStr, HttpServletResponse resp) {
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
......
...@@ -187,7 +187,7 @@ public class UserApi { ...@@ -187,7 +187,7 @@ public class UserApi {
* *
* @return * @return
*/ */
@RequestMapping(value = "/addQuickCyclesheetInfo", method = RequestMethod.GET) @RequestMapping(value = "/addQuickTask", method = RequestMethod.GET)
@RequiresPermissions("userInfo.add")//权限管理; @RequiresPermissions("userInfo.add")//权限管理;
@ResponseBody @ResponseBody
public String addQuickCyclesheetInfo(@RequestParam("id") String id, HttpServletResponse resp) { public String addQuickCyclesheetInfo(@RequestParam("id") String id, HttpServletResponse resp) {
...@@ -246,7 +246,7 @@ public class UserApi { ...@@ -246,7 +246,7 @@ public class UserApi {
* @return * @return
*/ */
@RequestMapping("addFailedinfo") @RequestMapping("addFailedinfo")
public String addFailedinfo(@RequestParam("id") String id, HttpServletResponse resp) { public String addFailedinfo(@RequestParam("idNo") String id, HttpServletResponse resp) {
String map = "[{\"failedinfoid\":\"20181016002\",\"failed_Reason\":1,\"groupno\":\"41108201\",\"cyclesheetid\":\"20181016001\"}]"; String map = "[{\"failedinfoid\":\"20181016002\",\"failed_Reason\":1,\"groupno\":\"41108201\",\"cyclesheetid\":\"20181016001\"}]";
JSONArray jsonArray = JSONArray.fromObject(map); JSONArray jsonArray = JSONArray.fromObject(map);
List<FailedCardEntity> failedinfoEntityList = new ArrayList<>(); List<FailedCardEntity> failedinfoEntityList = new ArrayList<>();
...@@ -267,15 +267,17 @@ public class UserApi { ...@@ -267,15 +267,17 @@ public class UserApi {
* @return * @return
*/ */
@RequestMapping("updateFailedinfo") @RequestMapping("updateFailedinfo")
@RequiresPermissions("userInfo.add")//权限管理; // @RequiresPermissions("userInfo.add")//权限管理;
public String updateFailedinfo(@RequestParam("id") String id, HttpServletResponse resp) { public String updateFailedinfo(@RequestParam("failedCardId") String id,@RequestParam("state") String state, HttpServletResponse resp) {
String map = "[{\"failedinfoid\":\"201810302\",\"failed_Reason\":1,\"groupno\":\"411081\",\"cyclesheetid\":\"20181016001\"}]"; FailedCardEntity failedCardEntity = new FailedCardEntity();
JSONArray jsonArray = JSONArray.fromObject(map); failedCardEntity.setFailedCardId(Long.valueOf(id));
failedCardEntity.setState(Long.valueOf(state));
List<FailedCardEntity> failedinfoEntityList = new ArrayList<>(); List<FailedCardEntity> failedinfoEntityList = new ArrayList<>();
for (Object object : jsonArray) { // for (Object object : jsonArray) {
FailedCardEntity o = (FailedCardEntity) JSONObject.toBean((JSONObject) object, FailedCardEntity.class); //// FailedCardEntity o = (FailedCardEntity) JSONObject.toBean((JSONObject) object, FailedCardEntity.class);
failedinfoEntityList.add(o); // failedinfoEntityList.add(o);
} // }
failedinfoEntityList.add(failedCardEntity);
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
int i = failedCardService.updateFailedinfo(failedinfoEntityList); int i = failedCardService.updateFailedinfo(failedinfoEntityList);
...@@ -570,7 +572,7 @@ public class UserApi { ...@@ -570,7 +572,7 @@ public class UserApi {
* *
* @return * @return
*/ */
@RequestMapping("reviseStorageCount") @RequestMapping("updateStorageCount")
// @RequiresPermissions("userInfo.add")//权限管理; // @RequiresPermissions("userInfo.add")//权限管理;
public String reviseStorageCount(@RequestParam("taskId") String taskId,@RequestParam("countyCode") String countyCode,@RequestParam("inStorageCount") String inStorageCount, @RequestParam("outStorageCount") String outStorageCount, HttpServletResponse resp) { public String reviseStorageCount(@RequestParam("taskId") String taskId,@RequestParam("countyCode") String countyCode,@RequestParam("inStorageCount") String inStorageCount, @RequestParam("outStorageCount") String outStorageCount, HttpServletResponse resp) {
int i=countyListService.reviseStorageCount(taskId,countyCode, inStorageCount, outStorageCount); int i=countyListService.reviseStorageCount(taskId,countyCode, inStorageCount, outStorageCount);
......
...@@ -55,7 +55,7 @@ public class YingxinApi { ...@@ -55,7 +55,7 @@ public class YingxinApi {
* *
* *
*/ */
@RequestMapping("getCbCountInfo") @RequestMapping("getCardBodyCount")
public String getCbCountInfo(@RequestParam("startTime")String startTime ,@RequestParam("endTime")String endTime,HttpServletResponse resp) { public String getCbCountInfo(@RequestParam("startTime")String startTime ,@RequestParam("endTime")String endTime,HttpServletResponse resp) {
List<Map<String, Object>> list=cardBodyService.getCbCount(startTime, endTime); List<Map<String, Object>> list=cardBodyService.getCbCount(startTime, endTime);
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
......
...@@ -454,6 +454,21 @@ app.service('MessageService', function (ngDialog) { ...@@ -454,6 +454,21 @@ app.service('MessageService', function (ngDialog) {
MessageService.httpRequestFailed(JSON.stringify(errA)) MessageService.httpRequestFailed(JSON.stringify(errA))
}) })
}, },
updateFailedCard:function(failedCardId,state,success){
$http({
method: 'GET',
url: "../user/updateFailedinfo" + urlTimeStamp(),
params:{
failedCardId:failedCardId,
state:state
}
}).then(function successCallback(response) {
success(response.data)
},function(err){
var errA = {Error:true, ReturnCode:err.status, ReturnMsg:"API访问返回错误"}
MessageService.httpRequestFailed(JSON.stringify(errA))
})
},
findFailedinfo:function(state,workShop,success){ findFailedinfo:function(state,workShop,success){
$http({ $http({
method: 'GET', method: 'GET',
......
...@@ -90,6 +90,8 @@ app.controller('addRemainCardCtrl', ['$scope', '$rootScope', '$http', '$state', ...@@ -90,6 +90,8 @@ app.controller('addRemainCardCtrl', ['$scope', '$rootScope', '$http', '$state',
console.log($rootScope.arr) console.log($rootScope.arr)
$(".confirmBtn").attr("disabled", true); $(".confirmBtn").attr("disabled", true);
if(count==$scope.dataInfo.length){ if(count==$scope.dataInfo.length){
console.log($rootScope.arr,"---$rootScope.arr---")
HttpService.addRemainCard($rootScope.arr,function(data){ HttpService.addRemainCard($rootScope.arr,function(data){
$scope.isShowSuccess = 1; $scope.isShowSuccess = 1;
$scope.AddSuccess = data.respData.string; $scope.AddSuccess = data.respData.string;
......
...@@ -109,8 +109,8 @@ app.controller('failedCardCtrl', ['$scope', '$rootScope', '$http', '$state', '$f ...@@ -109,8 +109,8 @@ app.controller('failedCardCtrl', ['$scope', '$rootScope', '$http', '$state', '$f
] ]
$scope.finishClick = function (taskId, userState) { $scope.finishClick = function (failedCardId,userState) {
HttpService.updateProductionTask(taskId, userState, function (data) { HttpService.updateFailedCard(failedCardId, userState, function (data) {
//点击确认成功后 再次废证列表 //点击确认成功后 再次废证列表
getFailedCardListData($rootScope.loginData.state, $rootScope.loginData.workshop); getFailedCardListData($rootScope.loginData.state, $rootScope.loginData.workshop);
}) })
......
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