|
@@ -462,7 +462,11 @@ public class FbsWorkingStatisticsController {
|
|
|
|
|
|
if(entity.getState().equals("1")){
|
|
|
|
|
|
- saveU8(entity,workshopDispatchList,allHors);
|
|
|
+ Map<String,Object> map=saveU8(entity,workshopDispatchList,allHors);
|
|
|
+ Object objects=map.get("result");
|
|
|
+ res.setCode("0");
|
|
|
+ res.setMsg(objects.toString());
|
|
|
+ return new ResponseEntity<ResHttpStatus>(res, HttpStatus.OK);
|
|
|
}
|
|
|
|
|
|
res.setCode("0");
|
|
@@ -472,14 +476,15 @@ public class FbsWorkingStatisticsController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- public void saveU8(FbsWorkingStatistics entity,FbsWorkshopDispatchList workshopDispatchList,BigDecimal allHors){
|
|
|
+ public Map<String, Object> saveU8(FbsWorkingStatistics entity,FbsWorkshopDispatchList workshopDispatchList,BigDecimal allHors){
|
|
|
+ Map<String, Object> mapR=new LinkedHashMap<>();
|
|
|
if(StringUtils.isNotBlank(entity.getBatchCode())){
|
|
|
String[] batchCodes=entity.getBatchCode().split(",");
|
|
|
List<Map<String,Object>> mapList=new ArrayList<>();
|
|
|
for(String batchCode:batchCodes){
|
|
|
|
|
|
Map<String,Object> itemMap=new LinkedHashMap<>();
|
|
|
- itemMap.put("CINVCODE",entity.getMaterielCode());
|
|
|
+ itemMap.put("CINVCODE",workshopDispatchList.getProductId());
|
|
|
itemMap.put("IQUANTITY",entity.getQualifiedNumber());
|
|
|
itemMap.put("MOCODE",workshopDispatchList.getProductionOrderNumberName());
|
|
|
itemMap.put("MOROWMO",entity.getRowNumber());
|
|
@@ -494,7 +499,12 @@ public class FbsWorkingStatisticsController {
|
|
|
}
|
|
|
|
|
|
Map<String,Object> map=new LinkedHashMap<>();
|
|
|
- map.put("CVOUCHCODE",UUID.randomUUID());
|
|
|
+ map.put("CSTORENAME","100");
|
|
|
+ Random random = new Random();
|
|
|
+ int nextInt = random.nextInt(9000000);
|
|
|
+ nextInt=nextInt+1000000;
|
|
|
+ String str=nextInt+"";
|
|
|
+ map.put("CVOUCHCODE",str);
|
|
|
Date date=new Date();
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
map.put("DDATE",sdf.format(date));
|
|
@@ -504,9 +514,9 @@ public class FbsWorkingStatisticsController {
|
|
|
map.put("CRDCODE","103");
|
|
|
map.put("DETAILList",mapList);
|
|
|
|
|
|
- getWebService(map);
|
|
|
+ mapR=getWebService(map);
|
|
|
}
|
|
|
-
|
|
|
+ return mapR;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -515,9 +525,11 @@ public class FbsWorkingStatisticsController {
|
|
|
|
|
|
|
|
|
String jsonObject = JSONUtils.toJSONString(mapR);
|
|
|
+ System.out.println(jsonObject);
|
|
|
|
|
|
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
|
|
|
- Client client = dcf.createClient("http://10.1.191.191:8090/WebService.asmx");
|
|
|
+
|
|
|
+ Client client = dcf.createClient("http://47.103.119.148:8090/WebService.asmx?WSDL");
|
|
|
|
|
|
|
|
|
|
|
@@ -527,6 +539,8 @@ public class FbsWorkingStatisticsController {
|
|
|
|
|
|
Object[] objects = client.invoke(name, jsonObject);
|
|
|
map.put("result", objects);
|
|
|
+ System.out.println(map.get("result"));
|
|
|
+ System.out.println(Arrays.toString(objects));
|
|
|
return map;
|
|
|
} catch (java.lang.Exception e) {
|
|
|
e.printStackTrace();
|
|
@@ -923,6 +937,7 @@ public class FbsWorkingStatisticsController {
|
|
|
*/
|
|
|
@GetMapping(value = "/getByMaterial")
|
|
|
public Result<Map<String,Object>> getByMaterial(String type){
|
|
|
+
|
|
|
Result<Map<String,Object>> result=new Result<>();
|
|
|
try {
|
|
|
String dateString="%Y-%m";
|
|
@@ -940,6 +955,48 @@ public class FbsWorkingStatisticsController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ public Map<String,Object> ceshi(){
|
|
|
+ List<Map<String,Object>> mapList=new ArrayList<>();
|
|
|
+
|
|
|
+ Map<String,Object> itemMap=new LinkedHashMap<>();
|
|
|
+ itemMap.put("CINVCODE","660001155");
|
|
|
+ itemMap.put("IQUANTITY","1");
|
|
|
+ itemMap.put("MOCODE","WO20090015");
|
|
|
+ itemMap.put("MOROWMO","1");
|
|
|
+ itemMap.put("CBATCH","1");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ mapList.add(itemMap);
|
|
|
+
|
|
|
+ Map<String,Object> map=new LinkedHashMap<>();
|
|
|
+ map.put("CSTORENAME","100");
|
|
|
+
|
|
|
+
|
|
|
+ Random random = new Random();
|
|
|
+ int nextInt = random.nextInt(9000000);
|
|
|
+ nextInt=nextInt+1000000;
|
|
|
+ String str=nextInt+"";
|
|
|
+ map.put("CVOUCHCODE",str);
|
|
|
+ Date date=new Date();
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ map.put("DDATE",sdf.format(date));
|
|
|
+ map.put("CWHCODE","01");
|
|
|
+ map.put("CDEPCODE","07");
|
|
|
+ map.put("CMAKER","AA");
|
|
|
+ map.put("CRDCODE","103");
|
|
|
+ map.put("DETAILList",mapList);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ getWebService(map);
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
map.put("d", "44");
|