csjoz11

导航

SAP单例

SELECT a.order_id,substring_index(group_concat(a.order_id ORDER BY a.order_id DESC),",",1) AS id FROM extend a left JOIN sfc b on a.order_bo like "%9999%"  GROUP BY a.order_id;
 
dynamicQuery.append("  SELECT DISTINCT RFID.SFC,A.DATA_VALUE,RFID.RESOURCE,RFID.FX_SFC,TO_CHAR(RFID.PARTITION_DATE ,'YYYY-MM-DD HH:mm:ss') AS PARTITION_DATE  ");
        dynamicQuery.append("  FROM WIP.Z_PUSHLET_RFID_SFC_EVENT RFID ");
        dynamicQuery.append("  INNER JOIN WIP.DATA_FIELD_LIST A ON RFID.RESOURCE=A.DATA_TAG AND DATA_FIELD_BO='DataFieldBO:1000,FXSFC_OP' ");
        dynamicQuery.append("  LEFT JOIN WIP.OPERATION OP ON A.DATA_VALUE=OP.OPERATION");
        dynamicQuery.append("  LEFT JOIN WIP.SFC_ASSY ASSY ON 'SFCBOMBO:SFCBO:1000,'||RFID.SFC=ASSY.SFC_BOM_BO AND OP.HANDLE=ASSY.OPERATION_BO AND ASSY_DATA_TYPE_BO LIKE '%SFC%' ");
        dynamicQuery.append("  WHERE ASSY.INVENTORY_BO IS NULL");
        dynamicQuery.append("  AND RFID.FX_SFC IS NOT NULL");
        dynamicQuery.append("   AND RFID.FX_SFC<>''  ORDER  BY   RFID.PARTITION_DATE  DESC");


    /**
     * 
     * @Description: 获取物料描述信息
     * @param itemRef
     * @return
     * @throws Exception
     */
    @WebMethod
    public String getItemInfos(@WebParam(name = "itemRef") String itemRef) throws Exception {
        DataCoreServiceInterface dataCoreService = Services.getService("com.sapdev.service", "DataCoreService", "1000");
        StringBuffer stringBuffer = new StringBuffer();
        stringBuffer.append(" SELECT I.DESCRIPTION ");
        stringBuffer.append(" FROM WIP.ITEM I WHERE I.CURRENT_REVISION = 'true' AND I.SITE = '1000' AND I.ITEM = '" + itemRef + "'");
        List<Map<String, Object>> itemInfos = dataCoreService.getResultByTSQL(stringBuffer.toString(), new HashMap<String, Object>());
        JSONObject jsonObject = new JSONObject();
        if (!itemInfos.isEmpty()) {
            jsonObject.put("ITEM_DESCRIPTION", itemInfos.get(0).get("DESCRIPTION"));
        } else {
            jsonObject.put("ITEM_DESCRIPTION", "");
        }
        return jsonObject.toString();
    }

posted on 2021-11-18 08:58  csjoz11  阅读(46)  评论(0编辑  收藏  举报