|
@@ -70,7 +70,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
|
|
// "from OM_MODetails where MOID = "+map.get("MOID");
|
|
// "from OM_MODetails where MOID = "+map.get("MOID");
|
|
//mo.cInvCode,inv.cInvName
|
|
//mo.cInvCode,inv.cInvName
|
|
String sql = "select mo.iVouchRowNo as 'poLineNum',mo.MODetailsID as MODetailsID,mo.MODetailsID as 'moDetailId','"+map.get("pkorg")+"' as pkorg," +
|
|
String sql = "select mo.iVouchRowNo as 'poLineNum',mo.MODetailsID as MODetailsID,mo.MODetailsID as 'moDetailId','"+map.get("pkorg")+"' as pkorg," +
|
|
- "'' as receivingInventoryOrgCode,'"+map.get("headerAttributeString6")+"' as MOID,'"+map.get("accId")+"' as 'accId'," +
|
|
|
|
|
|
+ "'' as receivingInventoryOrgCode,'"+map.get("moId")+"' as MOID,'"+map.get("accId")+"' as 'accId'," +
|
|
"'"+map.get("poNum")+"' as poNum,mo.cInvCode as 'customerItemCode',inv.cInvName as 'itemName'," +
|
|
"'"+map.get("poNum")+"' as poNum,mo.cInvCode as 'customerItemCode',inv.cInvName as 'itemName'," +
|
|
"'' as 'poLineStatus',mo.cFree1 as 'attributeValue1',mo.cFree2 as 'attributeValue2',mo.cFree3 as 'attributeValue3'," +
|
|
"'' as 'poLineStatus',mo.cFree1 as 'attributeValue1',mo.cFree2 as 'attributeValue2',mo.cFree3 as 'attributeValue3'," +
|
|
"mo.cFree4 as 'attributeValue4','cfree1' as 'attributeCode1','cfree2' as 'attributeCode2','cfree3' as 'attributeCode3'," +
|
|
"mo.cFree4 as 'attributeValue4','cfree1' as 'attributeCode1','cfree2' as 'attributeCode2','cfree3' as 'attributeCode3'," +
|
|
@@ -80,9 +80,9 @@ public class JsonChangeUtils implements ApplicationContextAware{
|
|
"mo.cDefine28 as 'lineAttributeString1',mo.cDefine32 as 'lineAttributeString2',mo.cDefine29 as 'lineAttributeString3'," +
|
|
"mo.cDefine28 as 'lineAttributeString1',mo.cDefine32 as 'lineAttributeString2',mo.cDefine29 as 'lineAttributeString3'," +
|
|
"mo.cDefine30 as 'lineAttributeString4',mo.cbMemo as 'lineAttributeString5',mo.cDefine22 as lineAttributeString6,'' as lineAttributeString7,'' as lineAttributeString8," +
|
|
"mo.cDefine30 as 'lineAttributeString4',mo.cbMemo as 'lineAttributeString5',mo.cDefine22 as lineAttributeString6,'' as lineAttributeString7,'' as lineAttributeString8," +
|
|
"cFree1 as 'color','' as 'customerNumber'," +
|
|
"cFree1 as 'color','' as 'customerNumber'," +
|
|
- "'' as externalLineNum,'' as itemAttrId,'"+map.get("headerAttributeString6")+"' as poId from OM_MODetails mo " +
|
|
|
|
|
|
+ "'' as externalLineNum,'' as itemAttrId,'"+map.get("moId")+"' as poId from OM_MODetails mo " +
|
|
"left join Inventory inv on mo.cInvCode = inv.cInvCode"+
|
|
"left join Inventory inv on mo.cInvCode = inv.cInvCode"+
|
|
- " where mo.MOID = "+map.get("headerAttributeString6");
|
|
|
|
|
|
+ " where mo.MOID = "+map.get("moId");
|
|
List<Map<String, Object>> list = senYuDataSourceOne.queryForList(sql);
|
|
List<Map<String, Object>> list = senYuDataSourceOne.queryForList(sql);
|
|
//子表转JSON
|
|
//子表转JSON
|
|
List<JSONObject> json = toMOListJson(list);
|
|
List<JSONObject> json = toMOListJson(list);
|
|
@@ -90,7 +90,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
|
|
|
|
|
|
}else if(map.get("pkorg").equals("two")){
|
|
}else if(map.get("pkorg").equals("two")){
|
|
String sql = "select mo.iVouchRowNo as 'poLineNum',mo.MODetailsID as MODetailsID,mo.MODetailsID as 'moDetailId','"+map.get("pkorg")+"' as pkorg," +
|
|
String sql = "select mo.iVouchRowNo as 'poLineNum',mo.MODetailsID as MODetailsID,mo.MODetailsID as 'moDetailId','"+map.get("pkorg")+"' as pkorg," +
|
|
- "'' as receivingInventoryOrgCode,'"+map.get("headerAttributeString6")+"' as MOID,'"+map.get("accId")+"' as 'accId'," +
|
|
|
|
|
|
+ "'' as receivingInventoryOrgCode,'"+map.get("moId")+"' as MOID,'"+map.get("accId")+"' as 'accId'," +
|
|
"'"+map.get("poNum")+"' as poNum,mo.cInvCode as 'customerItemCode',inv.cInvName as 'itemName'," +
|
|
"'"+map.get("poNum")+"' as poNum,mo.cInvCode as 'customerItemCode',inv.cInvName as 'itemName'," +
|
|
"'' as 'poLineStatus',mo.cFree1 as 'attributeValue1',mo.cFree2 as 'attributeValue2',mo.cFree3 as 'attributeValue3'," +
|
|
"'' as 'poLineStatus',mo.cFree1 as 'attributeValue1',mo.cFree2 as 'attributeValue2',mo.cFree3 as 'attributeValue3'," +
|
|
"mo.cFree4 as 'attributeValue4','cfree1' as 'attributeCode1','cfree2' as 'attributeCode2','cfree3' as 'attributeCode3'," +
|
|
"mo.cFree4 as 'attributeValue4','cfree1' as 'attributeCode1','cfree2' as 'attributeCode2','cfree3' as 'attributeCode3'," +
|
|
@@ -100,9 +100,9 @@ public class JsonChangeUtils implements ApplicationContextAware{
|
|
"mo.cDefine28 as 'lineAttributeString1',mo.cDefine32 as 'lineAttributeString2',mo.cDefine29 as 'lineAttributeString3'," +
|
|
"mo.cDefine28 as 'lineAttributeString1',mo.cDefine32 as 'lineAttributeString2',mo.cDefine29 as 'lineAttributeString3'," +
|
|
"mo.cDefine30 as 'lineAttributeString4',mo.cbMemo as 'lineAttributeString5',mo.cDefine22 as lineAttributeString6,'' as lineAttributeString7,'' as lineAttributeString8," +
|
|
"mo.cDefine30 as 'lineAttributeString4',mo.cbMemo as 'lineAttributeString5',mo.cDefine22 as lineAttributeString6,'' as lineAttributeString7,'' as lineAttributeString8," +
|
|
"cFree1 as 'color','' as 'customerNumber'," +
|
|
"cFree1 as 'color','' as 'customerNumber'," +
|
|
- "'' as externalLineNum,'' as itemAttrId,'"+map.get("headerAttributeString6")+"' as poId from OM_MODetails mo " +
|
|
|
|
|
|
+ "'' as externalLineNum,'' as itemAttrId,'"+map.get("moId")+"' as poId from OM_MODetails mo " +
|
|
"left join Inventory inv on mo.cInvCode = inv.cInvCode"+
|
|
"left join Inventory inv on mo.cInvCode = inv.cInvCode"+
|
|
- " where mo.MOID = "+map.get("headerAttributeString6");
|
|
|
|
|
|
+ " where mo.MOID = "+map.get("moId");
|
|
List<Map<String, Object>> list = senYuDataSourceTwo.queryForList(sql);
|
|
List<Map<String, Object>> list = senYuDataSourceTwo.queryForList(sql);
|
|
//子表转JSON
|
|
//子表转JSON
|
|
List<JSONObject> json = toMOListJson(list);
|
|
List<JSONObject> json = toMOListJson(list);
|
|
@@ -110,7 +110,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
|
|
|
|
|
|
}else if(map.get("pkorg").equals("three")){
|
|
}else if(map.get("pkorg").equals("three")){
|
|
String sql = "select mo.iVouchRowNo as 'poLineNum',mo.MODetailsID as MODetailsID,mo.MODetailsID as 'moDetailId','"+map.get("pkorg")+"' as pkorg," +
|
|
String sql = "select mo.iVouchRowNo as 'poLineNum',mo.MODetailsID as MODetailsID,mo.MODetailsID as 'moDetailId','"+map.get("pkorg")+"' as pkorg," +
|
|
- "'' as receivingInventoryOrgCode,'"+map.get("headerAttributeString6")+"' as MOID,'"+map.get("accId")+"' as 'accId'," +
|
|
|
|
|
|
+ "'' as receivingInventoryOrgCode,'"+map.get("moId")+"' as MOID,'"+map.get("accId")+"' as 'accId'," +
|
|
"'"+map.get("poNum")+"' as poNum,mo.cInvCode as 'customerItemCode',inv.cInvName as 'itemName'," +
|
|
"'"+map.get("poNum")+"' as poNum,mo.cInvCode as 'customerItemCode',inv.cInvName as 'itemName'," +
|
|
"'' as 'poLineStatus',mo.cFree1 as 'attributeValue1',mo.cFree2 as 'attributeValue2',mo.cFree3 as 'attributeValue3'," +
|
|
"'' as 'poLineStatus',mo.cFree1 as 'attributeValue1',mo.cFree2 as 'attributeValue2',mo.cFree3 as 'attributeValue3'," +
|
|
"mo.cFree4 as 'attributeValue4','cfree1' as 'attributeCode1','cfree2' as 'attributeCode2','cfree3' as 'attributeCode3'," +
|
|
"mo.cFree4 as 'attributeValue4','cfree1' as 'attributeCode1','cfree2' as 'attributeCode2','cfree3' as 'attributeCode3'," +
|
|
@@ -120,9 +120,9 @@ public class JsonChangeUtils implements ApplicationContextAware{
|
|
"mo.cDefine28 as 'lineAttributeString1',mo.cDefine32 as 'lineAttributeString2',mo.cDefine29 as 'lineAttributeString3'," +
|
|
"mo.cDefine28 as 'lineAttributeString1',mo.cDefine32 as 'lineAttributeString2',mo.cDefine29 as 'lineAttributeString3'," +
|
|
"mo.cDefine30 as 'lineAttributeString4',mo.cbMemo as 'lineAttributeString5',mo.cDefine22 as lineAttributeString6,'' as lineAttributeString7,'' as lineAttributeString8," +
|
|
"mo.cDefine30 as 'lineAttributeString4',mo.cbMemo as 'lineAttributeString5',mo.cDefine22 as lineAttributeString6,'' as lineAttributeString7,'' as lineAttributeString8," +
|
|
"cFree1 as 'color','' as 'customerNumber'," +
|
|
"cFree1 as 'color','' as 'customerNumber'," +
|
|
- "'' as externalLineNum,'' as itemAttrId,'"+map.get("headerAttributeString6")+"' as poId from OM_MODetails mo " +
|
|
|
|
|
|
+ "'' as externalLineNum,'' as itemAttrId,'"+map.get("moId")+"' as poId from OM_MODetails mo " +
|
|
"left join Inventory inv on mo.cInvCode = inv.cInvCode"+
|
|
"left join Inventory inv on mo.cInvCode = inv.cInvCode"+
|
|
- " where mo.MOID = "+map.get("headerAttributeString6");
|
|
|
|
|
|
+ " where mo.MOID = "+map.get("moId");
|
|
List<Map<String, Object>> list = iSenYuDataSourceThree.queryForList(sql);
|
|
List<Map<String, Object>> list = iSenYuDataSourceThree.queryForList(sql);
|
|
//子表转JSON
|
|
//子表转JSON
|
|
List<JSONObject> json = toMOListJson(list);
|
|
List<JSONObject> json = toMOListJson(list);
|
|
@@ -180,7 +180,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
|
|
"'' as 'lineAttributeString2','' as 'lineAttributeString3','' as 'attributeString1','' as 'lineAttributeString4'," +
|
|
"'' as 'lineAttributeString2','' as 'lineAttributeString3','' as 'attributeString1','' as 'lineAttributeString4'," +
|
|
"mo.cbMemo as 'lineAttributeString5',mo.cDefine22 as lineAttributeString6,'' as lineAttributeString7,'' as lineAttributeString8,'' as 'color'," +
|
|
"mo.cbMemo as 'lineAttributeString5',mo.cDefine22 as lineAttributeString6,'' as lineAttributeString7,'' as lineAttributeString8,'' as 'color'," +
|
|
"'' as 'externalLineNum',0 as 'itemAttrId' from PO_Podetails mo left join Inventory inv on mo.cInvCode = inv.cInvCode"+
|
|
"'' as 'externalLineNum',0 as 'itemAttrId' from PO_Podetails mo left join Inventory inv on mo.cInvCode = inv.cInvCode"+
|
|
- " where mo.POID = '"+map.get("headerAttributeString6")+"'";
|
|
|
|
|
|
+ " where mo.POID = '"+map.get("moId")+"'";
|
|
List<Map<String, Object>> list = senYuDataSourceOne.queryForList(sql);
|
|
List<Map<String, Object>> list = senYuDataSourceOne.queryForList(sql);
|
|
//子表转JSON
|
|
//子表转JSON
|
|
List<JSONObject> json = toListJson(list);
|
|
List<JSONObject> json = toListJson(list);
|
|
@@ -196,7 +196,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
|
|
"'' as 'lineAttributeString2','' as 'lineAttributeString3','' as 'attributeString1','' as 'lineAttributeString4'," +
|
|
"'' as 'lineAttributeString2','' as 'lineAttributeString3','' as 'attributeString1','' as 'lineAttributeString4'," +
|
|
"mo.cbMemo as 'lineAttributeString5',mo.cDefine22 as lineAttributeString6,'' as lineAttributeString7,'' as lineAttributeString8,'' as 'color'," +
|
|
"mo.cbMemo as 'lineAttributeString5',mo.cDefine22 as lineAttributeString6,'' as lineAttributeString7,'' as lineAttributeString8,'' as 'color'," +
|
|
"'' as 'externalLineNum',0 as 'itemAttrId' from PO_Podetails mo left join Inventory inv on mo.cInvCode = inv.cInvCode"+
|
|
"'' as 'externalLineNum',0 as 'itemAttrId' from PO_Podetails mo left join Inventory inv on mo.cInvCode = inv.cInvCode"+
|
|
- " where mo.POID = '"+map.get("headerAttributeString6")+"'";
|
|
|
|
|
|
+ " where mo.POID = '"+map.get("moId")+"'";
|
|
List<Map<String, Object>> list = senYuDataSourceTwo.queryForList(sql);
|
|
List<Map<String, Object>> list = senYuDataSourceTwo.queryForList(sql);
|
|
//子表转JSON
|
|
//子表转JSON
|
|
List<JSONObject> json = toListJson(list);
|
|
List<JSONObject> json = toListJson(list);
|
|
@@ -213,7 +213,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
|
|
"'' as 'lineAttributeString2','' as 'lineAttributeString3','' as 'attributeString1','' as 'lineAttributeString4'," +
|
|
"'' as 'lineAttributeString2','' as 'lineAttributeString3','' as 'attributeString1','' as 'lineAttributeString4'," +
|
|
"mo.cbMemo as 'lineAttributeString5',mo.cDefine22 as lineAttributeString6,'' as lineAttributeString7,'' as lineAttributeString8,'' as 'color'," +
|
|
"mo.cbMemo as 'lineAttributeString5',mo.cDefine22 as lineAttributeString6,'' as lineAttributeString7,'' as lineAttributeString8,'' as 'color'," +
|
|
"'' as 'externalLineNum',0 as 'itemAttrId' from PO_Podetails mo left join Inventory inv on mo.cInvCode = inv.cInvCode"+
|
|
"'' as 'externalLineNum',0 as 'itemAttrId' from PO_Podetails mo left join Inventory inv on mo.cInvCode = inv.cInvCode"+
|
|
- " where mo.POID = '"+map.get("headerAttributeString6")+"'";
|
|
|
|
|
|
+ " where mo.POID = '"+map.get("moId")+"'";
|
|
List<Map<String, Object>> list = iSenYuDataSourceThree.queryForList(sql);
|
|
List<Map<String, Object>> list = iSenYuDataSourceThree.queryForList(sql);
|
|
//子表转JSON
|
|
//子表转JSON
|
|
List<JSONObject> json = toListJson(list);
|
|
List<JSONObject> json = toListJson(list);
|