소스 검색

云南代储点bug修改

lvzhikai 5 년 전
부모
커밋
eb0762df2c

+ 7 - 5
src/main/java/com/chinaitop/depot/agent/bgz/controller/BusinessAgentBgmxzController.java

@@ -12,6 +12,8 @@ import java.util.Map;
12
 import javax.annotation.Resource;
12
 import javax.annotation.Resource;
13
 
13
 
14
 import com.alibaba.fastjson.JSON;
14
 import com.alibaba.fastjson.JSON;
15
+import com.alibaba.fastjson.JSONArray;
16
+import com.alibaba.fastjson.JSONObject;
15
 import com.chinaitop.utils.HTTPUtils;
17
 import com.chinaitop.utils.HTTPUtils;
16
 import org.springframework.http.MediaType;
18
 import org.springframework.http.MediaType;
17
 import org.springframework.web.bind.annotation.RequestMapping;
19
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -30,8 +32,6 @@ import io.swagger.annotations.Api;
30
 import io.swagger.annotations.ApiImplicitParam;
32
 import io.swagger.annotations.ApiImplicitParam;
31
 import io.swagger.annotations.ApiImplicitParams;
33
 import io.swagger.annotations.ApiImplicitParams;
32
 import io.swagger.annotations.ApiOperation;
34
 import io.swagger.annotations.ApiOperation;
33
-import net.sf.json.JSONArray;
34
-import net.sf.json.JSONObject;
35
 
35
 
36
 @RestController
36
 @RestController
37
 @RequestMapping(value = "/agent_bgmxz")
37
 @RequestMapping(value = "/agent_bgmxz")
@@ -214,7 +214,7 @@ public class BusinessAgentBgmxzController {
214
 		@ApiImplicitParam(name="orgId", value="当前单位ID", paramType="query"),
214
 		@ApiImplicitParam(name="orgId", value="当前单位ID", paramType="query"),
215
 		@ApiImplicitParam(name="stateType", value="路径状态", paramType="query")
215
 		@ApiImplicitParam(name="stateType", value="路径状态", paramType="query")
216
 	})
216
 	})
