NmmsImportController.java
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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;
/**
* @author shenhl
* <p>
* 2022/2/14/11:22
*/
@RestController
@RequestMapping("/nmms/imp")
public class NmmsImportController {
@Autowired
OriginService originService;
@Autowired
NmmsImportService nmmsImportService;
/**
* awbhIds[] 分单id
* 批量删除
* @param originmanifestsecondary
* @return
*/
@RequestMapping(value = "/imp_removes")
@ResponseBody
public ResultJson antivirus_log_remove(@RequestBody Originmanifestsecondary originmanifestsecondary){
int r = 0;
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", "批量删除成功")
: new ResultJson("201", "批量删除失败");
}
/**
* awbhIds[] 分单id
* flightDate 航班日期
* flightno 航班号
* @param originmanifestmaster
* @return
*/
@RequestMapping(value = "/mountAwbh")
@ResponseBody
public ResultJson antivirus_log_remove(@RequestBody ORIGINMANIFESTMASTER originmanifestmaster){
return nmmsImportService.mountAwbh(originmanifestmaster) > 0 ? new ResultJson("200", "分单挂载成功")
: new ResultJson("201", "分单挂载失败");
}
}