|
|
@@ -8,6 +8,7 @@ import com.chinaitop.depot.storage.service.StorageQualitycheckService;
|
|
8
|
8
|
import com.chinaitop.depot.storage.service.StorageQualitycheckSonService;
|
|
9
|
9
|
import com.chinaitop.depot.storage.utils.DataSynchronization;
|
|
10
|
10
|
import com.chinaitop.depot.storage.utils.ParameterUtil;
|
|
|
11
|
+import com.chinaitop.depot.storage.utils.createKC;
|
|
11
|
12
|
import com.fasterxml.jackson.core.type.TypeReference;
|
|
12
|
13
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
13
|
14
|
import com.github.pagehelper.PageHelper;
|
|
|
@@ -18,6 +19,7 @@ import io.swagger.annotations.ApiImplicitParams;
|
|
18
|
19
|
import io.swagger.annotations.ApiOperation;
|
|
19
|
20
|
import org.apache.commons.lang.ObjectUtils;
|
|
20
|
21
|
import org.apache.commons.lang3.StringUtils;
|
|
|
22
|
+import org.springframework.beans.factory.annotation.Value;
|
|
21
|
23
|
import org.springframework.http.MediaType;
|
|
22
|
24
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
23
|
25
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
@@ -26,10 +28,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
26
|
28
|
import javax.annotation.Resource;
|
|
27
|
29
|
import java.io.IOException;
|
|
28
|
30
|
import java.text.SimpleDateFormat;
|
|
29
|
|
-import java.util.ArrayList;
|
|
30
|
|
-import java.util.HashMap;
|
|
31
|
|
-import java.util.List;
|
|
32
|
|
-import java.util.Map;
|
|
|
31
|
+import java.util.*;
|
|
33
|
32
|
|
|
34
|
33
|
/**
|
|
35
|
34
|
* Created by product on 2017/10/11.
|
|
|
@@ -47,6 +46,10 @@ public class StorageQualitycheckController {
|
|
47
|
46
|
@Resource
|
|
48
|
47
|
private StorageQualitycheckInspectionService qualitycheckInspectionService;
|
|
49
|
48
|
|
|
|
49
|
+ // 获取ip地址
|
|
|
50
|
+ @Value("${crk-webservice}")
|
|
|
51
|
+ private String url;
|
|
|
52
|
+
|
|
50
|
53
|
/**
|
|
51
|
54
|
* 封仓管理中查询出未封仓的质量管理信息,已经封仓的不要展示
|
|
52
|
55
|
* 分页获取
|
|
|
@@ -660,6 +663,56 @@ public class StorageQualitycheckController {
|
|
660
|
663
|
return pageInfo;
|
|
661
|
664
|
}
|
|
662
|
665
|
|
|
|
666
|
+ /**
|
|
|
667
|
+ *
|
|
|
668
|
+ * @param houseId
|
|
|
669
|
+ * @param warehouseId
|
|
|
670
|
+ * @param orgId
|
|
|
671
|
+ * @param level
|
|
|
672
|
+ * @param crk_ip
|
|
|
673
|
+ * @return
|
|
|
674
|
+ */
|
|
|
675
|
+ @RequestMapping(value="/updateLevel", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
|
|
|
676
|
+ @ApiOperation(value="修改数据", notes = "修改数据")
|
|
|
677
|
+ @ApiImplicitParams({
|
|
|
678
|
+ @ApiImplicitParam(name = "houseId", value = "仓房油罐id", paramType = "query"),
|
|
|
679
|
+ @ApiImplicitParam(name = "warehouseId", value = "货位id", paramType = "query"),
|
|
|
680
|
+ @ApiImplicitParam(name = "orgId", value = "单位id", paramType = "query"),
|
|
|
681
|
+ @ApiImplicitParam(name = "level", value = "等级", paramType = "query"),
|
|
|
682
|
+ @ApiImplicitParam(name = "crk_ip", value = "出入库连接IP", paramType = "query")
|
|
|
683
|
+ })
|
|
|
684
|
+ public Map<String, Object> updateLevel(String houseId, String warehouseId, String orgId, String level, String crk_ip) {
|
|
|
685
|
+
|
|
|
686
|
+ Map<String, Object> modelMap = new HashMap<String, Object>();
|
|
|
687
|
+ String crk_adr = "";
|
|
|
688
|
+ try {
|
|
|
689
|
+ Object[] parameters = new Object[5];
|
|
|
690
|
+ parameters[0] = orgId + "";
|
|
|
691
|
+ parameters[1] = houseId + "";
|
|
|
692
|
+ parameters[2] = warehouseId + "";
|
|
|
693
|
+ parameters[3] = level + "";
|
|
|
694
|
+ parameters[4] = 2 + ""; //1:新增;2:修改;3:删除
|
|
|
695
|
+ crk_adr = crk_ip+url;
|
|
|
696
|
+
|
|
|
697
|
+ String str = createKC.createKC("ChangeGrainGrade", crk_adr, parameters);
|
|
|
698
|
+
|
|
|
699
|
+ /* *****end******/
|
|
|
700
|
+ if ("true".equals(str)) {
|
|
|
701
|
+ modelMap.put("status", "success");
|
|
|
702
|
+ } else {
|
|
|
703
|
+ modelMap.put("status", "error");
|
|
|
704
|
+ modelMap.put("msg", "等级修改失败");
|
|
|
705
|
+ return modelMap;
|
|
|
706
|
+ }
|
|
|
707
|
+
|
|
|
708
|
+ } catch (Exception e) {
|
|
|
709
|
+ e.printStackTrace();
|
|
|
710
|
+ modelMap.put("status", "error");
|
|
|
711
|
+ modelMap.put("msg", "等级修改失败");
|
|
|
712
|
+ }
|
|
|
713
|
+ return modelMap;
|
|
|
714
|
+ }
|
|
|
715
|
+
|
|
663
|
716
|
//质检信息主表同步
|
|
664
|
717
|
@RequestMapping("/qualityMainSynchronization")
|
|
665
|
718
|
public void qualityMainSynchronization() {
|