217
-	public String selectAgentHouseWareList(Integer orgId,String stateType) throws Exception {
217
+	public Map<String, Object> selectAgentHouseWareList(Integer orgId,String stateType) throws Exception {
218
 
218
 
219
 		Map<String, Object> paramMap = new HashMap<String, Object>();
219
 		Map<String, Object> paramMap = new HashMap<String, Object>();
220
 
220
 
@@ -232,8 +232,10 @@ public class BusinessAgentBgmxzController {
232
 		Map<String, Object> dataMap = new HashMap<String, Object>();
232
 		Map<String, Object> dataMap = new HashMap<String, Object>();
233
 		dataMap.put("datas",str);
233
 		dataMap.put("datas",str);
234
 		String strResult = HTTPUtils.doPost(url,dataMap);
234
 		String strResult = HTTPUtils.doPost(url,dataMap);
235
+		JSONArray json = JSONArray.parseArray(strResult);
236
+		paramMap.put("strResult",json);
235
 
237
 
236
-		return strResult;
238
+		return paramMap;
237
 	}
239
 	}
238
 	
240
 	
239
 	@RequestMapping(value="/addCrkFcbgzData", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
241
 	@RequestMapping(value="/addCrkFcbgzData", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
@@ -248,7 +250,7 @@ public class BusinessAgentBgmxzController {
248
 		Map<String, Object> map = new HashMap<String, Object>();
250
 		Map<String, Object> map = new HashMap<String, Object>();
249
 
251
 
250
 		try {
252
 		try {
251
-			JSONArray json = JSONArray.fromObject(fcbgzData);
253
+			JSONArray json = JSONArray.parseArray(fcbgzData);
252
 			if (json.size() > 0) {
254
 			if (json.size() > 0) {
253
 				BusinessAgentBgmxz bgmxz = null;
255
 				BusinessAgentBgmxz bgmxz = null;
254
 				for (int i = 0; i < json.size(); i++) {
256
 				for (int i = 0; i < json.size(); i++) {

+ 8 - 6
src/main/java/com/chinaitop/depot/agent/crk/controller/AgentHcController.java

@@ -11,6 +11,8 @@ import javax.annotation.Resource;
11
 import javax.servlet.http.HttpServletRequest;
11
 import javax.servlet.http.HttpServletRequest;
12
 
12
 
13
 import com.alibaba.fastjson.JSON;
13
 import com.alibaba.fastjson.JSON;
14
+import com.alibaba.fastjson.JSONArray;
15
+import com.alibaba.fastjson.JSONObject;
14
 import com.chinaitop.utils.HTTPUtils;
16
 import com.chinaitop.utils.HTTPUtils;
15
 import org.springframework.http.MediaType;
17
 import org.springframework.http.MediaType;
16
 import org.springframework.web.bind.annotation.RequestMapping;
18
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -33,8 +35,6 @@ import io.swagger.annotations.Api;
33
 import io.swagger.annotations.ApiImplicitParam;
35
 import io.swagger.annotations.ApiImplicitParam;
34
 import io.swagger.annotations.ApiImplicitParams;
36
 import io.swagger.annotations.ApiImplicitParams;
35
 import io.swagger.annotations.ApiOperation;
37
 import io.swagger.annotations.ApiOperation;
36
-import net.sf.json.JSONArray;
37
-import net.sf.json.JSONObject;
38
 
38
 
39
 @RestController
39
 @RestController
40
 @RequestMapping(value = "/agentHc")
40
 @RequestMapping(value = "/agentHc")
@@ -225,7 +225,7 @@ public class AgentHcController {
225
 	@ApiImplicitParams({
225
 	@ApiImplicitParams({
226
 		@ApiImplicitParam(name="orgId", value="当前单位ID", paramType="query")
226
 		@ApiImplicitParam(name="orgId", value="当前单位ID", paramType="query")
227
 	})
227
 	})
228
-	public String selectAgentHouseWareList(Integer orgId) throws Exception {
228
+	public Map<String, Object> selectAgentHouseWareList(Integer orgId) throws Exception {
229
 
229
 
230
 		Map<String, Object> paramMap = new HashMap<String, Object>();
230
 		Map<String, Object> paramMap = new HashMap<String, Object>();
231
 
231
 
@@ -237,8 +237,10 @@ public class AgentHcController {
237
         Map<String, Object> dataMap = new HashMap<String, Object>();
237
         Map<String, Object> dataMap = new HashMap<String, Object>();
238
         dataMap.put("datas",str);
238
         dataMap.put("datas",str);
239
         String strResult = HTTPUtils.doPost(url,dataMap);
239
         String strResult = HTTPUtils.doPost(url,dataMap);
240
+        JSONArray json = JSONArray.parseArray(strResult);
241
+        paramMap.put("strResult",json);
240
 
242
 
241
-		return strResult;
243
+		return paramMap;
242
 	}
244
 	}
243
     
245
     
244
     @RequestMapping(value="/editHcCrkRecordData", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
246
     @RequestMapping(value="/editHcCrkRecordData", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
@@ -253,7 +255,7 @@ public class AgentHcController {
253
 		Map<String, Object> map = new HashMap<String, Object>();
255
 		Map<String, Object> map = new HashMap<String, Object>();
254
 
256
 
255
 		try {
257
 		try {
256
-			JSONArray json = JSONArray.fromObject(hcCrkRecordData);
258
+			JSONArray json = JSONArray.parseArray(hcCrkRecordData);
257
 			if (json.size() > 0) {
259
 			if (json.size() > 0) {
258
 				BusinessAgentHc agentHc = null;
260
 				BusinessAgentHc agentHc = null;
259
 				for (int i = 0; i < json.size(); i++) {
261
 				for (int i = 0; i < json.size(); i++) {
@@ -279,7 +281,7 @@ public class AgentHcController {
279
 					agentHc.setGrainNumber(job.get("count")+"");
281
 					agentHc.setGrainNumber(job.get("count")+"");
280
 					agentHc.setStorehouseId(houseId);
282
 					agentHc.setStorehouseId(houseId);
281
 					agentHc.setWarehouseId(wareId);
283
 					agentHc.setWarehouseId(wareId);
282
-					Date crk_time = ParameterUtil.string2date(job.get("rq")+"");
284
+					Date crk_time = ParameterUtil.string2datetime(job.get("rq")+"");
283
 					agentHc.setCrkTime(crk_time);
285
 					agentHc.setCrkTime(crk_time);
284
 					agentHc.setCreateTime(new Date());
286
 					agentHc.setCreateTime(new Date());
285
 					agentHc.setSjly(1);
287
 					agentHc.setSjly(1);

+ 8 - 7
src/main/java/com/chinaitop/depot/agent/crk/controller/AgentQcController.java

@@ -11,6 +11,8 @@ import javax.annotation.Resource;
11
 import javax.servlet.http.HttpServletRequest;
11
 import javax.servlet.http.HttpServletRequest;
12
 
12
 
13
 import com.alibaba.fastjson.JSON;
13
 import com.alibaba.fastjson.JSON;
14
+import com.alibaba.fastjson.JSONArray;
15
+import com.alibaba.fastjson.JSONObject;
14
 import com.chinaitop.utils.HTTPUtils;
16
 import com.chinaitop.utils.HTTPUtils;
15
 import org.springframework.http.MediaType;
17
 import org.springframework.http.MediaType;
16
 import org.springframework.web.bind.annotation.RequestMapping;
18
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -33,8 +35,6 @@ import io.swagger.annotations.Api;
33
 import io.swagger.annotations.ApiImplicitParam;
35
 import io.swagger.annotations.ApiImplicitParam;
34
 import io.swagger.annotations.ApiImplicitParams;
36
 import io.swagger.annotations.ApiImplicitParams;
35
 import io.swagger.annotations.ApiOperation;
37
 import io.swagger.annotations.ApiOperation;
36
-import net.sf.json.JSONArray;
37
-import net.sf.json.JSONObject;
38
 
38
 
39
 @RestController
39
 @RestController
40
 @RequestMapping(value = "/agentQc")
40
 @RequestMapping(value = "/agentQc")
@@ -225,7 +225,7 @@ public class AgentQcController {
225
 	@ApiImplicitParams({
225
 	@ApiImplicitParams({
226
 		@ApiImplicitParam(name="orgId", value="当前单位ID", paramType="query")
226
 		@ApiImplicitParam(name="orgId", value="当前单位ID", paramType="query")
227
 	})
227
 	})
228
-	public String selectAgentHouseWareList(Integer orgId) throws Exception {
228
+	public Map<String, Object> selectAgentHouseWareList(Integer orgId) throws Exception {
229
 
229
 
230
 		Map<String, Object> paramMap = new HashMap<String, Object>();
230
 		Map<String, Object> paramMap = new HashMap<String, Object>();
231
 
231
 
@@ -237,8 +237,10 @@ public class AgentQcController {
237
         Map<String, Object> dataMap = new HashMap<String, Object>();
237
         Map<String, Object> dataMap = new HashMap<String, Object>();
238
         dataMap.put("datas",str);
238
         dataMap.put("datas",str);
239
         String strResult = HTTPUtils.doPost(url,dataMap);
239
         String strResult = HTTPUtils.doPost(url,dataMap);
240
+        JSONArray json = JSONArray.parseArray(strResult);
241
+        paramMap.put("strResult",json);
240
 
242
 
241
-		return strResult;
243
+		return paramMap;
242
 	}
244
 	}
243
 
245
 
244
     @RequestMapping(value="/editQcCrkRecordData", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
246
     @RequestMapping(value="/editQcCrkRecordData", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
@@ -251,9 +253,8 @@ public class AgentQcController {
251
 	public Map<String, Object> editQcCrkRecordData(String qcCrkRecordData, Integer orgId, String realName) {
253
 	public Map<String, Object> editQcCrkRecordData(String qcCrkRecordData, Integer orgId, String realName) {
252
 
254
 
253
 		Map<String, Object> map = new HashMap<String, Object>();
255
 		Map<String, Object> map = new HashMap<String, Object>();
254
-
255
 		try {
256
 		try {
256
-			JSONArray json = JSONArray.fromObject(qcCrkRecordData);
257
+			JSONArray json = JSONArray.parseArray(qcCrkRecordData);
257
 			if (json.size() > 0) {
258
 			if (json.size() > 0) {
258
 				BusinessAgentQc agentQc = null;
259
 				BusinessAgentQc agentQc = null;
259
 				for (int i = 0; i < json.size(); i++) {
260
 				for (int i = 0; i < json.size(); i++) {
@@ -284,7 +285,7 @@ public class AgentQcController {
284
 					agentQc.setGrainNumber(job.get("count")+"");
285
 					agentQc.setGrainNumber(job.get("count")+"");
285
 					agentQc.setStorehouseId(houseId);
286
 					agentQc.setStorehouseId(houseId);
286
 					agentQc.setWarehouseId(wareId);
287
 					agentQc.setWarehouseId(wareId);
287
-					Date crk_time = ParameterUtil.string2date(job.get("rq")+"");
288
+					Date crk_time = ParameterUtil.string2datetime(job.get("rq")+"");
288
 					agentQc.setCrkTime(crk_time);
289
 					agentQc.setCrkTime(crk_time);
289
 					agentQc.setCreateTime(new Date());
290
 					agentQc.setCreateTime(new Date());
290
 					agentQc.setSjly(1);
291
 					agentQc.setSjly(1);

+ 1 - 1
src/main/java/com/chinaitop/depot/agent/crk/mapper/BusinessAgentQcMapper.xml

@@ -466,7 +466,7 @@
466
     	c.qccrk_tbsj modifydate
466
     	c.qccrk_tbsj modifydate
467
     FROM business_agent_depot a
467
     FROM business_agent_depot a
468
 	LEFT JOIN business_agent_storehouse b ON b.agent_depot_id=a.id
468
 	LEFT JOIN business_agent_storehouse b ON b.agent_depot_id=a.id
469
-	LEFT JOIN business_agent_warehouse c ON c.agent_storehouse_id=b.id 
469
+	LEFT JOIN business_agent_warehouse c ON c.agent_storehouse_id=b.id AND c.del_flag=1
470
 	WHERE a.depot_id != 0 AND b.storehouse_id IS NOT NULL AND c.warehouse_id IS NOT NULL 
470
 	WHERE a.depot_id != 0 AND b.storehouse_id IS NOT NULL AND c.warehouse_id IS NOT NULL 
471
 	<if test="orgId != null">
471
 	<if test="orgId != null">
472
 	and c.org_id=#{orgId,jdbcType=INTEGER}
472
 	and c.org_id=#{orgId,jdbcType=INTEGER}

+ 4 - 3
src/main/java/com/chinaitop/depot/agent/number/controller/AgentNumberController.java

@@ -9,6 +9,9 @@ import java.util.Map;
9
 import javax.annotation.Resource;
9
 import javax.annotation.Resource;
10
 import javax.servlet.http.HttpServletRequest;
10
 import javax.servlet.http.HttpServletRequest;
11
 
11
 
12
+import com.alibaba.fastjson.JSON;
13
+import com.alibaba.fastjson.JSONArray;
14
+import com.alibaba.fastjson.JSONObject;
12
 import org.springframework.http.MediaType;
15
 import org.springframework.http.MediaType;
13
 import org.springframework.web.bind.annotation.RequestMapping;
16
 import org.springframework.web.bind.annotation.RequestMapping;
14
 import org.springframework.web.bind.annotation.RequestMethod;
17
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -32,8 +35,6 @@ import io.swagger.annotations.Api;
32
 import io.swagger.annotations.ApiImplicitParam;
35
 import io.swagger.annotations.ApiImplicitParam;
33
 import io.swagger.annotations.ApiImplicitParams;
36
 import io.swagger.annotations.ApiImplicitParams;
34
 import io.swagger.annotations.ApiOperation;
37
 import io.swagger.annotations.ApiOperation;
35
-import net.sf.json.JSONArray;
36
-import net.sf.json.JSONObject;
37
 
38
 
38
 @RestController
39
 @RestController
39
 @RequestMapping(value = "/agentNumber")
40
 @RequestMapping(value = "/agentNumber")
@@ -222,7 +223,7 @@ public class AgentNumberController {
222
 		Map<String, Object> map = new HashMap<String, Object>();
223
 		Map<String, Object> map = new HashMap<String, Object>();
223
 
224
 
224
 		try {
225
 		try {
225
-			JSONArray json = JSONArray.fromObject(kcswData);
226
+			JSONArray json = JSONArray.parseArray(kcswData);
226
 			if (json.size() > 0) {
227
 			if (json.size() > 0) {
227
 				BusinessAgentNumber agentNumber = null;
228
 				BusinessAgentNumber agentNumber = null;
228
 				for (int i = 0; i < json.size(); i++) {
229
 				for (int i = 0; i < json.size(); i++) {