|
@@ -64,19 +64,19 @@ public class JsonChangeUtils implements ApplicationContextAware{
|
|
|
// "'56' as lineAttributeString3,'78' as lineAttributeString4,cbMemo as lineAttributeString5 " +
|
|
// "'56' as lineAttributeString3,'78' as lineAttributeString4,cbMemo as lineAttributeString5 " +
|
|
|
// "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("headerAttributeString6")+"' as MOID,'"+map.get("accId")+"' as 'accId'" +
|
|
|
|
|
- ",'"+map.get("poNum")+"' as poNum,'N0201002142' as 'customerItemCode','35%棉65%涤 平纹汗布' as 'itemName','' 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','cfree4' as 'attributeCode4'," +
|
|
|
|
|
- "mo.iQuantity as 'customerDemandQty',mo.cUnitID as 'customerUomCode','"+map.get("customerDemandDate")+"' as 'customerDemandDate',mo.dArriveDate as 'customerPromiseDate'," +
|
|
|
|
|
|
|
+ String sql = "select mo.iVouchRowNo as 'poLineNum',mo.MODetailsID as MODetailsID,mo.MODetailsID as 'moDetailId'," +
|
|
|
|
|
+ "'' as receivingInventoryOrgCode,'"+map.get("headerAttributeString6")+"' as MOID,'"+map.get("accId")+"' as 'accId'," +
|
|
|
|
|
+ "'"+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'," +
|
|
|
|
|
+ "mo.cFree4 as 'attributeValue4','cfree1' as 'attributeCode1','cfree2' as 'attributeCode2','cfree3' as 'attributeCode3'," +
|
|
|
|
|
+ "'cfree4' as 'attributeCode4',mo.iQuantity as 'customerDemandQty',mo.cUnitID as 'customerUomCode'," +
|
|
|
|
|
+ "'"+map.get("customerDemandDate")+"' as 'customerDemandDate',mo.dArriveDate as 'customerPromiseDate'," +
|
|
|
"mo.iUnitPrice as 'customerPrice',(mo.iPerTaxRate/100) as 'lineTaxRate',mo.iMoney as 'amount'," +
|
|
"mo.iUnitPrice as 'customerPrice',(mo.iPerTaxRate/100) as 'lineTaxRate',mo.iMoney as 'amount'," +
|
|
|
"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',cFree1 as 'color','' as 'customerNumber','' as externalLineNum," +
|
|
|
|
|
- "'' as itemAttrId,'"+map.get("headerAttributeString6")+"' as poId " +
|
|
|
|
|
- " from OM_MODetails mo " +
|
|
|
|
|
- " left join Inventory inv " +
|
|
|
|
|
- " on mo.cInvCode = inv.cInvCode " +
|
|
|
|
|
|
|
+ "mo.cDefine30 as 'lineAttributeString4',mo.cbMemo as 'lineAttributeString5',mo.cDefine22 as lineAttributeString6,'' as lineAttributeString7,'' as lineAttributeString8," +
|
|
|
|
|
+ "cFree1 as 'color','' as 'customerNumber'," +
|
|
|
|
|
+ "'' as externalLineNum,'' as itemAttrId,'"+map.get("headerAttributeString6")+"' as poId from OM_MODetails mo " +
|
|
|
|
|
+ "left join Inventory inv on mo.cInvCode = inv.cInvCode"+
|
|
|
" where mo.MOID = "+map.get("headerAttributeString6");
|
|
" where mo.MOID = "+map.get("headerAttributeString6");
|
|
|
List<Map<String, Object>> list = senYuDataSourceOne.queryForList(sql);
|
|
List<Map<String, Object>> list = senYuDataSourceOne.queryForList(sql);
|
|
|
//子表转JSON
|
|
//子表转JSON
|
|
@@ -123,18 +123,17 @@ public class JsonChangeUtils implements ApplicationContextAware{
|
|
|
// "iSum as lineTotalPrice,'' as smallPo,'' as packId,'' as distributionPoint,'' as dyeFactoryCode,cbMemo as cbMemo " +
|
|
// "iSum as lineTotalPrice,'' as smallPo,'' as packId,'' as distributionPoint,'' as dyeFactoryCode,cbMemo as cbMemo " +
|
|
|
// "from PO_Podetails where POID = '"+map.get("POID")+"'";
|
|
// "from PO_Podetails where POID = '"+map.get("POID")+"'";
|
|
|
|
|
|
|
|
- String sql ="select '903' as 'accId',mo.iVouchRowNo as 'poLineNum',ID as 'moDetailId','"+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',mo.cFree4 as 'attributeValue4','cfree1' as 'attributeCode1'," +
|
|
|
|
|
- "'cfree2' as 'attributeCode2','cfree3' as 'attributeCode3','cfree4' as 'attributeCode4'," +
|
|
|
|
|
- "mo.iQuantity as 'customerDemandQty',mo.cUnitID as 'customerUomCode','"+map.get("customerDemandDate")+"' as 'customerDemandDate',mo.dArriveDate as 'customerPromiseDate'," +
|
|
|
|
|
- "mo.iUnitPrice as 'customerPrice',(mo.iPerTaxRate/100) as 'lineTaxRate',mo.iMoney as 'amount'," +
|
|
|
|
|
- "'' as 'lineAttributeString1','' as 'lineAttributeString2','' as 'lineAttributeString3','' as 'attributeString1'," +
|
|
|
|
|
- "'' as 'lineAttributeString4','' as 'color','' as 'externalLineNum',0 as 'itemAttrId' " +
|
|
|
|
|
- "from PO_Podetails mo " +
|
|
|
|
|
- "left join Inventory inv " +
|
|
|
|
|
- "on mo.cInvCode = inv.cInvCode "+
|
|
|
|
|
- "where mo.POID = '"+map.get("MOID")+"'";
|
|
|
|
|
|
|
+ String sql ="select '"+map.get("accId")+"' as 'accId',mo.iVouchRowNo as 'poLineNum',ID as 'moDetailId','"+map.get("poNum")+"' as poNum," +
|
|
|
|
|
+ "mo.cInvCode as 'customerItemCode',inv.cInvName as 'itemName','' as 'poLineStatus'," +
|
|
|
|
|
+ "'' as receivingInventoryOrgCode,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','cfree4' as 'attributeCode4',mo.iQuantity as 'customerDemandQty',mo.cUnitID as 'customerUomCode'," +
|
|
|
|
|
+ "'"+map.get("customerDemandDate")+"' as 'customerDemandDate',mo.dArriveDate as 'customerPromiseDate'," +
|
|
|
|
|
+ "mo.iUnitPrice as 'customerPrice',(mo.iPerTaxRate/100) as 'lineTaxRate',mo.iMoney as 'amount','' as 'lineAttributeString1'," +
|
|
|
|
|
+ "'' as 'lineAttributeString2','' as 'lineAttributeString3','' as 'attributeString1','' as 'lineAttributeString4'," +
|
|
|
|
|
+ "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"+
|
|
|
|
|
+ "where mo.POID = '"+map.get("headerAttributeString6")+"'";
|
|
|
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);
|
|
@@ -245,12 +244,13 @@ public class JsonChangeUtils implements ApplicationContextAware{
|
|
|
// "'' as outsourceAttributeString3,'' as iUnitQuantity " +
|
|
// "'' as outsourceAttributeString3,'' as iUnitQuantity " +
|
|
|
// " from OM_MOMaterials where MOMaterialsID = "+map.get("MODetailsID");
|
|
// " from OM_MOMaterials where MOMaterialsID = "+map.get("MODetailsID");
|
|
|
|
|
|
|
|
- String sql1 = "select '903' as accId,'"+map.get("MOID")+"' as poId,'"+map.get("poNum")+"' as poNum,'N0201002142' as 'customerItemCode','' as 'itemAttrId','cfree1' as attributeCode1," +
|
|
|
|
|
- "'cfree2' as attributeCode2,'cfree3' as attributeCode3,'cfree4' as attributeCode4,cFree1 as attributeValue1,cFree2 as attributeValue2," +
|
|
|
|
|
- "cFree3 as attributeValue3,cFree4 as attributeValue4,'' as 'customerUomId','' as customerUomCode,0 as customerPromiseQty," +
|
|
|
|
|
- " cDefine25 as outsourceAttributeString1,cDefine24 as 'outsourceAttributeString2'," +
|
|
|
|
|
- "cDefine27 as 'outsourceAttributeString3' from OM_MOMaterials " +
|
|
|
|
|
- "where MODetailsID = '"+map.get("MODetailsID")+"'";
|
|
|
|
|
|
|
+ String sql1 = "select '"+map.get("accId")+"' as accId,'"+map.get("MOID")+"' as poId,'"+map.get("poNum")+"' as poNum," +
|
|
|
|
|
+ "'N0201002142' as 'customerItemCode','' as 'itemAttrId','cfree1' as attributeCode1,'' as customerItemId," +
|
|
|
|
|
+ "'cfree2' as attributeCode2,'cfree3' as attributeCode3,'cfree4' as attributeCode4,'' as poOutsourceId," +
|
|
|
|
|
+ "''as poOutsourceNum,cFree1 as attributeValue1,cFree2 as attributeValue2,cFree3 as attributeValue3," +
|
|
|
|
|
+ "cFree4 as attributeValue4,'' as 'customerUomId','' as customerUomCode,0 as customerPromiseQty, " +
|
|
|
|
|
+ "cDefine25 as outsourceAttributeString1,cDefine24 as 'outsourceAttributeString2',cDefine27 as 'outsourceAttributeString3'" +
|
|
|
|
|
+ " from OM_MOMaterials where MODetailsID = '"+map.get("MODetailsID")+"'";
|
|
|
List<Map<String, Object>> list = senYuDataSourceOne.queryForList(sql1);
|
|
List<Map<String, Object>> list = senYuDataSourceOne.queryForList(sql1);
|
|
|
//子表转JSON
|
|
//子表转JSON
|
|
|
List<JSONObject> json = toListJson(list);
|
|
List<JSONObject> json = toListJson(list);
|