|
|
package com.tianbo.analysis.controller;
|
|
|
|
|
|
import com.tianbo.analysis.model.ORIGINMANIFESTMASTER;
|
|
|
import com.tianbo.analysis.model.Originmanifestsecondary;
|
|
|
import com.tianbo.analysis.model.ResultJson;
|
|
|
import com.tianbo.analysis.service.NmmsImportService;
|
|
|
import com.tianbo.analysis.service.OriginService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
import static sun.plugin2.os.windows.OSVERSIONINFOA.size;
|
|
|
|
|
|
/**
|
|
|
* @author shenhl
|
|
|
* <p>
|
...
|
...
|
@@ -23,16 +29,18 @@ public class NmmsImportController { |
|
|
NmmsImportService nmmsImportService;
|
|
|
|
|
|
/**
|
|
|
* awbhIds[] 分单id
|
|
|
* 批量删除
|
|
|
* @param awbhIds
|
|
|
* @param originmanifestsecondary
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/imp_removes")
|
|
|
@ResponseBody
|
|
|
public ResultJson antivirus_log_remove(String[] awbhIds){
|
|
|
public ResultJson antivirus_log_remove(@RequestBody Originmanifestsecondary originmanifestsecondary){
|
|
|
int r = 0;
|
|
|
for (int i=0; i< awbhIds.length; i++){
|
|
|
r += originService.deleteAwbh(awbhIds[i]);
|
|
|
List<String> awbhIds = originmanifestsecondary.getAwbhIds();
|
|
|
for (int i=0; i< awbhIds.size(); i++){
|
|
|
r += originService.deleteAwbh(awbhIds.get(i));
|
|
|
}
|
|
|
|
|
|
return r > 0 ? new ResultJson("200", "批量删除成功")
|
...
|
...
|
@@ -40,19 +48,17 @@ public class NmmsImportController { |
|
|
}
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
* @param awbhIds
|
|
|
* @param flightNo
|
|
|
* @param flightDate
|
|
|
* awbhIds[] 分单id
|
|
|
* flightDate 航班日期
|
|
|
* flightno 航班号
|
|
|
* @param originmanifestmaster
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/mountAwbh")
|
|
|
@ResponseBody
|
|
|
public ResultJson antivirus_log_remove(@RequestParam(value ="awbhIds")String[] awbhIds,
|
|
|
@RequestParam(value ="flightNo") String flightNo,
|
|
|
@RequestParam(value ="flightDate") String flightDate){
|
|
|
public ResultJson antivirus_log_remove(@RequestBody ORIGINMANIFESTMASTER originmanifestmaster){
|
|
|
|
|
|
return nmmsImportService.mountAwbh(awbhIds,flightNo,flightDate) > 0 ? new ResultJson("200", "分单挂载成功")
|
|
|
return nmmsImportService.mountAwbh(originmanifestmaster) > 0 ? new ResultJson("200", "分单挂载成功")
|
|
|
: new ResultJson("201", "分单挂载失败");
|
|
|
}
|
|
|
} |
...
|
...
|
|