|
|
@@ -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);
|