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 {
// }
// return map.toString();
// }
/**
* 添加角色
* @param jsonStr
* @param resp
* @return
*/
@RequestMapping("roleAdd")
public Map<String, String> roleAdd(@RequestBody String jsonStr, HttpServletResponse resp) {
resp.setCharacterEncoding("UTF-8");
......
......@@ -187,7 +187,7 @@ public class UserApi {
*
* @return
*/
@RequestMapping(value = "/addQuickCyclesheetInfo", method = RequestMethod.GET)
@RequestMapping(value = "/addQuickTask", method = RequestMethod.GET)
@RequiresPermissions("userInfo.add")//权限管理;
@ResponseBody
public String addQuickCyclesheetInfo(@RequestParam("id") String id, HttpServletResponse resp) {
......@@ -246,7 +246,7 @@ public class UserApi {
* @return
*/
@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\"}]";
JSONArray jsonArray = JSONArray.fromObject(map);
List<FailedCardEntity> failedinfoEntityList = new ArrayList<>();
......@@ -267,15 +267,17 @@ public class UserApi {
* @return
*/
@RequestMapping("updateFailedinfo")
@RequiresPermissions("userInfo.add")//权限管理;
public String updateFailedinfo(@RequestParam("id") String id, HttpServletResponse resp) {
String map = "[{\"failedinfoid\":\"201810302\",\"failed_Reason\":1,\"groupno\":\"411081\",\"cyclesheetid\":\"20181016001\"}]";
JSONArray jsonArray = JSONArray.fromObject(map);
// @RequiresPermissions("userInfo.add")//权限管理;
public String updateFailedinfo(@RequestParam("failedCardId") String id,@RequestParam("state") String state, HttpServletResponse resp) {
FailedCardEntity failedCardEntity = new FailedCardEntity();
failedCardEntity.setFailedCardId(Long.valueOf(id));
failedCardEntity.setState(Long.valueOf(state));
List<FailedCardEntity> failedinfoEntityList = new ArrayList<>();
for (Object object : jsonArray) {
FailedCardEntity o = (FailedCardEntity) JSONObject.toBean((JSONObject) object, FailedCardEntity.class);
failedinfoEntityList.add(o);
}
// for (Object object : jsonArray) {
//// FailedCardEntity o = (FailedCardEntity) JSONObject.toBean((JSONObject) object, FailedCardEntity.class);
// failedinfoEntityList.add(o);
// }
failedinfoEntityList.add(failedCardEntity);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = failedCardService.updateFailedinfo(failedinfoEntityList);
......@@ -570,7 +572,7 @@ public class UserApi {
*
* @return
*/
@RequestMapping("reviseStorageCount")
@RequestMapping("updateStorageCount")
// @RequiresPermissions("userInfo.add")//权限管理;
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);
......
......@@ -55,7 +55,7 @@ public class YingxinApi {
*
*
*/
@RequestMapping("getCbCountInfo")
@RequestMapping("getCardBodyCount")
public String getCbCountInfo(@RequestParam("startTime")String startTime ,@RequestParam("endTime")String endTime,HttpServletResponse resp) {
List<Map<String, Object>> list=cardBodyService.getCbCount(startTime, endTime);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
......
......@@ -454,6 +454,21 @@ app.service('MessageService', function (ngDialog) {
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){
$http({
method: 'GET',
......
......@@ -90,6 +90,8 @@ app.controller('addRemainCardCtrl', ['$scope', '$rootScope', '$http', '$state',
console.log($rootScope.arr)
$(".confirmBtn").attr("disabled", true);
if(count==$scope.dataInfo.length){
console.log($rootScope.arr,"---$rootScope.arr---")
HttpService.addRemainCard($rootScope.arr,function(data){
$scope.isShowSuccess = 1;
$scope.AddSuccess = data.respData.string;
......
......@@ -109,8 +109,8 @@ app.controller('failedCardCtrl', ['$scope', '$rootScope', '$http', '$state', '$f
]
$scope.finishClick = function (taskId, userState) {
HttpService.updateProductionTask(taskId, userState, function (data) {
$scope.finishClick = function (failedCardId,userState) {
HttpService.updateFailedCard(failedCardId, userState, function (data) {
//点击确认成功后 再次废证列表
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