Bladeren bron

云南代储点bug修改

lvzhikai 5 jaren geleden
bovenliggende
commit
eb0762df2c

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

@@ -12,6 +12,8 @@ import java.util.Map;
12 12
 import javax.annotation.Resource;
13 13
 
14 14
 import com.alibaba.fastjson.JSON;
15
+import com.alibaba.fastjson.JSONArray;
16
+import com.alibaba.fastjson.JSONObject;
15 17
 import com.chinaitop.utils.HTTPUtils;
16 18
 import org.springframework.http.MediaType;
17 19
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -30,8 +32,6 @@ import io.swagger.annotations.Api;
30 32
 import io.swagger.annotations.ApiImplicitParam;
31 33
 import io.swagger.annotations.ApiImplicitParams;
32 34
 import io.swagger.annotations.ApiOperation;
33
-import net.sf.json.JSONArray;
34
-import net.sf.json.JSONObject;
35 35
 
36 36
 @RestController
37 37
 @RequestMapping(value = "/agent_bgmxz")
@@ -214,7 +214,7 @@ public class BusinessAgentBgmxzController {
214 214
 		@ApiImplicitParam(name="orgId", value="当前单位ID", paramType="query"),
215 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 219
 		Map<String, Object> paramMap = new HashMap<String, Object>();
220 220
 
@@ -232,8 +232,10 @@ public class BusinessAgentBgmxzController {
232 232
 		Map<String, Object> dataMap = new HashMap<String, Object>();
233 233
 		dataMap.put("datas",str);
234 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 241
 	@RequestMapping(value="/addCrkFcbgzData", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
@@ -248,7 +250,7 @@ public class BusinessAgentBgmxzController {
248 250
 		Map<String, Object> map = new HashMap<String, Object>();
249 251
 
250 252
 		try {
251
-			JSONArray json = JSONArray.fromObject(fcbgzData);
253
+			JSONArray json = JSONArray.parseArray(fcbgzData);
252 254
 			if (json.size() > 0) {
253 255
 				BusinessAgentBgmxz bgmxz = null;
254 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 11
 import javax.servlet.http.HttpServletRequest;
12 12
 
13 13
 import com.alibaba.fastjson.JSON;
14
+import com.alibaba.fastjson.JSONArray;
15
+import com.alibaba.fastjson.JSONObject;
14 16
 import com.chinaitop.utils.HTTPUtils;
15 17
 import org.springframework.http.MediaType;
16 18
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -33,8 +35,6 @@ import io.swagger.annotations.Api;
33 35
 import io.swagger.annotations.ApiImplicitParam;
34 36
 import io.swagger.annotations.ApiImplicitParams;
35 37
 import io.swagger.annotations.ApiOperation;
36
-import net.sf.json.JSONArray;
37
-import net.sf.json.JSONObject;
38 38
 
39 39
 @RestController
40 40
 @RequestMapping(value = "/agentHc")
@@ -225,7 +225,7 @@ public class AgentHcController {
225 225
 	@ApiImplicitParams({
226 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 230
 		Map<String, Object> paramMap = new HashMap<String, Object>();
231 231
 
@@ -237,8 +237,10 @@ public class AgentHcController {
237 237
         Map<String, Object> dataMap = new HashMap<String, Object>();
238 238
         dataMap.put("datas",str);
239 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 246
     @RequestMapping(value="/editHcCrkRecordData", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
@@ -253,7 +255,7 @@ public class AgentHcController {
253 255
 		Map<String, Object> map = new HashMap<String, Object>();
254 256
 
255 257
 		try {
256
-			JSONArray json = JSONArray.fromObject(hcCrkRecordData);
258
+			JSONArray json = JSONArray.parseArray(hcCrkRecordData);
257 259
 			if (json.size() > 0) {
258 260
 				BusinessAgentHc agentHc = null;
259 261
 				for (int i = 0; i < json.size(); i++) {
@@ -279,7 +281,7 @@ public class AgentHcController {
279 281
 					agentHc.setGrainNumber(job.get("count")+"");
280 282
 					agentHc.setStorehouseId(houseId);
281 283
 					agentHc.setWarehouseId(wareId);
282
-					Date crk_time = ParameterUtil.string2date(job.get("rq")+"");
284
+					Date crk_time = ParameterUtil.string2datetime(job.get("rq")+"");
283 285
 					agentHc.setCrkTime(crk_time);
284 286
 					agentHc.setCreateTime(new Date());
285 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 11
 import javax.servlet.http.HttpServletRequest;
12 12
 
13 13
 import com.alibaba.fastjson.JSON;
14
+import com.alibaba.fastjson.JSONArray;
15
+import com.alibaba.fastjson.JSONObject;
14 16
 import com.chinaitop.utils.HTTPUtils;
15 17
 import org.springframework.http.MediaType;
16 18
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -33,8 +35,6 @@ import io.swagger.annotations.Api;
33 35
 import io.swagger.annotations.ApiImplicitParam;
34 36
 import io.swagger.annotations.ApiImplicitParams;
35 37
 import io.swagger.annotations.ApiOperation;
36
-import net.sf.json.JSONArray;
37
-import net.sf.json.JSONObject;
38 38
 
39 39
 @RestController
40 40
 @RequestMapping(value = "/agentQc")
@@ -225,7 +225,7 @@ public class AgentQcController {
225 225
 	@ApiImplicitParams({
226 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 230
 		Map<String, Object> paramMap = new HashMap<String, Object>();
231 231
 
@@ -237,8 +237,10 @@ public class AgentQcController {
237 237
         Map<String, Object> dataMap = new HashMap<String, Object>();
238 238
         dataMap.put("datas",str);
239 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 246
     @RequestMapping(value="/editQcCrkRecordData", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
@@ -251,9 +253,8 @@ public class AgentQcController {
251 253
 	public Map<String, Object> editQcCrkRecordData(String qcCrkRecordData, Integer orgId, String realName) {
252 254
 
253 255
 		Map<String, Object> map = new HashMap<String, Object>();
254
-
255 256
 		try {
256
-			JSONArray json = JSONArray.fromObject(qcCrkRecordData);
257
+			JSONArray json = JSONArray.parseArray(qcCrkRecordData);
257 258
 			if (json.size() > 0) {
258 259
 				BusinessAgentQc agentQc = null;
259 260
 				for (int i = 0; i < json.size(); i++) {
@@ -284,7 +285,7 @@ public class AgentQcController {
284 285
 					agentQc.setGrainNumber(job.get("count")+"");
285 286
 					agentQc.setStorehouseId(houseId);
286 287
 					agentQc.setWarehouseId(wareId);
287
-					Date crk_time = ParameterUtil.string2date(job.get("rq")+"");
288
+					Date crk_time = ParameterUtil.string2datetime(job.get("rq")+"");
288 289
 					agentQc.setCrkTime(crk_time);
289 290
 					agentQc.setCreateTime(new Date());
290 291
 					agentQc.setSjly(1);

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

@@ -466,7 +466,7 @@
466 466
     	c.qccrk_tbsj modifydate
467 467
     FROM business_agent_depot a
468 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 470
 	WHERE a.depot_id != 0 AND b.storehouse_id IS NOT NULL AND c.warehouse_id IS NOT NULL 
471 471
 	<if test="orgId != null">
472 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 9
 import javax.annotation.Resource;
10 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 15
 import org.springframework.http.MediaType;
13 16
 import org.springframework.web.bind.annotation.RequestMapping;
14 17
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -32,8 +35,6 @@ import io.swagger.annotations.Api;
32 35
 import io.swagger.annotations.ApiImplicitParam;
33 36
 import io.swagger.annotations.ApiImplicitParams;
34 37
 import io.swagger.annotations.ApiOperation;
35
-import net.sf.json.JSONArray;
36
-import net.sf.json.JSONObject;
37 38
 
38 39
 @RestController
39 40
 @RequestMapping(value = "/agentNumber")
@@ -222,7 +223,7 @@ public class AgentNumberController {
222 223
 		Map<String, Object> map = new HashMap<String, Object>();
223 224
 
224 225
 		try {
225
-			JSONArray json = JSONArray.fromObject(kcswData);
226
+			JSONArray json = JSONArray.parseArray(kcswData);
226 227
 			if (json.size() > 0) {
227 228
 				BusinessAgentNumber agentNumber = null;
228 229
 				for (int i = 0; i < json.size(); i++) {