|
|
@@ -3,6 +3,7 @@ package com.chinaitop.depot.storage.controller;
|
|
3
|
3
|
|
|
4
|
4
|
import com.chinaitop.depot.storage.model.*;
|
|
5
|
5
|
import com.chinaitop.depot.storage.model.StorageQualitycheckExample.Criteria;
|
|
|
6
|
+import com.chinaitop.depot.storage.service.StorageFoodbasicInfoService;
|
|
6
|
7
|
import com.chinaitop.depot.storage.service.StorageQualitycheckInspectionService;
|
|
7
|
8
|
import com.chinaitop.depot.storage.service.StorageQualitycheckService;
|
|
8
|
9
|
import com.chinaitop.depot.storage.service.StorageQualitycheckSonService;
|
|
|
@@ -47,6 +48,9 @@ public class StorageQualitycheckController {
|
|
47
|
48
|
@Resource
|
|
48
|
49
|
private StorageQualitycheckInspectionService qualitycheckInspectionService;
|
|
49
|
50
|
|
|
|
51
|
+ @Resource
|
|
|
52
|
+ private StorageFoodbasicInfoService foodbasicInfoService;
|
|
|
53
|
+
|
|
50
|
54
|
// 获取ip地址
|
|
51
|
55
|
@Value("${crk-webservice}")
|
|
52
|
56
|
private String url;
|
|
|
@@ -818,6 +822,39 @@ public class StorageQualitycheckController {
|
|
818
|
822
|
}
|
|
819
|
823
|
return pageInfo;
|
|
820
|
824
|
}
|
|
|
825
|
+
|
|
|
826
|
+ /**
|
|
|
827
|
+ * 封仓后修改地址
|
|
|
828
|
+ * @param location
|
|
|
829
|
+ * @return
|
|
|
830
|
+ */
|
|
|
831
|
+ @RequestMapping(value="/updateOrigin", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
|
|
|
832
|
+ @ApiOperation(value="封仓后修改地址", notes = "根据库里现场情况,需加功能封仓后需要修改一次地址")
|
|
|
833
|
+ @ApiImplicitParams({
|
|
|
834
|
+ @ApiImplicitParam(name = "id", value = "检验表id", paramType = "query"),
|
|
|
835
|
+ @ApiImplicitParam(name = "foodbasicinfoId", value = "封仓表id", paramType = "query"),
|
|
|
836
|
+ @ApiImplicitParam(name = "location", value = "地址信息", paramType = "form")
|
|
|
837
|
+ })
|
|
|
838
|
+ public Map<String, Object> updateOrigin(Integer id,Integer foodbasicinfoId,Integer location) {
|
|
|
839
|
+ StorageQualitycheck storageQualitycheck = new StorageQualitycheck();
|
|
|
840
|
+ StorageFoodbasicinfo storageFoodbasicinfo = new StorageFoodbasicinfo();
|
|
|
841
|
+ Map<String, Object> modelMap = new HashMap<String, Object>();
|
|
|
842
|
+ try {
|
|
|
843
|
+ storageQualitycheck.setId(id);
|
|
|
844
|
+ storageQualitycheck.setLocation(location);
|
|
|
845
|
+ storageQualitycheckService.setQualitycheckType(storageQualitycheck);
|
|
|
846
|
+
|
|
|
847
|
+
|
|
|
848
|
+ storageFoodbasicinfo.setId(foodbasicinfoId);
|
|
|
849
|
+ storageFoodbasicinfo.setValidHouseCapacity("0000");
|
|
|
850
|
+ foodbasicInfoService.updateByPrimaryKey(storageFoodbasicinfo);
|
|
|
851
|
+ modelMap.put("status", "success");
|
|
|
852
|
+ } catch (Exception e) {
|
|
|
853
|
+ modelMap.put("status", "error");
|
|
|
854
|
+ e.printStackTrace();
|
|
|
855
|
+ }
|
|
|
856
|
+ return modelMap;
|
|
|
857
|
+ }
|
|
821
|
858
|
|
|
822
|
859
|
|
|
823
|
860
|
//质检信息主表同步
|